3 #ifndef FL_TREE_PREFS_H 4 #define FL_TREE_PREFS_H 95 typedef 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;
319 if ( _userdeimage )
delete _userdeimage;
321 _userdeimage = _userimage->
copy();
336 return _closedeimage;
349 return(_showcollapse);
383 return(
int(_showroot));
390 _showroot = char(val);
406 return _itemreselectmode;
410 _itemreselectmode = mode;
414 return(_itemdrawmode);
424 void item_draw_callback(Fl_Tree_Item_Draw_Callback *cb,
void *data=0) {
425 _itemdrawcallback = cb;
426 _itemdrawuserdata = data;
428 Fl_Tree_Item_Draw_Callback* item_draw_callback()
const {
429 return(_itemdrawcallback);
431 void* item_draw_user_data()
const {
432 return(_itemdrawuserdata);
435 _itemdrawcallback(o, _itemdrawuserdata);
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:305
Add items in ascending sort order.
Definition: Fl_Tree_Prefs.H:49
int widgetmarginleft() const
Get the widget()'s left margin value in pixels.
Definition: Fl_Tree_Prefs.H:244
int linespacing() const
Get the line spacing value in pixels.
Definition: Fl_Tree_Prefs.H:252
Fl_Tree_Sort
Sort order options for items added to the tree.
Definition: Fl_Tree_Prefs.H:47
Fl_Tree_Connector connectorstyle() const
Get the connector style.
Definition: Fl_Tree_Prefs.H:272
void item_labelfont(Fl_Font val)
Set the label's font to val.
Definition: Fl_Tree_Prefs.H:147
Fl_Tree_Select selectmode() const
Get the selection mode used for the tree.
Definition: Fl_Tree_Prefs.H:393
Fl_Tree_Select
Tree selection style.
Definition: Fl_Tree_Prefs.H:65
Fl_Tree_Item_Draw_Mode item_draw_mode() const
Get the 'item draw mode' used for the tree.
Definition: Fl_Tree_Prefs.H:413
void showroot(int val)
Set if the root item should be shown or not.
Definition: Fl_Tree_Prefs.H:389
void selectmode(Fl_Tree_Select val)
Set the selection mode used for the tree to val.
Definition: Fl_Tree_Prefs.H:401
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
Use solid lines connecting items.
Definition: Fl_Tree_Prefs.H:59
Fl_Color labelfgcolor() const
Obsolete: Get the default label foreground color. Please use item_labelfgcolor() instead.
Definition: Fl_Tree_Prefs.H:182
Fl_Font item_labelfont() const
Return the label's font.
Definition: Fl_Tree_Prefs.H:145
void usericonmarginleft(int val)
Set the user icon's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:232
Use no lines connecting items.
Definition: Fl_Tree_Prefs.H:57
Enables FL_TREE_REASON_RESELECTED events for callbacks.
Definition: Fl_Tree_Prefs.H:80
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:62
Fl_Boxtype selectbox() const
Get the default selection box's box drawing style as an Fl_Boxtype.
Definition: Fl_Tree_Prefs.H:374
int showroot() const
Returns 1 if the root item is to be shown, or 0 if not.
Definition: Fl_Tree_Prefs.H:382
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:421
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
void connectorcolor(Fl_Color val)
Set the connector color used for tree connection lines.
Definition: Fl_Tree_Prefs.H:268
Fl_Color item_labelbgcolor() const
Get the default label background color.
Definition: Fl_Tree_Prefs.H:160
void showcollapse(int val)
Set if we should show the collapse icon or not.
Definition: Fl_Tree_Prefs.H:359
Fl_Fontsize item_labelsize() const
Return the label's size in pixels.
Definition: Fl_Tree_Prefs.H:149
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
Fl_Boxtype
FLTK standard box types.
Definition: Enumerations.H:598
int openchild_marginbottom() const
Get the margin below an open child in pixels.
Definition: Fl_Tree_Prefs.H:220
Multiple items can be selected by clicking with SHIFT, CTRL or mouse drags.
Definition: Fl_Tree_Prefs.H:68
If widget() defined, widget()'s height controls item's height.
Definition: Fl_Tree_Prefs.H:91
Fl_Image * usericon() const
Gets the default 'user icon' (default is 0)
Definition: Fl_Tree_Prefs.H:310
Item can only be selected once (default)
Definition: Fl_Tree_Prefs.H:79
Fl_Image * userdeicon() const
Return the deactivated version of the user icon, if any.
Definition: Fl_Tree_Prefs.H:340
void connectorwidth(int val)
Set the tree connection line's width.
Definition: Fl_Tree_Prefs.H:288
void item_labelbgcolor(Fl_Color val)
Set the default label background color.
Definition: Fl_Tree_Prefs.H:166
char showcollapse() const
Returns 1 if the collapse icon is enabled, 0 if not.
Definition: Fl_Tree_Prefs.H:348
void inactive()
The inactive() method calls color_average(FL_BACKGROUND_COLOR, 0.33f) to produce an image that appear...
Definition: Fl_Image.H:227
void sortorder(Fl_Tree_Sort val)
Set the default sort order value.
Definition: Fl_Tree_Prefs.H:370
void item_labelfgcolor(Fl_Color val)
Set the default label foreground color.
Definition: Fl_Tree_Prefs.H:155
Fl_Tree_Item_Reselect_Mode item_reselect_mode() const
Returns the current item re/selection mode.
Definition: Fl_Tree_Prefs.H:405
void item_labelsize(Fl_Fontsize val)
Set the label's size in pixels to val.
Definition: Fl_Tree_Prefs.H:151
void connectorstyle(Fl_Tree_Connector val)
Set the connector style.
Definition: Fl_Tree_Prefs.H:276
void connectorstyle(int val)
Set the connector style [integer].
Definition: Fl_Tree_Prefs.H:280
Fl_Color labelbgcolor() const
Obsolete: Get the default label background color. Please use item_labelbgcolor() instead.
Definition: Fl_Tree_Prefs.H:186
int margintop() const
Get the top margin's value in pixels.
Definition: Fl_Tree_Prefs.H:202
void widgetmarginleft(int val)
Set the widget's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:248
int marginleft() const
Get the left margin's value in pixels.
Definition: Fl_Tree_Prefs.H:194
Fl_Tree_Connector
Defines the style of connection lines between items.
Definition: Fl_Tree_Prefs.H:56
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
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:1014
void marginleft(int val)
Set the left margin's value in pixels.
Definition: Fl_Tree_Prefs.H:198
Nothing selected when items are clicked.
Definition: Fl_Tree_Prefs.H:66
Fl_Image * closedeicon() const
Return the deactivated version of the close icon, if any.
Definition: Fl_Tree_Prefs.H:335
If widget() defined, include label to the left of the widget.
Definition: Fl_Tree_Prefs.H:90
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042
Fl_Color connectorcolor() const
Get the connector color used for tree connection lines.
Definition: Fl_Tree_Prefs.H:264
void labelmarginleft(int val)
Set the label's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:240
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
Tree widget item.
Definition: Fl_Tree_Item.H:65
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:985
Add items in descending sort order.
Definition: Fl_Tree_Prefs.H:50
Fl_Tree_Item_Reselect_Mode
Defines the ways an item can be (re) selected via item_reselect_mode().
Definition: Fl_Tree_Prefs.H:78
void linespacing(int val)
Set the line spacing value in pixels.
Definition: Fl_Tree_Prefs.H:256
Fl_Font labelfont() const
Obsolete: Return the label's font. Please use item_labelfont() instead.
Definition: Fl_Tree_Prefs.H:174
Fl_Image * opendeicon() const
Return the deactivated version of the open icon, if any.
Definition: Fl_Tree_Prefs.H:330
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:316
Use dotted lines connecting items (default)
Definition: Fl_Tree_Prefs.H:58
int labelmarginleft() const
Get the label's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:236
Fl_Fontsize labelsize() const
Obsolete: Return the label's size in pixels. Please use item_labelsize() instead. ...
Definition: Fl_Tree_Prefs.H:178
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
Tree widget's preferences.
Definition: Fl_Tree_Prefs.H:105
int connectorwidth() const
Get the tree connection line's width.
Definition: Fl_Tree_Prefs.H:284
void margintop(int val)
Set the top margin's value in pixels.
Definition: Fl_Tree_Prefs.H:206
virtual Fl_Image * copy(int W, int H)
Creates a resized copy of the specified image.
Definition: Fl_Image.cxx:84
void selectbox(Fl_Boxtype val)
Set the default selection box's box drawing style to val.
Definition: Fl_Tree_Prefs.H:378
int marginbottom() const
Get the bottom margin's value in pixels.
Definition: Fl_Tree_Prefs.H:211
Fl_Tree_Sort sortorder() const
Get the default sort order value.
Definition: Fl_Tree_Prefs.H:363
Fl_Color item_labelfgcolor() const
Get the default label foreground color.
Definition: Fl_Tree_Prefs.H:153
Fl_Image * openicon() const
Get the current default 'open' icon.
Definition: Fl_Tree_Prefs.H:298
If widget() defined, draw in place of label, and widget() tracks item height (default) ...
Definition: Fl_Tree_Prefs.H:88
void openchild_marginbottom(int val)
Set the margin below an open child in pixels.
Definition: Fl_Tree_Prefs.H:224
Single item selected when item is clicked (default)
Definition: Fl_Tree_Prefs.H:67
No sorting; items are added in the order defined (default).
Definition: Fl_Tree_Prefs.H:48
int usericonmarginleft() const
Get the user icon's left margin value in pixels.
Definition: Fl_Tree_Prefs.H:228
void item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode)
Sets the item re/selection mode.
Definition: Fl_Tree_Prefs.H:409
Single items may be selected, and they may be reordered by mouse drag.
Definition: Fl_Tree_Prefs.H:70