FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IInputRoot

    trait · ferroui-base · v0.5.0

    trait IInputRoot
    

    Defines the interface for top-level input elements: the part of a presentation source that input is delivered through.

    View source

    Members

    focus_manager

    fn focus_manager(self: &Self) -> Option<Rc<FocusManager>>
    

    The focus manager of the root.

    Source

    pointer_over_element

    fn pointer_over_element(self: &Self) -> Option<Ref<InputElement>>
    

    The input element that the pointer is currently over.

    Source

    set_pointer_over_element

    fn set_pointer_over_element(self: &Self, value: Option<Ref<InputElement>>)
    

    Sets the input element that the pointer is currently over.

    Source

    cursor_element

    fn cursor_element(self: &Self) -> Option<Ref<InputElement>>
    

    The element whose cursor is shown.

    Source

    set_cursor_element

    fn set_cursor_element(self: &Self, value: Option<Ref<InputElement>>)
    

    Sets the element whose cursor is shown.

    Source

    root_element

    fn root_element(self: &Self) -> Ref<InputElement>
    

    The root input element.

    Source

    try_root_element

    fn try_root_element(self: &Self) -> Option<Ref<InputElement>>
    

    Deviation (DEVIATIONS.md, Input): the optional form of root_element.

    The root input element, or None once the root has closed: what the reference reads as a null RootElement, for the code that runs while an event that closed its root is still being processed.

    Source

    focus_root

    fn focus_root(self: &Self) -> Ref<InputElement>
    

    The element keyboard input is sent to when nothing is focused.

    Source

    hit_test_chrome_element

    fn hit_test_chrome_element(self: &Self, _point: Point) -> Option<WindowDecorationsElementRole>
    

    Performs a hit-test for chrome/decoration elements at the given position, in root-relative coordinates.

    Returns None if no chrome element was hit (no chrome involvement at this point), WindowDecorationsElementRole::DecorationsElement or WindowDecorationsElementRole::User if an interactive chrome element was hit — the platform should redirect non-client input to regular client input. Any other value different from WindowDecorationsElementRole::None indicates a specific non-client role (titlebar, resize grip, etc.).

    Source

    pointer_over_invalidated

    fn pointer_over_invalidated(self: &Self)
    

    Called when what is under the pointer may have changed without the pointer moving, e.g. when the capture of a pointer changes.

    The root re-evaluates the pointer-over element. This is a dispatcher seam: a host should update the pointer-over state from here, either immediately or posted to its dispatcher.

    Source

    Availability

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