X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..b54129836cbc680fbeb338bb6087c1a4f80bdf18:/interface/wx/taskbar.h diff --git a/interface/wx/taskbar.h b/interface/wx/taskbar.h index 9eb2faaefb..b4aeaef460 100644 --- a/interface/wx/taskbar.h +++ b/interface/wx/taskbar.h @@ -8,7 +8,6 @@ /** @class wxTaskBarIcon - @wxheader{taskbar.h} This class represents a taskbar icon. A taskbar icon is an icon that appears in the 'system tray' and responds to mouse clicks, optionally with a tooltip above it to help provide information. @@ -27,7 +26,7 @@ public: /** Destroys the wxTaskBarIcon object, removing the icon if not already removed. */ - ~wxTaskBarIcon(); + virtual ~wxTaskBarIcon(); /** This method is called by the library when the user requests popup menu @@ -51,27 +50,50 @@ public: /** Returns @true if SetIcon() was called with no subsequent RemoveIcon(). */ - bool IsIconInstalled(); + bool IsIconInstalled() const; /** Returns @true if the object initialized successfully. */ - bool IsOk(); + bool IsOk() const; /** Pops up a menu at the current mouse position. The events can be handled by a class derived from wxTaskBarIcon. */ - bool PopupMenu(wxMenu* menu); + virtual bool PopupMenu(wxMenu* menu); /** Removes the icon previously set with SetIcon(). */ - bool RemoveIcon(); + virtual bool RemoveIcon(); /** Sets the icon, and optional tooltip text. */ bool SetIcon(const wxIcon& icon, const wxString& tooltip); + + /** + Returns true if system tray is available in the desktop environment the + app runs under. + + On Windows and Mac OS X, the tray is always available and this function + simply returns true. + + On Unix, X11 environment may or may not provide the tray, depending on + user's desktop environment. Most modern desktops support the tray via + the System Tray Protocol by freedesktop.org + (http://freedesktop.org/wiki/Specifications/systemtray-spec). + + @note Tray availability may change during application's lifetime + under X11 and so applications shouldn't cache the result. + + @note wxTaskBarIcon supports older GNOME 1.2 and KDE 1/2 methods of + adding icons to tray, but they are unreliable and this method + doesn't detect them. + + @since 2.9.0 + */ + static bool IsAvailable(); };