FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FocusChangingEventArgs

    struct · ferroui-base · v0.5.0

    struct FocusChangingEventArgs
    

    Provides data for focus changing: the GettingFocus and LosingFocus events, which can cancel or redirect a focus change.

    View source

    Members

    old_focused_element

    old_focused_element: Option<crate::Ref<super::InputElement>>
    

    The element that had focus before the change.

    Source

    navigation_method

    navigation_method: super::NavigationMethod
    

    Indicates how the change in focus occurred.

    Source

    key_modifiers

    key_modifiers: super::KeyModifiers
    

    Any key modifiers active at the time of focus.

    Source

    new

    fn new<T: ?Sized>(routed_event: &RoutedEvent<T>) -> Self
    

    Creates args for a routed event.

    Source

    new_focused_element

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

    The element that focus will move to.

    Source

    canceled

    fn canceled(self: &Self) -> bool
    

    Whether the focus change is canceled.

    Source

    try_cancel

    fn try_cancel(self: &Self) -> bool
    

    Attempts to cancel the current focus change. Returns true if the focus change was cancelled; otherwise, false.

    Source

    try_set_new_focused_element

    fn try_set_new_focused_element(self: &Self, input_element: Option<&Ref<InputElement>>) -> bool
    

    Attempts to redirect focus from the targeted element to the specified element. Returns true if the focus change was redirected; otherwise, false.

    Source

    Trait implementations

    Availability

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