FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AccessKeyHandler

    struct · ferroui-base · v0.5.0

    struct AccessKeyHandler
    

    Handles access keys for a window.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    access_key_event

    fn access_key_event() -> &'static RoutedEvent<AccessKeyEventArgs>
    

    Defines the AccessKey event: raised on the element an access key targets.

    Source

    access_key_pressed_event

    fn access_key_pressed_event() -> &'static RoutedEvent<AccessKeyPressedEventArgs>
    

    Defines the AccessKeyPressed event: raised to find the target of an access key.

    Source

    show_access_key_property

    fn show_access_key_property() -> &'static AttachedProperty<bool>
    

    Defines the ShowAccessKey attached property: whether access key markers are shown in a window.

    Source

    new

    fn new() -> Rc<AccessKeyHandler>
    

    Creates an access key handler without an owner.

    Source

    registration_count

    fn registration_count(self: &Self) -> usize
    

    The number of registered access keys, including registrations of elements that are no longer alive and have not been purged yet.

    Source

    registrations

    fn registrations(self: &Self) -> Vec<(String, crate::Ref<super::InputElement>)>
    

    The registered access keys with the elements they target (the ones that are still alive). For handlers built on this one.

    Source

    set_owner_with

    fn set_owner_with(self: &Self, owner: &crate::Ref<super::InputElement>, on_set_owner: impl FnOnce(&crate::Ref<super::InputElement>) -> ())
    

    Sets the owner of the handler as IAccessKeyHandler::set_owner does, with the key and pointer handlers attached, and then runs on_set_owner: the OnSetOwner virtual of the class, which does nothing in this class and which a handler built on this one overrides (the handler of a menu item attaches its text input handler there).

    This method can only be called once.

    Source

    on_preview_key_down

    fn on_preview_key_down(self: &Self, e: &KeyEventArgs)
    

    Called when a key is pressed in the owner window, before the event reaches the focused element.

    Source

    on_key_down

    fn on_key_down(self: &Self, e: &KeyEventArgs)
    

    Called when a key is pressed in the owner window.

    Source

    on_preview_key_up

    fn on_preview_key_up(self: &Self, e: &KeyEventArgs)
    

    Handles the Alt/F10 keys being released in the window.

    Source

    on_preview_pointer_pressed

    fn on_preview_pointer_pressed(self: &Self, _e: &PointerPressedEventArgs)
    

    Handles a pointer press in the window: hides the access key markers.

    Source

    process_key

    fn process_key(self: &Self, key: Option<&str>, element: Option<&crate::Ref<super::InputElement>>) -> bool
    

    Processes an access key: raises the AccessKey event on the element the key targets. Returns whether a target was found.

    Source

    Trait implementations

    Availability

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