Macro limn_core::multi_event [] [src]

macro_rules! multi_event {
    ( impl EventHandler< $multi_event:ident > for $handler:ident { $ ( $event_type:ident => $event_method:ident, ) * } ) => { ... };
}

Simplifies setting up an EventHandler that can receive multiple events. Generates an event enum and matches each event to a method on the handler. Also creates an associated method on the handler, add_adapters that should be called when the handler is added to a widget, to add the "adapter" handlers that redirect each event to the main event handler.