Class: Wx::ActivateEvent

Inherits:
Event show all
Defined in:
lib/wx/doc/gen/events.rb

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:

Note:

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

See Also:

Defined Under Namespace

Classes: Reason

Instance Method Summary collapse

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.

Parameters:

  • eventType (Wx::GenericCollapsiblePane::EventType) (defaults to: Wx::EVT_NULL)
  • active (Boolean) (defaults to: true)
  • id (Integer) (defaults to: 0)
  • activationReason (Wx::ActivateEvent::Reason) (defaults to: REASON_UNKNOWN)


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_reasonWx::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_activeBoolean Also known as: active

Returns true if the application or window is being activated, false otherwise.

Returns:

  • (Boolean)


1627
# File 'lib/wx/doc/gen/events.rb', line 1627

def get_active; end