FLTK 1.4.4: Fl_Tree_Prefs Class Reference

FLTK 1.4.4

Loading...
Searching...
No Matches
Fl_Tree_Prefs Class Reference

Tree widget's preferences. More...

`#include <Fl_Tree_Prefs.H>`

## Public Member Functions
Fl_Image * | closedeicon () const
| Return the deactivated version of the close icon, if any.
Fl_Image * | closeicon () const
| Gets the default 'close' icon Returns the Fl_Image* of the icon, or 0 if none.
void | closeicon (Fl_Image *val)
| Sets the icon to be used as the 'close' icon.
int | closeicon_h () const
int | closeicon_w () const
Fl_Color | connectorcolor () const
| Get the connector color used for tree connection lines.
void | connectorcolor (Fl_Color val)
| Set the connector color used for tree connection lines.
Fl_Tree_Connector | connectorstyle () const
| Get the connector style.
void | connectorstyle (Fl_Tree_Connector val)
| Set the connector style.
void | connectorstyle (int val)
| Set the connector style [integer].
int | connectorwidth () const
| Get the tree connection line's width.
void | connectorwidth (int val)
| Set the tree connection line's width.
void | do_item_draw_callback (Fl_Tree_Item *o) const
| Fl_Tree_Prefs ()
| Fl_Tree_Prefs constructor.
Fl_Tree_Item_Draw_Callback * | item_draw_callback () const
void | item_draw_callback (Fl_Tree_Item_Draw_Callback *cb, void *data=0)
Fl_Tree_Item_Draw_Mode | item_draw_mode () const
| Get the 'item draw mode' used for the tree.
void | item_draw_mode (Fl_Tree_Item_Draw_Mode val)
| Set the 'item draw mode' used for the tree to `val`.
void * | item_draw_user_data () const
Fl_Color | item_labelbgcolor () const
| Get the default label background color.
void | item_labelbgcolor (Fl_Color val)
| Set the default label background color.
Fl_Color | item_labelfgcolor () const
| Get the default label foreground color.
void | item_labelfgcolor (Fl_Color val)
| Set the default label foreground color.
Fl_Font | item_labelfont () const
| Return the label's font.
void | item_labelfont (Fl_Font val)
| Set the label's font to `val`.
Fl_Fontsize | item_labelsize () const
| Return the label's size in pixels.
void | item_labelsize (Fl_Fontsize val)
| Set the label's size in pixels to `val`.
Fl_Tree_Item_Reselect_Mode | item_reselect_mode () const
| Returns the current item re/selection mode.
void | item_reselect_mode (Fl_Tree_Item_Reselect_Mode mode)
| Sets the item re/selection mode.
Fl_Color | labelbgcolor () const
| Obsolete: Get the default label background color. Please use item_labelbgcolor() instead.
void | labelbgcolor (Fl_Color val)
| Obsolete: Set the default label background color. Please use item_labelbgcolor(Fl_Color) instead.
Fl_Color | labelfgcolor () const
| Obsolete: Get the default label foreground color. Please use item_labelfgcolor() instead.
void | labelfgcolor (Fl_Color val)
| Obsolete: Set the default label foreground color. Please use item_labelfgcolor(Fl_Color) instead.
Fl_Font | labelfont () const
| Obsolete: Return the label's font. Please use item_labelfont() instead.
void | labelfont (Fl_Font val)
| Obsolete: Set the label's font to `val`. Please use item_labelfont(Fl_Font) instead.
int | labelmarginleft () const
| Get the label's left margin value in pixels.
void | labelmarginleft (int val)
| Set the label's left margin value in pixels.
Fl_Fontsize | labelsize () const
| Obsolete: Return the label's size in pixels. Please use item_labelsize() instead.
void | labelsize (Fl_Fontsize val)
| Obsolete: Set the label's size in pixels to `val`. Please use item_labelsize(Fl_Fontsize) instead.
int | linespacing () const
| Get the line spacing value in pixels.
void | linespacing (int val)
| Set the line spacing value in pixels.
int | marginbottom () const
| Get the bottom margin's value in pixels.
void | marginbottom (int val)
| Set the bottom margin's value in pixels This is the extra distance the vertical scroller lets you travel.
int | marginleft () const
| Get the left margin's value in pixels.
void | marginleft (int val)
| Set the left margin's value in pixels.
int | margintop () const
| Get the top margin's value in pixels.
void | margintop (int val)
| Set the top margin's value in pixels.
int | openchild_marginbottom () const
| Get the margin below an open child in pixels.
void | openchild_marginbottom (int val)
| Set the margin below an open child in pixels.
Fl_Image * | opendeicon () const
| Return the deactivated version of the open icon, if any.
Fl_Image * | openicon () const
| Get the current default 'open' icon.
void | openicon (Fl_Image *val)
| Sets the default icon to be used as the 'open' icon when items are add()ed to the tree.
int | openicon_h () const
int | openicon_w () const
Fl_Boxtype | selectbox () const
| Get the default selection box's box drawing style as an Fl_Boxtype.
void | selectbox (Fl_Boxtype val)
| Set the default selection box's box drawing style to `val`.
Fl_Tree_Select | selectmode () const
| Get the selection mode used for the tree.
void | selectmode (Fl_Tree_Select val)
| Set the selection mode used for the tree to `val`.
char | showcollapse () const
| Returns 1 if the collapse icon is enabled, 0 if not.
void | showcollapse (int val)
| Set if we should show the collapse icon or not.
int | showroot () const
| Returns 1 if the root item is to be shown, or 0 if not.
void | showroot (int val)
| Set if the root item should be shown or not.
Fl_Tree_Sort | sortorder () const
| Get the default sort order value.
void | sortorder (Fl_Tree_Sort val)
| Set the default sort order value.
Fl_Image * | userdeicon () const
| Return the deactivated version of the user icon, if any.
Fl_Image * | usericon () const
| Gets the default 'user icon' (default is 0)
void | usericon (Fl_Image *val)
| Sets the default 'user icon' Returns the Fl_Image* of the icon, or 0 if none (default).
int | usericonmarginleft () const
| Get the user icon's left margin value in pixels.
void | usericonmarginleft (int val)
| Set the user icon's left margin value in pixels.
int | widgetmarginleft () const
| Get the widget()'s left margin value in pixels.
void | widgetmarginleft (int val)
| Set the widget's left margin value in pixels.
| ~Fl_Tree_Prefs ()
| Fl_Tree_Prefs destructor.

## Detailed Description

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.

## Member Function Documentation

## ◆ closedeicon()

Fl_Image * Fl_Tree_Prefs::closedeicon | ( |  | ) | const
| inline

Return the deactivated version of the close icon, if any.

Returns 0 if none.

## ◆ closeicon()

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.

Parameters

  [in] | val | – The new image, or zero to use the default [-] icon.

## ◆ item_draw_mode()

void Fl_Tree_Prefs::item_draw_mode | ( | Fl_Tree_Item_Draw_Mode | val | ) |
| inline

Set the 'item draw mode' used for the tree to `val`.

This affects how items in the tree are drawn, such as when a widget() is defined. See Fl_Tree_Item_Draw_Mode for possible values.

## ◆ item_labelbgcolor() [1/2]

Fl_Color Fl_Tree_Prefs::item_labelbgcolor | ( |  | ) | const
| inline

Get the default label background color.

This returns the Fl_Tree::color() unless item_labelbgcolor() has been set explicitly.

## ◆ item_labelbgcolor() [2/2]

void Fl_Tree_Prefs::item_labelbgcolor | ( | Fl_Color | val | ) |
| inline

Set the default label background color.

Once set, overrides the default behavior of using Fl_Tree::color().

## ◆ marginbottom()

int Fl_Tree_Prefs::marginbottom | ( |  | ) | const
| inline

Get the bottom margin's value in pixels.

This is the extra distance the vertical scroller lets you travel.

## ◆ opendeicon()

Fl_Image * Fl_Tree_Prefs::opendeicon | ( |  | ) | const
| inline

Return the deactivated version of the open icon, if any.

Returns 0 if none.

## ◆ openicon() [1/2]

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.

## ◆ openicon() [2/2]

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.

Parameters

  [in] | val | – The new image, or zero to use the default [+] icon.

## ◆ selectmode()

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.

## ◆ showcollapse()

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().

Parameters

  [in] | val | 1: shows collapse icons (default), 0: hides collapse icons.

## ◆ showroot()

void Fl_Tree_Prefs::showroot | ( | int | val | ) |
| inline

Set if the root item should be shown or not.

Parameters

  [in] | val | 1 – show the root item (default) 0 – hide the root item.

## ◆ sortorder()

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.

## ◆ userdeicon()

Fl_Image * Fl_Tree_Prefs::userdeicon | ( |  | ) | const
| inline

Return the deactivated version of the user icon, if any.

Returns 0 if none.

The documentation for this class was generated from the following files:

- Fl_Tree_Prefs.H
- Fl_Tree_Prefs.cxx