Struct tuix::Event [−]
pub struct Event {
pub origin: Entity,
pub target: Entity,
pub propagation: Propagation,
pub consumable: bool,
pub unique: bool,
pub order: i32,
pub message: Box<dyn Message + 'static, Global>,
// some fields omitted
}
Expand description
An event is a wrapper around a message and provides metadata on how the event should be propagated through the tree
Fields
origin: Entity
target: Entity
propagation: Propagation
consumable: bool
unique: bool
order: i32
message: Box<dyn Message + 'static, Global>
Implementations
impl Event
impl Event
Specifies that the event is unique (only one of this event type should exist in the event queue at once)
pub fn propagate(self, propagation: Propagation) -> Event
pub fn propagate(self, propagation: Propagation) -> Event
Sets the propagation of the event
pub fn consume(&mut self)
pub fn consume(&mut self)
Consumes the event (prevents the event from continuing on its propagation path)