diff options
| author | Greg Ercolano <erco@seriss.com> | 2012-04-27 02:03:48 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2012-04-27 02:03:48 +0000 |
| commit | 474feee1db323f45fb121b02d76e776cb5c7c2f1 (patch) | |
| tree | 9782a4a5eec8b676e75cf34a83342f6d9a2a1f6d /FL/Fl_Tree_Prefs.H | |
| parent | fa60da1ca74c8ed9c037ba41dca82f59c31f50a5 (diff) | |
o Added FL_TREE_ITEM_HEIGHT_FROM_WIDGET option to item_draw_mode()
to allow widgets to control the size of items in the tree
(instead of vice versa).
o Added item_draw_mode(int) to allow for easier bitflag maintenance,
since enums don't seem to be typesafe yet.
o Tree demo modified to demonstrate this feature.
An important feature for adding large widgets to tree items.
Will probably add an example, 'tree-of-tables' to demo this usage.
o Small doc fixes.
o Had to rename FL_TREE_ITEM_DRAW_WIDGET_ONLY to FL_TREE_ITEM_DRAW_DEFAULT.
Its meaning for the bit fields changed when new bit fields were added.
(The prev name just didn't make sense in the new context. Since it was
just a few svn commits old and an unreleased ABI feature, it shouldn't
affect anyone not in R&D)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9404 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Tree_Prefs.H')
| -rw-r--r-- | FL/Fl_Tree_Prefs.H | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/FL/Fl_Tree_Prefs.H b/FL/Fl_Tree_Prefs.H index f396b80ce..12dcafdbf 100644 --- a/FL/Fl_Tree_Prefs.H +++ b/FL/Fl_Tree_Prefs.H @@ -73,19 +73,23 @@ enum Fl_Tree_Select { #if FLTK_ABI_VERSION >= 10302 /// \enum Fl_Tree_Item_Reselect_Mode -/// Defines the ways an item can be (re) selected. +/// Defines the ways an item can be (re) selected +/// via item_reselect_mode(). /// enum Fl_Tree_Item_Reselect_Mode { - FL_TREE_SELECTABLE_ONCE=0, ///< item can only be selected once (default) - FL_TREE_SELECTABLE_ALWAYS, ///< enables FL_TREE_REASON_RESELECTED events for callbacks + FL_TREE_SELECTABLE_ONCE=0, ///< Item can only be selected once (default) + FL_TREE_SELECTABLE_ALWAYS, ///< Enables FL_TREE_REASON_RESELECTED events for callbacks }; /// \enum Fl_Tree_Item_Draw_Mode -/// Controls how item's labels and widget()s are drawn in the tree. +/// Bit flags that control how item's labels and widget()s are drawn in the tree +/// via item_draw_mode(). /// enum Fl_Tree_Item_Draw_Mode { - FL_TREE_ITEM_DRAW_WIDGET_ONLY=0, ///< if widget() defined, draw it in place of the label (default) - FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET=1 ///< if widget() defined, draw it to right of label + FL_TREE_ITEM_DRAW_DEFAULT=0, ///< If widget() defined, draw in place of label, + ///< and widget() tracks item height (default) + FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET=1, ///< If widget() defined, include label to the left of the widget + FL_TREE_ITEM_HEIGHT_FROM_WIDGET=2 ///< If widget() defined, widget()'s height controls item's height }; #endif @@ -128,7 +132,7 @@ class FL_EXPORT Fl_Tree_Prefs { Fl_Tree_Select _selectmode; // selection mode #if FLTK_ABI_VERSION >= 10302 Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior - Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label, widget() + Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget() #endif public: Fl_Tree_Prefs(); |
