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:
25
samples/menu/copy.xpm
Normal file
25
samples/menu/copy.xpm
Normal 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",
|
||||||
|
" "
|
||||||
|
};
|
@@ -26,10 +26,11 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
|
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "copy.xpm"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// classes
|
// classes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -232,6 +233,10 @@ MyFrame::MyFrame()
|
|||||||
// create the menubar
|
// create the menubar
|
||||||
wxMenu *fileMenu = new wxMenu;
|
wxMenu *fileMenu = new wxMenu;
|
||||||
fileMenu->Append(Menu_File_Quit, "E&xit\tAlt-X", "Quit toolbar sample" );
|
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;
|
wxMenu *menubarMenu = new wxMenu;
|
||||||
menubarMenu->Append(Menu_MenuBar_Append, "&Append menu\tCtrl-A",
|
menubarMenu->Append(Menu_MenuBar_Append, "&Append menu\tCtrl-A",
|
||||||
|
Reference in New Issue
Block a user