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