]> git.saurik.com Git - wxWidgets.git/commitdiff
Implement wxWindow::GetToolTipText().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Jul 2009 23:13:58 +0000 (23:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Jul 2009 23:13:58 +0000 (23:13 +0000)
This was declared in wx/window.h but somehow never implemented.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/window.h
src/common/wincmn.cpp

index 73b300c789439cd201f7fe5250148a261a6bb9d6..7d1f81473c5aeab0e90fcfd57f5af2cfd45a34d4 100644 (file)
@@ -2216,6 +2216,11 @@ public:
     */
     wxToolTip* GetToolTip() const;
 
+    /**
+        Get the text of the associated tooltip or empty string if none.
+     */
+    wxString GetToolTipText() const;
+
     /**
         Attach a tooltip to the window.
 
index 6eddc7acf404015ec87df826851f4330e13194c6..b337a659e4e41693d1ced64483f4e2b276ca3596 100644 (file)
@@ -1878,6 +1878,11 @@ void wxWindowBase::OnHelp(wxHelpEvent& event)
 
 #if wxUSE_TOOLTIPS
 
+wxString wxWindowBase::GetToolTipText() const
+{
+    return m_tooltip ? m_tooltip->GetTip() : wxString();
+}
+
 void wxWindowBase::SetToolTip( const wxString &tip )
 {
     // don't create the new tooltip if we already have one