X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fc25a89ac1e6c5208db24bfc0abc8666b791dc6..a19918eb353f1f266f92891eee07834d7cf09cd7:/contrib/include/wx/ogl/drawnp.h diff --git a/contrib/include/wx/ogl/drawnp.h b/contrib/include/wx/ogl/drawnp.h index e819600e0a..9d6c3552a8 100644 --- a/contrib/include/wx/ogl/drawnp.h +++ b/contrib/include/wx/ogl/drawnp.h @@ -6,23 +6,18 @@ // Created: 12/07/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _OGL_DRAWNP_H_ #define _OGL_DRAWNP_H_ -#ifdef __GNUG__ -#pragma interface "drawnp.h" -#endif - -#include /* * Drawing operations * */ - + #define DRAWOP_SET_PEN 1 #define DRAWOP_SET_BRUSH 2 #define DRAWOP_SET_FONT 3 @@ -54,33 +49,34 @@ * Base, virtual class * */ - -class wxDrawOp: public wxObject + +class WXDLLIMPEXP_OGL wxDrawOp: public wxObject { public: inline wxDrawOp(int theOp) { m_op = theOp; } inline ~wxDrawOp() {} - inline virtual void Scale(double xScale, double yScale) {}; - inline virtual void Translate(double x, double y) {}; - inline virtual void Rotate(double x, double y, double theta, double sinTheta, double cosTheta) {}; + inline virtual void Scale(double WXUNUSED(xScale), double WXUNUSED(yScale)) {}; + inline virtual void Translate(double WXUNUSED(x), double WXUNUSED(y)) {}; + inline virtual void Rotate(double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(theta), double WXUNUSED(sinTheta), double WXUNUSED(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) - virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h, - double oldW, double oldH) { return FALSE; } + // Draw an outline using the current operation. By default, return false (not drawn) + virtual bool OnDrawOutline(wxDC& WXUNUSED(dc), double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h), + double WXUNUSED(oldW), double WXUNUSED(oldH)) { return false; } // Get the perimeter point using this data - virtual bool GetPerimeterPoint(double x1, double y1, - double x2, double y2, - double *x3, double *y3, - double xOffset, double yOffset, - int attachmentMode) - { return FALSE; } + virtual bool GetPerimeterPoint(double WXUNUSED(x1), double WXUNUSED(y1), + double WXUNUSED(x2), double WXUNUSED(y2), + double *WXUNUSED(x3), double *WXUNUSED(y3), + double WXUNUSED(xOffset), double WXUNUSED(yOffset), + int WXUNUSED(attachmentMode)) + { return false; } protected: int m_op; @@ -91,15 +87,17 @@ protected: * Set font, brush, text colour * */ - -class wxOpSetGDI: public wxDrawOp + +class WXDLLIMPEXP_OGL wxOpSetGDI: public wxDrawOp { public: 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; @@ -114,8 +112,8 @@ public: * Set/destroy clipping * */ - -class wxOpSetClipping: public wxDrawOp + +class WXDLLIMPEXP_OGL wxOpSetClipping: public wxDrawOp { public: wxOpSetClipping(int theOp, double theX1, double theY1, double theX2, double theY2); @@ -123,8 +121,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; @@ -137,20 +137,22 @@ public: * Draw line, rectangle, rounded rectangle, ellipse, point, arc, text * */ - -class wxOpDraw: public wxDrawOp + +class WXDLLIMPEXP_OGL wxOpDraw: public wxDrawOp { public: wxOpDraw(int theOp, double theX1, double theY1, double theX2, double theY2, - double radius = 0.0, char *s = NULL); + double radius = 0.0, const wxString& s = wxEmptyString); ~wxOpDraw(); void Do(wxDC& dc, double xoffset, double yoffset); void Scale(double scaleX, double scaleY); 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; @@ -160,7 +162,7 @@ public: double m_x3; double m_y3; double m_radius; - char* m_textString; + wxString m_textString; }; @@ -169,7 +171,7 @@ public: * */ -class wxOpPolyDraw: public wxDrawOp +class WXDLLIMPEXP_OGL wxOpPolyDraw: public wxDrawOp { public: wxOpPolyDraw(int theOp, int n, wxRealPoint *thePoints); @@ -179,8 +181,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, @@ -196,7 +200,7 @@ public: public: wxRealPoint* m_points; int m_noPoints; - + }; #endif