diff options
| author | Greg Ercolano <erco@seriss.com> | 2012-01-19 12:44:26 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2012-01-19 12:44:26 +0000 |
| commit | 9a4ef219defa24e0db83dc5f22d01cf29e0a75bd (patch) | |
| tree | dfe98f029a079fad8a88e296ef1d9919386c4cf4 /FL/Fl_Tree_Item_Array.H | |
| parent | 82b6725d166d507755153c4cdd20d3a879ae7846 (diff) | |
Fl_Tree optimizations for selecting large trees (100k items).
Added _next_sibling and _prev_sibling to Fl_Tree_Item class to make
next_sibling() and prev_sibling() more efficient during item selection.
Used new FLTK_ABI_VERSION macro (as designed by Greg and Albrecht on fltk.dev) to protect the ABI breaking features.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Tree_Item_Array.H')
| -rw-r--r-- | FL/Fl_Tree_Item_Array.H | 7 |
1 files changed, 7 insertions, 0 deletions
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); |
