From 474feee1db323f45fb121b02d76e776cb5c7c2f1 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Fri, 27 Apr 2012 02:03:48 +0000 Subject: 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 --- src/Fl_Tree.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Fl_Tree.cxx') diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx index 48eca8460..e1ab1baf0 100644 --- a/src/Fl_Tree.cxx +++ b/src/Fl_Tree.cxx @@ -554,7 +554,7 @@ Fl_Tree_Item* Fl_Tree::add(const char *path) { return(item); } -/// Add a new child to a tree-item. +/// Add a new child to a specific item in the tree. /// /// \param[in] item The existing item to add new child to. Must not be NULL. /// \param[in] name The label for the new item @@ -1724,6 +1724,9 @@ Fl_Tree_Item_Draw_Mode Fl_Tree::item_draw_mode() const { void Fl_Tree::item_draw_mode(Fl_Tree_Item_Draw_Mode val) { _prefs.item_draw_mode(val); } +void Fl_Tree::item_draw_mode(int val) { + _prefs.item_draw_mode(Fl_Tree_Item_Draw_Mode(val)); +} #endif /// See if \p item is currently displayed on-screen (visible within the widget). -- cgit v1.2.3