minifram sample modified to use XPMs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott 2002-06-14 10:21:52 +00:00
parent 0ed1d09c46
commit d440dda1e0
12 changed files with 5 additions and 33 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

View File

@ -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");

View File

@ -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"