Struct kas_widgets::Slider [−][src]
pub struct Slider<T: SliderType, D: Directional> { /* fields omitted */ }
Expand description
A slider
Sliders allow user input of a value from a fixed range.
Implementations
Construct a slider
Values vary between the given min
and max
. When keyboard navigation
is used, arrow keys will increment the value by step
and page up/down
keys by step * 16
.
The initial value defaults to the range’s
lower bound but may be specified via Slider::with_value
.
Construct a slider with the given direction
Values vary between the given min
and max
. When keyboard navigation
is used, arrow keys will increment the value by step
and page up/down
keys by step * 16
.
The initial value defaults to the range’s
lower bound but may be specified via Slider::with_value
.
Set the initial value
Set the value
Returns TkAction::REDRAW
if a redraw is required.
Trait Implementations
Get the number of child widgets
Get a reference to a child widget by index, or None
if the index is
out of bounds. Read more
Mutable variant of get Read more
Record first identifier Read more
Check whether id
is a descendant Read more
Find the child which is an ancestor of this id
, if any Read more
Find the leaf (lowest descendant) with this id
, if any Read more
Find the leaf (lowest descendant) with this id
, if any Read more
Walk through all widgets, calling f
once on each. Read more
Walk through all widgets, calling f
once on each. Read more
Get self as type Any
(mutable)
Get the name of the widget struct
Erase type
Erase type
Get whether the widget is disabled
Set the disabled state of a widget Read more
Set disabled state (chaining) Read more
Construct InputState
Read more
Auto Trait Implementations
impl<T, D> RefUnwindSafe for Slider<T, D> where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> UnwindSafe for Slider<T, D> where
D: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more