]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/taskbar.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / msw / taskbar.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////
fa1c12bd
VZ
2// File: wx/msw/taskbar.h
3// Purpose: Defines wxTaskBarIcon class for manipulating icons on the
2bda0e17
KB
4// Windows task bar.
5// Author: Julian Smart
1e6d9c20 6// Modified by: Vaclav Slavik
2bda0e17 7// Created: 24/3/98
fa1c12bd 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////
11
71e33cfb
VZ
12#ifndef _WX_TASKBAR_H_
13#define _WX_TASKBAR_H_
2bda0e17 14
d162a7ee
VZ
15#include "wx/icon.h"
16
1e6d9c20 17// private helper class:
b5dbe15d 18class WXDLLIMPEXP_FWD_ADV wxTaskBarIconWindow;
2bda0e17 19
71e33cfb 20class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase
6af507f7 21{
2bda0e17 22public:
70175534 23 wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE);
1e6d9c20 24 virtual ~wxTaskBarIcon();
2bda0e17 25
71e33cfb
VZ
26 // Accessors
27 bool IsOk() const { return true; }
28 bool IsIconInstalled() const { return m_iconAdded; }
2bda0e17 29
71e33cfb 30 // Operations
2b5f62a0 31 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
2bda0e17 32 bool RemoveIcon(void);
71e33cfb 33 bool PopupMenu(wxMenu *menu);
2bda0e17 34
cdcfde5d
VZ
35 // MSW-specific class methods
36
23bd008a 37#if wxUSE_TASKBARICON_BALLOONS
cdcfde5d
VZ
38 // show a balloon notification (the icon must have been already initialized
39 // using SetIcon)
40 //
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
45 // icon
46 //
47 // return true if balloon was shown, false on error (incorrect parameters
48 // or function unsupported by OS)
49 bool ShowBalloon(const wxString& title,
50 const wxString& text,
51 unsigned msec = 0,
52 int flags = 0);
23bd008a 53#endif // wxUSE_TASKBARICON_BALLOONS
cdcfde5d 54
1e6d9c20
VS
55protected:
56 friend class wxTaskBarIconWindow;
71e33cfb 57
dda36afd 58 long WindowProc(unsigned int msg, unsigned int wParam, long lParam);
1e6d9c20 59 void RegisterWindowMessages();
2bda0e17 60
71e33cfb 61
1e6d9c20
VS
62 wxTaskBarIconWindow *m_win;
63 bool m_iconAdded;
64 wxIcon m_icon;
65 wxString m_strTooltip;
56194595 66
71e33cfb 67 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon)
2bda0e17
KB
68};
69
71e33cfb 70#endif // _WX_TASKBAR_H_