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
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_TASKBAR_H_
13 #define _WX_TASKBAR_H_
17 // private helper class:
18 class WXDLLIMPEXP_FWD_ADV wxTaskBarIconWindow
;
20 class WXDLLIMPEXP_ADV wxTaskBarIcon
: public wxTaskBarIconBase
23 wxTaskBarIcon(wxTaskBarIconType iconType
= wxTBI_DEFAULT_TYPE
);
24 virtual ~wxTaskBarIcon();
27 bool IsOk() const { return true; }
28 bool IsIconInstalled() const { return m_iconAdded
; }
31 bool SetIcon(const wxIcon
& icon
, const wxString
& tooltip
= wxEmptyString
);
32 bool RemoveIcon(void);
33 bool PopupMenu(wxMenu
*menu
);
35 // MSW-specific class methods
37 #if wxUSE_TASKBARICON_BALLOONS
38 // show a balloon notification (the icon must have been already initialized
41 // title and text are limited to 63 and 255 characters respectively, msec
42 // is the timeout, in milliseconds, before the balloon disappears (will be
43 // clamped down to the allowed 10-30s range by Windows if it's outside it)
44 // and flags can include wxICON_ERROR/INFO/WARNING to show a corresponding
47 // return true if balloon was shown, false on error (incorrect parameters
48 // or function unsupported by OS)
49 bool ShowBalloon(const wxString
& title
,
53 #endif // wxUSE_TASKBARICON_BALLOONS
56 friend class wxTaskBarIconWindow
;
58 long WindowProc(unsigned int msg
, unsigned int wParam
, long lParam
);
59 void RegisterWindowMessages();
62 wxTaskBarIconWindow
*m_win
;
65 wxString m_strTooltip
;
67 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon
)
70 #endif // _WX_TASKBAR_H_