added UnsetToolTip() which is also provided (as empty function) in wxUSE_TOOLTIPS==0 case unlike SetToolTip(NULL)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-25 23:19:04 +00:00
parent 82db3c3d9d
commit 410201d988
2 changed files with 28 additions and 7 deletions

View File

@@ -1208,16 +1208,20 @@ public:
#if wxUSE_TOOLTIPS
// the easiest way to set a tooltip for a window is to use this method
void SetToolTip( const wxString &tip );
// attach a tooltip to the window
// attach a tooltip to the window, pointer can be NULL to remove
// existing tooltip
void SetToolTip( wxToolTip *tip ) { DoSetToolTip(tip); }
// more readable synonym for SetToolTip(NULL)
void UnsetToolTip() { SetToolTip(NULL); }
// get the associated tooltip or NULL if none
wxToolTip* GetToolTip() const { return m_tooltip; }
wxString GetToolTipText() const ;
#else
wxString GetToolTipText() const;
#else // !wxUSE_TOOLTIPS
// make it much easier to compile apps in an environment
// that doesn't support tooltips, such as PocketPC
inline void SetToolTip( const wxString & WXUNUSED(tip) ) {}
#endif // wxUSE_TOOLTIPS
void SetToolTip(const wxString & WXUNUSED(tip)) { }
void UnsetToolTip() { }
#endif // wxUSE_TOOLTIPS/!wxUSE_TOOLTIPS
// drag and drop
// -------------