made it possible to associate context help to a region of a window

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-06-11 21:10:32 +00:00
parent a9c11b71e3
commit dc6588e771
9 changed files with 173 additions and 43 deletions

View File

@@ -927,9 +927,19 @@ public:
// associate this help text with all windows with the same id as this
// one
void SetHelpTextForId(const wxString& text);
// get the help string associated with this window (may be empty)
wxString GetHelpText() const;
#else
// 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
virtual wxString GetHelpTextAtPoint(const wxPoint& pt,
wxHelpEvent::Origin origin) const;
// returns the position-independent help text
wxString GetHelpText() const
{
return GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Unknown);
}
#else // !wxUSE_HELP
// silently ignore SetHelpText() calls
void SetHelpText(const wxString& WXUNUSED(text)) { }
void SetHelpTextForId(const wxString& WXUNUSED(text)) { }