Added test for bitmap menu.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-09-12 08:17:23 +00:00
parent 343e14b3e2
commit fcaf9e704e
2 changed files with 31 additions and 1 deletions

25
samples/menu/copy.xpm Normal file
View File

@@ -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",
" "
};

View File

@@ -26,10 +26,11 @@
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/log.h>
#endif
#include "copy.xpm"
// ----------------------------------------------------------------------------
// classes
// ----------------------------------------------------------------------------
@@ -233,6 +234,10 @@ MyFrame::MyFrame()
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",
"Append a menu to the menubar");