An event is a structure holding information about an event passed to a
callback or member function. Event used to be a multipurpose
event object, and is an abstract base class for other event classes (see below).
For more information about events, see the Event handling overview.
EVT_NULL
)
Constructor. Should not need to be used directly by an application.
Returns a new, unique identifier for use by a custom user-defined event
type.
Different types of events in wxRuby are identified by unique integer
constant, for example Wx::EVT_COMMAND_LEFT_CLICK
(see
Event) Since this is used to wrap events triggered in the
API (or in user Ruby code) with the appropriate Ruby class, if you
create your own custom events, you may wish to use this
method to get an id which is guaranteed to be unique.
Returns a copy of the event.
Any event that is posted to the Widgets event system for later action (via
EvtHandler#add_pending_event or
PostEvent) must implement this method. All Widgets
events fully implement this method, but any derived events implemented by the
user should also implement this method just in case they (or some event
derived from them) are ever posted.
All Widgets events implement a copy constructor, so the easiest way of
implementing the Clone function is to implement a copy constructor for
a new event (call it MyEvent) and then define the Clone function like this:
Returns the object (usually a window) associated with the
event, if any.
Returns the integer identifier of the given event type, such as
Wx::EVT_COMMAND_BUTTON_CLICKED
.
Returns the identifier associated with this event, such as a button command id.
Returns true if the event handler should be skipped, false otherwise.
Gets the timestamp for the event. The timestamp is the time in milliseconds
since some fixed moment (not necessarily the standard Unix Epoch, so
only differences between the timestamps and not their absolute values usually
make sense).
Returns true if the event is or is derived from
CommandEvent else it returns false.
Note: Exists only for optimization purposes.
Sets the propagation level to the given value (for example returned from an
earlier call to stop_propagation).
Sets the originating object.
Sets the event type, which should be one of the event type constants,
such as Wx::EVT_COMMAND_BUTTON_CLICKED
.
Sets the identifier associated with this event, such as a button command id.
Sets the timestamp for the event.
Test if this event should be propagated or not, i.e. if the propagation level
is currently greater than 0.
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. Without skip() (or equivalently if skip(false) is used),
the event will not be processed any more. If skip(true) is called, the event
processing system continues searching for a further handler function for this
event, even though it has been processed already in the current handler.
In general, it is recommended to skip all non-command events to allow the
default handling to take place. The command events are, however, normally not
skipped as usually a single command such as a button click or menu item
selection must only be processed by one handler.
Stop the event from propagating to its parent window.
Returns the old propagation level value which may be later passed to
resume_propagation to allow propagating the
event again.
[This page automatically generated from the Textile source at 2023-06-09 00:45:29 +0000]