Slider
struct · ferroui-controls · v0.5.0
struct Slider
A control that lets the user select from a range of values by moving a thumb control along a track.
Members
TYPEto_refon_thumb_drag_startedon_thumb_drag_completedTEMPLATE_PARTSPSEUDO_CLASSESorientation_propertyis_direction_reversed_propertyis_snap_to_tick_enabled_propertytick_frequency_propertytick_placement_propertyticks_propertyconstructnewticksset_ticksorientationset_orientationis_direction_reversedset_is_direction_reversedis_snap_to_tick_enabledset_is_snap_to_tick_enabledtick_frequencyset_tick_frequencytick_placementset_tick_placementis_draggingtrack
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Slider>
Returns a strong reference to this object.
on_thumb_drag_started
fn on_thumb_drag_started(self: &Self, e: &VectorEventArgs)
Called when the user starts dragging the thumb.
on_thumb_drag_completed
fn on_thumb_drag_completed(self: &Self, e: &VectorEventArgs)
Called when the user stops dragging the thumb.
TEMPLATE_PARTS
const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
The named parts expected in the control template.
PSEUDO_CLASSES
const PSEUDO_CLASSES: PseudoClassesAttribute
The pseudoclasses set by the class.
orientation_property
fn orientation_property() -> &'static StyledProperty<Orientation>
Defines the Orientation property.
is_direction_reversed_property
fn is_direction_reversed_property() -> &'static StyledProperty<bool>
Defines the IsDirectionReversed property.
is_snap_to_tick_enabled_property
fn is_snap_to_tick_enabled_property() -> &'static StyledProperty<bool>
Defines the IsSnapToTickEnabled property.
tick_frequency_property
fn tick_frequency_property() -> &'static StyledProperty<f64>
Defines the TickFrequency property.
tick_placement_property
fn tick_placement_property() -> &'static StyledProperty<TickPlacement>
Defines the TickPlacement property.
ticks_property
fn ticks_property() -> &'static StyledProperty<Option<TickList>>
Defines the Ticks property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
ticks
fn ticks(self: &Self) -> Option<TickList>
Defines the ticks to be drawn on the tick bar.
set_ticks
fn set_ticks(self: &Self, value: Option<TickList>)
orientation
fn orientation(self: &Self) -> Orientation
The orientation of the slider.
set_orientation
fn set_orientation(self: &Self, value: Orientation)
is_direction_reversed
fn is_direction_reversed(self: &Self) -> bool
The direction of increasing value.
True if the direction of increasing value is to the left for a horizontal slider or down for a vertical slider; otherwise, false. The default is false.
set_is_direction_reversed
fn set_is_direction_reversed(self: &Self, value: bool)
is_snap_to_tick_enabled
fn is_snap_to_tick_enabled(self: &Self) -> bool
Indicates whether the slider automatically moves the thumb to the closest tick mark.
set_is_snap_to_tick_enabled
fn set_is_snap_to_tick_enabled(self: &Self, value: bool)
tick_frequency
fn tick_frequency(self: &Self) -> f64
The interval between tick marks.
set_tick_frequency
fn set_tick_frequency(self: &Self, value: f64)
tick_placement
fn tick_placement(self: &Self) -> TickPlacement
Indicates where to draw tick marks in relation to the track.
set_tick_placement
fn set_tick_placement(self: &Self, value: TickPlacement)
is_dragging
fn is_dragging(self: &Self) -> bool
Whether the slider is currently being dragged.
track
fn track(self: &Self) -> Option<Ref<Track>>
The track part of the slider.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtSliderImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<Slider>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplVisualImplLayoutableImplInteractiveImplControlImplFerroObjectImplTemplatedControlImplInputElementImplSliderImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.