e54c96f187
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
78 lines
2.3 KiB
Objective-C
78 lines
2.3 KiB
Objective-C
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: taskbar.h
|
|
// Purpose: interface of wxTaskBarIcon
|
|
// Author: wxWidgets team
|
|
// RCS-ID: $Id$
|
|
// Licence: wxWindows license
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
@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.
|
|
|
|
@library{wxadv}
|
|
@category{FIXME}
|
|
*/
|
|
class wxTaskBarIcon : public wxEvtHandler
|
|
{
|
|
public:
|
|
/**
|
|
Default constructor.
|
|
*/
|
|
wxTaskBarIcon();
|
|
|
|
/**
|
|
Destroys the wxTaskBarIcon object, removing the icon if not already removed.
|
|
*/
|
|
~wxTaskBarIcon();
|
|
|
|
/**
|
|
This method is called by the library when the user requests popup menu
|
|
(on Windows and Unix platforms, this is when the user right-clicks the icon).
|
|
Override this function in order to provide popup menu associated with the icon.
|
|
If CreatePopupMenu returns @NULL (this happens by default),
|
|
no menu is shown, otherwise the menu is
|
|
displayed and then deleted by the library as soon as the user dismisses it.
|
|
The events can be handled by a class derived from wxTaskBarIcon.
|
|
*/
|
|
virtual wxMenu* CreatePopupMenu();
|
|
|
|
/**
|
|
This method is similar to wxWindow::Destroy and can
|
|
be used to schedule the task bar icon object for the delayed destruction: it
|
|
will be deleted during the next event loop iteration, which allows the task bar
|
|
icon to process any pending events for it before being destroyed.
|
|
*/
|
|
void Destroy();
|
|
|
|
/**
|
|
Returns @true if SetIcon() was called with no subsequent RemoveIcon().
|
|
*/
|
|
bool IsIconInstalled();
|
|
|
|
/**
|
|
Returns @true if the object initialized successfully.
|
|
*/
|
|
bool IsOk();
|
|
|
|
/**
|
|
Pops up a menu at the current mouse position. The events can be handled by
|
|
a class derived from wxTaskBarIcon.
|
|
*/
|
|
bool PopupMenu(wxMenu* menu);
|
|
|
|
/**
|
|
Removes the icon previously set with SetIcon().
|
|
*/
|
|
bool RemoveIcon();
|
|
|
|
/**
|
|
Sets the icon, and optional tooltip text.
|
|
*/
|
|
bool SetIcon(const wxIcon& icon, const wxString& tooltip);
|
|
};
|
|
|