]>
Commit | Line | Data |
---|---|---|
bbf1f0e5 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: tbtest.h | |
3 | // Purpose: wxTaskBarIcon sample | |
4 | // Author: Julian Smart | |
329fa151 | 5 | // Modified by: |
bbf1f0e5 | 6 | // Created: 01/02/97 |
bbf1f0e5 | 7 | // Copyright: (c) |
2f6c54eb | 8 | // Licence: wxWindows licence |
bbf1f0e5 KB |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
cdcfde5d | 11 | class MyTaskBarIcon : public wxTaskBarIcon |
bbf1f0e5 KB |
12 | { |
13 | public: | |
a96f3e13 | 14 | #if defined(__WXOSX__) && wxOSX_USE_COCOA |
908d92cd | 15 | MyTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) |
a5593369 DE |
16 | : wxTaskBarIcon(iconType) |
17 | #else | |
18 | MyTaskBarIcon() | |
19 | #endif | |
20 | {} | |
bbf1f0e5 | 21 | |
329fa151 | 22 | void OnLeftButtonDClick(wxTaskBarIconEvent&); |
a42b93aa JS |
23 | void OnMenuRestore(wxCommandEvent&); |
24 | void OnMenuExit(wxCommandEvent&); | |
ab85e6cd | 25 | void OnMenuSetNewIcon(wxCommandEvent&); |
3ecee463 VZ |
26 | void OnMenuCheckmark(wxCommandEvent&); |
27 | void OnMenuUICheckmark(wxUpdateUIEvent&); | |
d806d30a | 28 | void OnMenuSub(wxCommandEvent&); |
dae73d74 VS |
29 | virtual wxMenu *CreatePopupMenu(); |
30 | ||
3ecee463 | 31 | DECLARE_EVENT_TABLE() |
bbf1f0e5 KB |
32 | }; |
33 | ||
34 | ||
35 | // Define a new application | |
cdcfde5d | 36 | class MyApp : public wxApp |
bbf1f0e5 KB |
37 | { |
38 | public: | |
3ecee463 | 39 | virtual bool OnInit(); |
bbf1f0e5 KB |
40 | }; |
41 | ||
42 | class MyDialog: public wxDialog | |
43 | { | |
44 | public: | |
cdcfde5d | 45 | MyDialog(const wxString& title); |
3ecee463 VZ |
46 | virtual ~MyDialog(); |
47 | ||
48 | protected: | |
cdcfde5d | 49 | void OnAbout(wxCommandEvent& event); |
bbf1f0e5 KB |
50 | void OnOK(wxCommandEvent& event); |
51 | void OnExit(wxCommandEvent& event); | |
52 | void OnCloseWindow(wxCloseEvent& event); | |
bbf1f0e5 | 53 | |
1e6d9c20 | 54 | MyTaskBarIcon *m_taskBarIcon; |
a96f3e13 | 55 | #if defined(__WXOSX__) && wxOSX_USE_COCOA |
a5593369 DE |
56 | MyTaskBarIcon *m_dockIcon; |
57 | #endif | |
1e6d9c20 | 58 | |
3ecee463 | 59 | DECLARE_EVENT_TABLE() |
bbf1f0e5 | 60 | }; |