pub trait EventMethods: ObjectMethods {
Show 14 methods
// Provided methods
fn clone(&self) -> Event { ... }
fn get_event_object(&self) -> Option<ObjectIsOwned<false>> { ... }
fn get_id(&self) -> c_int { ... }
fn get_event_user_data(&self) -> Option<ObjectIsOwned<false>> { ... }
fn get_skipped(&self) -> bool { ... }
fn get_timestamp(&self) -> c_long { ... }
fn is_command_event(&self) -> bool { ... }
fn resume_propagation(&self, propagation_level: c_int) { ... }
fn set_event_object<O: ObjectMethods>(&self, object: Option<&O>) { ... }
fn set_id(&self, id: c_int) { ... }
fn set_timestamp(&self, time_stamp: c_long) { ... }
fn should_propagate(&self) -> bool { ... }
fn skip(&self, skip: bool) { ... }
fn stop_propagation(&self) -> c_int { ... }
}Expand description
This trait represents C++ wxEvent class’s methods and inheritance.
See EventIsOwned documentation for the class usage.
Provided Methods§
Sourcefn get_event_object(&self) -> Option<ObjectIsOwned<false>>
fn get_event_object(&self) -> Option<ObjectIsOwned<false>>
Returns the object (usually a window) associated with the event, if any.
Sourcefn get_id(&self) -> c_int
fn get_id(&self) -> c_int
Returns the identifier associated with this event, such as a button command id.
Sourcefn get_event_user_data(&self) -> Option<ObjectIsOwned<false>>
fn get_event_user_data(&self) -> Option<ObjectIsOwned<false>>
Return the user data associated with a dynamically connected event handler.
Sourcefn get_skipped(&self) -> bool
fn get_skipped(&self) -> bool
Returns true if the event handler should be skipped, false otherwise.
Sourcefn get_timestamp(&self) -> c_long
fn get_timestamp(&self) -> c_long
Gets the timestamp for the event.
Sourcefn is_command_event(&self) -> bool
fn is_command_event(&self) -> bool
Returns true if the event is or is derived from wxCommandEvent else it returns false.
Sourcefn resume_propagation(&self, propagation_level: c_int)
fn resume_propagation(&self, propagation_level: c_int)
Sets the propagation level to the given value (for example returned from an earlier call to wxEvent::StopPropagation).
Sourcefn set_event_object<O: ObjectMethods>(&self, object: Option<&O>)
fn set_event_object<O: ObjectMethods>(&self, object: Option<&O>)
Sets the originating object.
Sourcefn set_id(&self, id: c_int)
fn set_id(&self, id: c_int)
Sets the identifier associated with this event, such as a button command id.
Sourcefn set_timestamp(&self, time_stamp: c_long)
fn set_timestamp(&self, time_stamp: c_long)
Sets the timestamp for the event.
Sourcefn should_propagate(&self) -> bool
fn should_propagate(&self) -> bool
Test if this event should be propagated or not, i.e. if the propagation level is currently greater than 0.
Sourcefn skip(&self, skip: bool)
fn skip(&self, skip: bool)
This method can be used inside an event handler to control whether further event handlers bound to this event will be called after the current one returns.
Sourcefn stop_propagation(&self) -> c_int
fn stop_propagation(&self) -> c_int
Stop the event from propagating to its parent window.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".