wxhelpeventa 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. derived from
wxcommandevent include files <wx/event.h> event table macros to process an activate event, use these event handler macros to direct input to a member function that takes a wxhelpevent argument.
wxcontexthelp, wxdialog, event handling overview members
wxhelpevent::wxhelpevent
wxhelpevent::wxhelpeventwxhelpevent(wxtype eventtype = 0, wxwindowid id = 0, const wxpoint& point) constructor.
wxhelpevent::getoriginwxhelpevent::origin getorigin() const returns the origin of the help event which is one of the following values:
the application may handle events generated using the keyboard or mouse differently, e.g. by using wxgetmouseposition() for the mouse events. see also
wxhelpevent::getpositionconst wxpoint& getposition() const returns the left-click position of the mouse, in screen coordinates. this allows the application to position the help appropriately.
wxhelpevent::setoriginvoid setorigin(wxhelpevent::origin origin) set the help event origin, only used internally by wxwidgets normally. see also
wxhelpevent::setpositionvoid setposition(const wxpoint& pt) sets the left-click position of the mouse, in screen coordinates.
|