From 78039ecb55130d4b6e30a1aa005b4498d1a6decf Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 6 Nov 2012 20:46:14 +0000 Subject: [PATCH] Replaced 10302 with 10301 for FLTK_ABI_VERSION git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 +- FL/Enumerations.H | 2 +- FL/Fl_Device.H | 2 +- FL/Fl_Paged_Device.H | 2 +- FL/Fl_Pixmap.H | 2 +- FL/Fl_Spinner.H | 2 +- FL/Fl_Table.H | 4 ++-- FL/Fl_Tooltip.H | 4 ++-- FL/Fl_Tree.H | 10 +++++----- FL/Fl_Tree_Item.H | 6 +++--- FL/Fl_Tree_Item_Array.H | 2 +- FL/Fl_Tree_Prefs.H | 16 ++++++++-------- FL/Fl_Window.H | 8 ++++---- examples/tree-of-tables.cxx | 2 +- src/Fl_Double_Window.cxx | 2 +- src/Fl_Pixmap.cxx | 2 +- src/Fl_Table.cxx | 8 ++++---- src/Fl_Tooltip.cxx | 2 +- src/Fl_Tree.cxx | 16 ++++++++-------- src/Fl_Tree_Item.cxx | 28 ++++++++++++++-------------- src/Fl_Tree_Item_Array.cxx | 2 +- src/Fl_Tree_Prefs.cxx | 6 +++--- src/Fl_Window.cxx | 2 +- src/Fl_Window_fullscreen.cxx | 2 +- test/tree.fl | 28 ++++++++++++++-------------- test/unittest_scrollbarsize.cxx | 4 ++-- 26 files changed, 83 insertions(+), 83 deletions(-) diff --git a/CHANGES b/CHANGES index cf4b0202c..79274f8d2 100644 --- a/CHANGES +++ b/CHANGES @@ -6,7 +6,7 @@ CHANGES IN FLTK 1.3.2 called with the old label() (STR #2836) 1.3.2 ABI FEATURES - (To enable the following ABI features, put: #define FLTK_ABI_VERSION 10302 + (To enable the following ABI features, put: #define FLTK_ABI_VERSION 10301 at the top of your FL/Enumerations.H and rebuild FLTK and your app) - Fl_Tree optimized to support large trees (eg. 100k items): diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 29a183891..383fa6b0a 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -27,7 +27,7 @@ * in the current patch release of FLTK. ** Use for static builds only! ** * For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION */ -//#define FLTK_ABI_VERSION 10302 +//#define FLTK_ABI_VERSION 10301 # include "Fl_Export.H" # include "fl_types.h" diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index e0218386c..217fd468e 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -367,7 +367,7 @@ protected: the image offset by the cx and cy arguments. */ virtual void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {} -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 virtual #endif void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); diff --git a/FL/Fl_Paged_Device.H b/FL/Fl_Paged_Device.H index 6e15bb99c..48367fab1 100644 --- a/FL/Fl_Paged_Device.H +++ b/FL/Fl_Paged_Device.H @@ -107,7 +107,7 @@ protected: int y_offset; /** \brief The constructor */ Fl_Paged_Device() : Fl_Surface_Device(NULL), x_offset(0), y_offset(0) {}; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 public: /** \brief The destructor */ virtual ~Fl_Paged_Device() {}; diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H index a33846ad6..6f93da7e8 100644 --- a/FL/Fl_Pixmap.H +++ b/FL/Fl_Pixmap.H @@ -60,7 +60,7 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image { private: #if defined(WIN32) -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 static // a static member is needed for ABI compatibility #endif UINT pixmap_bg_color; // RGB color used for pixmap background diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H index 2262c924a..02830e2e4 100644 --- a/FL/Fl_Spinner.H +++ b/FL/Fl_Spinner.H @@ -50,7 +50,7 @@ class FL_EXPORT Fl_Spinner : public Fl_Group { double step_; // Amount to add/subtract for up/down const char *format_; // Format string -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW protected: #endif diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H index e93def345..c71d918aa 100644 --- a/FL/Fl_Table.H +++ b/FL/Fl_Table.H @@ -207,7 +207,7 @@ private: int _auto_drag; int _selecting; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int _scrollbar_size; #endif @@ -1070,7 +1070,7 @@ public: void callback(Fl_Widget*, void*); #endif -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW /** Gets the current size of the scrollbars' troughs, in pixels. diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H index 0378aa80b..300c921dd 100644 --- a/FL/Fl_Tooltip.H +++ b/FL/Fl_Tooltip.H @@ -78,7 +78,7 @@ public: static Fl_Color textcolor() { return textcolor_; } /** Sets the color of the text in the tooltip. The default is black. */ static void textcolor(Fl_Color c) { textcolor_ = c; } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /** Gets the amount of extra space left/right of the tooltip's text. Default is 3. */ static int margin_width() { return margin_width_; } /** Sets the amount of extra space left/right of the tooltip's text. Default is 3. */ @@ -119,7 +119,7 @@ private: static Fl_Font font_; static Fl_Fontsize size_; static Fl_Widget* widget_; //!< Keeps track of the current target widget -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 static int margin_width_; //!< distance around tooltip text left+right static int margin_height_; //!< distance around tooltip text top+bottom static int wrap_width_; //!< maximum width of tooltip text before it word wraps diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H index 3ce4eeb77..849222aaf 100644 --- a/FL/Fl_Tree.H +++ b/FL/Fl_Tree.H @@ -300,7 +300,7 @@ enum Fl_Tree_Reason { FL_TREE_REASON_NONE=0, ///< unknown reason FL_TREE_REASON_SELECTED, ///< an item was selected FL_TREE_REASON_DESELECTED, ///< an item was de-selected -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 FL_TREE_REASON_RESELECTED, ///< an item was re-selected (e.g. double-clicked) #endif /*FLTK_ABI_VERSION*/ FL_TREE_REASON_OPENED, ///< an item was opened @@ -316,7 +316,7 @@ class FL_EXPORT Fl_Tree : public Fl_Group { Fl_Tree_Prefs _prefs; // all the tree's settings int _scrollbar_size; // size of scrollbar trough -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW: Fl_Tree_Item *_lastselect; #else /*FLTK_ABI_VERSION*/ @@ -420,7 +420,7 @@ public: void marginleft(int val); int margintop() const; void margintop(int val); -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int marginbottom() const; void marginbottom(int val); #endif /*FLTK_ABI_VERSION*/ @@ -432,7 +432,7 @@ public: void usericonmarginleft(int val); int labelmarginleft() const; void labelmarginleft(int val); -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int widgetmarginleft() const; void widgetmarginleft(int val); #endif /*FLTK_ABI_VERSION*/ @@ -456,7 +456,7 @@ public: void selectbox(Fl_Boxtype val); Fl_Tree_Select selectmode() const; void selectmode(Fl_Tree_Select val); -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 Fl_Tree_Item_Reselect_Mode item_reselect_mode() const; void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode); Fl_Tree_Item_Draw_Mode item_draw_mode() const; diff --git a/FL/Fl_Tree_Item.H b/FL/Fl_Tree_Item.H index b5dd7b985..13a77502a 100644 --- a/FL/Fl_Tree_Item.H +++ b/FL/Fl_Tree_Item.H @@ -63,7 +63,7 @@ class FL_EXPORT Fl_Tree_Item { ACTIVE = 1<<2, ///> item is active SELECTED = 1<<3, ///> item is selected }; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW unsigned short _flags; // misc flags #else /*FLTK_ABI_VERSION*/ @@ -81,7 +81,7 @@ class FL_EXPORT Fl_Tree_Item { Fl_Tree_Item_Array _children; // array of child items Fl_Tree_Item *_parent; // parent item (=0 if root) void *_userdata; // user data that can be associated with an item -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 Fl_Tree_Item *_prev_sibling; // previous sibling (same level) Fl_Tree_Item *_next_sibling; // next sibling (same level) #endif /*FLTK_ABI_VERSION*/ @@ -350,7 +350,7 @@ public: // Protected methods protected: -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Set a flag to an on or off value. val is 0 or 1. inline void set_flag(unsigned short flag,int val) { if ( val ) _flags |= flag; else _flags &= ~flag; diff --git a/FL/Fl_Tree_Item_Array.H b/FL/Fl_Tree_Item_Array.H index 18527a8ef..a8de00dcc 100644 --- a/FL/Fl_Tree_Item_Array.H +++ b/FL/Fl_Tree_Item_Array.H @@ -67,7 +67,7 @@ public: return(_total); } /// Swap the two items at index positions \p ax and \p bx. -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW -- code moved to .cxx void swap(int ax, int bx); #else /*FLTK_ABI_VERSION*/ diff --git a/FL/Fl_Tree_Prefs.H b/FL/Fl_Tree_Prefs.H index b87cc8521..b01033e78 100644 --- a/FL/Fl_Tree_Prefs.H +++ b/FL/Fl_Tree_Prefs.H @@ -71,7 +71,7 @@ enum Fl_Tree_Select { ///< with SHIFT, CTRL or mouse drags. }; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// \enum Fl_Tree_Item_Reselect_Mode /// Defines the ways an item can be (re) selected /// via item_reselect_mode(). @@ -106,13 +106,13 @@ class FL_EXPORT Fl_Tree_Prefs { Fl_Fontsize _labelsize; // label's font size int _margintop; // -- int _marginleft; // |- tree's controllable margins -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int _marginbottom; // -- #endif int _openchild_marginbottom; // extra space below an open child tree int _usericonmarginleft; // space to left of user icon (if any) int _labelmarginleft; // space to left of label -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int _widgetmarginleft; // space to left of widget #endif int _connectorwidth; // connector width (right of open/close icon) @@ -130,7 +130,7 @@ class FL_EXPORT Fl_Tree_Prefs { Fl_Tree_Sort _sortorder; // none, ascening, descending, etc. Fl_Boxtype _selectbox; // selection box type Fl_Tree_Select _selectmode; // selection mode -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget() #endif /*FLTK_ABI_VERSION*/ @@ -152,7 +152,7 @@ public: inline Fl_Color item_labelfgcolor() const { return(_labelfgcolor); } /// Set the default label foreground color inline void item_labelfgcolor(Fl_Color val) { _labelfgcolor = val; } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Get the default label background color. /// This returns the Fl_Tree::color() unless item_labelbgcolor() /// has been set explicitly. @@ -216,7 +216,7 @@ public: inline void margintop(int val) { _margintop = val; } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Get the bottom margin's value in pixels. /// This is the extra distance the vertical scroller lets you travel. inline int marginbottom() const { @@ -252,7 +252,7 @@ public: inline void labelmarginleft(int val) { _labelmarginleft = val; } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Get the widget()'s left margin value in pixels inline int widgetmarginleft() const { return(_widgetmarginleft); @@ -391,7 +391,7 @@ public: inline void selectmode(Fl_Tree_Select val) { _selectmode = val; } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Returns the current item re/selection mode Fl_Tree_Item_Reselect_Mode item_reselect_mode() const { return _itemreselectmode; diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index 84f706823..d6997e601 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -52,19 +52,19 @@ class FL_EXPORT Fl_Window : public Fl_Group { // Note: we must use separate statements for each of the following 4 variables, // with the static attribute, otherwise MS VC++ 2008/2010 complains :-( // AlbrechtS 04/2012 -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 static // when these members are static, ABI compatibility with 1.3.0 is respected #endif int no_fullscreen_x; -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 static // when these members are static, ABI compatibility with 1.3.0 is respected #endif int no_fullscreen_y; -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 static // when these members are static, ABI compatibility with 1.3.0 is respected #endif int no_fullscreen_w; -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 static // when these members are static, ABI compatibility with 1.3.0 is respected #endif int no_fullscreen_h; diff --git a/examples/tree-of-tables.cxx b/examples/tree-of-tables.cxx index e7b8fb51f..e5ec6e0a1 100644 --- a/examples/tree-of-tables.cxx +++ b/examples/tree-of-tables.cxx @@ -29,7 +29,7 @@ #define PI 3.14159 #endif -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 class MyTable : public Fl_Table { char *mode; public: diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 713430e88..424d3a570 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -87,7 +87,7 @@ void Fl_Double_Window::show() { \param pixmap offscreen buffer containing the rectangle to copy \param srcx,srcy origin in offscreen buffer of rectangle to copy */ -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { fl_graphics_driver->copy_offscreen(x, y, w, h, pixmap, srcx, srcy); } diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index 31b90e5e3..1bd3e5439 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -153,7 +153,7 @@ void Fl_GDI_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP } } -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 UINT Fl_Pixmap::pixmap_bg_color = 0; #endif diff --git a/src/Fl_Table.cxx b/src/Fl_Table.cxx index 6c5f70e25..d608aa189 100644 --- a/src/Fl_Table.cxx +++ b/src/Fl_Table.cxx @@ -128,7 +128,7 @@ 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 >= 10302 +#if FLTK_ABI_VERSION >= 10301 _scrollbar_size = 0; #endif box(FL_THIN_DOWN_FRAME); @@ -480,7 +480,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 >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size(); #else @@ -561,7 +561,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 >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size(); #else @@ -1147,7 +1147,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 >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size(); #else diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 670c7b8e7..a3deaaa6a 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -31,7 +31,7 @@ Fl_Color Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, Fl_Color Fl_Tooltip::textcolor_ = FL_BLACK; Fl_Font Fl_Tooltip::font_ = FL_HELVETICA; Fl_Fontsize Fl_Tooltip::size_ = -1; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int Fl_Tooltip::margin_width_ = 3; int Fl_Tooltip::margin_height_ = 3; int Fl_Tooltip::wrap_width_ = 400; diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx index 1f91a00e9..2623ba57b 100644 --- a/src/Fl_Tree.cxx +++ b/src/Fl_Tree.cxx @@ -99,7 +99,7 @@ Fl_Tree::Fl_Tree(int X, int Y, int W, int H, const char *L) : Fl_Group(X,Y,W,H,L _callback_reason = FL_TREE_REASON_NONE; _scrollbar_size = 0; // 0: uses Fl::scrollbar_size() -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW _lastselect = 0; #else /*FLTK_ABI_VERSION*/ @@ -148,7 +148,7 @@ int Fl_Tree::handle(int e) { char is_shift = Fl::event_state() & FL_SHIFT ? 1 : 0; char is_ctrl = Fl::event_state() & FL_CTRL ? 1 : 0; char is_command = Fl::event_state() & FL_COMMAND ? 1 : 0; // ctrl on win/lin, 'Command' on mac -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW: data inside Fl_Tree #else /*FLTK_ABI_VERSION*/ // OLD: @@ -477,7 +477,7 @@ int Fl_Tree::draw_tree() { // Show vertical scrollbar? { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW int SY = Y + _prefs.marginbottom(); #else /*FLTK_ABI_VERSION*/ @@ -1150,7 +1150,7 @@ int Fl_Tree::select(Fl_Tree_Item *item, int docallback) { redraw(); return(1); } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW if ( alreadySelected ) { if ( (item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS) && docallback ) { @@ -1319,7 +1319,7 @@ int Fl_Tree::select_only(Fl_Tree_Item *selitem, int docallback) { int changed = 0; for ( Fl_Tree_Item *item = first(); item; item = item->next() ) { if ( item == selitem ) { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW if ( item->is_selected() ) { // already selected? if ( item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS ) { @@ -1510,7 +1510,7 @@ void Fl_Tree::margintop(int val) { redraw(); } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Get the amount of white space (in pixels) that should appear /// below the last visible item when the vertical scroller is scrolled to the bottom. /// @@ -1578,7 +1578,7 @@ void Fl_Tree::labelmarginleft(int val) { _prefs.labelmarginleft(val); redraw(); } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Get the amount of white space (in pixels) that should appear /// to the left of the child fltk widget (if any). int Fl_Tree::widgetmarginleft() const { @@ -1748,7 +1748,7 @@ void Fl_Tree::selectmode(Fl_Tree_Select val) { _prefs.selectmode(val); } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Returns the current item re/selection mode Fl_Tree_Item_Reselect_Mode Fl_Tree::item_reselect_mode() const { return(_prefs.item_reselect_mode()); diff --git a/src/Fl_Tree_Item.cxx b/src/Fl_Tree_Item.cxx index 31080b40c..20070c12b 100644 --- a/src/Fl_Tree_Item.cxx +++ b/src/Fl_Tree_Item.cxx @@ -44,7 +44,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Prefs &prefs) { _labelfgcolor = prefs.labelfgcolor(); _labelbgcolor = prefs.labelbgcolor(); _widget = 0; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _flags = OPEN|VISIBLE|ACTIVE; #else /*FLTK_ABI_VERSION*/ _open = 1; @@ -67,7 +67,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Prefs &prefs) { _usericon = 0; _userdata = 0; _parent = 0; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _prev_sibling = 0; _next_sibling = 0; #endif /*FLTK_ABI_VERSION*/ @@ -92,7 +92,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) { _labelfgcolor = o->labelfgcolor(); _labelbgcolor = o->labelbgcolor(); _widget = o->widget(); -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _flags = o->_flags; #else /*FLTK_ABI_VERSION*/ _open = o->_open; @@ -115,7 +115,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) { _usericon = o->usericon(); _userdata = o->user_data(); _parent = o->_parent; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _prev_sibling = 0; // do not copy ptrs! use update_prev_next() _next_sibling = 0; // do not copy ptrs! use update_prev_next() #endif /*FLTK_ABI_VERSION*/ @@ -126,7 +126,7 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) { /// void Fl_Tree_Item::show_self(const char *indent) const { if ( label() ) { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 printf("%s-%s (%d children, this=%p, parent=%p, prev=%p, next=%p, depth=%d)\n", indent,label(),children(),(void*)this, (void*)_parent, _prev_sibling, _next_sibling, depth()); @@ -576,7 +576,7 @@ int Fl_Tree_Item::calc_item_height(const Fl_Tree_Prefs &prefs) const { fl_font(_labelfont, _labelsize); // fl_descent() needs this :/ H = _labelsize + fl_descent() + 1; // at least one pixel space below descender } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 if ( widget() && (prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET) && H < widget()->h()) { @@ -648,7 +648,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree, int wx = label_x; int wy = bg_y; int ww = widget()->w(); // use widget's width -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 int wh = (prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET) ? widget()->h() : H; if ( _label && @@ -660,7 +660,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree, fl_font(_labelfont, _labelsize); // fldescent() needs this int lw=0, lh=0; fl_measure(_label,lw,lh); // get box around text (including white space) -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW wx += (lw + prefs.widgetmarginleft()); #else /*FLTK_ABI_VERSION*/ @@ -735,7 +735,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree, prefs.usericon()->draw(uicon_x,uicon_y); } // Draw label -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 if ( _label && ( !widget() || (prefs.item_draw_mode() & FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) ) ) @@ -874,7 +874,7 @@ Fl_Tree_Item *Fl_Tree_Item::next() { if ( c->has_children() ) { return(c->child(0)); } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW while ( ( p = c->parent() ) != NULL ) { // loop upwards through parents if ( c->_next_sibling ) // not last child? @@ -901,7 +901,7 @@ Fl_Tree_Item *Fl_Tree_Item::next() { /// \returns the previous item in the tree, or 0 if there's no item above this one (hit the root). /// Fl_Tree_Item *Fl_Tree_Item::prev() { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW if ( !parent() ) return(0); // hit root? done if ( !_prev_sibling ) { // are we first child? @@ -955,7 +955,7 @@ Fl_Tree_Item *Fl_Tree_Item::prev() { /// \returns item's next sibling, or 0 if none. /// Fl_Tree_Item *Fl_Tree_Item::next_sibling() { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW return(_next_sibling); #else /*FLTK_ABI_VERSION*/ @@ -977,7 +977,7 @@ Fl_Tree_Item *Fl_Tree_Item::next_sibling() { /// \returns This item's previous sibling, or 0 if none. /// Fl_Tree_Item *Fl_Tree_Item::prev_sibling() { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW return(_prev_sibling); #else /*FLTK_ABI_VERSION*/ @@ -995,7 +995,7 @@ Fl_Tree_Item *Fl_Tree_Item::prev_sibling() { /// Call this whenever items in the array are added/removed/moved/swapped. /// void Fl_Tree_Item::update_prev_next(int index) { -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW int pchildren = parent() ? parent()->children() : 0; int index_prev = index-1; diff --git a/src/Fl_Tree_Item_Array.cxx b/src/Fl_Tree_Item_Array.cxx index 5518be46f..b6eddd09d 100644 --- a/src/Fl_Tree_Item_Array.cxx +++ b/src/Fl_Tree_Item_Array.cxx @@ -158,7 +158,7 @@ int Fl_Tree_Item_Array::remove(Fl_Tree_Item *item) { return(-1); } -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 /// Swap the two items at index positions \p ax and \p bx. void Fl_Tree_Item_Array::swap(int ax, int bx) { Fl_Tree_Item *asave = _items[ax]; diff --git a/src/Fl_Tree_Prefs.cxx b/src/Fl_Tree_Prefs.cxx index 45018a1ae..b52724aef 100644 --- a/src/Fl_Tree_Prefs.cxx +++ b/src/Fl_Tree_Prefs.cxx @@ -125,13 +125,13 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() { _labelsize = FL_NORMAL_SIZE; _marginleft = 6; _margintop = 3; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _marginbottom = 20; #endif /*FLTK_ABI_VERSION*/ _openchild_marginbottom = 0; _usericonmarginleft = 3; _labelmarginleft = 3; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _widgetmarginleft = 3; #endif /*FLTK_ABI_VERSION*/ _linespacing = 0; @@ -152,7 +152,7 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() { _sortorder = FL_TREE_SORT_NONE; _selectbox = FL_FLAT_BOX; _selectmode = FL_TREE_SELECT_SINGLE; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 _itemreselectmode = FL_TREE_SELECTABLE_ONCE; _itemdrawmode = FL_TREE_ITEM_DRAW_DEFAULT; #endif diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index f5c295d77..20bb520fd 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -50,7 +50,7 @@ void Fl_Window::_Fl_Window() { resizable(0); size_range_set = 0; minw = maxw = minh = maxh = 0; -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 no_fullscreen_x = 0; no_fullscreen_y = 0; no_fullscreen_w = w(); diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx index 2cbf59788..7a8ce4631 100644 --- a/src/Fl_Window_fullscreen.cxx +++ b/src/Fl_Window_fullscreen.cxx @@ -31,7 +31,7 @@ #include -#if FLTK_ABI_VERSION < 10302 +#if FLTK_ABI_VERSION < 10301 int Fl_Window::no_fullscreen_x = 0; int Fl_Window::no_fullscreen_y = 0; int Fl_Window::no_fullscreen_w = 0; diff --git a/test/tree.fl b/test/tree.fl index 35c81ce47..ebb1b1bf3 100644 --- a/test/tree.fl +++ b/test/tree.fl @@ -48,7 +48,7 @@ Function {reason_as_name(Fl_Tree_Reason reason)} { case FL_TREE_REASON_DESELECTED: return("deselected"); case FL_TREE_REASON_OPENED: return("opened"); case FL_TREE_REASON_CLOSED: return("closed"); -\#if FLTK_ABI_VERSION >= 10302 +\#if FLTK_ABI_VERSION >= 10301 case FL_TREE_REASON_RESELECTED: return("reselected"); \#endif default: return("???"); @@ -288,7 +288,7 @@ Function {GetTreeMarginBottom()} { comment {Get the current 'margin bottom' size Handles this as an ABI feature..} open return_type int } { - code {\#if FLTK_ABI_VERSION >= 10302 + code {\#if FLTK_ABI_VERSION >= 10301 return tree->marginbottom(); \#else return 0; @@ -299,7 +299,7 @@ Function {GetTreeWidgetMarginLeft()} { comment {Get the current 'margin bottom' size Handles this as an ABI feature..} open return_type int } { - code {\#if FLTK_ABI_VERSION >= 10302 + code {\#if FLTK_ABI_VERSION >= 10301 return tree->widgetmarginleft(); \#else return 0; @@ -399,7 +399,7 @@ tree->redraw();} Fl_Value_Slider marginbottom_slider { label {marginbottom()} user_data tree - callback {\#if FLTK_ABI_VERSION >= 10302 + callback {\#if FLTK_ABI_VERSION >= 10301 // NEW int val = (int)marginbottom_slider->value(); tree->marginbottom(val); @@ -408,7 +408,7 @@ tree->redraw(); // OLD marginbottom_slider->deactivate(); // deactivate if this ABI feature is disabled marginbottom_slider->tooltip("DISABLED.\\n" - "Set FLTK_ABI_VERSION to 10302 (or higher)\\n" + "Set FLTK_ABI_VERSION to 10301 (or higher)\\n" "to get this feature"); \#endif} tooltip {Changes the bottom margin for the tree @@ -454,14 +454,14 @@ tree->redraw();} Fl_Value_Slider widgetmarginleft_slider { label {widgetmarginleft()} user_data tree - callback {\#if FLTK_ABI_VERSION >= 10302 + callback {\#if FLTK_ABI_VERSION >= 10301 int val = (int)widgetmarginleft_slider->value(); tree->widgetmarginleft(val); tree->redraw(); \#else widgetmarginleft_slider->deactivate(); widgetmarginleft_slider->tooltip("DISABLED.\\n" - "Set FLTK_ABI_VERSION to 10302 (or higher)\\n" + "Set FLTK_ABI_VERSION to 10301 (or higher)\\n" "to get this feature"); \#endif} tooltip {Changes the margin to the left of child FLTK widget()} xywh {505 160 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9 @@ -647,7 +647,7 @@ switch ( selectmode_chooser->value() ) { } Fl_Choice reselectmode_chooser { label {Item Reselect Mode} - callback {\#if FLTK_ABI_VERSION >= 10302 + callback {\#if FLTK_ABI_VERSION >= 10301 // NEW // Set reselection mode switch ( reselectmode_chooser->value() ) { @@ -658,7 +658,7 @@ switch ( reselectmode_chooser->value() ) { // OLD reselectmode_chooser->deactivate(); // deactivate if this ABI feature is disabled reselectmode_chooser->tooltip("DISABLED.\\n" - "Set FLTK_ABI_VERSION to 10302 (or higher)\\n" + "Set FLTK_ABI_VERSION to 10301 (or higher)\\n" "to get this feature"); window->redraw(); // deactivated \#endif} @@ -727,7 +727,7 @@ tree->visible_focus(onoff);} } Fl_Check_Button labelandwidget_radio { label {Show label + widget} - callback {\#if FLTK_ABI_VERSION >= 10302 + callback {\#if FLTK_ABI_VERSION >= 10301 // NEW int flags = tree->item_draw_mode(); if ( labelandwidget_radio->value() ) @@ -740,7 +740,7 @@ tree->redraw(); // OLD labelandwidget_radio->deactivate(); // deactivate if this ABI feature is disabled labelandwidget_radio->tooltip("DISABLED.\\n" - "Set FLTK_ABI_VERSION to 10302 (or higher)\\n" + "Set FLTK_ABI_VERSION to 10301 (or higher)\\n" "to get this feature"); window->redraw(); // deactivated \#endif} @@ -751,7 +751,7 @@ When enabled, widget should appear to the right of the item's label. By default, } Fl_Check_Button itemheightfromwidget_radio { label {Item h() from widget} - callback {\#if FLTK_ABI_VERSION >= 10302 + callback {\#if FLTK_ABI_VERSION >= 10301 // NEW int flags = tree->item_draw_mode(); if ( itemheightfromwidget_radio->value() ) @@ -764,7 +764,7 @@ tree->redraw(); // OLD itemheightfromwidget_radio->deactivate(); // deactivate if this ABI feature is disabled itemheightfromwidget_radio->tooltip("DISABLED.\\n" - "Set FLTK_ABI_VERSION to 10302 (or higher)\\n" + "Set FLTK_ABI_VERSION to 10301 (or higher)\\n" "to get this feature"); window->redraw(); // deactivated \#endif} @@ -1664,7 +1664,7 @@ helpwin->show();} selected } code {// Initialize Tree tree->root_label("ROOT"); -\#if FLTK_ABI_VERSION >= 10302 +\#if FLTK_ABI_VERSION >= 10301 tree->item_reselect_mode(FL_TREE_SELECTABLE_ALWAYS); \#endif RebuildTree(); diff --git a/test/unittest_scrollbarsize.cxx b/test/unittest_scrollbarsize.cxx index ea67d5f65..d150c963b 100644 --- a/test/unittest_scrollbarsize.cxx +++ b/test/unittest_scrollbarsize.cxx @@ -126,7 +126,7 @@ class ScrollBarSizeTest : public Fl_Group { if ( strcmp(label,"A: Scroll Size") == 0 ) { brow_a->scrollbar_size(val); tree_a->scrollbar_size(val); -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 // NEW table_a->scrollbar_size(val); #endif @@ -206,7 +206,7 @@ public: "Scrollbar's size should change interactively as size sliders are changed.\n" "Changing 'Global Scroll Size' should affect all three browser's scrollbars UNLESS\n" "the 'A: Scroll Size' slider is changed, in which case its value will take precedence\n" -#if FLTK_ABI_VERSION >= 10302 +#if FLTK_ABI_VERSION >= 10301 "for the 'A' group of widgets."); #else "for the 'A' group of widgets. (NOTE: 'table_a' does not currently support this)");