wxTaskBarIcon::wxTaskBarIcon
wxTaskBarIcon::~wxTaskBarIcon
wxTaskBarIcon::IsIconInstalled
wxTaskBarIcon::IsOk
wxTaskBarIcon::PopupMenu
wxTaskBarIcon::RemoveIcon
wxTaskBarIcon::SetIcon
wxTaskBarIcon
Contents Up Previous Next

wxTaskBarIcon

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

wxEvtHandler
wxObject

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.
Members


wxTaskBarIcon::wxTaskBarIcon

wxTaskBarIcon()

Default constructor.


wxTaskBarIcon::~wxTaskBarIcon

~wxTaskBarIcon()

Destroys the wxTaskBarIcon object, removing the icon if not already removed.


wxTaskBarIcon::IsIconInstalled

bool IsIconInstalled()

Returns true if SetIcon was called with no subsequent RemoveIcon.


wxTaskBarIcon::IsOk

bool IsOk()

Returns true if the object initialized successfully.


wxTaskBarIcon::PopupMenu

bool PopupMenu(wxMenu* menu)

Pops up a menu at the current mouse position. The events can be handled by a class derived from wxTaskBarIcon.


wxTaskBarIcon::RemoveIcon

bool RemoveIcon()

Removes the icon previously set with SetIcon.


wxTaskBarIcon::SetIcon

bool SetIcon(const wxIcon& icon, const wxString& tooltip)

Sets the icon, and optional tooltip text.