summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Tree.H3
-rw-r--r--FL/Fl_Tree_Item_Array.H17
2 files changed, 20 insertions, 0 deletions
diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H
index 849222aaf..f29161c01 100644
--- a/FL/Fl_Tree.H
+++ b/FL/Fl_Tree.H
@@ -373,6 +373,9 @@ public:
Fl_Tree_Item *last_visible();
Fl_Tree_Item *first_selected_item();
Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item=0);
+#if FLTK_ABI_VERSION >= 10303
+ int get_selected_items(Fl_Tree_Item_Array &items);
+#endif
//////////////////////////
// Item open/close methods
diff --git a/FL/Fl_Tree_Item_Array.H b/FL/Fl_Tree_Item_Array.H
index a8de00dcc..802381f7f 100644
--- a/FL/Fl_Tree_Item_Array.H
+++ b/FL/Fl_Tree_Item_Array.H
@@ -49,6 +49,12 @@ class FL_EXPORT Fl_Tree_Item_Array {
int _total; // #items in array
int _size; // #items *allocated* for array
int _chunksize; // #items to enlarge mem allocation
+#if FLTK_ABI_VERSION >= 10303
+ enum {
+ MANAGE_ITEM = 1, ///> manage the Fl_Tree_Item's internals (internal use only)
+ };
+ char _flags; // flags to control behavior
+#endif
void enlarge(int count);
public:
Fl_Tree_Item_Array(int new_chunksize = 10); // CTOR
@@ -83,6 +89,17 @@ public:
void insert(int pos, Fl_Tree_Item *new_item);
void remove(int index);
int remove(Fl_Tree_Item *item);
+#if FLTK_ABI_VERSION >= 10303
+ /// Option to control if Fl_Tree_Item_Array's destructor will also destroy the Fl_Tree_Item's.
+ /// If set: items and item array is destroyed.
+ /// If clear: only the item array is destroyed, not items themselves.
+ void manage_item_destroy(int val) {
+ if ( val ) _flags |= MANAGE_ITEM; else _flags &= ~MANAGE_ITEM;
+ }
+ int manage_item_destroy() const {
+ return _flags & MANAGE_ITEM ? 1 : 0;
+ }
+#endif
};
#endif /*_FL_TREE_ITEM_ARRAY_H*/