1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/notifmsg.h
3 // Purpose: implementation of wxNotificationMessage for Windows
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MSW_NOTIFMSG_H_
11 #define _WX_MSW_NOTIFMSG_H_
13 class WXDLLIMPEXP_FWD_ADV wxTaskBarIcon
;
15 // ----------------------------------------------------------------------------
16 // wxNotificationMessage
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_ADV wxNotificationMessage
: public wxNotificationMessageBase
22 wxNotificationMessage() { Init(); }
23 wxNotificationMessage(const wxString
& title
,
24 const wxString
& message
= wxString(),
25 wxWindow
*parent
= NULL
,
26 int flags
= wxICON_INFORMATION
)
27 : wxNotificationMessageBase(title
, message
, parent
, flags
)
32 virtual ~wxNotificationMessage();
35 virtual bool Show(int timeout
= Timeout_Auto
);
38 // MSW implementation-specific methods
40 // by default, wxNotificationMessage under MSW creates a temporary taskbar
41 // icon to which it attaches the notification, if there is an existing
42 // taskbar icon object in the application you may want to call this method
43 // to attach the notification to it instead (we won't take ownership of it
44 // and you can also pass NULL to not use the icon for notifications any
47 // returns the task bar icon which was used previously (may be NULL)
48 static wxTaskBarIcon
*UseTaskBarIcon(wxTaskBarIcon
*icon
);
50 // call this to always use the generic implementation, even if the system
51 // supports the balloon tooltips used by the native one
52 static void AlwaysUseGeneric(bool alwaysUseGeneric
)
54 ms_alwaysUseGeneric
= alwaysUseGeneric
;
58 // common part of all ctors
59 void Init() { m_impl
= NULL
; }
62 // flag indicating whether we should always use generic implementation
63 static bool ms_alwaysUseGeneric
;
65 // the real implementation of this class (selected during run-time because
66 // the balloon task bar icons are not available in all Windows versions)
67 class wxNotifMsgImpl
*m_impl
;
70 wxDECLARE_NO_COPY_CLASS(wxNotificationMessage
);
73 #endif // _WX_MSW_NOTIFMSG_H_