FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ILogicalScrollable

    trait · ferroui-controls · v0.5.0

    trait ILogicalScrollable: IScrollable
    

    Interface implemented by controls that handle their own scrolling when placed inside a ScrollViewer.

    Controls that implement this interface, when placed inside a ScrollViewer, can override the physical scrolling behavior of the scroll viewer with logical scrolling. Physical scrolling means that the scroll viewer is a simple viewport onto a larger canvas whereas logical scrolling means that the scrolling is handled by the child control itself and it can choose to do handle the scroll information as it sees fit.

    A class implementing the trait is made known with register_logical_scrollable, normally from its class initialization; as_logical_scrollable then views an object of the class (or of a class derived from it) as the interface.

    View source

    Members

    set_can_horizontally_scroll

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

    Sets a value indicating whether the content can be scrolled horizontally.

    Source

    set_can_vertically_scroll

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

    Sets a value indicating whether the content can be scrolled vertically.

    Source

    is_logical_scroll_enabled

    fn is_logical_scroll_enabled(self: &Self) -> bool
    

    Gets a value indicating whether logical scrolling is enabled on the control.

    Source

    scroll_size

    fn scroll_size(self: &Self) -> Size
    

    Gets the size to scroll by, in logical units.

    Source

    page_scroll_size

    fn page_scroll_size(self: &Self) -> Size
    

    Gets the size to page by, in logical units.

    Source

    scroll_invalidated

    fn scroll_invalidated(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
    

    Raised when the scroll is invalidated.

    This event notifies an attached ScrollViewer of a change in one of the scroll properties. Disposing the returned handle removes the handler.

    Source

    bring_into_view

    fn bring_into_view(self: &Self, target: &Ref<Control>, target_rect: Rect) -> bool
    

    Attempts to bring a portion of the target visual into view by scrolling the content.

    target is the target visual and target_rect the portion of the target visual to bring into view. Returns true if the scroll offset was changed; otherwise false.

    Source

    get_control_in_direction

    fn get_control_in_direction(self: &Self, direction: NavigationDirection, from: Option<&Ref<Control>>) -> Option<Ref<Control>>
    

    Gets the next control in the specified direction.

    direction is the movement direction and from the control from which movement begins.

    Source

    raise_scroll_invalidated

    fn raise_scroll_invalidated(self: &Self)
    

    Raises the scroll_invalidated event.

    Source

    Trait implementations

    Availability

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