From: Chris Elliott Date: Fri, 14 Jun 2002 10:21:52 +0000 (+0000) Subject: minifram sample modified to use XPMs X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d440dda1e08192ca77b3f046e695e27f23cccd8e minifram sample modified to use XPMs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/minifram/bitmaps/copy.bmp b/samples/minifram/bitmaps/copy.bmp deleted file mode 100644 index 4551a06bfa..0000000000 Binary files a/samples/minifram/bitmaps/copy.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/cut.bmp b/samples/minifram/bitmaps/cut.bmp deleted file mode 100644 index 15554338a0..0000000000 Binary files a/samples/minifram/bitmaps/cut.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/help.bmp b/samples/minifram/bitmaps/help.bmp deleted file mode 100644 index 2d9e6922ca..0000000000 Binary files a/samples/minifram/bitmaps/help.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/new.bmp b/samples/minifram/bitmaps/new.bmp deleted file mode 100644 index d66feb2384..0000000000 Binary files a/samples/minifram/bitmaps/new.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/open.bmp b/samples/minifram/bitmaps/open.bmp deleted file mode 100644 index bbf93fe033..0000000000 Binary files a/samples/minifram/bitmaps/open.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/page.bmp b/samples/minifram/bitmaps/page.bmp deleted file mode 100644 index 3dbd4b05b4..0000000000 Binary files a/samples/minifram/bitmaps/page.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/paste.bmp b/samples/minifram/bitmaps/paste.bmp deleted file mode 100644 index 564f514e0d..0000000000 Binary files a/samples/minifram/bitmaps/paste.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/preview.bmp b/samples/minifram/bitmaps/preview.bmp deleted file mode 100644 index da1f4dbc4b..0000000000 Binary files a/samples/minifram/bitmaps/preview.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/print.bmp b/samples/minifram/bitmaps/print.bmp deleted file mode 100644 index 00319b55bb..0000000000 Binary files a/samples/minifram/bitmaps/print.bmp and /dev/null differ diff --git a/samples/minifram/bitmaps/save.bmp b/samples/minifram/bitmaps/save.bmp deleted file mode 100644 index 56dd10b6e3..0000000000 Binary files a/samples/minifram/bitmaps/save.bmp and /dev/null differ diff --git a/samples/minifram/minifram.cpp b/samples/minifram/minifram.cpp index 436778d198..ebb4d138ba 100644 --- a/samples/minifram/minifram.cpp +++ b/samples/minifram/minifram.cpp @@ -23,8 +23,9 @@ #include "wx/toolbar.h" #include "minifram.h" -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) +#if !defined(__WXMSW__) #include "mondrian.xpm" +#endif #include "bitmaps/new.xpm" #include "bitmaps/open.xpm" #include "bitmaps/save.xpm" @@ -34,7 +35,7 @@ #include "bitmaps/print.xpm" #include "bitmaps/preview.xpm" #include "bitmaps/help.xpm" -#endif + // start wxWindows @@ -68,13 +69,8 @@ bool MyApp::OnInit() mini_frame->CreateToolBar(wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT, ID_TOOLBAR); InitToolbar(mini_frame->GetToolBar()); -#ifdef __WXMSW__ - main_frame->SetIcon(wxIcon("mondrian")); - mini_frame->SetIcon(wxIcon("mondrian")); -#else - main_frame->SetIcon( wxIcon(mondrian_xpm) ); - mini_frame->SetIcon( wxIcon(mondrian_xpm) ); -#endif + main_frame->SetIcon(wxICON(mondrian)); + mini_frame->SetIcon(wxICON(mondrian)); SetTopWindow(main_frame); @@ -91,16 +87,6 @@ bool MyApp::InitToolbar(wxToolBar* toolBar) // Set up toolbar wxBitmap* toolBarBitmaps[8]; -#ifdef __WXMSW__ - toolBarBitmaps[0] = new wxBitmap("icon1"); - toolBarBitmaps[1] = new wxBitmap("icon2"); - toolBarBitmaps[2] = new wxBitmap("icon3"); - toolBarBitmaps[3] = new wxBitmap("icon4"); - toolBarBitmaps[4] = new wxBitmap("icon5"); - toolBarBitmaps[5] = new wxBitmap("icon6"); - toolBarBitmaps[6] = new wxBitmap("icon7"); - toolBarBitmaps[7] = new wxBitmap("icon8"); -#else toolBarBitmaps[0] = new wxBitmap( new_xpm ); toolBarBitmaps[1] = new wxBitmap( open_xpm ); toolBarBitmaps[2] = new wxBitmap( save_xpm ); @@ -110,13 +96,8 @@ bool MyApp::InitToolbar(wxToolBar* toolBar) toolBarBitmaps[5] = new wxBitmap( preview_xpm ); toolBarBitmaps[6] = new wxBitmap( print_xpm ); toolBarBitmaps[7] = new wxBitmap( help_xpm ); -#endif -#ifdef __WXMSW__ - int width = 24; -#else int width = 16; -#endif int currentX = 5; toolBar->AddTool(wxID_NEW, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New file"); diff --git a/samples/minifram/minifram.rc b/samples/minifram/minifram.rc index 6c9086d0c6..55808f0e34 100644 --- a/samples/minifram/minifram.rc +++ b/samples/minifram/minifram.rc @@ -1,13 +1,4 @@ mondrian ICON "mondrian.ico" #include "wx/msw/wx.rc" -icon1 BITMAP "bitmaps/new.bmp" -icon2 BITMAP "bitmaps/open.bmp" -icon3 BITMAP "bitmaps/save.bmp" -icon4 BITMAP "bitmaps/copy.bmp" -icon5 BITMAP "bitmaps/cut.bmp" -icon6 BITMAP "bitmaps/paste.bmp" -icon7 BITMAP "bitmaps/print.bmp" - -icon8 BITMAP "bitmaps/help.bmp"