]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/notifmsg.h
implemented wxNotificationMessage for wxMSW using wxTaskBarIcon and fallback to gener...
[wxWidgets.git] / include / wx / generic / notifmsg.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/notifmsg.h
3 // Purpose: generic implementation of wxGenericNotificationMessage
4 // Author: Vadim Zeitlin
5 // Created: 2007-11-24
6 // RCS-ID: $Id$
7 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_GENERIC_NOTIFMSG_H_
12 #define _WX_GENERIC_NOTIFMSG_H_
13
14 class wxNotificationMessageDialog;
15
16 // ----------------------------------------------------------------------------
17 // wxGenericNotificationMessage
18 // ----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_ADV wxGenericNotificationMessage : public wxNotificationMessageBase
21 {
22 public:
23 wxGenericNotificationMessage() { Init(); }
24 wxGenericNotificationMessage(const wxString& title,
25 const wxString& message = wxString(),
26 wxWindow *parent = NULL)
27 : wxNotificationMessageBase(title, message, parent)
28 {
29 Init();
30 }
31
32 virtual ~wxGenericNotificationMessage();
33
34
35 virtual bool Show(int timeout = Timeout_Auto);
36 virtual bool Close();
37
38 // generic implementation-specific methods
39
40 // get/set the default timeout (used if Timeout_Auto is specified)
41 static int GetDefaultTimeout() { return ms_timeout; }
42 static void SetDefaultTimeout(int timeout);
43
44 private:
45 void Init();
46
47
48 // default timeout
49 static int ms_timeout;
50
51 // notification message is represented by a modeless dialog in this
52 // implementation
53 wxNotificationMessageDialog *m_dialog;
54
55
56 DECLARE_NO_COPY_CLASS(wxGenericNotificationMessage)
57 };
58
59 #endif // _WX_GENERIC_NOTIFMSG_H_
60