]> git.saurik.com Git - wxWidgets.git/commitdiff
show icon changing on all platforms
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 31 May 2004 22:04:58 +0000 (22:04 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 31 May 2004 22:04:58 +0000 (22:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/taskbar/smile.xpm [new file with mode: 0644]
samples/taskbar/tbtest.cpp

diff --git a/samples/taskbar/smile.xpm b/samples/taskbar/smile.xpm
new file mode 100644 (file)
index 0000000..165e738
--- /dev/null
@@ -0,0 +1,49 @@
+/* XPM */
+static char * smile_xpm[] = {
+"24 24 22 1",
+"      c None",
+".     c #404000",
+"+     c #333300",
+"@     c #7F7F00",
+"#     c #FFFF00",
+"$     c #000000",
+"%     c #CFCF00",
+"&     c #9F9F00",
+"*     c #DFDF00",
+"=     c #303000",
+"-     c #808000",
+";     c #BFBF00",
+">     c #202000",
+",     c #707000",
+"'     c #606000",
+")     c #EFEF00",
+"!     c #9F1000",
+"~     c #603000",
+"{     c #DF0000",
+"]     c #FF0000",
+"^     c #804000",
+"/     c #800000",
+"         ......         ",
+"      +@@######@@+      ",
+"     $%##########%$     ",
+"    &##############&    ",
+"   &################&   ",
+"  $##################$  ",
+" +%####*==*##*==*####%+ ",
+" -#####-$$-##-$$-#####- ",
+" -#####-$$-##-$$-#####- ",
+".######-$$-##-$$-######.",
+".######;>>;##;>>;######.",
+".#####,#%%####%%#,#####.",
+".####%,##########,%####.",
+".##-->############>--##.",
+".##;;;,##########,;;;##.",
+" -####;')######)';####- ",
+" -####*.'&####&'.*####- ",
+" +%####*=!....!=*####%+ ",
+"  $######~{]]{~######$  ",
+"   &#####*^//^*#####&   ",
+"    &#####*;;*#####&    ",
+"     $%##########%$     ",
+"      +--######--+      ",
+"         ......         "};
index d84bf01373804e7ed6df2c2d0de37ca17cbb3734..44042da02f27dde48fbc881172beb55d666eb8d7 100644 (file)
@@ -25,6 +25,8 @@
     #include "../sample.xpm"
 #endif
 
+#include "smile.xpm"
+
 #include "wx/taskbar.h"
 #include "tbtest.h"
 
@@ -91,7 +93,6 @@ void MyDialog::Init(void)
   (new wxButton(this, wxID_OK, _T("Hide me"), wxPoint(100, 230), wxSize(80, 25)))->SetDefault();
   Centre(wxBOTH);
    
-  
   m_taskBarIcon = new MyTaskBarIcon();
   if (!m_taskBarIcon->SetIcon(wxICON(sample), wxT("wxTaskBarIcon Sample")))
         wxMessageBox(wxT("Could not set icon."));
@@ -130,12 +131,10 @@ void MyTaskBarIcon::OnMenuExit(wxCommandEvent& )
 
 void MyTaskBarIcon::OnMenuSetNewIcon(wxCommandEvent&)
 {
-#ifdef __WXMSW__
-    wxIcon icon(wxT("wxDEFAULT_FRAME"));
+    wxIcon icon(smile_xpm);
 
-    if (!SetIcon(icon, wxT("wxTaskBarIcon Sample")))
+    if (!SetIcon(icon, wxT("wxTaskBarIcon Sample - a different icon")))
         wxMessageBox(wxT("Could not set new icon."));
-#endif
 }
 
 // Overridables
@@ -144,9 +143,7 @@ void MyTaskBarIcon::OnRButtonUp(wxEvent&)
     wxMenu      menu;
 
     menu.Append(PU_RESTORE, _T("&Restore TBTest"));
-#ifdef __WXMSW__
     menu.Append(PU_NEW_ICON,_T("&Set New Icon"));
-#endif
     menu.Append(PU_EXIT,    _T("E&xit"));
 
     PopupMenu(&menu);
@@ -156,7 +153,3 @@ void MyTaskBarIcon::OnLButtonDClick(wxEvent&)
 {
     dialog->Show(true);
 }
-
-
-
-