notifmsg.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/hildon/notifmsg.h
  3. // Purpose: Hildon implementation of wxNotificationMessage
  4. // Author: Vadim Zeitlin
  5. // Created: 2007-11-21
  6. // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_GTK_HILDON_NOTIFMSG_H_
  10. #define _WX_GTK_HILDON_NOTIFMSG_H_
  11. typedef struct _HildonBanner HildonBanner;
  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. : wxNotificationMessageBase(title, message, parent)
  23. {
  24. Init();
  25. }
  26. virtual ~wxNotificationMessage();
  27. virtual bool Show(int timeout = Timeout_Auto);
  28. virtual bool Close();
  29. private:
  30. void Init() { m_banner = NULL; }
  31. // return the string containing markup for both the title and, if
  32. // specified, the message
  33. wxString HildonGetMarkup() const;
  34. // returns the widget of the parent GtkWindow to use or NULL
  35. GtkWidget *HildonGetWindow() const;
  36. // the banner we're showing, only non-NULL if it's an animation or progress
  37. // banner as the informational dialog times out on its own and we don't
  38. // need to store it (nor do we have any way to get its widget anyhow)
  39. GtkWidget *m_banner;
  40. wxDECLARE_NO_COPY_CLASS(wxNotificationMessage);
  41. };
  42. #endif // _WX_GTK_HILDON_NOTIFMSG_H_