From 29a9e89b39c2fdc1f9498717f5ae53798528ffb1 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 26 Mar 2016 02:55:14 +0000 Subject: Remove FLTK_ABI_VERSION from all but *tree*.* and documentation. Everything related to Fl_Tree and its test and demo programs has been cleaned. Documentation needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Native_File_Chooser_WIN32.cxx | 9 ----- src/Fl_Table.cxx | 28 ---------------- src/Fl_Tabs.cxx | 6 ---- src/Fl_Text_Display.cxx | 64 ++++-------------------------------- 4 files changed, 6 insertions(+), 101 deletions(-) (limited to 'src') diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx index da425339a..7cd50e7dd 100644 --- a/src/Fl_Native_File_Chooser_WIN32.cxx +++ b/src/Fl_Native_File_Chooser_WIN32.cxx @@ -24,11 +24,6 @@ #ifndef FL_DOXYGEN // PREVENT DOXYGEN'S USE OF THIS FILE #include -#if FLTK_ABI_VERSION < 10304 -#define _ofn_ptr (&_ofn) -#define _binf_ptr (&_binf) -#endif - #include // malloc #include // sprintf #include @@ -133,10 +128,8 @@ static void dnullcat(char*&wp, const char *string, int n = -1 ) { Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { _btype = val; _options = NO_OPTIONS; -#if FLTK_ABI_VERSION >= 10304 _ofn_ptr = new OPENFILENAMEW; _binf_ptr = new BROWSEINFOW; -#endif memset((void*)_ofn_ptr, 0, sizeof(OPENFILENAMEW)); _ofn_ptr->lStructSize = sizeof(OPENFILENAMEW); _ofn_ptr->hwndOwner = 0L; @@ -167,10 +160,8 @@ Fl_Native_File_Chooser::~Fl_Native_File_Chooser() { clear_pathnames(); ClearOFN(); ClearBINF(); -#if FLTK_ABI_VERSION >= 10304 delete _binf_ptr; delete _ofn_ptr; -#endif } // SET TYPE OF BROWSER diff --git a/src/Fl_Table.cxx b/src/Fl_Table.cxx index b5fecc0d1..48541fada 100644 --- a/src/Fl_Table.cxx +++ b/src/Fl_Table.cxx @@ -128,12 +128,8 @@ Fl_Table::Fl_Table(int X, int Y, int W, int H, const char *l) : Fl_Group(X,Y,W,H current_row = -1; select_row = -1; select_col = -1; -#if FLTK_ABI_VERSION >= 10301 _scrollbar_size = 0; -#endif -#if FLTK_ABI_VERSION >= 10303 flags_ = 0; // TABCELLNAV off -#endif box(FL_THIN_DOWN_FRAME); vscrollbar = new Fl_Scrollbar(x()+w()-Fl::scrollbar_size(), y(), @@ -483,13 +479,7 @@ void Fl_Table::recalc_dimensions() { // First pass: can hide via window size? int hidev = (table_h <= tih); int hideh = (table_w <= tiw); -#if FLTK_ABI_VERSION >= 10301 - // NEW int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size(); -#else - // OLD - int scrollsize = Fl::scrollbar_size(); -#endif // Second pass: Check for interference if ( !hideh & hidev ) { hidev = (( table_h - tih + scrollsize ) <= 0 ); } if ( !hidev & hideh ) { hideh = (( table_w - tiw + scrollsize ) <= 0 ); } @@ -564,13 +554,7 @@ void Fl_Table::table_resized() { // Vertical scrollbar float vscrolltab = ( table_h == 0 || tih > table_h ) ? 1 : (float)tih / table_h; float hscrolltab = ( table_w == 0 || tiw > table_w ) ? 1 : (float)tiw / table_w; -#if FLTK_ABI_VERSION >= 10301 - // NEW int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size(); -#else - // OLD - int scrollsize = Fl::scrollbar_size(); -#endif vscrollbar->bounds(0, table_h-tih); vscrollbar->precision(10); vscrollbar->slider_size(vscrolltab); @@ -736,9 +720,7 @@ int Fl_Table::handle(int event) { int _event_x = Fl::event_x(); int _event_y = Fl::event_y(); int _event_key = Fl::event_key(); -#if FLTK_ABI_VERSION >= 10303 int _event_state = Fl::event_state(); -#endif Fl_Widget *_focus = Fl::focus(); switch ( event ) { case FL_PUSH: @@ -1036,7 +1018,6 @@ int Fl_Table::handle(int event) { ret = move_cursor(1, 0); break; case FL_Tab: -#if FLTK_ABI_VERSION >= 10303 if ( !tab_cell_nav() ) break; // not navigating cells? let fltk handle it (STR#2862) if ( _event_state & FL_SHIFT ) { ret = move_cursor(0, -1, 0); // shift-tab -> left @@ -1044,9 +1025,6 @@ int Fl_Table::handle(int event) { ret = move_cursor(0, 1, 0); // tab -> right } break; -#else - break; // without tab_cell_nav(), Fl_Table should default to navigating widgets, not cells -#endif } if (ret && Fl::focus() != this) { do_callback(CONTEXT_TABLE, -1, -1); @@ -1168,13 +1146,7 @@ void Fl_Table::set_selection(int row_top, int col_left, int row_bot, int col_rig // Then tell the group to draw over us. // void Fl_Table::draw() { -#if FLTK_ABI_VERSION >= 10301 - // NEW int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size(); -#else - // OLD - int scrollsize = Fl::scrollbar_size(); -#endif // Check if scrollbar size changed if ( ( vscrollbar && (scrollsize != vscrollbar->w()) ) || ( hscrollbar && (scrollsize != hscrollbar->h()) ) ) { diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 16b6426f5..f0117b431 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -461,12 +461,6 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) : Fl_Group(X,Y,W,H,l) { box(FL_THIN_UP_BOX); -#if FLTK_ABI_VERSION >= 10304 - // NEW (nothing) -#else - // OLD (init to prevent 'unused' warnings) -- STR #3169 - value_ = 0; // NOTE: this member unused -- STR #3169 -#endif push_ = 0; tab_pos = 0; tab_width = 0; diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index cfeb9d970..b696b0d3d 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -171,14 +171,12 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l) mContinuousWrap = 0; mWrapMarginPix = 0; mSuppressResync = mNLinesDeleted = mModifyingTabDistance = 0; -#if FLTK_ABI_VERSION >= 10303 linenumber_font_ = FL_HELVETICA; linenumber_size_ = FL_NORMAL_SIZE; linenumber_fgcolor_ = FL_INACTIVE_COLOR; linenumber_bgcolor_ = 53; // ~90% gray linenumber_align_ = FL_ALIGN_RIGHT; linenumber_format_ = strdup("%d"); -#endif } @@ -199,12 +197,10 @@ Fl_Text_Display::~Fl_Text_Display() { mBuffer->remove_predelete_callback(buffer_predelete_cb, this); } if (mLineStarts) delete[] mLineStarts; -#if FLTK_ABI_VERSION >= 10303 if (linenumber_format_) { free((void*)linenumber_format_); linenumber_format_ = 0; } -#endif } @@ -230,118 +226,78 @@ int Fl_Text_Display::linenumber_width() const { /** Set the font used for line numbers (if enabled). - \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher) + \version 1.3.3 ABI feature (ignored in 1.3.x unless FL_ABI_VERSION is 10303 or higher) */ void Fl_Text_Display::linenumber_font(Fl_Font val) { -#if FLTK_ABI_VERSION >= 10303 linenumber_font_ = val; -#else - // do nothing -#endif } /** Return the font used for line numbers (if enabled). */ Fl_Font Fl_Text_Display::linenumber_font() const { -#if FLTK_ABI_VERSION >= 10303 return linenumber_font_; -#else - return FL_HELVETICA; -#endif } /** Set the font size used for line numbers (if enabled). - \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher) + \version 1.3.3 ABI feature (ignored in 1.3.x unless FL_ABI_VERSION is 10303 or higher) */ void Fl_Text_Display::linenumber_size(Fl_Fontsize val) { -#if FLTK_ABI_VERSION >= 10303 linenumber_size_ = val; -#else - // do nothing -#endif } /** Return the font size used for line numbers (if enabled). */ Fl_Fontsize Fl_Text_Display::linenumber_size() const { -#if FLTK_ABI_VERSION >= 10303 return linenumber_size_; -#else - return FL_NORMAL_SIZE; -#endif } /** Set the foreground color used for line numbers (if enabled). - \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher) + \version 1.3.3 ABI feature (ignored in 1.3.x unless FL_ABI_VERSION is 10303 or higher) */ void Fl_Text_Display::linenumber_fgcolor(Fl_Color val) { -#if FLTK_ABI_VERSION >= 10303 linenumber_fgcolor_ = val; -#else - // do nothing -#endif } /** Return the foreground color used for line numbers (if enabled). */ Fl_Color Fl_Text_Display::linenumber_fgcolor() const { -#if FLTK_ABI_VERSION >= 10303 return linenumber_fgcolor_; -#else - return FL_INACTIVE_COLOR; -#endif } /** Set the background color used for line numbers (if enabled). - \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher) + \version 1.3.3 ABI feature (ignored in 1.3.x unless FL_ABI_VERSION is 10303 or higher) */ void Fl_Text_Display::linenumber_bgcolor(Fl_Color val) { -#if FLTK_ABI_VERSION >= 10303 linenumber_bgcolor_ = val; -#else - // do nothing -#endif } /** Returns the background color used for line numbers (if enabled). */ Fl_Color Fl_Text_Display::linenumber_bgcolor() const { -#if FLTK_ABI_VERSION >= 10303 return linenumber_bgcolor_; -#else - return 53; // hard coded ~90% gray -#endif } /** Set alignment for line numbers (if enabled). Valid values are FL_ALIGN_LEFT, FL_ALIGN_CENTER or FL_ALIGN_RIGHT. - \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher) + \version 1.3.3 ABI feature (ignored in 1.3.x unless FL_ABI_VERSION is 10303 or higher) */ void Fl_Text_Display::linenumber_align(Fl_Align val) { -#if FLTK_ABI_VERSION >= 10303 linenumber_align_ = val; -#else - // do nothing -#endif } /** Returns the alignment used for line numbers (if enabled). */ Fl_Align Fl_Text_Display::linenumber_align() const { -#if FLTK_ABI_VERSION >= 10303 return linenumber_align_; -#else - return FL_ALIGN_RIGHT; -#endif } /** @@ -361,26 +317,18 @@ Fl_Align Fl_Text_Display::linenumber_align() const { - "%x" -- For hexadecimal line numbers - "%o" -- For octal line numbers - \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher) + \version 1.3.3 ABI feature (ignored in 1.3.x unless FL_ABI_VERSION is 10303 or higher) */ void Fl_Text_Display::linenumber_format(const char* val) { -#if FLTK_ABI_VERSION >= 10303 if ( linenumber_format_ ) free((void*)linenumber_format_); linenumber_format_ = val ? strdup(val) : 0; -#else - // do nothing -#endif } /** Returns the line number printf() format string. */ const char* Fl_Text_Display::linenumber_format() const { -#if FLTK_ABI_VERSION >= 10303 return linenumber_format_; -#else - return "%d"; -#endif } /** -- cgit v1.2.3