diff options
| author | Fabien Costantini <fabien@onepost.net> | 2012-04-15 20:11:36 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2012-04-15 20:11:36 +0000 |
| commit | b31264e473d9475d80d7d4cf7964f2b0051bfcba (patch) | |
| tree | 9b8f8707323b980cd0254c7dba7c0562ed9cdfc9 /test | |
| parent | efe0b2b939a7135b957acd626e3877f2375d6d62 (diff) | |
STR 2827 implementation. Implemented Reselect code and related API all within ABI controlled preprocessor blocks because of new attribute defintion would break ABI anyway. Because the code is already ABI controlled, I took the opportunity to keep keep the REASON enum sorted. Added test code in Tree.fl adequately.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/tree.fl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/tree.fl b/test/tree.fl index 003b1be07..8e6d90d34 100644 --- a/test/tree.fl +++ b/test/tree.fl @@ -45,6 +45,9 @@ Function {reason_as_name(Fl_Tree_Reason reason)} { case FL_TREE_REASON_DESELECTED: return("deselected"); case FL_TREE_REASON_OPENED: return("opened"); case FL_TREE_REASON_CLOSED: return("closed"); +\#if FLTK_ABI_VERSION >= 10302 + case FL_TREE_REASON_RESELECTED: return("reselected"); +\#endif default: return("???"); }} {} } @@ -221,7 +224,9 @@ Function {} {open label Tree user_data 1234 callback {G_cb_counter++; // Increment callback counter whenever tree callback is invoked - +\#if FLTK_ABI_VERSION >= 10302 + tree->item_reselect_mode(Fl_Tree::FL_TREE_SELECTABLE_ALWAYS); +\#endif Fl_Tree_Item *item = tree->callback_item(); if ( item ) { fprintf(stderr, "TREE CALLBACK: label='%s' userdata=%ld reason=%s\\n", @@ -231,7 +236,7 @@ if ( item ) { } else { fprintf(stderr, "TREE CALLBACK: reason=%s item=(no item -- probably multiple items were changed at once)\\n", reason_as_name(tree->callback_reason())); -}} open +}} open selected tooltip {Test tree} xywh {15 22 280 411} box DOWN_BOX color 55 selection_color 15 class Fl_Tree } {} @@ -1165,7 +1170,7 @@ while (item) { } item = item->next(); } -tree->redraw();} selected +tree->redraw();} tooltip {Adds 20,000 items to the selected item's parent} xywh {530 398 95 16} labelsize 9 } } |
