Class: Wx::HelpEvent
- Inherits:
-
CommandEvent
- Object
- Object
- Event
- CommandEvent
- Wx::HelpEvent
- 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:
-
EvtHandler#evt_help(id, meth = nil, &block): Process a EVT_HELP event.
-
EvtHandler#evt_help_range(id1, id2, meth = nil, &block): Process a EVT_HELP event for a range of ids.
Category: Events
Defined Under Namespace
Classes: Origin
Instance Method Summary collapse
-
#get_origin ⇒ Wx::HelpEvent::Origin
(also: #origin)
Returns the origin of the help event which is one of the Origin values.
-
#get_position ⇒ Wx::Point
(also: #position)
Returns the left-click position of the mouse, in screen coordinates.
-
#initialize(type = Wx::EVT_NULL, winid = 0, pt = Wx::DEFAULT_POSITION, origin = ORIGIN_UNKNOWN) ⇒ Wx::HelpEvent
constructor
Constructor.
-
#set_origin(origin) ⇒ void
(also: #origin=)
Set the help event origin, only used internally by wxWidgets normally.
-
#set_position(pt) ⇒ void
(also: #position=)
Sets the left-click position of the mouse, in screen coordinates.
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.
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_origin ⇒ Wx::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.
2682 |
# File 'lib/wx/doc/gen/events.rb', line 2682 def get_origin; end |
#get_position ⇒ Wx::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.
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.
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.
2704 |
# File 'lib/wx/doc/gen/events.rb', line 2704 def set_position(pt) end |