sptk2 logo
SPTK Home Page

sptk::CButton Class Reference
[GUI Classes]

Button widget. More...

#include <CButton.h>

Inheritance diagram for sptk::CButton:

sptk::CBaseButton sptk::CLayoutClient

List of all members.

Public Member Functions

 CButton (CButtonKind kind, CLayoutAlign layoutAlign=SP_ALIGN_RIGHT, const char *label=0, CThemeButtonType tbt=THM_BUTTON_NORMAL)
 Constructor in SPTK style.
 CButton (const char *label=0, CLayoutAlign layoutAlign=SP_ALIGN_RIGHT, CThemeButtonType tbt=THM_BUTTON_NORMAL)
 Default constructor in SPTK style.
virtual void buttonImage (Fl_Image *image)
 Sets the image to the button.
virtual void buttonImage (CButtonKind bkind, CIconSize iconSize=IS_LARGE_ICON)
 Sets the stock image to the button.
virtual Fl_Image * buttonImage ()
 Returns the button's image.
virtual void load (const CXmlNode *node)
 Loads the the widget from XML node.
virtual void save (CXmlNode *node) const
 Saves the the widget to XML node.

Static Public Member Functions

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


Detailed Description

Button widget.

Button that displays an a regular Fl_Image *, or as a stock image of CButtonKind.


Constructor & Destructor Documentation

sptk::CButton::CButton ( CButtonKind  kind,
CLayoutAlign  layoutAlign = SP_ALIGN_RIGHT,
const char *  label = 0,
CThemeButtonType  tbt = THM_BUTTON_NORMAL 
) [inline]

Constructor in SPTK style.

Parameters:
kind CButtonKind stock image id
layoutAlign CLayoutAlign widget align in layout
label const char * label
tbt CThemeButtonType, the size type of the button

sptk::CButton::CButton ( const char *  label = 0,
CLayoutAlign  layoutAlign = SP_ALIGN_RIGHT,
CThemeButtonType  tbt = THM_BUTTON_NORMAL 
) [inline]

Default constructor in SPTK style.

Parameters:
label const char * label
layoutAlign CLayoutAlign widget align in layout
tbt CThemeButtonType, the button type (size)


Member Function Documentation

virtual Fl_Image* sptk::CButton::buttonImage (  )  [inline, virtual]

Returns the button's image.

Returns:
image pointer

Implements sptk::CBaseButton.

virtual void sptk::CButton::buttonImage ( CButtonKind  bkind,
CIconSize  iconSize = IS_LARGE_ICON 
) [inline, virtual]

Sets the stock image to the button.

Parameters:
bkind CButtonKind stock image id.
iconSize CIconSize, the size of the icon

Implements sptk::CBaseButton.

virtual void sptk::CButton::buttonImage ( Fl_Image *  image  )  [inline, virtual]

Sets the image to the button.

Parameters:
image const Fl_Image * image pointer

Implements sptk::CBaseButton.

virtual void sptk::CButton::load ( const CXmlNode node  )  [virtual]

Loads the the widget from XML node.

The widget information may include widget attributes and widget data

Parameters:
node CXmlNode*, XML node

virtual void sptk::CButton::save ( CXmlNode node  )  const [virtual]

Saves the the widget to XML node.

The widget information may include widget attributes and widget data

Parameters:
node CXmlNode*, XML node


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

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