summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Tree_Item.H5
-rw-r--r--FL/Fl_Tree_Item_Array.H7
2 files changed, 12 insertions, 0 deletions
diff --git a/FL/Fl_Tree_Item.H b/FL/Fl_Tree_Item.H
index a3b4e2cda..d090df1b6 100644
--- a/FL/Fl_Tree_Item.H
+++ b/FL/Fl_Tree_Item.H
@@ -69,6 +69,10 @@ 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
+ Fl_Tree_Item *_prev_sibling; // previous sibling (same level)
+ Fl_Tree_Item *_next_sibling; // next sibling (same level)
+#endif /*FLTK_ABI_VERSION*/
protected:
void show_widgets();
void hide_widgets();
@@ -178,6 +182,7 @@ public:
Fl_Tree_Item *next();
Fl_Tree_Item *next_sibling();
Fl_Tree_Item *prev_sibling();
+ void update_prev_next(int index);
Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs);
Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs);
diff --git a/FL/Fl_Tree_Item_Array.H b/FL/Fl_Tree_Item_Array.H
index 8bdf21afc..18527a8ef 100644
--- a/FL/Fl_Tree_Item_Array.H
+++ b/FL/Fl_Tree_Item_Array.H
@@ -5,6 +5,7 @@
#ifndef _FL_TREE_ITEM_ARRAY_H
#define _FL_TREE_ITEM_ARRAY_H
+#include <FL/Fl.H>
#include "Fl_Export.H"
class FL_EXPORT Fl_Tree_Item; // forward decl must *precede* first doxygen comment block
@@ -66,11 +67,17 @@ public:
return(_total);
}
/// Swap the two items at index positions \p ax and \p bx.
+#if FLTK_ABI_VERSION >= 10302
+ // NEW -- code moved to .cxx
+ void swap(int ax, int bx);
+#else /*FLTK_ABI_VERSION*/
+ // OLD
void swap(int ax, int bx) {
Fl_Tree_Item *asave = _items[ax];
_items[ax] = _items[bx];
_items[bx] = asave;
}
+#endif /*FLTK_ABI_VERSION*/
void clear();
void add(Fl_Tree_Item *val);
void insert(int pos, Fl_Tree_Item *new_item);