X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ebcfb769f52c756018de75dacf3218ff60a8768..832e44d38a9c283ea1b03a76f80efb52519de21f:/samples/mdi/mdi.cpp?ds=sidebyside diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index f3077f4ade..3721a03308 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -29,20 +29,22 @@ #include "wx/mdi.h" #endif -#include +#include "wx/toolbar.h" -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) +#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) #include "mondrian.xpm" - #include "bitmaps/new.xpm" - #include "bitmaps/open.xpm" - #include "bitmaps/save.xpm" - #include "bitmaps/copy.xpm" - #include "bitmaps/cut.xpm" - #include "bitmaps/paste.xpm" - #include "bitmaps/print.xpm" - #include "bitmaps/help.xpm" #endif +#include "bitmaps/new.xpm" +#include "bitmaps/open.xpm" +#include "bitmaps/save.xpm" +#include "bitmaps/copy.xpm" +#include "bitmaps/cut.xpm" +#include "bitmaps/paste.xpm" +#include "bitmaps/print.xpm" +#include "bitmaps/help.xpm" + + #include "mdi.h" IMPLEMENT_APP(MyApp) @@ -286,16 +288,6 @@ void MyFrame::InitToolBar(wxToolBar* toolBar) { wxBitmap* bitmaps[8]; -#ifdef __WXMSW__ - bitmaps[0] = new wxBitmap("icon1", wxBITMAP_TYPE_RESOURCE); - bitmaps[1] = new wxBitmap("icon2", wxBITMAP_TYPE_RESOURCE); - bitmaps[2] = new wxBitmap("icon3", wxBITMAP_TYPE_RESOURCE); - bitmaps[3] = new wxBitmap("icon4", wxBITMAP_TYPE_RESOURCE); - bitmaps[4] = new wxBitmap("icon5", wxBITMAP_TYPE_RESOURCE); - bitmaps[5] = new wxBitmap("icon6", wxBITMAP_TYPE_RESOURCE); - bitmaps[6] = new wxBitmap("icon7", wxBITMAP_TYPE_RESOURCE); - bitmaps[7] = new wxBitmap("icon8", wxBITMAP_TYPE_RESOURCE); -#else bitmaps[0] = new wxBitmap( new_xpm ); bitmaps[1] = new wxBitmap( open_xpm ); bitmaps[2] = new wxBitmap( save_xpm ); @@ -304,13 +296,8 @@ void MyFrame::InitToolBar(wxToolBar* toolBar) bitmaps[5] = new wxBitmap( paste_xpm ); bitmaps[6] = new wxBitmap( print_xpm ); bitmaps[7] = new wxBitmap( help_xpm ); -#endif -#ifdef __WXMSW__ int width = 24; -#else - int width = 16; -#endif int currentX = 5; toolBar->AddTool( MDI_NEW_WINDOW, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New file"); @@ -475,7 +462,7 @@ void MyChild::OnMove(wxMoveEvent& event) // to be the width of the MDI canvas border) wxPoint pos1 = event.GetPosition(), pos2 = GetPosition(); - wxLogStatus("position from event: (%d, %d), from frame (%d, %d)", + wxLogStatus(wxT("position from event: (%d, %d), from frame (%d, %d)"), pos1.x, pos1.y, pos2.x, pos2.y); event.Skip(); @@ -489,7 +476,7 @@ void MyChild::OnSize(wxSizeEvent& event) wxSize size1 = event.GetSize(), size2 = GetSize(), size3 = GetClientSize(); - wxLogStatus("size from event: %dx%d, from frame %dx%d, client %dx%d", + wxLogStatus(wxT("size from event: %dx%d, from frame %dx%d, client %dx%d"), size1.x, size1.y, size2.x, size2.y, size3.x, size3.y); event.Skip();