Class: Wx::ActivateEvent
Overview
An activate event is sent when a window or application is being activated or deactivated.
Events using this class
The following event-handler methods redirect the events to member method or handler blocks for ActivateEvent events. Event handler methods:
-
EvtHandler#evt_activate(meth = nil, &block): Process a EVT_ACTIVATE event.
-
EvtHandler#evt_activate_app(meth = nil, &block): Process a EVT_ACTIVATE_APP event. This event is received by the App-derived instance only.
-
EvtHandler#evt_hibernate(meth = nil, &block): Process a hibernate event, supplying the member function. This event applies to App only, and only on Windows SmartPhone and PocketPC. It is generated when the system is low on memory; the application should free up as much memory as possible, and restore full working state when it receives a EVT_ACTIVATE or EVT_ACTIVATE_APP event.
Until wxWidgets 3.1.0 activation events could be sent by WXMSW when the window was minimized. This reflected the native MSW behaviour but was often surprising and unexpected, so starting from 3.1.0 such events are not sent any more when the window is in the minimized state.
Category: Events
Defined Under Namespace
Classes: Reason
Instance Method Summary collapse
-
#get_activation_reason ⇒ Wx::ActivateEvent::Reason
(also: #activation_reason)
Allows checking if the window was activated by clicking it with the mouse or in some other way.
-
#get_active ⇒ Boolean
(also: #active)
Returns true if the application or window is being activated, false otherwise.
-
#initialize(eventType = Wx::EVT_NULL, active = true, id = 0, activationReason = REASON_UNKNOWN) ⇒ Wx::ActivateEvent
constructor
Constructor.
Methods inherited from Event
#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(eventType = Wx::EVT_NULL, active = true, id = 0, activationReason = REASON_UNKNOWN) ⇒ Wx::ActivateEvent
Constructor.
1623 |
# File 'lib/wx/doc/gen/events.rb', line 1623 def initialize(eventType=Wx::EVT_NULL, active=true, id=0, activationReason=REASON_UNKNOWN) end |
Instance Method Details
#get_activation_reason ⇒ Wx::ActivateEvent::Reason Also known as: activation_reason
Allows checking if the window was activated by clicking it with the mouse or in some other way.
This method is currently only implemented in WXMSW and returns Reason_Mouse there if the window was activated by a mouse click and Reason_Unknown if it was activated in any other way (e.g. from keyboard or programmatically). Under all the other platforms, Reason_Unknown is always returned.
1635 |
# File 'lib/wx/doc/gen/events.rb', line 1635 def get_activation_reason; end |
#get_active ⇒ Boolean Also known as: active
Returns true if the application or window is being activated, false otherwise.
1627 |
# File 'lib/wx/doc/gen/events.rb', line 1627 def get_active; end |