This class represents a Windows 95 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.
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.
virtual void OnLButtonDown()
Override this function to intercept left mouse button down events.
virtual void OnLButtonDClick()
Override this function to intercept left mouse button double-click events.
virtual void OnLButtonUp()
Override this function to intercept left mouse button up events.
virtual void OnRButtonDown()
Override this function to intercept right mouse button down events.
virtual void OnRButtonDClick()
Override this function to intercept right mouse button double-click events.
virtual void OnRButtonUp()
Override this function to intercept right mouse button up events.
virtual void OnMouseMove()
Override this function to intercept mouse move events.
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.