]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/ogl/studio/shapes.cpp
Layout fixes for wxPlotWindow [#1192416] + source cleaning to the wxW 2.6 coding...
[wxWidgets.git] / contrib / samples / ogl / studio / shapes.cpp
index 7ca63c9c90afa5989f7930f390601ca3df90f78b..44c61728e20b3895dea9da4140a164f1ec03de9c 100644 (file)
 #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
 #endif
 
-#include <wx/deprecated/setup.h>
-#include <wx/deprecated/wxexpr.h>
+#include <wx/ogl/ogl.h> // base header of OGL, includes and adjusts wx/deprecated/setup.h
 
 #include "studio.h"
 #include "doc.h"
 #include "shapes.h"
 #include "view.h"
-#include <wx/ogl/basicp.h>
-#include <wx/ogl/linesp.h>
 #include "cspalette.h"
 #include "dialogs.h"
 
@@ -682,6 +679,9 @@ bool csEvtHandler::EditProperties()
         return false;
     }
 
+    wxString newLabel(m_label);
+
+#if wxUSE_WX_RESOURCES
     csShapePropertiesDialog* dialog = new csShapePropertiesDialog(shape->GetCanvas()->GetParent(), title, attributeDialog, attributeDialogName);
     dialog->GetGeneralPropertiesDialog()->SetShapeLabel(m_label);
     if (dialog->ShowModal() == wxID_CANCEL)
@@ -690,8 +690,11 @@ bool csEvtHandler::EditProperties()
         return false;
     }
 
-    wxString newLabel = dialog->GetGeneralPropertiesDialog()->GetShapeLabel();
+    newLabel = dialog->GetGeneralPropertiesDialog()->GetShapeLabel();
     dialog->Destroy();
+#else
+    wxUnusedVar(attributeDialog);
+#endif // wxUSE_WX_RESOURCES
 
     wxShape* newShape = shape->CreateNewCopy();
 
@@ -708,6 +711,7 @@ bool csEvtHandler::EditProperties()
  * Diagram
  */
 
+#if wxUSE_PROLOGIO
 bool csDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
 {
   wxDiagram::OnShapeSave(db, shape, expr);
@@ -726,6 +730,7 @@ bool csDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr)
 
   return true;
 }
+#endif // wxUSE_PROLOGIO
 
 IMPLEMENT_DYNAMIC_CLASS(csThinRectangleShape, wxDrawnShape)