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