Tree widget's preferences. More...
#include <Fl_Tree_Prefs.H>
Public Member Functions | |
void | closeicon (Fl_Image *val) |
Sets the icon to be used as the 'close' icon. | |
Fl_Image * | closeicon () const |
Gets the default 'close' icon Returns the Fl_Image* of the icon, or 0 if none. | |
void | connectorcolor (Fl_Color val) |
Set the connector color used for tree connection lines. | |
Fl_Color | connectorcolor () const |
Get the connector color used for tree connection lines. | |
void | connectorstyle (int val) |
Set the connector style [integer]. | |
void | connectorstyle (Fl_Tree_Connector val) |
Set the connector style. | |
Fl_Tree_Connector | connectorstyle () const |
Get the connector style. | |
void | connectorwidth (int val) |
Set the tree connection line's width. | |
int | connectorwidth () const |
Get the tree connection line's width. | |
Fl_Tree_Prefs () | |
Fl_Tree_Prefs constructor. | |
void | item_labelbgcolor (Fl_Color val) |
Set the default label background color. | |
Fl_Color | item_labelbgcolor () const |
Get the default label background color. | |
void | item_labelfgcolor (Fl_Color val) |
Set the default label foreground color. | |
Fl_Color | item_labelfgcolor () const |
Get the default label foreground color. | |
void | item_labelfont (Fl_Font val) |
Set the label's font to val . | |
Fl_Font | item_labelfont () const |
Return the label's font. | |
void | item_labelsize (Fl_Fontsize val) |
Set the label's size in pixels to val . | |
Fl_Fontsize | item_labelsize () const |
Return the label's size in pixels. | |
void | labelbgcolor (Fl_Color val) |
Obsolete: Set the default label background color. Please use item_labelbgcolor(Fl_Color) instead. | |
Fl_Color | labelbgcolor () const |
Obsolete: Get the default label background color. Please use item_labelbgcolor() instead. | |
void | labelfgcolor (Fl_Color val) |
Obsolete: Set the default label foreground color. Please use item_labelfgcolor(Fl_Color) instead. | |
Fl_Color | labelfgcolor () const |
Obsolete: Get the default label foreground color. Please use item_labelfgcolor() instead. | |
void | labelfont (Fl_Font val) |
Obsolete: Set the label's font to val . Please use item_labelfont(Fl_Font) instead. | |
Fl_Font | labelfont () const |
Obsolete: Return the label's font. | |
void | labelmarginleft (int val) |
Set the label's left margin value in pixels. | |
int | labelmarginleft () const |
Get the label's left margin value in pixels. | |
void | labelsize (Fl_Fontsize val) |
Obsolete: Set the label's size in pixels to val . Please use item_labelsize(Fl_Fontsize) instead. | |
Fl_Fontsize | labelsize () const |
Obsolete: Return the label's size in pixels. Please use item_labelsize() instead. | |
void | linespacing (int val) |
Set the line spacing value in pixels. | |
int | linespacing () const |
Get the line spacing value in pixels. | |
void | marginleft (int val) |
Set the left margin's value in pixels. | |
int | marginleft () const |
Get the left margin's value in pixels. | |
void | margintop (int val) |
Set the top margin's value in pixels. | |
int | margintop () const |
Get the top margin's value in pixels. | |
void | openchild_marginbottom (int val) |
Set the margin below an open child in pixels. | |
int | openchild_marginbottom () const |
Get the margin below an open child in pixels. | |
void | openicon (Fl_Image *val) |
Sets the default icon to be used as the 'open' icon when items are add()ed to the tree. | |
Fl_Image * | openicon () const |
Get the current default 'open' icon. | |
void | selectbox (Fl_Boxtype val) |
Set the default selection box's box drawing style to val . | |
Fl_Boxtype | selectbox () const |
Get the default selection box's box drawing style as an Fl_Boxtype. | |
void | selectmode (Fl_Tree_Select val) |
Set the selection mode used for the tree to val . | |
Fl_Tree_Select | selectmode () const |
Get the selection mode used for the tree. | |
void | showcollapse (int val) |
Set if we should show the collapse icon or not. | |
char | showcollapse () const |
Returns 1 if the collapse icon is enabled, 0 if not. | |
void | showroot (int val) |
Set if the root item should be shown or not. | |
int | showroot () const |
Returns 1 if the root item is to be shown, or 0 if not. | |
void | sortorder (Fl_Tree_Sort val) |
Set the default sort order value. | |
Fl_Tree_Sort | sortorder () const |
Get the default sort order value. | |
void | usericon (Fl_Image *val) |
Sets the default 'user icon' Returns the Fl_Image* of the icon, or 0 if none (default). | |
Fl_Image * | usericon () const |
Gets the default 'user icon' (default is 0). | |
void | usericonmarginleft (int val) |
Set the user icon's left margin value in pixels. | |
int | usericonmarginleft () const |
Get the user icon's left margin value in pixels. |
Tree widget's preferences.
Fl_Tree's Preferences class.
This class manages the Fl_Tree's defaults. You should probably be using the methods in Fl_Tree instead of trying to accessing tree's preferences settings directly.
void Fl_Tree_Prefs::closeicon | ( | Fl_Image * | val | ) |
Sets the icon to be used as the 'close' icon.
This overrides the built in default '[-]' icon.
[in] | val | -- The new image, or zero to use the default [-] icon. |
Fl_Color Fl_Tree_Prefs::connectorcolor | ( | ) | const [inline] |
Get the connector color used for tree connection lines.
Fl_Font Fl_Tree_Prefs::item_labelfont | ( | ) | const [inline] |
Return the label's font.
Fl_Font Fl_Tree_Prefs::labelfont | ( | ) | const [inline] |
Obsolete: Return the label's font.
Please use item_labelfont() instead.
void Fl_Tree_Prefs::openicon | ( | Fl_Image * | val | ) |
Sets the default icon to be used as the 'open' icon when items are add()ed to the tree.
This overrides the built in default '[+]' icon.
[in] | val | -- The new image, or zero to use the default [+] icon. |
Fl_Image* Fl_Tree_Prefs::openicon | ( | ) | const [inline] |
Get the current default 'open' icon.
Returns the Fl_Image* of the icon, or 0 if none.
void Fl_Tree_Prefs::selectmode | ( | Fl_Tree_Select | val | ) | [inline] |
Set the selection mode used for the tree to val
.
This affects how items in the tree are selected when clicked on and dragged over by the mouse. See Fl_Tree_Select for possible values.
void Fl_Tree_Prefs::showcollapse | ( | int | val | ) | [inline] |
Set if we should show the collapse icon or not.
If collapse icons are disabled, the user will not be able to interactively collapse items in the tree, unless the application provides some other means via open() and close().
[in] | val | 1: shows collapse icons (default), 0: hides collapse icons. |
char Fl_Tree_Prefs::showcollapse | ( | ) | const [inline] |
Returns 1 if the collapse icon is enabled, 0 if not.
void Fl_Tree_Prefs::showroot | ( | int | val | ) | [inline] |
Set if the root item should be shown or not.
[in] | val | 1 -- show the root item (default) 0 -- hide the root item. |
void Fl_Tree_Prefs::sortorder | ( | Fl_Tree_Sort | val | ) | [inline] |
Set the default sort order value.
Defines the order new items appear when add()ed to the tree. See Fl_Tree_Sort for possible values.