Valuator - siffiejoe/lua-fltk4lua GitHub Wiki
Valuator (abstract):
Corresponds to:
Fl_Valuator
Functions
obj:bounds( int min, int max )obj:clamp( int val ) ==> int newValclamps value to range
obj:format() ==> str valif step value zero then %g format
else %.*f format w/ digits for step valueobj:increment( int value, int n ) ==> int newValadds (n times step) to value
if step 0, use (max - min) / 100obj:range( int min, int max )clamping is done after rounding to step value
obj:round( int val ) ==> int newValRound to nearest step increment
Does nothing if step is zero
Properties
obj.step ==> int valgetobj.step = int valsetobj.value ==> int valgetobj.value ==> int valsetobj.maximum ==> int maxgetobj.maximum = int maxsetobj.minimum ==> int mingetobj.minimum = int minsetobj.precision = int digitssetSets step to 1.0 / 10 digits