From a35327028051bf75882b4f4cd6fcaf351c7b892b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 13 Jun 2006 19:08:21 +0000 Subject: [PATCH] Help text for regions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_cshelp.i | 10 ++++++++++ wxPython/src/_radio.i | 7 +++++++ wxPython/src/_window.i | 10 ++++++++++ 3 files changed, 27 insertions(+) diff --git a/wxPython/src/_cshelp.i b/wxPython/src/_cshelp.i index 6fc709d291..f9f0bae2dd 100644 --- a/wxPython/src/_cshelp.i +++ b/wxPython/src/_cshelp.i @@ -255,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), diff --git a/wxPython/src/_radio.i b/wxPython/src/_radio.i index abd79bba1e..d9da1d4890 100644 --- a/wxPython/src/_radio.i +++ b/wxPython/src/_radio.i @@ -86,7 +86,14 @@ public: // get the individual items tooltip; returns NULL if none wxToolTip *GetItemToolTip(unsigned int item) const; + // set helptext for a particular item, pass an empty string to erase it + void SetItemHelpText(unsigned int n, const wxString& helpText); + + // retrieve helptext for a particular item, empty string means no help text + wxString GetItemHelpText(unsigned int n) const; + virtual int GetItemFromPoint(const wxPoint& pt) const; + // bool IsValid(int n) const; ** not public static wxVisualAttributes diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 628e416945..3f57c17e6d 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -1776,6 +1776,16 @@ one.", ""); DocDeclStr( + virtual wxString , GetHelpTextAtPoint(const wxPoint& pt, + wxHelpEvent::Origin origin) const, + "Get the help string associated with the given position in this window. + +Notice that pt may be invalid if event origin is keyboard or unknown +and this method should return the global window help text then +", ""); + + + DocDeclStr( wxString , GetHelpText() const, "Gets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current