tooltip.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/tooltip.h
  3. // Purpose: wxToolTip class
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTKTOOLTIP_H_
  9. #define _WX_GTKTOOLTIP_H_
  10. #include "wx/string.h"
  11. #include "wx/object.h"
  12. //-----------------------------------------------------------------------------
  13. // forward declarations
  14. //-----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_FWD_CORE wxWindow;
  16. //-----------------------------------------------------------------------------
  17. // wxToolTip
  18. //-----------------------------------------------------------------------------
  19. class WXDLLIMPEXP_CORE wxToolTip : public wxObject
  20. {
  21. public:
  22. wxToolTip( const wxString &tip );
  23. // globally change the tooltip parameters
  24. static void Enable( bool flag );
  25. static void SetDelay( long msecs );
  26. // set the delay after which the tooltip disappears or how long the tooltip remains visible
  27. static void SetAutoPop(long msecs);
  28. // set the delay between subsequent tooltips to appear
  29. static void SetReshow(long msecs);
  30. // get/set the tooltip text
  31. void SetTip( const wxString &tip );
  32. wxString GetTip() const { return m_text; }
  33. wxWindow *GetWindow() const { return m_window; }
  34. // Implementation
  35. void GTKSetWindow(wxWindow* win);
  36. static void GTKApply(GtkWidget* widget, const char* tip);
  37. private:
  38. wxString m_text;
  39. wxWindow *m_window;
  40. DECLARE_ABSTRACT_CLASS(wxToolTip)
  41. };
  42. #endif // _WX_GTKTOOLTIP_H_