X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f96aa4d9eb296b3dfc468a351ce013bf92fab983..31a06b07cce898a22d0ca3992501e85da9c22f13:/user/wxTest/wxTest.cpp diff --git a/user/wxTest/wxTest.cpp b/user/wxTest/wxTest.cpp index 8e5f747858..a43d89fda8 100644 --- a/user/wxTest/wxTest.cpp +++ b/user/wxTest/wxTest.cpp @@ -28,6 +28,7 @@ #include "folder.xpm" #include "list.xpm" +#include "test.xpm" //----------------------------------------------------------------------------- // main program @@ -324,8 +325,7 @@ MyCanvas::MyCanvas( wxWindow *parent, const wxWindowID id, const wxPoint &pos, c : wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER ) { my_bitmap = new wxBitmap( folder_xpm ); -// my_horse = new wxBitmap(); -// my_horse->LoadFile( "horse.png", 0 ); + my_horse = new wxBitmap( test_xpm); my_backstore = new wxBitmap( 150, 150 ); my_font = new wxFont( 20, wxROMAN, wxNORMAL, wxNORMAL ); m_isCreated = FALSE; @@ -337,7 +337,7 @@ MyCanvas::~MyCanvas(void) { delete my_bitmap; delete my_backstore; -// delete my_horse; + delete my_horse; delete my_font; }; @@ -387,7 +387,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) dc.DrawText( "Hej, ho, hej, ho. (ItalicFont)", 80, 100 ); dc.DrawBitmap( *my_bitmap, 30, 80, TRUE ); -// dc.DrawBitmap( *my_horse, 30, 120 ); + dc.DrawBitmap( *my_horse, 30, 120 ); dc.Blit( 200, 200, 150, 150, &memDC, 0, 0, 0 ); @@ -445,6 +445,7 @@ END_EVENT_TABLE() MyFrame::MyFrame(void) : wxFrame( (wxFrame *) NULL, -1, (char *) "Robert's Test application", wxPoint(20,20), wxSize(470,360) ) { +/* wxMenu *file_menu = new wxMenu( "Test" ); file_menu->Append( ID_OPEN, "Open.."); file_menu->Append( ID_MSG, "MessageBox.."); @@ -460,6 +461,7 @@ MyFrame::MyFrame(void) : menu_bar->Show( TRUE ); SetMenuBar( menu_bar ); +*/ CreateStatusBar( 2 ); @@ -470,7 +472,6 @@ MyFrame::MyFrame(void) : m_canvas->SetScrollbars( 10, 10, 50, 50 ); m_tb = CreateToolBar(); - m_tb->SetMargins( 2, 2 ); m_tb->AddTool( 0, wxBitmap( list_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "This is a button" ); m_tb->AddTool( 0, wxBitmap( folder_xpm ), wxNullBitmap, TRUE, -1, -1, (wxObject *) NULL, "This is a toggle" ); m_tb->Realize();