sptk2 logo
SPTK Home Page
Public Member Functions | Protected Member Functions | List of all members
sptk::CCheckButton Class Reference

The check button. More...

#include <CCheckButtons.h>

Inheritance diagram for sptk::CCheckButton:
sptk::CLayoutClient

Public Member Functions

 CCheckButton (const char *label, int layoutSize, CLayoutAlign layoutAlignment)
 
int handle (int event) override
 
bool preferredSize (int &w, int &h) override
 
- Public Member Functions inherited from sptk::CLayoutClient
 CLayoutClient (Fl_Widget *widget, int layoutSize, CLayoutAlign ca)
 
virtual ~CLayoutClient ()
 
CLayoutAlign layoutAlign () const
 
void layoutAlign (CLayoutAlign al)
 
int layoutSize () const
 
void layoutSize (int ls)
 
virtual void label (const String &l)
 
virtual const Stringlabel () const
 
void name (const char *aname)
 
void name (const String &aname)
 
const Stringname () const
 
virtual bool preferredSize (int &w, int &h)
 
virtual bool computeSize (int &w, int &h)
 
virtual String className () const
 
Fl_Widget * widget () const
 
virtual void load (const xdoc::SNode &node, CLayoutXMLmode xmlMode)
 
virtual void load (const std::shared_ptr< xdoc::Node > &node)
 
virtual void save (const std::shared_ptr< xdoc::Node > &node, CLayoutXMLmode xmlMode) const
 

Protected Member Functions

void draw () override
 
- Protected Member Functions inherited from sptk::CLayoutClient
int lastPreferredH () const
 
int lastPreferredW () const
 
void lastPreferredH (int height)
 
void lastPreferredW (int width)
 

Additional Inherited Members

- Protected Attributes inherited from sptk::CLayoutClient
Fl_Widget * m_widget
 
String m_name
 
String m_label
 
CLayoutAlign m_layoutAlign
 

Detailed Description

The check button.

Implements the SPTK check button that understands and reports its size requirements, and can be a layout client.

Constructor & Destructor Documentation

◆ CCheckButton()

sptk::CCheckButton::CCheckButton ( const char *  label,
int  layoutSize,
CLayoutAlign  layoutAlignment 
)
inline

SPTK-style constructor

Parameters
labelconst char *, the widget label
layoutSizeint, the size of widget in layout
layoutAlignmentCLayoutAlign, widget align in the layout

Member Function Documentation

◆ draw()

void sptk::CCheckButton::draw ( )
overrideprotected

Draws the check button

◆ handle()

int sptk::CCheckButton::handle ( int  event)
override

A special handle method. See FLTK Fl_Widget::handle() for more information.

Parameters
eventint, FLTK event type
Returns
true if the event was processed

◆ preferredSize()

bool sptk::CCheckButton::preferredSize ( int &  w,
int &  h 
)
overridevirtual

Reports the preferred size of the widget based on offered size.

Parameters
wint, input/output desirable widget width
hint, input/output desirable widget heigth
Returns
true if the size is stable (doesn't depend on input sizes)

Reimplemented from sptk::CLayoutClient.


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

Fri Oct 14 2022 09:58:33: SPTK 5.4.1