FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ferro_routed_event

    macro · ferroui-base · v0.5.0

    macro_rules! ferro_routed_event
    

    Declares the accessor of a routed event definition.

    impl Button {
        ferro_routed_event!(pub fn click_event() -> RoutedEvent<RoutedEventArgs> {
            RoutedEvent::register::<Button, _>("Click", RoutingStrategies::BUBBLE)
        });
    }
    

    The event is registered the first time the accessor is called on a thread. Routed event definitions, like the objects that raise them, belong to the thread that uses them.

    View source

    Availability

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