]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/ogl/studio/view.cpp
Removal of second part of dsw files (as requested by Jamie Gadd).
[wxWidgets.git] / contrib / samples / ogl / studio / view.cpp
index f3073fc44a521952eda26724d692da84251b0506..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) );
@@ -853,7 +847,7 @@ csCanvas::~csCanvas(void)
 
 void csCanvas::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2)
 {
-    wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+    wxPen dottedPen(*wxBLACK, 1, wxDOT);
     dc.SetPen(dottedPen);
     dc.SetBrush(* wxTRANSPARENT_BRUSH);
 
@@ -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();