95typedef void (Fl_Tree_Item_Draw_Callback)(
Fl_Tree_Item*,
void*);
111 int _openchild_marginbottom;
112 int _usericonmarginleft;
113 int _labelmarginleft;
114 int _widgetmarginleft;
135 Fl_Tree_Item_Draw_Callback *_itemdrawcallback;
136 void *_itemdrawuserdata;
161 return _labelbgcolor;
212 return(_marginbottom);
221 return(_openchild_marginbottom);
225 _openchild_marginbottom = val;
229 return(_usericonmarginleft);
233 _usericonmarginleft = val;
237 return(_labelmarginleft);
241 _labelmarginleft = val;
245 return(_widgetmarginleft);
249 _widgetmarginleft = val;
253 return(_linespacing);
265 return(_connectorcolor);
269 _connectorcolor = val;
273 return(_connectorstyle);
277 _connectorstyle = val;
285 return(_connectorwidth);
289 _connectorwidth = val;
301 inline int openicon_w()
const {
return _openimage ? _openimage->
w() : 11; }
302 inline int openicon_h()
const {
return _openimage ? _openimage->
h() : 11; }
310 inline int closeicon_w()
const {
return _closeimage ? _closeimage->
w() : 11; }
311 inline int closeicon_h()
const {
return _closeimage ? _closeimage->
h() : 11; }
323 if ( _userdeimage )
delete _userdeimage;
325 _userdeimage = _userimage->
copy();
340 return _closedeimage;
353 return(_showcollapse);
387 return(
int(_showroot));
394 _showroot = char(val);
410 return _itemreselectmode;
414 _itemreselectmode = mode;
418 return(_itemdrawmode);
428 void item_draw_callback(Fl_Tree_Item_Draw_Callback *cb,
void *data=0) {
429 _itemdrawcallback = cb;
430 _itemdrawuserdata = data;
432 Fl_Tree_Item_Draw_Callback* item_draw_callback()
const {
433 return(_itemdrawcallback);
435 void* item_draw_user_data()
const {
436 return(_itemdrawuserdata);
439 _itemdrawcallback(o, _itemdrawuserdata);
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:1069
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition: Enumerations.H:1126
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:1098
Fl_Boxtype
FLTK standard box types.
Definition: Enumerations.H:650
Fl_Tree_Connector
Defines the style of connection lines between items.
Definition: Fl_Tree_Prefs.H:56
@ FL_TREE_CONNECTOR_SOLID
Use solid lines connecting items.
Definition: Fl_Tree_Prefs.H:59
@ FL_TREE_CONNECTOR_NONE
Use no lines connecting items.
Definition: Fl_Tree_Prefs.H:57
@ FL_TREE_CONNECTOR_DOTTED
Use dotted lines connecting items (default)
Definition: Fl_Tree_Prefs.H:58
Fl_Tree_Sort
Sort order options for items added to the tree.
Definition: Fl_Tree_Prefs.H:47
@ FL_TREE_SORT_ASCENDING
Add items in ascending sort order.
Definition: Fl_Tree_Prefs.H:49
@ FL_TREE_SORT_DESCENDING
Add items in descending sort order.
Definition: Fl_Tree_Prefs.H:50
@ FL_TREE_SORT_NONE
No sorting; items are added in the order defined (default).
Definition: Fl_Tree_Prefs.H:48
Fl_Tree_Item_Reselect_Mode
Defines the ways an item can be (re) selected via item_reselect_mode().
Definition: Fl_Tree_Prefs.H:78
@ FL_TREE_SELECTABLE_ALWAYS
Enables FL_TREE_REASON_RESELECTED events for callbacks.
Definition: Fl_Tree_Prefs.H:80
@ FL_TREE_SELECTABLE_ONCE
Item can only be selected once (default)
Definition: Fl_Tree_Prefs.H:79
Fl_Tree_Item_Draw_Mode
Bit flags that control how item's labels and widget()s are drawn in the tree via item_draw_mode().
Definition: Fl_Tree_Prefs.H:87
@ FL_TREE_ITEM_DRAW_DEFAULT
If widget() defined, draw in place of label, and widget() tracks item height (default)
Definition: Fl_Tree_Prefs.H:88
@ FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET
If widget() defined, include label to the left of the widget.
Definition: Fl_Tree_Prefs.H:90
@ FL_TREE_ITEM_HEIGHT_FROM_WIDGET
If widget() defined, widget()'s height controls item's height.
Definition: Fl_Tree_Prefs.H:91
Fl_Tree_Select
Tree selection style.
Definition: Fl_Tree_Prefs.H:65
@ FL_TREE_SELECT_NONE
Nothing selected when items are clicked.
Definition: Fl_Tree_Prefs.H:66
@ FL_TREE_SELECT_MULTI
Multiple items can be selected by clicking with SHIFT, CTRL or mouse drags.
Definition: Fl_Tree_Prefs.H:68
@ FL_TREE_SELECT_SINGLE
Single item selected when item is clicked (default)
Definition: Fl_Tree_Prefs.H:67
@ FL_TREE_SELECT_SINGLE_DRAGGABLE
Single items may be selected, and they may be reordered by mouse drag.
Definition: Fl_Tree_Prefs.H:70
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:60
void h(int H)
Sets the height of the image data.
Definition: Fl_Image.H:93
void w(int W)
Sets the width of the image data.
Definition: Fl_Image.H:87
virtual Fl_Image * copy(int W, int H) const
Creates a resized copy of the image.
Definition: Fl_Image.cxx:115
void inactive()
The inactive() method calls color_average(FL_BACKGROUND_COLOR, 0.33f) to produce an image that appear...
Definition: Fl_Image.H:279
Tree widget item.
Definition: Fl_Tree_Item.H:65
Tree widget's preferences.
Definition: Fl_Tree_Prefs.H:105
Fl_Color labelbgcolor() const
Obsolete: Get the default label background color. Please use item_labelbgcolor() instead.
Definition: Fl_Tree_Prefs.H:186
void marginbottom(int val)
Set the bottom margin's value in pixels This is the extra distance the vertical scroller lets you tra...
Definition: Fl_Tree_Prefs.H:216
void connectorstyle(int val)
Set the connector style [integer].
Definition: Fl_Tree_Prefs.H:280
Fl_Tree_Connector connectorstyle() const
Get the connector style.
Definition: Fl_Tree_Prefs.H:272
int margintop() const
Get the top margin's value in pixels.
Definition: Fl_Tree_Prefs.H:202
void labelmarginleft(int val)
Set the label's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:240
Fl_Fontsize labelsize() const
Obsolete: Return the label's size in pixels. Please use item_labelsize() instead.
Definition: Fl_Tree_Prefs.H:178
void marginleft(int val)
Set the left margin's value in pixels.
Definition: Fl_Tree_Prefs.H:198
Fl_Image * usericon() const
Gets the default 'user icon' (default is 0)
Definition: Fl_Tree_Prefs.H:314
int showroot() const
Returns 1 if the root item is to be shown, or 0 if not.
Definition: Fl_Tree_Prefs.H:386
void selectmode(Fl_Tree_Select val)
Set the selection mode used for the tree to val.
Definition: Fl_Tree_Prefs.H:405
Fl_Tree_Item_Draw_Mode item_draw_mode() const
Get the 'item draw mode' used for the tree.
Definition: Fl_Tree_Prefs.H:417
void linespacing(int val)
Set the line spacing value in pixels.
Definition: Fl_Tree_Prefs.H:256
void margintop(int val)
Set the top margin's value in pixels.
Definition: Fl_Tree_Prefs.H:206
Fl_Color item_labelbgcolor() const
Get the default label background color.
Definition: Fl_Tree_Prefs.H:160
void item_draw_mode(Fl_Tree_Item_Draw_Mode val)
Set the 'item draw mode' used for the tree to val.
Definition: Fl_Tree_Prefs.H:425
void labelfont(Fl_Font val)
Obsolete: Set the label's font to val. Please use item_labelfont(Fl_Font) instead.
Definition: Fl_Tree_Prefs.H:176
Fl_Tree_Select selectmode() const
Get the selection mode used for the tree.
Definition: Fl_Tree_Prefs.H:397
Fl_Tree_Item_Reselect_Mode item_reselect_mode() const
Returns the current item re/selection mode.
Definition: Fl_Tree_Prefs.H:409
void sortorder(Fl_Tree_Sort val)
Set the default sort order value.
Definition: Fl_Tree_Prefs.H:374
int widgetmarginleft() const
Get the widget()'s left margin value in pixels.
Definition: Fl_Tree_Prefs.H:244
void usericon(Fl_Image *val)
Sets the default 'user icon' Returns the Fl_Image* of the icon, or 0 if none (default).
Definition: Fl_Tree_Prefs.H:320
Fl_Image * openicon() const
Get the current default 'open' icon.
Definition: Fl_Tree_Prefs.H:298
Fl_Color connectorcolor() const
Get the connector color used for tree connection lines.
Definition: Fl_Tree_Prefs.H:264
void item_labelbgcolor(Fl_Color val)
Set the default label background color.
Definition: Fl_Tree_Prefs.H:166
void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode)
Sets the item re/selection mode.
Definition: Fl_Tree_Prefs.H:413
void usericonmarginleft(int val)
Set the user icon's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:232
Fl_Color labelfgcolor() const
Obsolete: Get the default label foreground color. Please use item_labelfgcolor() instead.
Definition: Fl_Tree_Prefs.H:182
int linespacing() const
Get the line spacing value in pixels.
Definition: Fl_Tree_Prefs.H:252
Fl_Image * closedeicon() const
Return the deactivated version of the close icon, if any.
Definition: Fl_Tree_Prefs.H:339
int marginbottom() const
Get the bottom margin's value in pixels.
Definition: Fl_Tree_Prefs.H:211
Fl_Image * userdeicon() const
Return the deactivated version of the user icon, if any.
Definition: Fl_Tree_Prefs.H:344
char showcollapse() const
Returns 1 if the collapse icon is enabled, 0 if not.
Definition: Fl_Tree_Prefs.H:352
int marginleft() const
Get the left margin's value in pixels.
Definition: Fl_Tree_Prefs.H:194
void openchild_marginbottom(int val)
Set the margin below an open child in pixels.
Definition: Fl_Tree_Prefs.H:224
int labelmarginleft() const
Get the label's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:236
void connectorcolor(Fl_Color val)
Set the connector color used for tree connection lines.
Definition: Fl_Tree_Prefs.H:268
void showroot(int val)
Set if the root item should be shown or not.
Definition: Fl_Tree_Prefs.H:393
void labelbgcolor(Fl_Color val)
Obsolete: Set the default label background color. Please use item_labelbgcolor(Fl_Color) instead.
Definition: Fl_Tree_Prefs.H:188
void labelfgcolor(Fl_Color val)
Obsolete: Set the default label foreground color. Please use item_labelfgcolor(Fl_Color) instead.
Definition: Fl_Tree_Prefs.H:184
void item_labelsize(Fl_Fontsize val)
Set the label's size in pixels to val.
Definition: Fl_Tree_Prefs.H:151
int connectorwidth() const
Get the tree connection line's width.
Definition: Fl_Tree_Prefs.H:284
int usericonmarginleft() const
Get the user icon's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:228
Fl_Color item_labelfgcolor() const
Get the default label foreground color.
Definition: Fl_Tree_Prefs.H:153
void connectorwidth(int val)
Set the tree connection line's width.
Definition: Fl_Tree_Prefs.H:288
Fl_Image * closeicon() const
Gets the default 'close' icon Returns the Fl_Image* of the icon, or 0 if none.
Definition: Fl_Tree_Prefs.H:307
int openchild_marginbottom() const
Get the margin below an open child in pixels.
Definition: Fl_Tree_Prefs.H:220
void selectbox(Fl_Boxtype val)
Set the default selection box's box drawing style to val.
Definition: Fl_Tree_Prefs.H:382
void labelsize(Fl_Fontsize val)
Obsolete: Set the label's size in pixels to val. Please use item_labelsize(Fl_Fontsize) instead.
Definition: Fl_Tree_Prefs.H:180
void widgetmarginleft(int val)
Set the widget's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:248
void showcollapse(int val)
Set if we should show the collapse icon or not.
Definition: Fl_Tree_Prefs.H:363
void item_labelfont(Fl_Font val)
Set the label's font to val.
Definition: Fl_Tree_Prefs.H:147
void item_labelfgcolor(Fl_Color val)
Set the default label foreground color.
Definition: Fl_Tree_Prefs.H:155
Fl_Font item_labelfont() const
Return the label's font.
Definition: Fl_Tree_Prefs.H:145
Fl_Fontsize item_labelsize() const
Return the label's size in pixels.
Definition: Fl_Tree_Prefs.H:149
Fl_Image * opendeicon() const
Return the deactivated version of the open icon, if any.
Definition: Fl_Tree_Prefs.H:334
void connectorstyle(Fl_Tree_Connector val)
Set the connector style.
Definition: Fl_Tree_Prefs.H:276
Fl_Tree_Sort sortorder() const
Get the default sort order value.
Definition: Fl_Tree_Prefs.H:367
Fl_Boxtype selectbox() const
Get the default selection box's box drawing style as an Fl_Boxtype.
Definition: Fl_Tree_Prefs.H:378
Fl_Font labelfont() const
Obsolete: Return the label's font. Please use item_labelfont() instead.
Definition: Fl_Tree_Prefs.H:174