]> git.saurik.com Git - wxWidgets.git/commitdiff
Added test for bitmap menu.
authorRobert Roebling <robert@roebling.de>
Tue, 12 Sep 2000 08:17:23 +0000 (08:17 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 12 Sep 2000 08:17:23 +0000 (08:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/menu/copy.xpm [new file with mode: 0644]
samples/menu/menu.cpp

diff --git a/samples/menu/copy.xpm b/samples/menu/copy.xpm
new file mode 100644 (file)
index 0000000..47565c1
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static char *copy_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 4 1",
+"  c None",
+". c Black",
+"X c Gray100",
+"o c #000080",
+/* pixels */
+"                ",
+" ......         ",
+" .XXXX..        ",
+" .XXXX.X.       ",
+" .X..X.oooooo   ",
+" .XXXXXoXXXXoo  ",
+" .X....oXXXXoXo ",
+" .XXXXXoX..Xoooo",
+" .X....oXXXXXXXo",
+" .XXXXXoX.....Xo",
+" ......oXXXXXXXo",
+"       oX.....Xo",
+"       oXXXXXXXo",
+"       ooooooooo",
+"                "
+};
index cee944b197f82d3a8ba5ef2c9a375200f2d61287..3346cf74247762680ed053c409becab2ec9fe8cc 100644 (file)
 
 #ifndef WX_PRECOMP
     #include <wx/wx.h>
 
 #ifndef WX_PRECOMP
     #include <wx/wx.h>
-
     #include <wx/log.h>
 #endif
 
     #include <wx/log.h>
 #endif
 
+#include "copy.xpm"
+
 // ----------------------------------------------------------------------------
 // classes
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // classes
 // ----------------------------------------------------------------------------
@@ -232,6 +233,10 @@ MyFrame::MyFrame()
     // create the menubar
     wxMenu *fileMenu = new wxMenu;
     fileMenu->Append(Menu_File_Quit, "E&xit\tAlt-X", "Quit toolbar sample" );
     // create the menubar
     wxMenu *fileMenu = new wxMenu;
     fileMenu->Append(Menu_File_Quit, "E&xit\tAlt-X", "Quit toolbar sample" );
+    
+    wxMenuItem *bitmap_menu_item = new wxMenuItem( fileMenu, Menu_File_Quit, "Quit with &bitmap" );
+    bitmap_menu_item->SetBitmap( wxBitmap( copy_xpm ) );
+    fileMenu->Append( bitmap_menu_item ); 
 
     wxMenu *menubarMenu = new wxMenu;
     menubarMenu->Append(Menu_MenuBar_Append, "&Append menu\tCtrl-A",
 
     wxMenu *menubarMenu = new wxMenu;
     menubarMenu->Append(Menu_MenuBar_Append, "&Append menu\tCtrl-A",