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