Public Member Functions

Wt::WSpinBox Class Reference

A spin box. More...

#include <Wt/WSpinBox>

Inheritance diagram for Wt::WSpinBox:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WSpinBox (WContainerWidget *parent=0)
 Creates a spin-box.
void setMinimum (double minimum)
 Sets the minimum value.
double minimum () const
 Returns the minimum value.
void setMaximum (double maximum)
 Sets the maximum value.
double maximum () const
 Returns the maximum value.
void setRange (double minimum, double maximum)
 Sets the range.
void setSingleStep (double step)
 Sets the step value.
double singleStep () const
 Returns the step value.
void setValue (double value)
 Sets the value.
double value () const
 Returns the value.
Signal< double > & valueChanged ()
 A signal that indicates when the value has changed.

Detailed Description

A spin box.

The spin box provides a control for entering a number. It consists of a line edit, and buttons which allow to increase or decrease the value.

WSpinBox is an inline widget.

CSS

Using HTML4, the widget is implemented using a <input type="text"> The element can be styled using the Wt-spinbox style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate.

Note:
With the advent of HTML5, this widget will be implemented using the native HTML5 control when available.

Constructor & Destructor Documentation

Wt::WSpinBox::WSpinBox ( WContainerWidget parent = 0 )

Creates a spin-box.

The range is (0-99) and the step size 1.


Member Function Documentation

double Wt::WSpinBox::maximum (  ) const

Returns the maximum value.

See also:
setMaximum()
double Wt::WSpinBox::minimum (  ) const

Returns the minimum value.

See also:
setMinimum()
void Wt::WSpinBox::setMaximum ( double  maximum )

Sets the maximum value.

The default value is 99.

void Wt::WSpinBox::setMinimum ( double  minimum )

Sets the minimum value.

The default value is 0.

void Wt::WSpinBox::setRange ( double  minimum,
double  maximum 
)

Sets the range.

See also:
setMinimum(), setMaximum()
void Wt::WSpinBox::setSingleStep ( double  step )

Sets the step value.

The default value is 1.

void Wt::WSpinBox::setValue ( double  value )

Sets the value.

value must be a value between minimum() and maximum().

The default value is 0

Signal<double>& Wt::WSpinBox::valueChanged (  )

A signal that indicates when the value has changed.

This signal is emitted when setValue() is called.

See also:
setValue()
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Fri Feb 4 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.2