glv::ValueWidget< Tv, Tm > Class Template Reference

Base class for a widget with a grid of values. More...

#include <glv_widget.h>

Inheritance diagram for glv::ValueWidget< Tv, Tm >:

glv::View glv::TRect< T > glv::Notifier glv::SmartObject< BaseClass > glv::NumberDialer glv::SliderBase< Dim > glv::SliderBase< 2 > glv::SliderGrid< Dim > glv::Slider2D glv::SliderRange

List of all members.

Public Member Functions

 ValueWidget (const Rect &r, int nx, int ny, space_t pad, bool toggles, bool mutExc, bool drawGrid=true)
bool isSelected (int x, int y) const
 Returns whether this element coordinate is selected.
const Tm & max () const
 Get maximum of value interval.
const Tm & min () const
 Get minimum of value interval.
Tm mid () const
 Get middle point of value interval.
space_t padding () const
 Get element padding amount.
int selected () const
 Get selected element index.
int selectedX () const
 Get selected element x coordinate.
int selectedY () const
 Get selected element y coordinate.
int size () const
 Get total number of elements.
int sizeX () const
 Get number of elements along x.
int sizeY () const
 Get number of elements along y.
const Tv & values () const
 Returns 1D value array.
void attachVariable (model_type &v, int i=0)
 Attach a model variable at a specified index.
ValueWidgetpadding (space_t v)
 Set element padding amount.
void resize (int nx, int ny)
 Resize grid.
ValueWidgetselect (int i)
 Select element at 1D index.
ValueWidgetselect (int ix, int iy)
 Select element at 2D index.
virtual void onModelSync ()
 Sync self to attached model variables.


Detailed Description

template<class Tv, class Tm>
class glv::ValueWidget< Tv, Tm >

Base class for a widget with a grid of values.

Constructor & Destructor Documentation

template<class Tv, class Tm>
glv::ValueWidget< Tv, Tm >::ValueWidget ( const Rect r,
int  nx,
int  ny,
space_t  pad,
bool  toggles,
bool  mutExc,
bool  drawGrid = true 
) [inline]

Parameters:
[in] r geometry
[in] nx number along x (ignored by fixed size value types)
[in] ny number along y (ignored by fixed size value types)
[in] pad padding from border
[in] toggles whether the value elements toggle
[in] mutExc whether value elements operate mutually exclusively
[in] drawGrid whether to draw grid separater for multiple elements


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

Generated on Thu Aug 12 23:55:16 2010 for GLV by  doxygen 1.5.5