5b4a70247c
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
61 lines
1.5 KiB
C++
61 lines
1.5 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: tbtest.h
|
|
// Purpose: wxTaskBarIcon sample
|
|
// Author: Julian Smart
|
|
// Modified by:
|
|
// Created: 01/02/97
|
|
// Copyright: (c)
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
class MyTaskBarIcon : public wxTaskBarIcon
|
|
{
|
|
public:
|
|
#if defined(__WXOSX__) && wxOSX_USE_COCOA
|
|
MyTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE)
|
|
: wxTaskBarIcon(iconType)
|
|
#else
|
|
MyTaskBarIcon()
|
|
#endif
|
|
{}
|
|
|
|
void OnLeftButtonDClick(wxTaskBarIconEvent&);
|
|
void OnMenuRestore(wxCommandEvent&);
|
|
void OnMenuExit(wxCommandEvent&);
|
|
void OnMenuSetNewIcon(wxCommandEvent&);
|
|
void OnMenuCheckmark(wxCommandEvent&);
|
|
void OnMenuUICheckmark(wxUpdateUIEvent&);
|
|
void OnMenuSub(wxCommandEvent&);
|
|
virtual wxMenu *CreatePopupMenu() wxOVERRIDE;
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
};
|
|
|
|
|
|
// Define a new application
|
|
class MyApp : public wxApp
|
|
{
|
|
public:
|
|
virtual bool OnInit() wxOVERRIDE;
|
|
};
|
|
|
|
class MyDialog: public wxDialog
|
|
{
|
|
public:
|
|
MyDialog(const wxString& title);
|
|
virtual ~MyDialog();
|
|
|
|
protected:
|
|
void OnAbout(wxCommandEvent& event);
|
|
void OnOK(wxCommandEvent& event);
|
|
void OnExit(wxCommandEvent& event);
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
MyTaskBarIcon *m_taskBarIcon;
|
|
#if defined(__WXOSX__) && wxOSX_USE_COCOA
|
|
MyTaskBarIcon *m_dockIcon;
|
|
#endif
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
};
|