]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/taskbar.tex
split wxRegion(wxBitmap) ctor into two ctors with clearer semantics
[wxWidgets.git] / docs / latex / wx / taskbar.tex
1 \section{\class{wxTaskBarIcon}}\label{wxtaskbaricon}
2
3 This class represents a taskbar icon, appearing in the `system tray' and
4 responding to mouse clicks. An icon has an optional tooltip. This class is only
5 supported under Windows 95/NT and in X Window System ports (wxGTK, wxMotif,
6 wxX11).
7
8 \wxheading{X Window System Note}
9
10 Under X Window System, the window manager must support either
11 the \urlref{System Tray Protocol by freedesktop.org}{http://freedesktop.org/Standards/systemtray-spec}
12 (WMs used by modern desktop environments such as GNOME >= 2, KDE
13 >= 3 and XFCE >= 4 all do) or the older methods used in GNOME 1.2 and
14 KDE 1 and 2. If it doesn't, the icon will appear as a toplevel window on
15 user's desktop.
16
17 Because not all window managers have system tray, there's no guarantee that
18 wxTaskBarIcon will work correctly under X Window System and so the applications
19 should use it only as an optional component of their user interface. The user
20 should be required to explicitly enable the taskbar icon on Unix, it shouldn't
21 be on by default.
22
23
24 \wxheading{Derived from}
25
26 \helpref{wxEvtHandler}{wxevthandler}\\
27 \helpref{wxObject}{wxobject}
28
29 \wxheading{Include files}
30
31 <wx/taskbar.h>
32
33 \wxheading{Event handling}
34
35 To process input from a taskbar icon, use the following event handler macros to direct input to member
36 functions that take a wxTaskBarIconEvent argument.
37
38 \twocolwidtha{7cm}
39 \begin{twocollist}\itemsep=0pt
40 \twocolitem{{\bf EVT\_TASKBAR\_MOVE(func)}}{Process a
41 wxEVT\_TASKBAR\_MOVE event.}
42 \twocolitem{{\bf EVT\_TASKBAR\_LEFT\_DOWN(func)}}{Process a
43 wxEVT\_TASKBAR\_LEFT\_DOWN event.}
44 \twocolitem{{\bf EVT\_TASKBAR\_LEFT\_UP(func)}}{Process a
45 wxEVT\_TASKBAR\_LEFT\_UP event.}
46 \twocolitem{{\bf EVT\_TASKBAR\_RIGHT\_DOWN(func)}}{Process a
47 wxEVT\_TASKBAR\_RIGHT\_DOWN event.}
48 \twocolitem{{\bf EVT\_TASKBAR\_RIGHT\_UP(func)}}{Process a
49 wxEVT\_TASKBAR\_RIGHT\_UP event.}
50 \twocolitem{{\bf EVT\_TASKBAR\_LEFT\_DCLICK(func)}}{Process a
51 wxEVT\_TASKBAR\_LEFT\_DCLICK event.}
52 \twocolitem{{\bf EVT\_TASKBAR\_RIGHT\_DCLICK(func)}}{Process a
53 wxEVT\_TASKBAR\_RIGHT\_DCLICK event.}
54 \end{twocollist}%
55
56 \latexignore{\rtfignore{\wxheading{Members}}}
57
58 \membersection{wxTaskBarIcon::wxTaskBarIcon}\label{wxtaskbariconconstr}
59
60 \func{}{wxTaskBarIcon}{\void}
61
62 Default constructor.
63
64 \membersection{wxTaskBarIcon::\destruct{wxTaskBarIcon}}
65
66 \func{}{\destruct{wxTaskBarIcon}}{\void}
67
68 Destroys the wxTaskBarIcon object, removing the icon if not already removed.
69
70 \membersection{wxTaskBarIcon::IsIconInstalled}\label{wxtaskbariconisiconinstalled}
71
72 \func{bool}{IsIconInstalled}{\void}
73
74 Returns true if \helpref{SetIcon}{wxtaskbariconseticon} was called with no subsequent \helpref{RemoveIcon}{wxtaskbariconremoveicon}.
75
76 \membersection{wxTaskBarIcon::IsOk}\label{wxtaskbariconisok}
77
78 \func{bool}{IsOk}{\void}
79
80 Returns true if the object initialized successfully.
81
82 \membersection{wxTaskBarIcon::PopupMenu}\label{wxtaskbariconpopupmenu}
83
84 \func{bool}{PopupMenu}{\param{wxMenu*}{ menu}}
85
86 Pops up a menu at the current mouse position. The events can be handled by
87 a class derived from wxTaskBarIcon.
88
89 \membersection{wxTaskBarIcon::RemoveIcon}\label{wxtaskbariconremoveicon}
90
91 \func{bool}{RemoveIcon}{\void}
92
93 Removes the icon previously set with \helpref{SetIcon}{wxtaskbariconseticon}.
94
95 \membersection{wxTaskBarIcon::SetIcon}\label{wxtaskbariconseticon}
96
97 \func{bool}{SetIcon}{\param{const wxIcon\&}{ icon}, \param{const wxString\& }{tooltip}}
98
99 Sets the icon, and optional tooltip text.
100
101