diff --git a/contrib/include/wx/ogl/basic.h b/contrib/include/wx/ogl/basic.h index 30c23cea36..a765fbe09d 100644 --- a/contrib/include/wx/ogl/basic.h +++ b/contrib/include/wx/ogl/basic.h @@ -22,11 +22,6 @@ #define DEFAULT_MOUSE_TOLERANCE 3 #endif -// Edit these lines if you positively don't want PROLOGIO support -#ifndef PROLOGIO -#define PROLOGIO -#endif - // Key identifiers #define KEY_SHIFT 1 #define KEY_CTRL 2 @@ -110,7 +105,7 @@ class wxControlPoint; class wxShapeRegion; class wxShape; -#ifdef PROLOGIO +#if wxUSE_PROLOGIO class WXDLLEXPORT wxExpr; class WXDLLEXPORT wxExprDatabase; #endif @@ -381,7 +376,7 @@ class wxShape: public wxShapeEvtHandler virtual void ClearText(int regionId = 0); void RemoveLine(wxLineShape *line); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O virtual void WriteAttributes(wxExpr *clause); virtual void ReadAttributes(wxExpr *clause); @@ -613,7 +608,7 @@ class wxPolygonShape: public wxShape // Recalculates the centre of the polygon virtual void CalculatePolygonCentre(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif @@ -652,7 +647,7 @@ class wxRectangleShape: public wxShape void SetSize(double x, double y, bool recursive = TRUE); void SetCornerRadius(double rad); // If > 0, rounded corners -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif @@ -682,8 +677,8 @@ class wxTextShape: public wxRectangleShape void OnDraw(wxDC& dc); -#ifdef PROLOGIO - void WriteAttributes(wxExpr *clause); +#if wxUSE_PROLOGIO + void WriteAttributes(wxExpr *clause); #endif // Does the copying for this object @@ -704,7 +699,7 @@ class wxEllipseShape: public wxShape void OnDraw(wxDC& dc); void SetSize(double x, double y, bool recursive = TRUE); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif diff --git a/contrib/include/wx/ogl/bmpshape.h b/contrib/include/wx/ogl/bmpshape.h index 1b56477550..5389351fe4 100644 --- a/contrib/include/wx/ogl/bmpshape.h +++ b/contrib/include/wx/ogl/bmpshape.h @@ -27,7 +27,7 @@ class wxBitmapShape: public wxRectangleShape void OnDraw(wxDC& dc); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); diff --git a/contrib/include/wx/ogl/composit.h b/contrib/include/wx/ogl/composit.h index fc373fe505..618629d4ff 100644 --- a/contrib/include/wx/ogl/composit.h +++ b/contrib/include/wx/ogl/composit.h @@ -77,7 +77,7 @@ public: // Calculates size and position of composite object based on children void CalculateSize(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); // In case the object has constraints it needs to read in in a different pass @@ -152,7 +152,7 @@ class wxDivisionShape: public wxCompositeShape void MakeMandatoryControlPoints(); void ResetMandatoryControlPoints(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif diff --git a/contrib/include/wx/ogl/divided.h b/contrib/include/wx/ogl/divided.h index a427a63062..6fc733eee3 100644 --- a/contrib/include/wx/ogl/divided.h +++ b/contrib/include/wx/ogl/divided.h @@ -46,7 +46,7 @@ class wxDividedShape: public wxRectangleShape void MakeMandatoryControlPoints(); void ResetMandatoryControlPoints(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif diff --git a/contrib/include/wx/ogl/drawn.h b/contrib/include/wx/ogl/drawn.h index 4bc00f91d3..dafde44d21 100644 --- a/contrib/include/wx/ogl/drawn.h +++ b/contrib/include/wx/ogl/drawn.h @@ -32,7 +32,7 @@ class wxPseudoMetaFile: public wxObject void Draw(wxDC& dc, double xoffset, double yoffset); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause, int whichAngle); void ReadAttributes(wxExpr *clause, int whichAngle); #endif @@ -139,7 +139,7 @@ class wxDrawnShape: public wxRectangleShape void OnDraw(wxDC& dc); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); diff --git a/contrib/include/wx/ogl/drawnp.h b/contrib/include/wx/ogl/drawnp.h index 98ca0a8b65..dd083219b8 100644 --- a/contrib/include/wx/ogl/drawnp.h +++ b/contrib/include/wx/ogl/drawnp.h @@ -65,9 +65,10 @@ public: inline virtual void Rotate(double x, double y, double theta, double sinTheta, double cosTheta) {}; virtual void Do(wxDC& dc, double xoffset, double yoffset) = 0; virtual wxDrawOp *Copy(wxPseudoMetaFile *newImage) = 0; +#if wxUSE_PROLOGIO virtual wxExpr *WriteExpr(wxPseudoMetaFile *image) = 0; virtual void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) = 0; - +#endif inline int GetOp() const { return m_op; } // Draw an outline using the current operation. By default, return FALSE (not drawn) @@ -98,8 +99,10 @@ class wxOpSetGDI: public wxDrawOp wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0); void Do(wxDC& dc, double xoffset, double yoffset); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif public: int m_mode; @@ -123,8 +126,10 @@ public: void Scale(double xScale, double yScale); void Translate(double x, double y); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif public: double m_x1; @@ -149,8 +154,10 @@ class wxOpDraw: public wxDrawOp void Translate(double x, double y); void Rotate(double x, double y, double theta, double sinTheta, double cosTheta); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif public: double m_x1; @@ -179,8 +186,10 @@ public: void Translate(double x, double y); void Rotate(double x, double y, double theta, double sinTheta, double cosTheta); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif // Draw an outline using the current operation. virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h, diff --git a/contrib/include/wx/ogl/lines.h b/contrib/include/wx/ogl/lines.h index 0fb141ea98..22d7a3b22c 100644 --- a/contrib/include/wx/ogl/lines.h +++ b/contrib/include/wx/ogl/lines.h @@ -188,7 +188,7 @@ class wxLineShape: public wxShape bool HitTest(double x, double y, int *attachment, double *distance); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O virtual void WriteAttributes(wxExpr *clause); virtual void ReadAttributes(wxExpr *clause); diff --git a/contrib/include/wx/ogl/ogldiag.h b/contrib/include/wx/ogl/ogldiag.h index afe7db18c4..7a593f2466 100644 --- a/contrib/include/wx/ogl/ogldiag.h +++ b/contrib/include/wx/ogl/ogldiag.h @@ -67,7 +67,7 @@ public: // Make sure all text that should be centred, is centred. void RecentreAll(wxDC& dc); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO virtual bool SaveFile(const wxString& filename); virtual bool LoadFile(const wxString& filename); diff --git a/contrib/src/ogl/basic.cpp b/contrib/src/ogl/basic.cpp index a78d178bf5..261243d542 100644 --- a/contrib/src/ogl/basic.cpp +++ b/contrib/src/ogl/basic.cpp @@ -1697,7 +1697,7 @@ void wxShape::RemoveLine(wxLineShape *line) m_lines.DeleteObject(line); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxShape::WriteAttributes(wxExpr *clause) { clause->AddAttributeValueString("type", GetClassInfo()->GetClassName()); diff --git a/contrib/src/ogl/basic2.cpp b/contrib/src/ogl/basic2.cpp index 5dd361faa4..33ed98da8a 100644 --- a/contrib/src/ogl/basic2.cpp +++ b/contrib/src/ogl/basic2.cpp @@ -581,7 +581,7 @@ void wxPolygonShape::ResetControlPoints() } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxPolygonShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -940,7 +940,7 @@ bool wxRectangleShape::GetPerimeterPoint(double x1, double y1, return TRUE; } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxRectangleShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -1013,7 +1013,7 @@ void wxTextShape::Copy(wxShape& copy) wxRectangleShape::Copy(copy); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxTextShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -1080,7 +1080,7 @@ void wxEllipseShape::SetSize(double x, double y, bool recursive) SetDefaultRegionSize(); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxEllipseShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); diff --git a/contrib/src/ogl/bmpshape.cpp b/contrib/src/ogl/bmpshape.cpp index 10b1748517..7125c98300 100644 --- a/contrib/src/ogl/bmpshape.cpp +++ b/contrib/src/ogl/bmpshape.cpp @@ -52,7 +52,7 @@ void wxBitmapShape::OnDraw(wxDC& dc) { if (!m_bitmap.Ok()) return; - + wxMemoryDC tempDC; tempDC.SelectObject(m_bitmap); double x, y; @@ -76,7 +76,7 @@ void wxBitmapShape::SetSize(double w, double h, bool recursive) SetDefaultRegionSize(); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxBitmapShape::WriteAttributes(wxExpr *clause) { // Can't really save the bitmap; so instantiate the bitmap diff --git a/contrib/src/ogl/composit.cpp b/contrib/src/ogl/composit.cpp index ded8e3be12..3602cac170 100644 --- a/contrib/src/ogl/composit.cpp +++ b/contrib/src/ogl/composit.cpp @@ -33,10 +33,11 @@ #include #include +#if wxUSE_PROLOGIO // Sometimes, objects need to access the whole database to // construct themselves. wxExprDatabase *GlobalwxExprDatabase = NULL; - +#endif /* * Division control point @@ -598,7 +599,7 @@ bool wxCompositeShape::Constrain() return changed; } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxCompositeShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -984,7 +985,7 @@ void wxDivisionShape::Copy(wxShape& copy) // Division geometry copying is handled at the wxCompositeShape level. } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxDivisionShape::WriteAttributes(wxExpr *clause) { wxCompositeShape::WriteAttributes(clause); diff --git a/contrib/src/ogl/divided.cpp b/contrib/src/ogl/divided.cpp index 8bac0783fc..146ca96d68 100644 --- a/contrib/src/ogl/divided.cpp +++ b/contrib/src/ogl/divided.cpp @@ -415,7 +415,7 @@ void wxDividedShape::ResetMandatoryControlPoints() } } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxDividedShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); diff --git a/contrib/src/ogl/drawn.cpp b/contrib/src/ogl/drawn.cpp index 52a77a2e7a..07a3036997 100644 --- a/contrib/src/ogl/drawn.cpp +++ b/contrib/src/ogl/drawn.cpp @@ -35,6 +35,8 @@ #include #include +#include + static void IntToHex(unsigned int dec, char *buf); static unsigned long HexToInt(char *buf); extern char *oglBuffer; @@ -234,7 +236,7 @@ bool wxDrawnShape::GetPerimeterPoint(double x1, double y1, return wxRectangleShape::GetPerimeterPoint(x1, y1, x2, y2, x3, y3); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxDrawnShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -520,6 +522,7 @@ wxDrawOp *wxOpSetGDI::Copy(wxPseudoMetaFile *newImage) return newOp; } +#if wxUSE_PROLOGIO wxExpr *wxOpSetGDI::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -580,6 +583,7 @@ void wxOpSetGDI::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) break; } } +#endif /* * Set/destroy clipping @@ -634,6 +638,7 @@ void wxOpSetClipping::Translate(double x, double y) m_y1 += y; } +#if wxUSE_PROLOGIO wxExpr *wxOpSetClipping::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -670,6 +675,7 @@ void wxOpSetClipping::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) break; } } +#endif /* * Draw line, rectangle, rounded rectangle, ellipse, point, arc, text @@ -878,6 +884,7 @@ void wxOpDraw::Rotate(double x, double y, double theta, double sinTheta, double } } +#if wxUSE_PROLOGIO wxExpr *wxOpDraw::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -989,6 +996,7 @@ void wxOpDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) } } } +#endif /* * Draw polygon, polyline, spline @@ -1102,6 +1110,7 @@ void wxOpPolyDraw::Rotate(double x, double y, double theta, double sinTheta, dou } } +#if wxUSE_PROLOGIO wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -1190,6 +1199,7 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) i ++; } } +#endif // Draw an outline using the current operation. bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH) @@ -1446,7 +1456,7 @@ void wxPseudoMetaFile::Rotate(double x, double y, double theta) m_currentRotation = theta; } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxPseudoMetaFile::WriteAttributes(wxExpr *clause, int whichAngle) { wxString widthStr; diff --git a/contrib/src/ogl/lines.cpp b/contrib/src/ogl/lines.cpp index 2b94575298..7c816e5414 100644 --- a/contrib/src/ogl/lines.cpp +++ b/contrib/src/ogl/lines.cpp @@ -1373,7 +1373,7 @@ void wxLineShape::ResetControlPoints() } } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxLineShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); diff --git a/contrib/src/ogl/ogldiag.cpp b/contrib/src/ogl/ogldiag.cpp index f5b880414b..d7ec3fc0b6 100644 --- a/contrib/src/ogl/ogldiag.cpp +++ b/contrib/src/ogl/ogldiag.cpp @@ -225,7 +225,7 @@ void wxDiagram::RecentreAll(wxDC& dc) } // Input/output -#ifdef PROLOGIO +#if wxUSE_PROLOGIO bool wxDiagram::SaveFile(const wxString& filename) { wxBeginBusyCursor();