]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/ogl/ogledit/view.cpp
Removed every usage of obsolete wxTLW flags. 2.6 compatibility markup for them.
[wxWidgets.git] / contrib / samples / ogl / ogledit / view.cpp
index 1942b2c8207042193bb566de4fe09b08f2858418..c8661fc38052fe7aec1b0a3805ce4d60e660cb88 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        view.cpp
+// Name:        contrib/samples/ogl/ogledit/view.cpp
 // Purpose:     Implements view functionality in OGLEdit
 // 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"
 
 #endif
 
 #ifndef WX_PRECOMP
-#include <wx/wx.h>
+#include "wx/wx.h"
 #endif
 
-#include <wx/colordlg.h>
+#include "wx/colordlg.h"
 
 #if !wxUSE_DOC_VIEW_ARCHITECTURE
 #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
@@ -38,7 +34,7 @@
 IMPLEMENT_DYNAMIC_CLASS(DiagramView, wxView)
 
 BEGIN_EVENT_TABLE(DiagramView, wxView)
-    EVT_MENU(OGLEDIT_CUT, DiagramView::OnCut)
+    EVT_MENU(wxID_CUT, DiagramView::OnCut)
     EVT_MENU(OGLEDIT_CHANGE_BACKGROUND_COLOUR, DiagramView::OnChangeBackgroundColour)
     EVT_MENU(OGLEDIT_EDIT_LABEL, DiagramView::OnEditLabel)
 END_EVENT_TABLE()
@@ -122,7 +118,6 @@ void DiagramView::OnDraw(wxDC *dc)
 
   // This part was added to preform the print preview and printing functions
 
-  dc->BeginDrawing(); // Allows optimization of drawing code under MS Windows.
   wxDiagram *diagram_p=((DiagramDocument*)GetDocument())->GetDiagram();  // Get the current diagram
   if (diagram_p->GetShapeList())
   {
@@ -139,7 +134,6 @@ void DiagramView::OnDraw(wxDC *dc)
         current = current->GetNext();  // Procede to the next shape in the list
     }
   }
-  dc->EndDrawing(); // Allows optimization of drawing code under MS Windows.
 }
 
 void DiagramView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint))
@@ -195,7 +189,7 @@ void DiagramView::OnCut(wxCommandEvent& WXUNUSED(event))
 
   wxShape *theShape = FindSelectedShape();
   if (theShape)
-    doc->GetCommandProcessor()->Submit(new DiagramCommand(_T("Cut"), OGLEDIT_CUT, doc, NULL, 0.0, 0.0, true, theShape));
+    doc->GetCommandProcessor()->Submit(new DiagramCommand(_T("Cut"), wxID_CUT, doc, NULL, 0.0, 0.0, true, theShape));
 }
 
 void DiagramView::OnChangeBackgroundColour(wxCommandEvent& WXUNUSED(event))