]> git.saurik.com Git - wxWidgets.git/blame - samples/taskbar/tbtest.h
fix wxMenu leak (reopened #9089)
[wxWidgets.git] / samples / taskbar / tbtest.h
CommitLineData
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
cdcfde5d 12class MyTaskBarIcon : public wxTaskBarIcon
bbf1f0e5
KB
13{
14public:
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&);
3ecee463
VZ
27 void OnMenuCheckmark(wxCommandEvent&);
28 void OnMenuUICheckmark(wxUpdateUIEvent&);
d806d30a 29 void OnMenuSub(wxCommandEvent&);
dae73d74
VS
30 virtual wxMenu *CreatePopupMenu();
31
3ecee463 32 DECLARE_EVENT_TABLE()
bbf1f0e5
KB
33};
34
35
36// Define a new application
cdcfde5d 37class MyApp : public wxApp
bbf1f0e5
KB
38{
39public:
3ecee463 40 virtual bool OnInit();
bbf1f0e5
KB
41};
42
43class MyDialog: public wxDialog
44{
45public:
cdcfde5d 46 MyDialog(const wxString& title);
3ecee463
VZ
47 virtual ~MyDialog();
48
49protected:
cdcfde5d 50 void OnAbout(wxCommandEvent& event);
bbf1f0e5
KB
51 void OnOK(wxCommandEvent& event);
52 void OnExit(wxCommandEvent& event);
53 void OnCloseWindow(wxCloseEvent& event);
bbf1f0e5 54
1e6d9c20 55 MyTaskBarIcon *m_taskBarIcon;
a5593369
DE
56#if defined(__WXCOCOA__)
57 MyTaskBarIcon *m_dockIcon;
58#endif
1e6d9c20 59
3ecee463 60 DECLARE_EVENT_TABLE()
bbf1f0e5 61};