1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxTaskBarIcon sample
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 class MyTaskBarIcon
: public wxTaskBarIcon
15 #if defined(__WXOSX__) && wxOSX_USE_COCOA
16 MyTaskBarIcon(wxTaskBarIconType iconType
= DEFAULT_TYPE
)
17 : wxTaskBarIcon(iconType
)
23 void OnLeftButtonDClick(wxTaskBarIconEvent
&);
24 void OnMenuRestore(wxCommandEvent
&);
25 void OnMenuExit(wxCommandEvent
&);
26 void OnMenuSetNewIcon(wxCommandEvent
&);
27 void OnMenuCheckmark(wxCommandEvent
&);
28 void OnMenuUICheckmark(wxUpdateUIEvent
&);
29 void OnMenuSub(wxCommandEvent
&);
30 virtual wxMenu
*CreatePopupMenu();
36 // Define a new application
37 class MyApp
: public wxApp
40 virtual bool OnInit();
43 class MyDialog
: public wxDialog
46 MyDialog(const wxString
& title
);
50 void OnAbout(wxCommandEvent
& event
);
51 void OnOK(wxCommandEvent
& event
);
52 void OnExit(wxCommandEvent
& event
);
53 void OnCloseWindow(wxCloseEvent
& event
);
55 MyTaskBarIcon
*m_taskBarIcon
;
56 #if defined(__WXOSX__) && wxOSX_USE_COCOA
57 MyTaskBarIcon
*m_dockIcon
;