sptk2 logo
SPTK Home Page

sptk::CCheckButtons Class Reference
[GUI Classes]

A set of check buttons. More...

#include <CCheckButtons.h>

Inheritance diagram for sptk::CCheckButtons:

sptk::CRadioButtons sptk::CButtonGroup sptk::CControl sptk::CLayoutClient

List of all members.

Public Member Functions

 CCheckButtons (const char *label=0, int layoutSize=20, CLayoutAlign layoutAlignment=SP_ALIGN_TOP)
void getSelections (CIntList &selection) const
 Gets the currently selected buttons argument()s.
void setSelections (const CIntList &selection)
 Sets the currently selected buttons matching with argument()s.
virtual CVariant data () const
virtual void data (const CVariant v)
virtual CControlKind kind () const
 Returns an internal SPTK control type information.
virtual std::string className () const
 Returns an internal SPTK control class name information.

Static Public Member Functions

static CLayoutClientcreator (CXmlNode *node)
 Creates chack buttons group based on the XML node information.

Protected Member Functions

virtual Fl_Button * createButton (const char *label, int sz=10, CLayoutAlign layoutAlignment=SP_ALIGN_TOP)
 Creates a radio button and adds it to the group.


Detailed Description

A set of check buttons.

Implements a group of check buttons with an optional CInput for the 'Other' choice. Data connector returns the current state as a string with selected buttons names separated with '|' character.


Constructor & Destructor Documentation

sptk::CCheckButtons::CCheckButtons ( const char *  label = 0,
int  layoutSize = 20,
CLayoutAlign  layoutAlignment = SP_ALIGN_TOP 
)

SPTK-style constructor

Parameters:
label const char *, the widget label
layoutSize int, the size of widget in layout
layoutAlignment CLayoutAlign, widget align in the layout


Member Function Documentation

virtual void sptk::CCheckButtons::data ( const CVariant  v  )  [virtual]

Universal data connection writer.

Parameters:
v CVariant, sets the selection from the list of labels as pipe ('|') separated strings

Reimplemented from sptk::CButtonGroup.

virtual CVariant sptk::CCheckButtons::data (  )  const [virtual]

Universal data connection reader.

Returns:
the list of selected button labels as pipe ('|') separated strings

Reimplemented from sptk::CButtonGroup.


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

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