FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IScrollAnchorProvider

    trait · ferroui-controls · v0.5.0

    trait IScrollAnchorProvider
    

    Specifies a contract for a scrolling control that supports scroll anchoring.

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

    View source

    Members

    current_anchor

    fn current_anchor(self: &Self) -> Option<Ref<Control>>
    

    The currently chosen anchor element to use for scroll anchoring.

    Source

    register_anchor_candidate

    fn register_anchor_candidate(self: &Self, element: &Ref<Control>)
    

    Registers a control as a potential scroll anchor candidate.

    element is a control within the subtree of the provider.

    Source

    unregister_anchor_candidate

    fn unregister_anchor_candidate(self: &Self, element: &Ref<Control>)
    

    Unregisters a control as a potential scroll anchor candidate.

    element is a control within the subtree of the provider.

    Source

    Trait implementations

    Availability

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