tooltip.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/tooltip.h
  3. // Purpose: wxToolTip class - tooltip control
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 10/17/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_OS2_TOOLTIP_H_
  11. #define _WX_OS2_TOOLTIP_H_
  12. class wxToolTip : public wxObject
  13. {
  14. public:
  15. // ctor & dtor
  16. wxToolTip(const wxString &rsTip);
  17. virtual ~wxToolTip();
  18. //
  19. // Accessors
  20. //
  21. inline const wxString& GetTip(void) const { return m_sText; }
  22. inline wxWindow* GetWindow(void) const { return m_pWindow; }
  23. void SetTip(const wxString& rsTip);
  24. inline void SetWindow(wxWindow* pWin) { m_pWindow = pWin; }
  25. // controlling tooltip behaviour: globally change tooltip parameters
  26. // enable or disable the tooltips globally
  27. static void Enable(bool WXUNUSED(flag)) {}
  28. // set the delay after which the tooltip appears
  29. static void SetDelay(long WXUNUSED(milliseconds)) {}
  30. // set the delay after which the tooltip disappears or how long the tooltip remains visible
  31. static void SetAutoPop(long WXUNUSED(milliseconds)) {}
  32. // set the delay between subsequent tooltips to appear
  33. static void SetReshow(long WXUNUSED(milliseconds)) {}
  34. //
  35. // Implementation
  36. //
  37. void DisplayToolTipWindow(const wxPoint& rPos);
  38. void HideToolTipWindow(void);
  39. private:
  40. void Create(const wxString &rsTip);
  41. HWND m_hWnd;
  42. wxString m_sText; // tooltip text
  43. wxWindow* m_pWindow; // window we're associated with
  44. }; // end of CLASS wxToolTip
  45. #endif // _WX_OS2_TOOLTIP_H_