X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab7ce33c563651f790f99d64ee56727706047ae3..d7903e1336b9a8f220b6495999feb2977e3901d7:/contrib/samples/ogl/ogledit/doc.h diff --git a/contrib/samples/ogl/ogledit/doc.h b/contrib/samples/ogl/ogledit/doc.h index 6817c6d3d4..741d4c7062 100644 --- a/contrib/samples/ogl/ogledit/doc.h +++ b/contrib/samples/ogl/ogledit/doc.h @@ -1,27 +1,28 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: doc.h +// Name: contrib/samples/ogl/ogledit/doc.h // Purpose: Document classes // Author: Julian Smart // Modified by: // Created: 12/07/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _OGLSAMPLE_DOC_H_ #define _OGLSAMPLE_DOC_H_ -#if defined(__GNUG__) && !defined(__APPLE__) -// #pragma interface -#endif +#include "wx/docview.h" +#include "wx/cmdproc.h" +#include "wx/string.h" + +#include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h -#include -#include -#include -#include +#if wxUSE_PROLOGIO +#include "wx/deprecated/wxexpr.h" +#endif -#include +#include "wx/ogl/ogl.h" #if wxUSE_STD_IOSTREAM #include @@ -30,20 +31,22 @@ /* * Override a few members for this application */ - + class MyDiagram: public wxDiagram { public: MyDiagram(void) {} +#if wxUSE_PROLOGIO bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr); bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr); +#endif }; /* * A few new shape classes so we have a 1:1 mapping * between palette symbol and unique class */ - + class wxRoundedRectangleShape: public wxRectangleShape { DECLARE_DYNAMIC_CLASS(wxRoundedRectangleShape) @@ -64,12 +67,12 @@ class wxDiamondShape: public wxPolygonShape * All shape event behaviour is routed through this handler, so we don't * have to derive from each shape class. We plug this in to each shape. */ - + class MyEvtHandler: public wxShapeEvtHandler { public: wxString label; - MyEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL, const wxString& lab = ""):wxShapeEvtHandler(prev, shape) + MyEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL, const wxString& lab = wxEmptyString):wxShapeEvtHandler(prev, shape) { label = lab; } @@ -86,14 +89,14 @@ class MyEvtHandler: public wxShapeEvtHandler /* * A diagram document, which contains a diagram. */ - + class DiagramDocument: public wxDocument { DECLARE_DYNAMIC_CLASS(DiagramDocument) private: public: MyDiagram diagram; - + DiagramDocument(void); ~DiagramDocument(void); @@ -104,9 +107,9 @@ class DiagramDocument: public wxDocument virtual wxOutputStream& SaveObject(wxOutputStream& stream); virtual wxInputStream& LoadObject(wxInputStream& stream); #endif - + inline wxDiagram *GetDiagram() { return &diagram; } - + bool OnCloseDocument(void); }; @@ -135,7 +138,7 @@ class DiagramDocument: public wxDocument * Assume, as here, that we keep a pointer to the old shape so we reuse it * when we recreate. */ - + class DiagramCommand: public wxCommand { protected: @@ -151,17 +154,17 @@ class DiagramCommand: public wxCommand bool deleteShape; // Storage for property commands - wxBrush *shapeBrush; + const wxBrush *shapeBrush; wxPen *shapePen; wxString shapeLabel; public: // Multi-purpose constructor for creating, deleting shapes - DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, wxClassInfo *shapeInfo = NULL, - double x = 0.0, double y = 0.0, bool sel = FALSE, wxShape *theShape = NULL, wxShape *fs = NULL, wxShape *ts = NULL); + DiagramCommand(const wxString& name, int cmd, DiagramDocument *ddoc, wxClassInfo *shapeInfo = NULL, + double x = 0.0, double y = 0.0, bool sel = false, wxShape *theShape = NULL, wxShape *fs = NULL, wxShape *ts = NULL); // Property-changing command constructors - DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape); - DiagramCommand(char *name, int cmd, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape); + DiagramCommand(const wxString& name, int cmd, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape); + DiagramCommand(const wxString& name, int cmd, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape); ~DiagramCommand(void);