summaryrefslogtreecommitdiff
path: root/src/Fl_Tree_Prefs.cxx
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2012-04-22 13:40:02 +0000
committerGreg Ercolano <erco@seriss.com>2012-04-22 13:40:02 +0000
commitf58cd169c08a4be9ae07903a9e61b686bb7a75b6 (patch)
treea2a498a84c10cb1c8ba57f52f6511922aa8ce8a1 /src/Fl_Tree_Prefs.cxx
parentdc6e8a5f8ae8c24bf7fb3aa0d702eb4415ace6b5 (diff)
Various mods for Fl_Tree
o Fix STR#2828 (E): {Vertical|Widget} Gap o Moved Fabien's reselected methods to Fl_Tree_Prefs, return method made const, doxygen, removed underbars from methods (to follow general API) o Widgets can now appear to the right of labels. This can be controlled with item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) o Cleaned up Fl_Tree_Item::draw(), Fl_Tree::draw() o New methods: marginbottom() -- [ABI feature] extra space below last tree element when scrolling widgetmarginleft() -- [ABI feature] space to left of widget usericonmarginleft() -- space to left of usericon labelmarginleft() -- space to left of label item_draw_mode() -- control how items, widget() are drawn o Updated Fl_Tree docs, tree-elements.png o test/tree: added sliders to test the above new features, added "open all" and "close all" buttons o Probably other stuff.. TODO: Fix "scroll-beyond-bottom" (STR#2796) TODO: Fix other items in STR#2828 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tree_Prefs.cxx')
-rw-r--r--src/Fl_Tree_Prefs.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Fl_Tree_Prefs.cxx b/src/Fl_Tree_Prefs.cxx
index b8b640d4a..c32262d5b 100644
--- a/src/Fl_Tree_Prefs.cxx
+++ b/src/Fl_Tree_Prefs.cxx
@@ -125,11 +125,15 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
_labelsize = FL_NORMAL_SIZE;
_marginleft = 6;
_margintop = 3;
- //_marginright = 3;
- //_marginbottom = 3;
+#if FLTK_ABI_VERSION >= 10302
+ _marginbottom = 20;
+#endif
_openchild_marginbottom = 0;
_usericonmarginleft = 3;
_labelmarginleft = 3;
+#if FLTK_ABI_VERSION >= 10302
+ _widgetmarginleft = 3;
+#endif
_linespacing = 0;
_labelfgcolor = FL_BLACK;
_labelbgcolor = FL_WHITE;
@@ -148,6 +152,10 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
_sortorder = FL_TREE_SORT_NONE;
_selectbox = FL_FLAT_BOX;
_selectmode = FL_TREE_SELECT_SINGLE;
+#if FLTK_ABI_VERSION >= 10302
+ _itemreselectmode = FL_TREE_SELECTABLE_ONCE;
+ _itemdrawmode = FL_TREE_ITEM_DRAW_WIDGET_ONLY;
+#endif
// Let fltk's current 'scheme' affect defaults
if ( Fl::scheme() ) {
if ( strcmp(Fl::scheme(), "gtk+") == 0 ) {