Vaca::Spinner Class Reference

#include <Spinner.h>

Inheritance diagram for Vaca::Spinner:

Vaca::Register< T > Vaca::Widget Vaca::Component Vaca::Referenceable Vaca::NonCopyable

List of all members.


Detailed Description

A Spinner is a couple of Widgets: an Edit and a SpinButton at the right side.

The default range is from 0 to 100. The default position is 0.

Public Member Functions

 Spinner (Widget *parent, Style spinStyle=SpinButtonStyle, Style style=SpinnerStyle)
 Spinner (int minValue, int maxValue, int value, Widget *parent, Style spinStyle=SpinButtonStyle, Style style=SpinnerStyle)
virtual ~Spinner ()
EditgetEdit ()
SpinButtongetSpinButton ()
int getMinimum ()
int getMaximum ()
void getRange (int &minValue, int &maxValue)
void setRange (int minValue, int maxValue)
int getValue ()
void setValue (int value)
int getBase ()
 Returns the radix base used in Edit widget.
void setBase (int base)
 Sets the radix base to be used in the Edit widget.
virtual void layout ()
 Positions the children: the spin button at the right of the edit control to connect theirs edges and to see it like a whole control.

Protected Member Functions

virtual void onPreferredSize (Size &sz)
 Fills sz with the size of both controls for the width and the maximun height of both controls.

Private Attributes

Edit m_edit
SpinButton m_spin


Constructor & Destructor Documentation

Spinner::Spinner ( Widget parent,
Style  spinStyle = SpinButtonStyle,
Style  style = SpinnerStyle 
)

Spinner::Spinner ( int  minValue,
int  maxValue,
int  value,
Widget parent,
Style  spinStyle = SpinButtonStyle,
Style  style = SpinnerStyle 
)

Spinner::~Spinner (  )  [virtual]


Member Function Documentation

Edit & Spinner::getEdit (  ) 

SpinButton & Spinner::getSpinButton (  ) 

int Spinner::getMinimum (  ) 

int Spinner::getMaximum (  ) 

void Spinner::getRange ( int &  minValue,
int &  maxValue 
)

void Spinner::setRange ( int  minValue,
int  maxValue 
)

int Spinner::getValue (  ) 

void Spinner::setValue ( int  value  ) 

int Spinner::getBase (  ) 

Returns the radix base used in Edit widget.

void Spinner::setBase ( int  base  ) 

Sets the radix base to be used in the Edit widget.

This can be 10 for decimal or 16 for hexadecimal.

void Spinner::layout (  )  [virtual]

Positions the children: the spin button at the right of the edit control to connect theirs edges and to see it like a whole control.

Reimplemented from Vaca::Widget.

void Spinner::onPreferredSize ( Size sz  )  [protected, virtual]

Fills sz with the size of both controls for the width and the maximun height of both controls.

Reimplemented from Vaca::Widget.


Member Data Documentation