Trait EventMethods

Source
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§

Source

fn clone(&self) -> Event

Returns a copy of the event.

See C++ wxEvent::Clone()’s documentation.

Source

fn get_event_object(&self) -> Option<ObjectIsOwned<false>>

Returns the object (usually a window) associated with the event, if any.

See C++ wxEvent::GetEventObject()’s documentation.

Source

fn get_id(&self) -> c_int

Returns the identifier associated with this event, such as a button command id.

See C++ wxEvent::GetId()’s documentation.

Source

fn get_event_user_data(&self) -> Option<ObjectIsOwned<false>>

Return the user data associated with a dynamically connected event handler.

See C++ wxEvent::GetEventUserData()’s documentation.

Source

fn get_skipped(&self) -> bool

Returns true if the event handler should be skipped, false otherwise.

See C++ wxEvent::GetSkipped()’s documentation.

Source

fn get_timestamp(&self) -> c_long

Gets the timestamp for the event.

See C++ wxEvent::GetTimestamp()’s documentation.

Source

fn is_command_event(&self) -> bool

Returns true if the event is or is derived from wxCommandEvent else it returns false.

See C++ wxEvent::IsCommandEvent()’s documentation.

Source

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).

See C++ wxEvent::ResumePropagation()’s documentation.

Source

fn set_event_object<O: ObjectMethods>(&self, object: Option<&O>)

Sets the originating object.

See C++ wxEvent::SetEventObject()’s documentation.

Source

fn set_id(&self, id: c_int)

Sets the identifier associated with this event, such as a button command id.

See C++ wxEvent::SetId()’s documentation.

Source

fn set_timestamp(&self, time_stamp: c_long)

Sets the timestamp for the event.

See C++ wxEvent::SetTimestamp()’s documentation.

Source

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.

See C++ wxEvent::ShouldPropagate()’s documentation.

Source

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.

See C++ wxEvent::Skip()’s documentation.

Source

fn stop_propagation(&self) -> c_int

Stop the event from propagating to its parent window.

See C++ wxEvent::StopPropagation()’s documentation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const OWNED: bool> EventMethods for EventIsOwned<OWNED>

Source§

impl<const OWNED: bool> EventMethods for TimerEventIsOwned<OWNED>