glv::NumberDialer Class Reference

Number editor with individually controllable digits. More...

#include <glv_textview.h>

Inheritance diagram for glv::NumberDialer:

glv::ValueWidget< Tv, Tm > glv::View glv::TRect< T > glv::Notifier glv::SmartObject< BaseClass >

List of all members.

Public Member Functions

 NumberDialer (const Rect &r, int numInt, int numFrac)
 NumberDialer (const Rect &r, int numInt, int numFrac, double max, double min)
double value () const
 Get value.
NumberDialerpadding (space_t v)
 Set padding amount from top and bottom.
NumberDialerinterval (double max, double min=0)
 Set max and min output range. Values larger than displayable range will be clipped.
NumberDialerresize (int numInt, int numFrac)
 Set number of digits in integer and fraction parts.
NumberDialershowSign (bool v)
 Set whether to show sign.
NumberDialervalue (double v)
 Set value.
virtual void onDraw ()
 Main drawing callback.
virtual bool onEvent (Event::t e, GLV &g)
 Main event callback to be called after those in callback list.

Protected Member Functions

int size () const
 Get total number of elements.


Detailed Description

Number editor with individually controllable digits.

Each digit acts like a slider that can be scrolled up or down to increase or decrease the value of the number. The keyboard can also be used to edit the currently focused digit. The sign on the left side can be toggled by clicking it. The digits are scaled according to the dimensions of the view. The padding amount determines the spacing around the digits. For best looking characters use a Rect dimension ns x s where 'n' is the number of digits and 's' is the character size plus padding amount.


Constructor & Destructor Documentation

glv::NumberDialer::NumberDialer ( const Rect r,
int  numInt,
int  numFrac 
)

Parameters:
[in] r Geometry
[in] numInt Number of places in integer part
[in] numFrac Number of places in fraction part

glv::NumberDialer::NumberDialer ( const Rect r,
int  numInt,
int  numFrac,
double  max,
double  min 
)

Parameters:
[in] r Geometry
[in] numInt Number of places in integer part
[in] numFrac Number of places in fraction part
[in] max Maximum value
[in] min Minimum value


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

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