summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2014-09-04 18:56:52 +0000
committerGreg Ercolano <erco@seriss.com>2014-09-04 18:56:52 +0000
commit107fc50e48c96d3eca7980cdb227d8d22aad30a8 (patch)
treed9588a5246a55f627d5e68b912e5a9312011080a /FL
parent0ed1e8e0f0f29492a53f92bd222fb99e8d6030ae (diff)
Solves STR #3127.
Added to assist cand for his patch to solve RFE STR #2828 option (I). o Add move() methods to Fl_Tree_Item. o Add deparent()/reparent() methods o Supporting methods added to Fl_Tree_Item_Array, and enhancement to update_prev_next() to allow -1 option to create an orphan item Added to Fl_Tree_Item: * Fl_Tree_Item* deparent(int pos) * int reparent(Fl_Tree_Item *newchild, int pos) * int move(int to, int from) * int move(Fl_Tree_Item *item, int op, int pos) * int move_above(Fl_Tree_Item *item) * int move_below(Fl_Tree_Item *item) * int move_into(Fl_Tree_Item *item, int pos) Added to Fl_Tree_Item_Array: * int move(int to, int from) * int deparent(int pos) * int reparent(Fl_Tree_Item *item, Fl_Tree_Item* newparent, int pos) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10271 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Tree_Item.H7
-rw-r--r--FL/Fl_Tree_Item_Array.H3
2 files changed, 10 insertions, 0 deletions
diff --git a/FL/Fl_Tree_Item.H b/FL/Fl_Tree_Item.H
index 4cd9027ca..7941fa379 100644
--- a/FL/Fl_Tree_Item.H
+++ b/FL/Fl_Tree_Item.H
@@ -271,6 +271,13 @@ public:
#endif
Fl_Tree_Item *insert(const Fl_Tree_Prefs &prefs, const char *new_label, int pos=0);
Fl_Tree_Item *insert_above(const Fl_Tree_Prefs &prefs, const char *new_label);
+ Fl_Tree_Item* deparent(int index);
+ int reparent(Fl_Tree_Item *newchild, int index);
+ int move(int to, int from);
+ int move(Fl_Tree_Item *item, int op=0, int pos=0);
+ int move_above(Fl_Tree_Item *item);
+ int move_below(Fl_Tree_Item *item);
+ int move_into(Fl_Tree_Item *item, int pos=0);
int depth() const;
Fl_Tree_Item *prev();
Fl_Tree_Item *next();
diff --git a/FL/Fl_Tree_Item_Array.H b/FL/Fl_Tree_Item_Array.H
index ff3eb0ea5..f876458cb 100644
--- a/FL/Fl_Tree_Item_Array.H
+++ b/FL/Fl_Tree_Item_Array.H
@@ -84,6 +84,9 @@ public:
_items[bx] = asave;
}
#endif /*FLTK_ABI_VERSION*/
+ int move(int to, int from);
+ int deparent(int pos);
+ int reparent(Fl_Tree_Item *item, Fl_Tree_Item *newparent, int pos);
void clear();
void add(Fl_Tree_Item *val);
void insert(int pos, Fl_Tree_Item *new_item);