sptk2 logo
SPTK Home Page

sptk::CToolBar Class Reference
[GUI Classes]

Toolbar widget. More...

#include <CToolBar.h>

Inheritance diagram for sptk::CToolBar:

sptk::CGroup sptk::CLayoutManager sptk::CLayoutClient

List of all members.

Public Member Functions

 CToolBar (CLayoutAlign layoutAlign=SP_ALIGN_TOP)
 Constructor in SPTK style.
CButtonaddButton (CButtonKind buttonKind, Fl_Callback_p cb, const char *label=0, CLayoutAlign buttonAlign=SP_ALIGN_LEFT)
 Creates and adds a new button to the toolbar.
virtual void resize (int x, int y, int w, int h)
 Resizes the group and inside widgets.
virtual bool preferredSize (int &w, int &h)
 Computes the optimal group size.
bool collapsed () const
 Flag, true if the toolbar is collapsed.
int handle (int)
 Special handle() function.
void draw ()
 Draws the toolbar.
virtual std::string className () const
 Returns widget class name (internal SPTK RTTI).

Static Public Member Functions

static CLayoutClientcreator (CXmlNode *node)
 Creates a widget based on the XML node information.


Detailed Description

Toolbar widget.

The slightely extended CGroup to work as a toolbar. Most of the toolbar functionality isn't implemented yet.


Constructor & Destructor Documentation

sptk::CToolBar::CToolBar ( CLayoutAlign  layoutAlign = SP_ALIGN_TOP  ) 

Constructor in SPTK style.

Parameters:
layoutAlign CLayoutAlign, widget align in layout


Member Function Documentation

CButton* sptk::CToolBar::addButton ( CButtonKind  buttonKind,
Fl_Callback_p  cb,
const char *  label = 0,
CLayoutAlign  buttonAlign = SP_ALIGN_LEFT 
)

Creates and adds a new button to the toolbar.

Parameters:
buttonKind CButtonKind, button type
cb Fl_Callback_p, button callback
label const char *, button label
buttonAlign CLayoutAlign, button align in the toolbar
See also:
CButton

static CLayoutClient* sptk::CToolBar::creator ( CXmlNode node  )  [static]

Creates a widget based on the XML node information.

Parameters:
node CXmlNode*, an XML node with widget information

Reimplemented from sptk::CGroup.

virtual bool sptk::CToolBar::preferredSize ( int &  w,
int &  h 
) [virtual]

Computes the optimal group size.

Parameters:
w int&, input - width offered by the program, output - width required by widget
h int&, input - height offered by the program, output - height required by widget
Returns:
true if the size is stable (doesn't depend on input sizes)

Reimplemented from sptk::CGroup.

virtual void sptk::CToolBar::resize ( int  x,
int  y,
int  w,
int  h 
) [virtual]

Resizes the group and inside widgets.

Parameters:
x int, x-position
y int, y-position
w int, width
h int, height

Reimplemented from sptk::CGroup.


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

Mon Mar 5 11:56:19 2012: SPTK 3.5.7