From a5593369fcb103c620246dda3d0cbaa40deb1d2c Mon Sep 17 00:00:00 2001 From: David Elliott Date: Sat, 16 Oct 2004 02:15:48 +0000 Subject: [PATCH] Add a second wxTaskBarIcon that uses the Dock (wxCocoa only) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/taskbar/tbtest.cpp | 6 ++++++ samples/taskbar/tbtest.h | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index 89f7295273..3fdbc781a6 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -64,6 +64,9 @@ MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title, MyDialog::~MyDialog() { delete m_taskBarIcon; +#if defined(__WXCOCOA__) + delete m_dockIcon; +#endif } void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event)) @@ -94,6 +97,9 @@ void MyDialog::Init(void) Centre(wxBOTH); m_taskBarIcon = new MyTaskBarIcon(); +#if defined(__WXCOCOA__) + m_dockIcon = new MyTaskBarIcon(wxTaskBarIcon::DOCK); +#endif if (!m_taskBarIcon->SetIcon(wxICON(sample), wxT("wxTaskBarIcon Sample"))) wxMessageBox(wxT("Could not set icon.")); } diff --git a/samples/taskbar/tbtest.h b/samples/taskbar/tbtest.h index ee230b6ee3..fdd2018edf 100644 --- a/samples/taskbar/tbtest.h +++ b/samples/taskbar/tbtest.h @@ -12,7 +12,13 @@ class MyTaskBarIcon: public wxTaskBarIcon { public: - MyTaskBarIcon() {}; +#if defined(__WXCOCOA__) + MyTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE) + : wxTaskBarIcon(iconType) +#else + MyTaskBarIcon() +#endif + {} void OnLeftButtonDClick(wxTaskBarIconEvent&); void OnMenuRestore(wxCommandEvent&); @@ -46,6 +52,9 @@ public: protected: MyTaskBarIcon *m_taskBarIcon; +#if defined(__WXCOCOA__) + MyTaskBarIcon *m_dockIcon; +#endif DECLARE_EVENT_TABLE() }; -- 2.45.2