Struct Range

Abstract base class for range-based controls.

struct Range ;

Range is a base class for Control nodes that change a floating-point value between a minimum and a maximum, using step and page, for example a ScrollBar.

Properties

NameTypeDescription
allowGreater[get, set] boolIf true, value may be greater than maxValue.
allowLesser[get, set] boolIf true, value may be less than minValue.
expEdit[get, set] boolIf true, and min_value is greater than 0, value will be represented exponentially rather than linearly.
maxValue[get, set] doubleMaximum value. Range is clamped if value is greater than max_value.
minValue[get, set] doubleMinimum value. Range is clamped if value is less than min_value.
page[get, set] doublePage size. Used mainly for ScrollBar. ScrollBar's length is its size multiplied by page over the difference between min_value and max_value.
ratio[get, set] doubleThe value mapped between 0 and 1.
rounded[get, set] boolIf true, value will always be rounded to the nearest integer.
step[get, set] doubleIf greater than 0, value will always be rounded to a multiple of step. If rounded is also true, value will first be rounded to a multiple of step then rounded to the nearest integer.
value[get, set] doubleRange's current value.

Methods

NameDescription
getAsRatio
getMax
getMin
getPage
getStep
getValue
isGreaterAllowed
isLesserAllowed
isRatioExp
isUsingRoundedValues
setAllowGreater
setAllowLesser
setAsRatio
setExpRatio
setMax
setMin
setPage
setStep
setUseRoundedValues
setValue
share Binds two ranges together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group.
unshare Stops range from sharing its member variables with any other.