Derived from: public MView, public MDividable, public BControl
Declared in: <SpinButton.h>
A SpinButton is a control consisting of a textbox and two buttons, that allows
you to enter numeric values by either typing a value into the textbox, and to
increase or decrease the value in the textbox by clicking on the buttons.
You can also set the minimum and maximum value the SpinButton will allow, the
stepsize to use when increasing/decreasing the value of the SpinButton and the
format string with which the value will be displayed.
SpinButton(const char *label,spinmode mode, BHandler *target=NULL)Creates a SpinButton with the given label, mode and target.
Mode is one of SPIN_FLOAT and SPIN_INTEGER, which will make the SpinButton accepts floating point or integer values respectively.
virtual ~SpinButton()Destroys the SpinButton.
virtual void AllAttached()Sets the target of the SpinButton to be the target that was specified when the SpinButton was constructed.
double Decrement() double Increment()Decreases/increases the value of the SpinButton by the current stepsize.
const char * Format() const void SetFormat(const char *f)Returns or sets the current format string of the SpinButton's textbox.
double Maximum() double Minimum() void SetMaximum(double max) void SetMinimum(double min)Returns/sets the current maximum/minimum allowed value of the SpinButton.
virtual void MessageReceived(BMessage *mes)Processes the messages generated by the textbox and buttons.
void SetStepSize(double step) double StepSize()Sets and returns the current stepsize.
virtual void SetValue(int32 v) virtual void SetValue(double v)Sets the value of the SpinButton to v
double Value()Returns the current value of the SpinButton as a double.