pub trait EventControllerExt: IsA<EventController> + 'static {
// Provided methods
fn propagation_phase(&self) -> PropagationPhase { ... }
fn widget(&self) -> Option<Widget> { ... }
fn handle_event(&self, event: &Event) -> bool { ... }
fn reset(&self) { ... }
fn set_propagation_phase(&self, phase: PropagationPhase) { ... }
fn connect_propagation_phase_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Trait containing all EventController methods.
§Implementors
EventControllerKey, EventControllerMotion, EventControllerScroll, EventController, Gesture, PadController
Provided Methods§
Sourcefn propagation_phase(&self) -> PropagationPhase
fn propagation_phase(&self) -> PropagationPhase
Sourcefn handle_event(&self, event: &Event) -> bool
fn handle_event(&self, event: &Event) -> bool
Sourcefn reset(&self)
fn reset(&self)
Resets the self to a clean state. Every interaction
the controller did through handle-event
will be dropped at this point.
Sourcefn set_propagation_phase(&self, phase: PropagationPhase)
fn set_propagation_phase(&self, phase: PropagationPhase)
Sets the propagation phase at which a controller handles events.
If phase is PropagationPhase::None, no automatic event handling will be
performed, but other additional gesture maintenance will. In that phase,
the events can be managed by calling handle_event().
§phase
a propagation phase
fn connect_propagation_phase_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".