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