1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxTaskBarIcon sample
4 // Author: Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 class MyTaskBarIcon
: public wxTaskBarIcon
14 #if defined(__WXOSX__) && wxOSX_USE_COCOA
15 MyTaskBarIcon(wxTaskBarIconType iconType
= wxTBI_DEFAULT_TYPE
)
16 : wxTaskBarIcon(iconType
)
22 void OnLeftButtonDClick(wxTaskBarIconEvent
&);
23 void OnMenuRestore(wxCommandEvent
&);
24 void OnMenuExit(wxCommandEvent
&);
25 void OnMenuSetNewIcon(wxCommandEvent
&);
26 void OnMenuCheckmark(wxCommandEvent
&);
27 void OnMenuUICheckmark(wxUpdateUIEvent
&);
28 void OnMenuSub(wxCommandEvent
&);
29 virtual wxMenu
*CreatePopupMenu();
35 // Define a new application
36 class MyApp
: public wxApp
39 virtual bool OnInit();
42 class MyDialog
: public wxDialog
45 MyDialog(const wxString
& title
);
49 void OnAbout(wxCommandEvent
& event
);
50 void OnOK(wxCommandEvent
& event
);
51 void OnExit(wxCommandEvent
& event
);
52 void OnCloseWindow(wxCloseEvent
& event
);
54 MyTaskBarIcon
*m_taskBarIcon
;
55 #if defined(__WXOSX__) && wxOSX_USE_COCOA
56 MyTaskBarIcon
*m_dockIcon
;