This class represents a taskbar icon, appearing in the 'system tray' and responding to mouse clicks. An icon has an optional tooltip. This class is only supported for Windows 95/NT and for X Window System ports (wxGTK, wxMotif, wxX11), assuming the window manager supports KDE and GNOME 1.2 systray methods.
Derived from
Include files
<wx/taskbar.h>
Event handling
To process input from a taskbar icon, use the following event handler macros to direct input to member functions that take a wxTaskBarIconEvent argument.
EVT_TASKBAR_MOVE(func) | Process a wxEVT_TASKBAR_MOVE event. |
EVT_TASKBAR_LEFT_DOWN(func) | Process a wxEVT_TASKBAR_LEFT_DOWN event. |
EVT_TASKBAR_LEFT_UP(func) | Process a wxEVT_TASKBAR_LEFT_UP event. |
EVT_TASKBAR_RIGHT_DOWN(func) | Process a wxEVT_TASKBAR_RIGHT_DOWN event. |
EVT_TASKBAR_RIGHT_UP(func) | Process a wxEVT_TASKBAR_RIGHT_UP event. |
EVT_TASKBAR_LEFT_DCLICK(func) | Process a wxEVT_TASKBAR_LEFT_DCLICK event. |
EVT_TASKBAR_RIGHT_DCLICK(func) | Process a wxEVT_TASKBAR_RIGHT_DCLICK event. |
wxTaskBarIcon()
Default constructor.
~wxTaskBarIcon()
Destroys the wxTaskBarIcon object, removing the icon if not already removed.
bool IsIconInstalled()
Returns true if SetIcon was called with no subsequent RemoveIcon.
bool IsOk()
Returns true if the object initialized successfully.
bool PopupMenu(wxMenu* menu)
Pops up a menu at the current mouse position. The events can be handled by a class derived from wxTaskBarIcon.
bool RemoveIcon()
Removes the icon previously set with SetIcon.
bool SetIcon(const wxIcon& icon, const wxString& tooltip)
Sets the icon, and optional tooltip text.