Track
struct · ferroui-controls · v0.5.0
struct Track
A control that positions a Thumb and the buttons before and after it
along a range: the building block of scroll bars and sliders.
Members
TYPEto_refvalue_from_pointvalue_from_distancePSEUDO_CLASSESminimum_propertymaximum_propertyvalue_propertyviewport_size_propertyorientation_propertythumb_propertyincrease_button_propertydecrease_button_propertyis_direction_reversed_propertyignore_thumb_drag_propertydefer_thumb_drag_propertyconstructnewminimumset_minimummaximumset_maximumvalueset_range_valueviewport_sizeset_viewport_sizeorientationset_orientationthumbset_thumbincrease_buttonset_increase_buttondecrease_buttonset_decrease_buttonis_direction_reversedset_is_direction_reversedignore_thumb_dragset_ignore_thumb_dragdefer_thumb_dragset_defer_thumb_drag
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Track>
Returns a strong reference to this object.
value_from_point
fn value_from_point(self: &Self, point: Point) -> f64
Calculates the distance along the thumb of a specified point along the track.
Returns the distance between the thumb and the specified point value.
value_from_distance
fn value_from_distance(self: &Self, horizontal: f64, vertical: f64) -> f64
Calculates the change in the value of the track when the thumb moves by the given horizontal and vertical displacement.
PSEUDO_CLASSES
const PSEUDO_CLASSES: PseudoClassesAttribute
The pseudoclasses set by the class.
minimum_property
fn minimum_property() -> &'static StyledProperty<f64>
Defines the Minimum property.
maximum_property
fn maximum_property() -> &'static StyledProperty<f64>
Defines the Maximum property.
value_property
fn value_property() -> &'static StyledProperty<f64>
Defines the Value property.
viewport_size_property
fn viewport_size_property() -> &'static StyledProperty<f64>
Defines the ViewportSize property.
orientation_property
fn orientation_property() -> &'static StyledProperty<Orientation>
Defines the Orientation property.
thumb_property
fn thumb_property() -> &'static StyledProperty<Option<Ref<Thumb>>>
Defines the Thumb property.
increase_button_property
fn increase_button_property() -> &'static StyledProperty<Option<Ref<Button>>>
Defines the IncreaseButton property.
decrease_button_property
fn decrease_button_property() -> &'static StyledProperty<Option<Ref<Button>>>
Defines the DecreaseButton property.
is_direction_reversed_property
fn is_direction_reversed_property() -> &'static StyledProperty<bool>
Defines the IsDirectionReversed property.
ignore_thumb_drag_property
fn ignore_thumb_drag_property() -> &'static StyledProperty<bool>
Defines the IgnoreThumbDrag property.
defer_thumb_drag_property
fn defer_thumb_drag_property() -> &'static StyledProperty<bool>
Defines the DeferThumbDrag property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
minimum
fn minimum(self: &Self) -> f64
The minimum possible value.
set_minimum
fn set_minimum(self: &Self, value: f64)
maximum
fn maximum(self: &Self) -> f64
The maximum possible value.
set_maximum
fn set_maximum(self: &Self, value: f64)
value
fn value(self: &Self) -> f64
The current value.
set_range_value
fn set_range_value(self: &Self, value: f64)
viewport_size
fn viewport_size(self: &Self) -> f64
The amount of the scrollable content that is currently visible.
set_viewport_size
fn set_viewport_size(self: &Self, value: f64)
orientation
fn orientation(self: &Self) -> Orientation
The orientation of the track.
set_orientation
fn set_orientation(self: &Self, value: Orientation)
thumb
fn thumb(self: &Self) -> Option<Ref<Thumb>>
The thumb of the track: its content.
set_thumb
fn set_thumb(self: &Self, value: impl Into<Nullable<Thumb>>)
increase_button
fn increase_button(self: &Self) -> Option<Ref<Button>>
The button that increases the value.
set_increase_button
fn set_increase_button(self: &Self, value: impl Into<Nullable<Button>>)
decrease_button
fn decrease_button(self: &Self) -> Option<Ref<Button>>
The button that decreases the value.
set_decrease_button
fn set_decrease_button(self: &Self, value: impl Into<Nullable<Button>>)
is_direction_reversed
fn is_direction_reversed(self: &Self) -> bool
Whether the direction of increasing value is reversed.
set_is_direction_reversed
fn set_is_direction_reversed(self: &Self, value: bool)
ignore_thumb_drag
fn ignore_thumb_drag(self: &Self) -> bool
Whether drags of the thumb are ignored.
set_ignore_thumb_drag
fn set_ignore_thumb_drag(self: &Self, value: bool)
defer_thumb_drag
fn defer_thumb_drag(self: &Self) -> bool
Whether the value is only updated when a drag of the thumb completes.
set_defer_thumb_drag
fn set_defer_thumb_drag(self: &Self, value: bool)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTrackImplExtControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<Track>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplVisualImplInteractiveImplInputElementImplControlImplFerroObjectImplLayoutableImplTrackImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.