]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/ogl/studio/view.cpp
use wxHAVE_U_ESCAPE to accomodate old compilers
[wxWidgets.git] / contrib / samples / ogl / studio / view.cpp
index 5a157a8704d6fefccc167a45ec832786e2358e5b..8a5e625c629afd12e23b4d7c01591635c36476d2 100644 (file)
@@ -1,18 +1,14 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        view.cpp
+// Name:        contrib/samples/ogl/studio/view.cpp
 // Purpose:     Implements view functionality
 // Author:      Julian Smart
 // Modified by:
 // Created:     12/07/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:
+// 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!
@@ -36,8 +32,8 @@
 #include "cspalette.h"
 #include "symbols.h"
 #include "dialogs.h"
-#include <wx/ogl/basicp.h>
-#include <wx/ogl/linesp.h>
+#include "wx/ogl/basicp.h"
+#include "wx/ogl/linesp.h"
 
 IMPLEMENT_DYNAMIC_CLASS(csDiagramView, wxView)
 
@@ -309,8 +305,6 @@ void csDiagramView::OnCopyUpdate(wxUpdateUIEvent& event)
 
 void csDiagramView::OnPasteUpdate(wxUpdateUIEvent& event)
 {
-    /* csDiagramDocument *doc = */ (csDiagramDocument *)GetDocument();
-
     int n = wxGetApp().GetDiagramClipboard().GetCount();
 
     event.Enable( (n > 0) );
@@ -877,6 +871,9 @@ void csCanvas::OnLeftClick(double x, double y, int WXUNUSED(keys))
 
     if (palette->GetSelection() == PALETTE_TEXT_TOOL)
     {
+        wxString newLabel;
+
+#if wxUSE_WX_RESOURCES
         // Ask for a label and create a new free-floating text region
         csLabelEditingDialog* dialog = new csLabelEditingDialog(GetParent());
 
@@ -888,8 +885,9 @@ void csCanvas::OnLeftClick(double x, double y, int WXUNUSED(keys))
             return;
         }
 
-        wxString newLabel = dialog->GetShapeLabel();
+        newLabel = dialog->GetShapeLabel();
         dialog->Destroy();
+#endif // wxUSE_WX_RESOURCES
 
         wxShape* shape = new csTextBoxShape;
         shape->AssignNewIds();