Class: Wx::HelpEvent

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

Overview

A help event is sent when the user has requested context-sensitive help.

This can either be caused by the application requesting context-sensitive help mode via ContextHelp, or (on MS Windows) by the system generating a WM_HELP message when the user pressed F1 or clicked on the query button in a dialog caption. A help event is sent to the window that the user clicked on, and is propagated up the window hierarchy until the event is processed or there are no more event handlers. The application should call Event#get_id to check the identity of the clicked-on window, and then either show some suitable help or call Event#skip if the identifier is unrecognised. Calling Skip is important because it allows wxWidgets to generate further events for ancestors of the clicked-on window. Otherwise it would be impossible to show help for container windows, since processing would stop after the first window found.

Events using this class

The following event-handler methods redirect the events to member method or handler blocks for HelpEvent events. Event handler methods:

Category: Events

See Also:

Defined Under Namespace

Classes: Origin

Instance Method Summary collapse

Methods inherited from CommandEvent

#client_data, #client_data=, #get_client_data, #get_client_object, #get_int, #get_selection, #get_string, #is_checked, #is_selection, #set_client_data, #set_client_object, #set_extra_long, #set_int, #set_string

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(type = Wx::EVT_NULL, winid = 0, pt = Wx::DEFAULT_POSITION, origin = ORIGIN_UNKNOWN) ⇒ Wx::HelpEvent

Constructor.

Parameters:

  • type (Wx::GenericCollapsiblePane::EventType) (defaults to: Wx::EVT_NULL)
  • winid (Integer) (defaults to: 0)
  • pt (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)
  • origin (Wx::HelpEvent::Origin) (defaults to: ORIGIN_UNKNOWN)


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

def initialize(type=Wx::EVT_NULL, winid=0, pt=Wx::DEFAULT_POSITION, origin=ORIGIN_UNKNOWN) end

Instance Method Details

#get_originWx::HelpEvent::Origin Also known as: origin

Returns the origin of the help event which is one of the Origin values.

The application may handle events generated using the keyboard or mouse differently, e.g. by using Wx.get_mouse_position for the mouse events.

Returns:

See Also:



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

def get_origin; end

#get_positionWx::Point Also known as: position

Returns the left-click position of the mouse, in screen coordinates.

This allows the application to position the help appropriately.

Returns:



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

def get_position; end

#set_origin(origin) ⇒ void Also known as: origin=

This method returns an undefined value.

Set the help event origin, only used internally by wxWidgets normally.

Parameters:

See Also:



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

def set_origin(origin) end

#set_position(pt) ⇒ void Also known as: position=

This method returns an undefined value.

Sets the left-click position of the mouse, in screen coordinates.

Parameters:



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

def set_position(pt) end