GGUI::ValueOps struct

Per-type operations, as the core calls them.

Public variables

ValueKind Kind
the type
bool bWhole
integer type: steps are at least 1
ValueBits Lowest
the type's lowest value; used when no limit is set
ValueBits Highest
ValueBits(* Snap
Clamp value to [min, max] and, if step is set, snap to a multiple of it (measured from min when there is one, else from zero).
ValueBits(* Step
Move value by steps of step, then Snap.
double(* ToDouble
The value as a double, losing what it can't hold: for drawing a position along a range. Never used for the value itself.
ValueBits(* FromDouble
A double as the type, for limits or steps given as plain numbers.
void(* Tell
Invoke a handler typed for this value.
int(* Write
Format with decimals places. Returns the length.
bool(* Parse
Parse typed text. False if it isn't a number.

Variable documentation

ValueBits GGUI::ValueOps::Highest

the type's highest value; used when no limit is set