X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d96cdd4a885886d1c76c6f4cb1a7eefba34b3d10..ed177375b27f8b80231a42638314c9809e6e945d:/contrib/samples/ogl/ogledit/ogledit.cpp diff --git a/contrib/samples/ogl/ogledit/ogledit.cpp b/contrib/samples/ogl/ogledit/ogledit.cpp index c0c668408f..8c0263ed09 100644 --- a/contrib/samples/ogl/ogledit/ogledit.cpp +++ b/contrib/samples/ogl/ogledit/ogledit.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: ogledit.cpp +// Name: contrib/samples/ogl/ogledit/ogledit.cpp // Purpose: OGLEdit sample app // Author: Julian Smart // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -// #pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,7 +17,7 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif #if !wxUSE_DOC_VIEW_ARCHITECTURE @@ -33,8 +29,8 @@ #include "doc.h" #include "view.h" -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) -#include "ogl.xpm" +#ifndef __WXMSW__ + #include "ogl.xpm" #endif // A macro needed for some compilers (AIX) that need 'main' to be defined @@ -52,7 +48,7 @@ MyApp::MyApp(void) bool MyApp::OnInit(void) { wxOGLInitialize(); - + //// Create a document manager myDocManager = new wxDocManager; @@ -88,13 +84,13 @@ bool MyApp::OnInit(void) edit_menu->Append(wxID_UNDO, _T("&Undo")); edit_menu->Append(wxID_REDO, _T("&Redo")); edit_menu->AppendSeparator(); - edit_menu->Append(OGLEDIT_CUT, _T("&Cut")); + edit_menu->Append(wxID_CUT, _T("&Cut")); edit_menu->AppendSeparator(); edit_menu->Append(OGLEDIT_CHANGE_BACKGROUND_COLOUR, _T("Change &background colour")); edit_menu->Append(OGLEDIT_EDIT_LABEL, _T("Edit &label")); frame->editMenu = edit_menu; - + file_menu->AppendSeparator(); file_menu->Append(wxID_EXIT, _T("E&xit")); @@ -170,7 +166,7 @@ void MyFrame::OnSize(wxSizeEvent& event) int canvasY = 0; int canvasW = cw - paletteW; int canvasH = ch; - + palette->SetSize(paletteX, paletteY, paletteW, paletteH); canvas->SetSize(canvasX, canvasY, canvasW, canvasH); } @@ -212,4 +208,3 @@ MyFrame *GetMainFrame(void) { return wxGetApp().frame; } -