Class: Wx::Event
- Defined in:
- lib/wx/doc/gen/event.rb,
lib/wx/doc/event.rb
Overview
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 Events and Event Handling overview.
Category: Events
Direct Known Subclasses
AUI::AuiManagerEvent, ActivateEvent, CalculateLayoutEvent, CloseEvent, CommandEvent, DPIChangedEvent, DialUpEvent, DisplayChangedEvent, DropFilesEvent, EraseEvent, FocusEvent, FullScreenEvent, GestureEvent, IconizeEvent, IdleEvent, InitDialogEvent, JoystickEvent, KeyEvent, MaximizeEvent, MenuEvent, MouseCaptureChangedEvent, MouseCaptureLostEvent, MouseEvent, MoveEvent, NavigationKeyEvent, PaintEvent, PaletteChangedEvent, QueryLayoutInfoEvent, QueryNewPaletteEvent, ScrollWinEvent, SetCursorEvent, ShowEvent, SizeEvent, SysColourChangedEvent, TaskBarIconEvent, TimerEvent
Instance Method Summary collapse
-
#clone ⇒ Wx::Event
Returns a copy of the event.
-
#get_event_category ⇒ Wx::EventCategory
(also: #event_category)
Returns a generic category for this event.
-
#get_event_object ⇒ Wx::Object
(also: #event_object)
Returns the object (usually a window) associated with the event, if any.
-
#get_event_type ⇒ Wx::GenericCollapsiblePane::EventType
(also: #event_type)
Returns the identifier of the given event type, such as EVT_BUTTON.
-
#get_id ⇒ Integer
(also: #id)
Returns the identifier associated with this event, such as a button command id.
-
#get_skipped ⇒ Boolean
(also: #skipped)
Returns true if the event handler should be skipped, false otherwise.
-
#get_timestamp ⇒ Integer
(also: #timestamp)
Gets the timestamp for the event.
-
#initialize(evt_type = Wx::EVT_NULL, id = 0, prop_level = Wx::EVENT_PROPAGATE_NONE) ⇒ Event
constructor
Constructor.
-
#is_command_event ⇒ Boolean
(also: #command_event?)
Returns true if the event is or is derived from CommandEvent else it returns false.
-
#resume_propagation(propagationLevel) ⇒ void
Sets the propagation level to the given value (for example returned from an earlier call to #stop_propagation).
-
#set_event_object(object) ⇒ void
(also: #event_object=)
Sets the originating object.
-
#set_event_type(type) ⇒ void
(also: #event_type=)
Sets the event type.
-
#set_id(id) ⇒ void
(also: #id=)
Sets the identifier associated with this event, such as a button command id.
-
#set_timestamp(timeStamp = 0) ⇒ void
(also: #timestamp=)
Sets the timestamp for the event.
-
#should_propagate ⇒ Boolean
Test if this event should be propagated or not, i.e.
-
#skip(skip = true) ⇒ void
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.
-
#stop_propagation ⇒ Integer
Stop the event from propagating to its parent window.
Methods inherited from Object
Constructor Details
Instance Method Details
#clone ⇒ Wx::Event
Returns a copy of the event. Any event that is posted to the wxRuby event system for later action (via Wx::EvtHandler#add_pending_event, Wx::EvtHandler#queue_event or Wx::EvtHandler#post_event) must implement this method. All standard wxRuby events fully implement this method and wxRuby has taken care of correctly handling this for any user defined event classes derived from either Wx::Event or Wx::CommandEvent. Creating user defined event classes derived for other classes than Wx::Event or Wx::CommandEvent is currently not supported in wxRuby.
26 |
# File 'lib/wx/doc/event.rb', line 26 def clone; end |
#get_event_category ⇒ Wx::EventCategory Also known as: event_category
Returns a generic category for this event.
Wx::Event implementation returns Wx::EventCategory::EVT_CATEGORY_UI by default. This function is used to selectively process events in Wx::EventLoopBase::YieldFor.
724 |
# File 'lib/wx/doc/gen/event.rb', line 724 def get_event_category; end |
#get_event_object ⇒ Wx::Object Also known as: event_object
Returns the object (usually a window) associated with the event, if any.
711 |
# File 'lib/wx/doc/gen/event.rb', line 711 def get_event_object; end |
#get_event_type ⇒ Wx::GenericCollapsiblePane::EventType Also known as: event_type
Returns the identifier of the given event type, such as Wx::EVT_BUTTON.
716 |
# File 'lib/wx/doc/gen/event.rb', line 716 def get_event_type; end |
#get_id ⇒ Integer Also known as: id
Returns the identifier associated with this event, such as a button command id.
729 |
# File 'lib/wx/doc/gen/event.rb', line 729 def get_id; end |
#get_skipped ⇒ Boolean Also known as: skipped
Returns true if the event handler should be skipped, false otherwise.
734 |
# File 'lib/wx/doc/gen/event.rb', line 734 def get_skipped; end |
#get_timestamp ⇒ Integer Also known as: timestamp
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). wxWidgets returns a non-NULL timestamp only for mouse and key events (see MouseEvent and KeyEvent).
742 |
# File 'lib/wx/doc/gen/event.rb', line 742 def ; end |
#is_command_event ⇒ Boolean Also known as: command_event?
Returns true if the event is or is derived from CommandEvent else it returns false.
exists only for optimization purposes.
753 |
# File 'lib/wx/doc/gen/event.rb', line 753 def is_command_event; end |
#resume_propagation(propagationLevel) ⇒ void
This method returns an undefined value.
Sets the propagation level to the given value (for example returned from an earlier call to #stop_propagation).
759 |
# File 'lib/wx/doc/gen/event.rb', line 759 def resume_propagation(propagationLevel) end |
#set_event_object(object) ⇒ void Also known as: event_object=
This method returns an undefined value.
Sets the originating object.
764 |
# File 'lib/wx/doc/gen/event.rb', line 764 def set_event_object(object) end |
#set_event_type(type) ⇒ void Also known as: event_type=
This method returns an undefined value.
Sets the event type.
770 |
# File 'lib/wx/doc/gen/event.rb', line 770 def set_event_type(type) end |
#set_id(id) ⇒ void Also known as: id=
This method returns an undefined value.
Sets the identifier associated with this event, such as a button command id.
776 |
# File 'lib/wx/doc/gen/event.rb', line 776 def set_id(id) end |
#set_timestamp(timeStamp = 0) ⇒ void Also known as: timestamp=
This method returns an undefined value.
Sets the timestamp for the event.
782 |
# File 'lib/wx/doc/gen/event.rb', line 782 def (timeStamp=0) end |
#should_propagate ⇒ Boolean
Test if this event should be propagated or not, i.e. if the propagation level is currently greater than 0.
787 |
# File 'lib/wx/doc/gen/event.rb', line 787 def should_propagate; end |
#skip(skip = true) ⇒ void
This method returns an undefined value.
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.
795 |
# File 'lib/wx/doc/gen/event.rb', line 795 def skip(skip=true) end |
#stop_propagation ⇒ Integer
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.
801 |
# File 'lib/wx/doc/gen/event.rb', line 801 def stop_propagation; end |