One or more buttons on a grid. More...
#include <glv_buttons.h>
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. | |
| Buttons & | iconOff (const iconFunc &f) |
| Set off state icon. | |
| Buttons & | iconOn (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. | |
One or more buttons on a grid.
| 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 | |||
| ) |
| [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 |
1.7.1