From ab2e120e3a8e80bfa3bd040bf34264cbb7f3e57d Mon Sep 17 00:00:00 2001 From: David Freese Date: Wed, 11 Apr 2012 17:39:29 -0500 Subject: [PATCH] FTextView * Fix for compiling against FLTK-1.1.10 --- src/widgets/FTextView.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/widgets/FTextView.cxx b/src/widgets/FTextView.cxx index a21f9c1..aaf3e0d 100644 --- a/src/widgets/FTextView.cxx +++ b/src/widgets/FTextView.cxx @@ -61,9 +61,16 @@ using namespace std; /// @param w /// @param h /// @param l + +#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 +FTextBase::FTextBase(int x, int y, int w, int h, const char *l) + : Fl_Text_Editor_mod(x, y, w, h, l), + wrap(true), wrap_col(80), max_lines(0), scroll_hint(false) +#else FTextBase::FTextBase(int x, int y, int w, int h, const char *l) : Fl_Text_Editor_mod(x, y, w, h, l), wrap(WRAP_AT_BOUNDS), wrap_col(80), max_lines(0), scroll_hint(false) +#endif { oldw = oldh = olds = -1; oldf = (Fl_Font)-1; @@ -141,9 +148,15 @@ void FTextBase::add(unsigned char c, int attr) void FTextBase::set_word_wrap(bool b) { +#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 + if ((wrap = b)) wrap_mode(true, 0); + else wrap_mode(false, 0); + show_insert_position(); +#else if ((wrap = b)) wrap_mode(WRAP_AT_BOUNDS, 0); else wrap_mode(WRAP_NONE, 0); show_insert_position(); +#endif } void FTextBase::setFont(Fl_Font f, int attr)