]> git.saurik.com Git - wxWidgets.git/commitdiff
Add a second wxTaskBarIcon that uses the Dock (wxCocoa only)
authorDavid Elliott <dfe@tgwbd.org>
Sat, 16 Oct 2004 02:15:48 +0000 (02:15 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Sat, 16 Oct 2004 02:15:48 +0000 (02:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/taskbar/tbtest.cpp
samples/taskbar/tbtest.h

index 89f7295273153fb65f1bcf926b008c8f88acc954..3fdbc781a6ac7e97fcf501f6f0c84ffcd708d431 100644 (file)
@@ -64,6 +64,9 @@ MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
 MyDialog::~MyDialog()
 {
     delete m_taskBarIcon;
 MyDialog::~MyDialog()
 {
     delete m_taskBarIcon;
+#if defined(__WXCOCOA__)
+    delete m_dockIcon;
+#endif
 }
 
 void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event))
 }
 
 void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event))
@@ -94,6 +97,9 @@ void MyDialog::Init(void)
   Centre(wxBOTH);
    
   m_taskBarIcon = new MyTaskBarIcon();
   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."));
 }
   if (!m_taskBarIcon->SetIcon(wxICON(sample), wxT("wxTaskBarIcon Sample")))
         wxMessageBox(wxT("Could not set icon."));
 }
index ee230b6ee3ce8f99d1c2b58277618e1773c66982..fdd2018edfdf4d743f2df8b3abb46cbe3adf0451 100644 (file)
 class MyTaskBarIcon: public wxTaskBarIcon
 {
 public:
 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&);
 
     void OnLeftButtonDClick(wxTaskBarIconEvent&);
     void OnMenuRestore(wxCommandEvent&);
@@ -46,6 +52,9 @@ public:
 
 protected:
     MyTaskBarIcon   *m_taskBarIcon;
 
 protected:
     MyTaskBarIcon   *m_taskBarIcon;
+#if defined(__WXCOCOA__)
+    MyTaskBarIcon   *m_dockIcon;
+#endif
 
 DECLARE_EVENT_TABLE()
 };
 
 DECLARE_EVENT_TABLE()
 };