FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RoutedEventRegistry

    struct · ferroui-base · v0.5.0

    struct RoutedEventRegistry
    

    Tracks registered routed events.

    Like routed event definitions, the registry is per-thread.

    View source

    Members

    new

    fn new() -> Self
    

    Creates an empty registry.

    Source

    instance

    fn instance() -> &'static RoutedEventRegistry
    

    The routed event registry instance of the current thread.

    Source

    register

    fn register<T: ?Sized>(self: &Self, type_: &'static TypeInfo, event: RoutedEvent<T>)
    

    Registers a routed event on a type.

    You won't usually want to call this method directly: use RoutedEvent::register, which calls it.

    Source

    get_all_registered

    fn get_all_registered(self: &Self) -> Vec<RoutedEvent>
    

    Returns all routed events registered with the registry.

    Source

    get_registered

    fn get_registered(self: &Self, type_: &'static TypeInfo) -> Vec<RoutedEvent>
    

    Returns the routed events registered on a type.

    Source

    get_registered_for

    fn get_registered_for<TOwner: StaticType>(self: &Self) -> Vec<RoutedEvent>
    

    Returns the routed events registered on class TOwner.

    Source

    find_by_name

    fn find_by_name(self: &Self, owner: &'static TypeInfo, name: &str) -> Option<RoutedEvent>
    

    Finds the routed event named name that owner or one of its base classes registers, nearest class first: the lookup of the routed event behind an event name of the managed original (the static <Name>Event field of the class or of a base class, found by reflection).

    The comparison is case-sensitive. name is the name of the event ("Click") or of the field that holds it ("ClickEvent"): on each class an event of exactly that name is preferred, then the name without the Event suffix.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • Default

    Availability

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