General description: mention how to move items around

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12824 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2018-04-10 18:37:18 +00:00
parent 798823f7dc
commit c7080e826e
2 changed files with 15 additions and 0 deletions

View File

@ -89,6 +89,12 @@
/// positioned on the screen with show_item_top(), show_item_middle() and
/// show_item_bottom(),<BR>
/// item children can be swapped around with Fl_Tree_Item::swap_children(),<BR>
/// items can be moved around with Fl_Tree_Item::move(),<BR>
/// an item's children can be walked with Fl_Tree_Item::first() and Fl_Tree_Item::next(),
/// an item's children can be indexed directly with Fl_Tree_Item::child()
/// and Fl_Tree_Item::children(),<BR>
/// items can be moved from one subtree to another with Fl_Tree_Item::deparent()
/// and Fl_Tree_Item::reparent(),<BR>
/// sorting can be controlled when items are add()ed via sortorder().<BR>
/// You can walk the entire tree with first() and next().<BR>
/// You can walk visible items with first_visible_item()

View File

@ -454,6 +454,7 @@ int Fl_Tree_Item::reparent(Fl_Tree_Item *newchild, int pos) {
/// - 0: Success
/// - -1: range error (e.g. if \p 'to' or \p 'from' out of range).
/// - (Other return values reserved for future use)
/// \see move_above(), move_below(), move_into(), move(Fl_Tree_Item*,int,int)
///
int Fl_Tree_Item::move(int to, int from) {
return _children.move(to, from);
@ -475,6 +476,8 @@ int Fl_Tree_Item::move(int to, int from) {
/// - -6: could not reparent at \p 'pos'
/// - (Other return values reserved for future use.)
///
/// \see move_above(), move_below(), move_into(), move(int,int)
///
int Fl_Tree_Item::move(Fl_Tree_Item *item, int op, int pos) {
Fl_Tree_Item *from_parent, *to_parent;
int from, to;
@ -529,6 +532,8 @@ int Fl_Tree_Item::move(Fl_Tree_Item *item, int op, int pos) {
/// On error returns a negative value;
/// see move(Fl_Tree_Item*,int,int) for possible error codes.
///
/// \see move_below(), move_into(), move(int,int), move(Fl_Tree_Item*,int,int)
///
int Fl_Tree_Item::move_above(Fl_Tree_Item *item) {
return move(item, 0, 0);
}
@ -540,6 +545,8 @@ int Fl_Tree_Item::move_above(Fl_Tree_Item *item) {
/// On error returns a negative value;
/// see move(Fl_Tree_Item*,int,int) for possible error codes.
///
/// \see move_above(), move_into(), move(int,int), move(Fl_Tree_Item*,int,int)
///
int Fl_Tree_Item::move_below(Fl_Tree_Item *item) {
return move(item, 1, 0);
}
@ -551,6 +558,8 @@ int Fl_Tree_Item::move_below(Fl_Tree_Item *item) {
/// On error returns a negative value;
/// see move(Fl_Tree_Item*,int,int) for possible error codes.
///
/// \see move_above(), move_below(), move(int,int), move(Fl_Tree_Item*,int,int)
///
int Fl_Tree_Item::move_into(Fl_Tree_Item *item, int pos) {
return move(item, 2, pos);
}