Slider

Constructors

this
this(R range, size_t index, void delegate() @(safe) changed)
this(R range, void delegate() @(safe) changed)

Create the slider using the given range as the set of possible values/steps.

Members

Functions

drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
isHovered
bool isHovered()
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
value
T value()
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin enableInputActions
Undocumented in source.

Variables

range
SliderRange!T range;

Value range of the slider.

Inherited Members

From AbstractSlider

railWidth
enum railWidth;
Undocumented in source.
minStepDistance
enum minStepDistance;
Undocumented in source.
handle
SliderHandle handle;

Handle of the slider.

index
size_t index;

Index/current position of the slider.

firstStepX
float firstStepX;

Position of the first step hitbox on the X axis.

stepDistance
float stepDistance;

Distance between each step

isPressed
bool isPressed()
Undocumented in source. Be warned that the author may not have intended to support it.
resizeImpl
void resizeImpl(Vector2 space)
Undocumented in source. Be warned that the author may not have intended to support it.
drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
press
void press()
Undocumented in source. Be warned that the author may not have intended to support it.
decrement
void decrement()
Undocumented in source. Be warned that the author may not have intended to support it.
increment
void increment()
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length()

Length of the range.

Examples

// To create a slider, pass it a range
slider!int(iota(0, 10));     // slider from 0 to 9
slider!int(iota(0, 11, 2));  // 0, 2, 4, 6, 8, 10

// Use any value and any random-access range
slider!string(["A", "B", "C"]);

Meta