notifmsg.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/notifmsg.h
  3. // Purpose: wxNotificationMessage for wxGTK.
  4. // Author: Vadim Zeitlin
  5. // Created: 2012-07-25
  6. // Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_GTK_NOTIFMSG_H_
  10. #define _WX_GTK_NOTIFMSG_H_
  11. typedef struct _NotifyNotification NotifyNotification;
  12. // ----------------------------------------------------------------------------
  13. // wxNotificationMessage
  14. // ----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_ADV wxNotificationMessage : public wxNotificationMessageBase
  16. {
  17. public:
  18. wxNotificationMessage() { Init(); }
  19. wxNotificationMessage(const wxString& title,
  20. const wxString& message = wxString(),
  21. wxWindow *parent = NULL,
  22. int flags = wxICON_INFORMATION)
  23. : wxNotificationMessageBase(title, message, parent, flags)
  24. {
  25. Init();
  26. }
  27. virtual ~wxNotificationMessage();
  28. virtual bool Show(int timeout = Timeout_Auto);
  29. virtual bool Close();
  30. // Set the name of the icon to use, overriding the default icon determined
  31. // by the flags. Call with empty string to reset custom icon.
  32. bool GTKSetIconName(const wxString& name);
  33. private:
  34. void Init() { m_notification = NULL; }
  35. NotifyNotification* m_notification;
  36. wxString m_iconName;
  37. wxDECLARE_NO_COPY_CLASS(wxNotificationMessage);
  38. };
  39. #endif // _WX_GTK_NOTIFMSG_H_