ScrollBar
struct · ferroui-controls · v0.5.0
struct ScrollBar
A scrollbar control.
Members
TYPEto_refTEMPLATE_PARTSPSEUDO_CLASSESviewport_size_propertyvisibility_propertyorientation_propertyis_expanded_propertyallow_auto_hide_propertyhide_delay_propertyshow_delay_propertyconstructnewviewport_sizeset_viewport_sizevisibilityset_visibilityorientationset_orientationis_expandedallow_auto_hideset_allow_auto_hidehide_delayset_hide_delayshow_delayset_show_delayscrollon_scrollscroll_herescroll_to_homescroll_to_endpage_uppage_downpage_leftpage_rightline_upline_downline_leftline_right
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ScrollBar>
Returns a strong reference to this object.
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.
viewport_size_property
fn viewport_size_property() -> &'static StyledProperty<f64>
Defines the ViewportSize property.
visibility_property
fn visibility_property() -> &'static StyledProperty<ScrollBarVisibility>
Defines the Visibility property.
orientation_property
fn orientation_property() -> &'static StyledProperty<Orientation>
Defines the Orientation property.
is_expanded_property
fn is_expanded_property() -> &'static DirectProperty<ScrollBar, bool>
Defines the IsExpanded property.
allow_auto_hide_property
fn allow_auto_hide_property() -> &'static StyledProperty<bool>
Defines the AllowAutoHide property.
hide_delay_property
fn hide_delay_property() -> &'static StyledProperty<Duration>
Defines the HideDelay property.
show_delay_property
fn show_delay_property() -> &'static StyledProperty<Duration>
Defines the ShowDelay property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
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)
visibility
fn visibility(self: &Self) -> ScrollBarVisibility
Indicates whether the scrollbar should hide itself when it is not needed.
set_visibility
fn set_visibility(self: &Self, value: ScrollBarVisibility)
orientation
fn orientation(self: &Self) -> Orientation
The orientation of the scrollbar.
set_orientation
fn set_orientation(self: &Self, value: Orientation)
is_expanded
fn is_expanded(self: &Self) -> bool
Indicates whether the scrollbar is expanded.
allow_auto_hide
fn allow_auto_hide(self: &Self) -> bool
Indicates whether the scrollbar can hide itself when the user is not interacting with it.
set_allow_auto_hide
fn set_allow_auto_hide(self: &Self, value: bool)
hide_delay
fn hide_delay(self: &Self) -> Duration
Determines how long the hide delay will be after the user stops interacting with the scrollbar.
set_hide_delay
fn set_hide_delay(self: &Self, value: Duration)
show_delay
fn show_delay(self: &Self) -> Duration
Determines how long the show delay will be when the user starts interacting with the scrollbar.
set_show_delay
fn set_show_delay(self: &Self, value: Duration)
scroll
fn scroll(self: &Self, handler: impl Fn(&ScrollEventArgs) -> () + 'static) -> Subscription
Raised when the scrollbar scrolls. The handler receives the event data, as the handlers of the other plain events do.
Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the scroll bar.
on_scroll
fn on_scroll(self: &Self, scroll_event_type: ScrollEventType)
Raises the scroll event.
scroll_here
fn scroll_here(self: &Self)
Scrolls to the location at which the context menu was most recently requested.
scroll_to_home
fn scroll_to_home(self: &Self)
Scrolls to the top (or left edge) of the scrollbar by setting the value to the minimum.
scroll_to_end
fn scroll_to_end(self: &Self)
Scrolls to the bottom (or right edge) of the scrollbar by setting the value to the maximum.
page_up
fn page_up(self: &Self)
Scrolls up by one large change (a page) on a vertical scrollbar.
page_down
fn page_down(self: &Self)
Scrolls down by one large change (a page) on a vertical scrollbar.
page_left
fn page_left(self: &Self)
Scrolls left by one large change (a page) on a horizontal scrollbar.
page_right
fn page_right(self: &Self)
Scrolls right by one large change (a page) on a horizontal scrollbar.
line_up
fn line_up(self: &Self)
Scrolls up by one small change on a vertical scrollbar.
line_down
fn line_down(self: &Self)
Scrolls down by one small change on a vertical scrollbar.
line_left
fn line_left(self: &Self)
Scrolls left by one small change on a horizontal scrollbar.
line_right
fn line_right(self: &Self)
Scrolls right by one small change on a horizontal scrollbar.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<ScrollBar>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplControlImplVisualImplFerroObjectImplInputElementImplTemplatedControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.