FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ScrollBar

    struct · ferroui-controls · v0.5.0

    struct ScrollBar
    

    A scrollbar control.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ScrollBar>
    

    Returns a strong reference to this object.

    Source

    TEMPLATE_PARTS

    const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
    

    The named parts expected in the control template.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    viewport_size_property

    fn viewport_size_property() -> &'static StyledProperty<f64>
    

    Defines the ViewportSize property.

    Source

    visibility_property

    fn visibility_property() -> &'static StyledProperty<ScrollBarVisibility>
    

    Defines the Visibility property.

    Source

    orientation_property

    fn orientation_property() -> &'static StyledProperty<Orientation>
    

    Defines the Orientation property.

    Source

    is_expanded_property

    fn is_expanded_property() -> &'static DirectProperty<ScrollBar, bool>
    

    Defines the IsExpanded property.

    Source

    allow_auto_hide_property

    fn allow_auto_hide_property() -> &'static StyledProperty<bool>
    

    Defines the AllowAutoHide property.

    Source

    hide_delay_property

    fn hide_delay_property() -> &'static StyledProperty<Duration>
    

    Defines the HideDelay property.

    Source

    show_delay_property

    fn show_delay_property() -> &'static StyledProperty<Duration>
    

    Defines the ShowDelay property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    viewport_size

    fn viewport_size(self: &Self) -> f64
    

    The amount of the scrollable content that is currently visible.

    Source

    set_viewport_size

    fn set_viewport_size(self: &Self, value: f64)
    

    Source

    visibility

    fn visibility(self: &Self) -> ScrollBarVisibility
    

    Indicates whether the scrollbar should hide itself when it is not needed.

    Source

    set_visibility

    fn set_visibility(self: &Self, value: ScrollBarVisibility)
    

    Source

    orientation

    fn orientation(self: &Self) -> Orientation
    

    The orientation of the scrollbar.

    Source

    set_orientation

    fn set_orientation(self: &Self, value: Orientation)
    

    Source

    is_expanded

    fn is_expanded(self: &Self) -> bool
    

    Indicates whether the scrollbar is expanded.

    Source

    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.

    Source

    set_allow_auto_hide

    fn set_allow_auto_hide(self: &Self, value: bool)
    

    Source

    hide_delay

    fn hide_delay(self: &Self) -> Duration
    

    Determines how long the hide delay will be after the user stops interacting with the scrollbar.

    Source

    set_hide_delay

    fn set_hide_delay(self: &Self, value: Duration)
    

    Source

    show_delay

    fn show_delay(self: &Self) -> Duration
    

    Determines how long the show delay will be when the user starts interacting with the scrollbar.

    Source

    set_show_delay

    fn set_show_delay(self: &Self, value: Duration)
    

    Source

    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.

    Source

    on_scroll

    fn on_scroll(self: &Self, scroll_event_type: ScrollEventType)
    

    Raises the scroll event.

    Source

    scroll_here

    fn scroll_here(self: &Self)
    

    Scrolls to the location at which the context menu was most recently requested.

    Source

    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.

    Source

    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.

    Source

    page_up

    fn page_up(self: &Self)
    

    Scrolls up by one large change (a page) on a vertical scrollbar.

    Source

    page_down

    fn page_down(self: &Self)
    

    Scrolls down by one large change (a page) on a vertical scrollbar.

    Source

    page_left

    fn page_left(self: &Self)
    

    Scrolls left by one large change (a page) on a horizontal scrollbar.

    Source

    page_right

    fn page_right(self: &Self)
    

    Scrolls right by one large change (a page) on a horizontal scrollbar.

    Source

    line_up

    fn line_up(self: &Self)
    

    Scrolls up by one small change on a vertical scrollbar.

    Source

    line_down

    fn line_down(self: &Self)
    

    Scrolls down by one small change on a vertical scrollbar.

    Source

    line_left

    fn line_left(self: &Self)
    

    Scrolls left by one small change on a horizontal scrollbar.

    Source

    line_right

    fn line_right(self: &Self)
    

    Scrolls right by one small change on a horizontal scrollbar.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.