X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55c91e8a3faff8a1f4e758bbb64c28d1743c66c8..ae200bfcb537c475708959cb034be66eb0f5dcd4:/contrib/samples/ogl/studio/shapes.cpp diff --git a/contrib/samples/ogl/studio/shapes.cpp b/contrib/samples/ogl/studio/shapes.cpp index 7ca63c9c90..e7125a4a24 100644 --- a/contrib/samples/ogl/studio/shapes.cpp +++ b/contrib/samples/ogl/studio/shapes.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: shapes.cpp +// Name: contrib/samples/ogl/studio/shapes.cpp // Purpose: Implements Studio shapes // 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,22 +17,19 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif #if !wxUSE_DOC_VIEW_ARCHITECTURE #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! #endif -#include -#include +#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 -#include #include "cspalette.h" #include "dialogs.h" @@ -682,6 +675,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 +686,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 +707,7 @@ bool csEvtHandler::EditProperties() * Diagram */ +#if wxUSE_PROLOGIO bool csDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr) { wxDiagram::OnShapeSave(db, shape, expr); @@ -726,6 +726,7 @@ bool csDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr) return true; } +#endif // wxUSE_PROLOGIO IMPLEMENT_DYNAMIC_CLASS(csThinRectangleShape, wxDrawnShape) @@ -1194,4 +1195,3 @@ void ShapeEditMenu::OnCommand(wxCommandEvent& event) { studioShapeEditProc(*this, event); } -