added wxTaskBarIcon::CreatePopupMenu API

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-06-04 21:56:29 +00:00
parent 2de78beb93
commit dae73d7473
6 changed files with 72 additions and 12 deletions

View File

@@ -7,6 +7,8 @@
#include "wx/event.h"
class WXDLLIMPEXP_ADV wxTaskBarIconEvent;
// ----------------------------------------------------------------------------
// wxTaskBarIconBase: define wxTaskBarIcon interface
// ----------------------------------------------------------------------------
@@ -15,8 +17,22 @@ class WXDLLIMPEXP_ADV wxTaskBarIconBase : public wxEvtHandler
{
public:
wxTaskBarIconBase() { }
// Operations:
virtual bool SetIcon(const wxIcon& icon,
const wxString& tooltip = wxEmptyString) = 0;
virtual bool RemoveIcon() = 0;
virtual bool PopupMenu(wxMenu *menu) = 0;
protected:
// creates menu to be displayed when user clicks on the icon
virtual wxMenu *CreatePopupMenu() { return NULL; }
private:
// default events handling, calls CreatePopupMenu:
void OnRightButtonDown(wxEvent& event);
DECLARE_EVENT_TABLE()
DECLARE_NO_COPY_CLASS(wxTaskBarIconBase)
};