Public Member Functions

glv::Buttons Class Reference

One or more buttons on a grid. More...

#include <glv_buttons.h>

Inheritance diagram for glv::Buttons:
glv::Widget glv::View glv::DataModel glv::Notifier glv::SmartObject< View > glv::Button

List of all members.

Public Member Functions

 Buttons (const Rect &r=Rect(), int nx=1, int ny=1, bool momentary=false, bool mutExc=false, iconFunc on=draw::rectangle, iconFunc off=0)
const iconFunc & iconOff () const
 Get off state icon.
const iconFunc & iconOn () const
 Get on state icon.
ButtonsiconOff (const iconFunc &f)
 Set off state icon.
ButtonsiconOn (const iconFunc &f)
 Set on state icon.
virtual const char * className () const
 Get class name.
virtual void onDraw (GLV &g)
 Drawing callback.
virtual bool onEvent (Event::t e, GLV &g)
 Event callback to be called after those in callback list.
bool getValue () const
 Get selected element value type-casted to template parameter.
bool getValue (int i) const
 Get element value at 1D index type-casted to template parameter.
bool getValue (int i1, int i2) const
 Get element value at 2D index type-casted to template parameter.

Detailed Description

One or more buttons on a grid.


Constructor & Destructor Documentation

glv::Buttons::Buttons ( const Rect r = Rect(),
int  nx = 1,
int  ny = 1,
bool  momentary = false,
bool  mutExc = false,
iconFunc  on = draw::rectangle,
iconFunc  off = 0 
)
Parameters:
[in] r geometry
[in] nx number along x
[in] ny number along y
[in] momentary whether the button state matches button press state
[in] mutExc whether multiple buttons can be on
[in] on the on state icon
[in] off the off state icon

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