X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b9ac87bc5cbe46227195e32c44e25831f8206e3c..a19918eb353f1f266f92891eee07834d7cf09cd7:/contrib/include/wx/ogl/drawn.h diff --git a/contrib/include/wx/ogl/drawn.h b/contrib/include/wx/ogl/drawn.h index 75f3d00a9a..0df56399a2 100644 --- a/contrib/include/wx/ogl/drawn.h +++ b/contrib/include/wx/ogl/drawn.h @@ -6,23 +6,18 @@ // Created: 12/07/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _OGL_DRAWN_H_ #define _OGL_DRAWN_H_ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "drawn.h" -#endif - -#include #define oglMETAFLAGS_OUTLINE 1 #define oglMETAFLAGS_ATTACHMENTS 2 -class wxDrawnShape; -class wxPseudoMetaFile: public wxObject +class WXDLLIMPEXP_OGL wxDrawnShape; +class WXDLLIMPEXP_OGL wxPseudoMetaFile: public wxObject { DECLARE_DYNAMIC_CLASS(wxPseudoMetaFile) public: @@ -62,11 +57,11 @@ class wxPseudoMetaFile: public wxObject inline void SetSize(double w, double h) { m_width = w; m_height = h; } - inline void SetFillBrush(wxBrush* brush) { m_fillBrush = brush; } - inline wxBrush* GetFillBrush() const { return m_fillBrush; } + inline void SetFillBrush(const wxBrush* brush) { m_fillBrush = brush; } + inline wxBrush* GetFillBrush() const { return wx_const_cast(wxBrush*, m_fillBrush); } - inline void SetOutlinePen(wxPen* pen) { m_outlinePen = pen; } - inline wxPen* GetOutlinePen() const { return m_outlinePen; } + inline void SetOutlinePen(const wxPen* pen) { m_outlinePen = pen; } + inline wxPen* GetOutlinePen() const { return wx_const_cast(wxPen*, m_outlinePen); } inline void SetOutlineOp(int op) { m_outlineOp = op; } inline int GetOutlineOp() const { return m_outlineOp; } @@ -101,8 +96,8 @@ public: virtual void SetClippingRect(const wxRect& rect); virtual void DestroyClippingRect(); - virtual void SetPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual - virtual void SetBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc. + virtual void SetPen(const wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual + virtual void SetBrush(const wxBrush* brush, bool isFill = false); // pens/brushes etc. virtual void SetFont(wxFont* font); virtual void SetTextColour(const wxColour& colour); virtual void SetBackgroundColour(const wxColour& colour); @@ -118,8 +113,8 @@ public: // Pen/brush specifying outline/fill colours // to override operations. - wxPen* m_outlinePen; - wxBrush* m_fillBrush; + const wxPen* m_outlinePen; + const wxBrush* m_fillBrush; wxList m_outlineColours; // List of the GDI operations that comprise the outline wxList m_fillColours; // List of the GDI operations that fill the shape double m_currentRotation; @@ -130,7 +125,7 @@ public: #define oglDRAWN_ANGLE_180 2 #define oglDRAWN_ANGLE_270 3 -class wxDrawnShape: public wxRectangleShape +class WXDLLIMPEXP_OGL wxDrawnShape: public wxRectangleShape { DECLARE_DYNAMIC_CLASS(wxDrawnShape) public: @@ -156,7 +151,7 @@ class wxDrawnShape: public wxRectangleShape // Get current rotation inline double GetRotation() const { return m_rotation; } - void SetSize(double w, double h, bool recursive = TRUE); + void SetSize(double w, double h, bool recursive = true); bool LoadFromMetaFile(const wxString& filename); inline void SetSaveToFile(bool save) { m_saveToFile = save; } @@ -189,8 +184,8 @@ class wxDrawnShape: public wxRectangleShape virtual void SetClippingRect(const wxRect& rect); virtual void DestroyClippingRect(); - virtual void SetDrawnPen(wxPen* pen, bool isOutline = FALSE); // TODO: eventually, just store GDI object attributes, not actual - virtual void SetDrawnBrush(wxBrush* brush, bool isFill = FALSE); // pens/brushes etc. + virtual void SetDrawnPen(const wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual + virtual void SetDrawnBrush(const wxBrush* brush, bool isFill = false); // pens/brushes etc. virtual void SetDrawnFont(wxFont* font); virtual void SetDrawnTextColour(const wxColour& colour); virtual void SetDrawnBackgroundColour(const wxColour& colour); @@ -224,4 +219,3 @@ private: #endif // _DRAWN_H_ -