summaryrefslogtreecommitdiff
path: root/FL/Fl_Tree.H
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2013-11-10 04:33:44 +0000
committerGreg Ercolano <erco@seriss.com>2013-11-10 04:33:44 +0000
commit88cea3c82dd821e652608fcccce229fea0249d08 (patch)
treeaf8f5c8c8d3336522a98959b717c4855eb2114c2 /FL/Fl_Tree.H
parent39a8ef3c4cb3fb61c7aec9717423490aad6604ff (diff)
o Added Fl_Tree::item_draw_callback(), letting one define a custom draw function for Fl_Tree_Item's.
o Added examples/tree-custom-draw-items.cxx to demonstrate its use. o Fixed small doc error for recent Fl_Tree::get_selected_items() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10018 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Tree.H')
-rw-r--r--FL/Fl_Tree.H10
1 files changed, 9 insertions, 1 deletions
diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H
index f29161c01..ed2a2d526 100644
--- a/FL/Fl_Tree.H
+++ b/FL/Fl_Tree.H
@@ -96,6 +96,8 @@
/// Items can be found by their pathname using find_item(const char*),
/// and an item's pathname can be found with item_pathname().
/// The selected items' colors are controlled by selection_color() (inherited from Fl_Widget).
+/// A hook is provided to allow you to redefine how item's labels are drawn
+/// via Fl_Tree::item_draw_callback().
///
/// \b SELECTION OF ITEMS
///
@@ -465,7 +467,13 @@ public:
Fl_Tree_Item_Draw_Mode item_draw_mode() const;
void item_draw_mode(Fl_Tree_Item_Draw_Mode mode);
void item_draw_mode(int mode);
-#endif /*FLTK_ABI_VERSION*/
+#endif
+#if FLTK_ABI_VERSION >= 10303
+ void item_draw_callback(Fl_Tree_Item_Draw_Callback *cb, void *data=0);
+ Fl_Tree_Item_Draw_Callback* item_draw_callback() const;
+ void* item_draw_user_data() const;
+ void do_item_draw_callback(Fl_Tree_Item *o) const;
+#endif
int displayed(Fl_Tree_Item *item);
void show_item(Fl_Tree_Item *item, int yoff);
void show_item(Fl_Tree_Item *item);