X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6cedc146fa58e31e8b57f21ccf3b34a9bacb29e7..941afb6b650abdad082742dccbe8e463848ba964:/wxPython/src/_cshelp.i?ds=sidebyside diff --git a/wxPython/src/_cshelp.i b/wxPython/src/_cshelp.i index fbc13ac227..f9f0bae2dd 100644 --- a/wxPython/src/_cshelp.i +++ b/wxPython/src/_cshelp.i @@ -70,10 +70,19 @@ Events class wxHelpEvent : public wxCommandEvent { public: + // how was this help event generated? + enum Origin + { + Origin_Unknown, // unrecognized event source + Origin_Keyboard, // event generated from F1 key press + Origin_HelpButton // event from [?] button on the title bar (Windows) + }; + DocCtorStr( wxHelpEvent(wxEventType type = wxEVT_NULL, wxWindowID winid = 0, - const wxPoint& pt = wxDefaultPosition), + const wxPoint& pt = wxDefaultPosition, + Origin origin = Origin_Unknown ), "", ""); @@ -104,7 +113,16 @@ appropriately.", ""); DocDeclStr( void , SetTarget(const wxString& target), "Set an optional target to display help in. E.g. a window specification", ""); + + // optional indication of the event source + DocDeclStr( + Origin , GetOrigin() const, + "Optiononal indication of the source of the event.", ""); + DocDeclStr( + void , SetOrigin(Origin origin), + "", ""); + }; //--------------------------------------------------------------------------- @@ -237,6 +255,16 @@ help is associated with the window.", ""); "Shows help for the given window. Uses GetHelp internally if applicable. Returns True if it was done, or False if no help was available for this window.", ""); + + DocDeclStr( + virtual bool , ShowHelpAtPoint(wxWindowBase *window, + const wxPoint& pt, + wxHelpEvent::Origin origin), + "Show help for the given window (uses window.GetHelpAtPoint() +internally if applicable), return true if it was done or false if no +help available for this window.", ""); + + DocDeclStr( void , AddHelp(wxWindow *window, const wxString& text),