1 /////////////////////////////////////////////////////////////////////////
2 // File: wx/msw/taskbar.h
3 // Purpose: Defines wxTaskBarIcon class for manipulating icons on the
5 // Author: Julian Smart
6 // Modified by: Vaclav Slavik
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_TASKBAR_H_
14 #define _WX_TASKBAR_H_
18 // private helper class:
19 class WXDLLIMPEXP_FWD_ADV wxTaskBarIconWindow
;
21 class WXDLLIMPEXP_ADV wxTaskBarIcon
: public wxTaskBarIconBase
24 wxTaskBarIcon(wxTaskBarIconType iconType
= wxTBI_DEFAULT_TYPE
);
25 virtual ~wxTaskBarIcon();
28 bool IsOk() const { return true; }
29 bool IsIconInstalled() const { return m_iconAdded
; }
32 bool SetIcon(const wxIcon
& icon
, const wxString
& tooltip
= wxEmptyString
);
33 bool RemoveIcon(void);
34 bool PopupMenu(wxMenu
*menu
);
36 // MSW-specific class methods
38 #if wxUSE_TASKBARICON_BALLOONS
39 // show a balloon notification (the icon must have been already initialized
42 // title and text are limited to 63 and 255 characters respectively, msec
43 // is the timeout, in milliseconds, before the balloon disappears (will be
44 // clamped down to the allowed 10-30s range by Windows if it's outside it)
45 // and flags can include wxICON_ERROR/INFO/WARNING to show a corresponding
48 // return true if balloon was shown, false on error (incorrect parameters
49 // or function unsupported by OS)
50 bool ShowBalloon(const wxString
& title
,
54 #endif // wxUSE_TASKBARICON_BALLOONS
57 friend class wxTaskBarIconWindow
;
59 long WindowProc(unsigned int msg
, unsigned int wParam
, long lParam
);
60 void RegisterWindowMessages();
63 wxTaskBarIconWindow
*m_win
;
66 wxString m_strTooltip
;
68 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon
)
71 #endif // _WX_TASKBAR_H_