fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Tree_Prefs Class Reference

Tree widget's preferences. More...

#include <Fl_Tree_Prefs.H>

Collaboration diagram for Fl_Tree_Prefs:

List of all members.

Public Member Functions

 Fl_Tree_Prefs ()
 Fl_Tree_Prefs constructor.
int labelfont () const
void labelfont (int val)
 Set the label's font to val.
int labelsize () const
 Return the label's size in pixels.
void labelsize (int val)
 Set the label's size in pixels to val.
int marginleft () const
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.
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 labelmarginleft () const
 Get the label's left margin value in pixels.
void labelmarginleft (int val)
 Set the label's left margin value in pixels.
int linespacing () const
 Get the line spacing value in pixels.
void linespacing (int val)
 Set the line spacing value in pixels.
Fl_Color fgcolor () const
void fgcolor (Fl_Color val)
 Set the default label foreground color.
Fl_Color bgcolor () const
 Get the default label background color.
void bgcolor (Fl_Color val)
 Set the default label background color.
Fl_Color selectcolor () const
 Get the default selection color.
void selectcolor (Fl_Color val)
 Set the default selection color.
Fl_Color inactivecolor () const
 Get the default inactive color.
void inactivecolor (Fl_Color val)
 Set the default inactive color.
Fl_Color connectorcolor () const
 Get the connector color; the color used for tree connection lines.
void connectorcolor (Fl_Color val)
 Set the connector color; the 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.
Fl_Imageopenicon () const
void openicon (Fl_Image *val)
Fl_Imagecloseicon () const
void closeicon (Fl_Image *val)
Fl_Imageusericon () const
 Gets the default 'user icon' (default is 0)
void usericon (Fl_Image *val)
char showcollapse () const
void showcollapse (int val)
Fl_Tree_Sort sortorder () const
 Get the default sort order value.
void sortorder (Fl_Tree_Sort val)
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.
int showroot () const
 Returns 1 if the root item is to be shown, or 0 if not.
void showroot (int val)
Fl_Tree_Select selectmode () const
 Get the selection mode used for the tree.
void selectmode (Fl_Tree_Select val)

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.

Definition at line 85 of file Fl_Tree_Prefs.H.


Constructor & Destructor Documentation


Member Function Documentation

Fl_Color Fl_Tree_Prefs::bgcolor ( ) const [inline]

Get the default label background color.

Definition at line 215 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw(), and Fl_Tree_Item::Fl_Tree_Item().

void Fl_Tree_Prefs::bgcolor ( Fl_Color  val) [inline]

Set the default label background color.

Definition at line 219 of file Fl_Tree_Prefs.H.

References val.

Fl_Image* Fl_Tree_Prefs::closeicon ( ) const [inline]

Gets the default 'close' icon Returns the Fl_Image* of the icon, or 0 if none.

Definition at line 280 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

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.

Definition at line 123 of file Fl_Tree_Prefs.cxx.

Fl_Color Fl_Tree_Prefs::connectorcolor ( ) const [inline]

Get the connector color; the color used for tree connection lines.

Definition at line 239 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw_horizontal_connector(), and Fl_Tree_Item::draw_vertical_connector().

void Fl_Tree_Prefs::connectorcolor ( Fl_Color  val) [inline]

Set the connector color; the color used for tree connection lines.

Definition at line 243 of file Fl_Tree_Prefs.H.

References val.

Fl_Tree_Connector Fl_Tree_Prefs::connectorstyle ( ) const [inline]

Get the connector style.

Definition at line 247 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw(), Fl_Tree_Item::draw_horizontal_connector(), and Fl_Tree_Item::draw_vertical_connector().

void Fl_Tree_Prefs::connectorstyle ( Fl_Tree_Connector  val) [inline]

Set the connector style.

Definition at line 251 of file Fl_Tree_Prefs.H.

References val.

void Fl_Tree_Prefs::connectorstyle ( int  val) [inline]

Set the connector style [integer].

Definition at line 255 of file Fl_Tree_Prefs.H.

int Fl_Tree_Prefs::connectorwidth ( ) const [inline]

Get the tree connection line's width.

Definition at line 259 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

void Fl_Tree_Prefs::connectorwidth ( int  val) [inline]

Set the tree connection line's width.

Definition at line 263 of file Fl_Tree_Prefs.H.

References val.

void Fl_Tree_Prefs::fgcolor ( Fl_Color  val) [inline]

Set the default label foreground color.

Definition at line 211 of file Fl_Tree_Prefs.H.

References val.

Fl_Color Fl_Tree_Prefs::fgcolor ( ) const [inline]

Get the default label foreground color

Definition at line 207 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::Fl_Tree_Item().

Fl_Color Fl_Tree_Prefs::inactivecolor ( ) const [inline]

Get the default inactive color.

Definition at line 231 of file Fl_Tree_Prefs.H.

void Fl_Tree_Prefs::inactivecolor ( Fl_Color  val) [inline]

Set the default inactive color.

Definition at line 235 of file Fl_Tree_Prefs.H.

References val.

int Fl_Tree_Prefs::labelfont ( ) const [inline]

Return the label's font.

Definition at line 119 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree::draw(), and Fl_Tree_Item::Fl_Tree_Item().

void Fl_Tree_Prefs::labelfont ( int  val) [inline]

Set the label's font to val.

Definition at line 123 of file Fl_Tree_Prefs.H.

References val.

int Fl_Tree_Prefs::labelmarginleft ( ) const [inline]

Get the label's left margin value in pixels.

Definition at line 187 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

void Fl_Tree_Prefs::labelmarginleft ( int  val) [inline]

Set the label's left margin value in pixels.

Definition at line 191 of file Fl_Tree_Prefs.H.

References val.

void Fl_Tree_Prefs::labelsize ( int  val) [inline]

Set the label's size in pixels to val.

Definition at line 131 of file Fl_Tree_Prefs.H.

References val.

int Fl_Tree_Prefs::labelsize ( ) const [inline]

Return the label's size in pixels.

Definition at line 127 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree::draw(), and Fl_Tree_Item::Fl_Tree_Item().

void Fl_Tree_Prefs::linespacing ( int  val) [inline]

Set the line spacing value in pixels.

Definition at line 199 of file Fl_Tree_Prefs.H.

References val.

int Fl_Tree_Prefs::linespacing ( ) const [inline]

Get the line spacing value in pixels.

Definition at line 195 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

int Fl_Tree_Prefs::marginleft ( ) const [inline]

Get the left margin's value in pixels

Definition at line 139 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree::draw().

void Fl_Tree_Prefs::marginleft ( int  val) [inline]

Set the left margin's value in pixels.

Definition at line 143 of file Fl_Tree_Prefs.H.

References val.

void Fl_Tree_Prefs::margintop ( int  val) [inline]

Set the top margin's value in pixels.

Definition at line 151 of file Fl_Tree_Prefs.H.

References val.

int Fl_Tree_Prefs::margintop ( ) const [inline]

Get the top margin's value in pixels.

Definition at line 147 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree::draw().

int Fl_Tree_Prefs::openchild_marginbottom ( ) const [inline]

Get the margin below an open child in pixels.

Definition at line 155 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

void Fl_Tree_Prefs::openchild_marginbottom ( int  val) [inline]

Set the margin below an open child in pixels.

Definition at line 159 of file Fl_Tree_Prefs.H.

References val.

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.

Definition at line 273 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

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.

Definition at line 114 of file Fl_Tree_Prefs.cxx.

Fl_Boxtype Fl_Tree_Prefs::selectbox ( ) const [inline]

Get the default selection box's box drawing style as an Fl_Boxtype.

Definition at line 325 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

void Fl_Tree_Prefs::selectbox ( Fl_Boxtype  val) [inline]

Set the default selection box's box drawing style to val.

Definition at line 329 of file Fl_Tree_Prefs.H.

References val.

Fl_Color Fl_Tree_Prefs::selectcolor ( ) const [inline]

Get the default selection color.

Definition at line 223 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

void Fl_Tree_Prefs::selectcolor ( Fl_Color  val) [inline]

Set the default selection color.

Definition at line 227 of file Fl_Tree_Prefs.H.

References val.

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.

Definition at line 352 of file Fl_Tree_Prefs.H.

References val.

Fl_Tree_Select Fl_Tree_Prefs::selectmode ( ) const [inline]

Get the selection mode used for the tree.

Definition at line 344 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree::handle().

char Fl_Tree_Prefs::showcollapse ( ) const [inline]

Returns 1 if the collapse icon is enabled, 0 if not.

Definition at line 299 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw(), and Fl_Tree_Item::event_on_collapse_icon().

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]val1: shows collapse icons (default),
0: hides collapse icons.

Definition at line 310 of file Fl_Tree_Prefs.H.

References val.

void Fl_Tree_Prefs::showroot ( int  val) [inline]

Set if the root item should be shown or not.

Parameters:
[in]val1 -- show the root item (default)
0 -- hide the root item.

Definition at line 340 of file Fl_Tree_Prefs.H.

int Fl_Tree_Prefs::showroot ( ) const [inline]

Returns 1 if the root item is to be shown, or 0 if not.

Definition at line 333 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw(), Fl_Tree_Item::find_clicked(), Fl_Tree_Item::next_displayed(), and Fl_Tree_Item::prev_displayed().

Fl_Tree_Sort Fl_Tree_Prefs::sortorder ( ) const [inline]

Get the default sort order value.

Definition at line 314 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::add().

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.

Definition at line 321 of file Fl_Tree_Prefs.H.

References val.

void Fl_Tree_Prefs::usericon ( Fl_Image val) [inline]

Sets the default 'user icon' Returns the Fl_Image* of the icon, or 0 if none (default).

Definition at line 291 of file Fl_Tree_Prefs.H.

References val.

Fl_Image* Fl_Tree_Prefs::usericon ( ) const [inline]

Gets the default 'user icon' (default is 0)

Definition at line 285 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().

void Fl_Tree_Prefs::usericonmarginleft ( int  val) [inline]

Set the user icon's left margin value in pixels.

Definition at line 183 of file Fl_Tree_Prefs.H.

References val.

int Fl_Tree_Prefs::usericonmarginleft ( ) const [inline]

Get the user icon's left margin value in pixels.

Definition at line 179 of file Fl_Tree_Prefs.H.

Referenced by Fl_Tree_Item::draw().


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