Version: 2.9.4
Public Types | Public Member Functions
wxHelpEvent Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/event.h>

Inheritance diagram for wxHelpEvent:

Detailed Description

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 wxContextHelp, 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 wxEvent::GetId to check the identity of the clicked-on window, and then either show some suitable help or call wxEvent::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 macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxHelpEvent& event)

Event macros:

Library:  wxCore
Category:  Events
参照:
wxContextHelp, wxDialog, Events and Event Handling

Public Types

enum  Origin {
  Origin_Unknown,
  Origin_Keyboard,
  Origin_HelpButton
}
 Indicates how a wxHelpEvent was generated. More...

Public Member Functions

 wxHelpEvent (wxEventType type=wxEVT_NULL, wxWindowID winid=0, const wxPoint &pt=wxDefaultPosition, wxHelpEvent::Origin origin=Origin_Unknown)
 Constructor.
wxHelpEvent::Origin GetOrigin () const
 Returns the origin of the help event which is one of the ::wxHelpEventOrigin values.
const wxPointGetPosition () const
 Returns the left-click position of the mouse, in screen coordinates.
void SetOrigin (wxHelpEvent::Origin origin)
 Set the help event origin, only used internally by wxWidgets normally.
void SetPosition (const wxPoint &pt)
 Sets the left-click position of the mouse, in screen coordinates.

List of all members.


Member Enumeration Documentation

Indicates how a wxHelpEvent was generated.

Enumerator:
Origin_Unknown 

unrecognized event source.

Origin_Keyboard 

event generated from F1 key press.

Origin_HelpButton 

event generated by wxContextHelp or from the [?] button on the title bar (Windows).


Constructor & Destructor Documentation

wxHelpEvent::wxHelpEvent ( wxEventType  type = wxEVT_NULL,
wxWindowID  winid = 0,
const wxPoint pt = wxDefaultPosition,
wxHelpEvent::Origin  origin = Origin_Unknown 
)

Constructor.


Member Function Documentation

wxHelpEvent::Origin wxHelpEvent::GetOrigin ( ) const

Returns the origin of the help event which is one of the ::wxHelpEventOrigin values.

The application may handle events generated using the keyboard or mouse differently, e.g. by using wxGetMousePosition() for the mouse events.

参照:
SetOrigin()
const wxPoint& wxHelpEvent::GetPosition ( ) const

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

This allows the application to position the help appropriately.

void wxHelpEvent::SetOrigin ( wxHelpEvent::Origin  origin)

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

参照:
GetOrigin()
void wxHelpEvent::SetPosition ( const wxPoint pt)

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

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines