]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/taskbar.h
don't style using Doxygen tags; use <span> tags and CSS instead
[wxWidgets.git] / interface / taskbar.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: taskbar.h
3// Purpose: documentation for wxTaskBarIcon class
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxTaskBarIcon
11 @wxheader{taskbar.h}
12
13 This class represents a taskbar icon. A taskbar icon is an icon that appears in
14 the 'system tray' and responds to mouse clicks, optionally with a tooltip above it to help provide information.
15
16 @library{wxadv}
17 @category{FIXME}
18*/
19class wxTaskBarIcon : public wxEvtHandler
20{
21public:
22 /**
23 Default constructor.
24 */
25 wxTaskBarIcon();
26
27 /**
28 Destroys the wxTaskBarIcon object, removing the icon if not already removed.
29 */
30 ~wxTaskBarIcon();
31
32 /**
33 This method is called by the library when the user requests popup menu
34 (on Windows and Unix platforms, this is when the user right-clicks the icon).
35 Override this function in order to provide popup menu associated with the icon.
36
37 If CreatePopupMenu returns @NULL (this happens by default),
38 no menu is shown, otherwise the menu is
39 displayed and then deleted by the library as soon as the user dismisses it.
40 The events can be handled by a class derived from wxTaskBarIcon.
41 */
42 virtual wxMenu* CreatePopupMenu();
43
44 /**
45 This method is similar to wxWindow::Destroy and can
46 be used to schedule the task bar icon object for the delayed destruction: it
47 will be deleted during the next event loop iteration, which allows the task bar
48 icon to process any pending events for it before being destroyed.
49 */
50 void Destroy();
51
52 /**
53 Returns @true if SetIcon() was called with no subsequent RemoveIcon().
54 */
55 bool IsIconInstalled();
56
57 /**
58 Returns @true if the object initialized successfully.
59 */
60#define bool IsOk() /* implementation is private */
61
62 /**
63 Pops up a menu at the current mouse position. The events can be handled by
64 a class derived from wxTaskBarIcon.
65 */
66 bool PopupMenu(wxMenu* menu);
67
68 /**
69 Removes the icon previously set with SetIcon().
70 */
71 bool RemoveIcon();
72
73 /**
74 Sets the icon, and optional tooltip text.
75 */
76 bool SetIcon(const wxIcon& icon, const wxString& tooltip);
77};