DVX_GUI/widgets/spinner/spinner.dhs

75 lines
2.4 KiB
Text

.topic widget.spinner
.title Spinner
.toc 1 Spinner
.index Spinner
.index wgtSpinner
.index wgtSpinnerSetValue
.index wgtSpinnerGetValue
.index wgtSpinnerSetRealMode
.h2 Spinner
A numeric input with up/down buttons for incrementing and decrementing a value within a range. Supports both integer and floating-point (real) modes.
Header: widgets/widgetSpinner.h
.h3 Creation
.code
WidgetT *sp = wgtSpinner(parent, 0, 100, 1);
.endcode
.h3 Macros
.index wgtSpinnerSetRange
.index wgtSpinnerSetStep
.index wgtSpinnerGetRealValue
.index wgtSpinnerSetRealValue
.index wgtSpinnerSetRealRange
.index wgtSpinnerSetRealStep
.index wgtSpinnerSetDecimals
.table
Macro Description
----- -----------
wgtSpinner(parent, minVal, maxVal, step) Create a spinner with the given integer range and step size.
wgtSpinnerSetValue(w, value) Set the integer value.
wgtSpinnerGetValue(w) Get the current integer value.
wgtSpinnerSetRange(w, minVal, maxVal) Set the integer range.
wgtSpinnerSetStep(w, step) Set the integer step size.
wgtSpinnerSetRealMode(w, enable) Switch to floating-point mode.
wgtSpinnerGetRealValue(w) Get the current floating-point value.
wgtSpinnerSetRealValue(w, value) Set the floating-point value.
wgtSpinnerSetRealRange(w, minVal, maxVal) Set the floating-point range.
wgtSpinnerSetRealStep(w, step) Set the floating-point step size.
wgtSpinnerSetDecimals(w, decimals) Set the number of decimal places displayed in real mode.
.endtable
.h3 Events
.table
Callback Description
-------- -----------
onChange Fires when the value changes.
.endtable
.h3 Properties (BASIC Interface)
.table
Property Type Access Description
-------- ---- ------ -----------
Value Integer Read/Write Current integer value.
RealMode Boolean Read/Write Whether floating-point mode is active.
Decimals Integer Read/Write Number of decimal places displayed in real mode.
.endtable
.h3 Methods (BASIC Interface)
.table
Method Description
------ -----------
SetRange Set the integer range (min, max).
SetStep Set the integer step size.
.endtable
.hr