X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab7ce33c563651f790f99d64ee56727706047ae3..90daa6cd4addce8ca6ba3f30d1637cab5568208a:/contrib/include/wx/ogl/composit.h diff --git a/contrib/include/wx/ogl/composit.h b/contrib/include/wx/ogl/composit.h index fc373fe505..68a2c400a2 100644 --- a/contrib/include/wx/ogl/composit.h +++ b/contrib/include/wx/ogl/composit.h @@ -6,25 +6,22 @@ // Created: 12/07/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _OGL_COMPOSIT_H_ #define _OGL_COMPOSIT_H_ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "composit.h" -#endif -class wxDivisionShape; -class wxOGLConstraint; +class WXDLLIMPEXP_OGL wxDivisionShape; +class WXDLLIMPEXP_OGL wxOGLConstraint; /* * A composite object is an invisible rectangle surrounding all children * */ -class wxCompositeShape: public wxRectangleShape +class WXDLLIMPEXP_OGL wxCompositeShape: public wxRectangleShape { DECLARE_DYNAMIC_CLASS(wxCompositeShape) public: @@ -35,16 +32,16 @@ public: void OnDraw(wxDC& dc); void OnDrawContents(wxDC& dc); void OnErase(wxDC& dc); - bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE); + bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = true); void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0); void OnBeginDragLeft(double x, double y, int keys, int attachment = 0); void OnEndDragLeft(double x, double y, int keys, int attachment = 0); void OnRightClick(double x, double y, int keys, int attachment = 0); - void SetSize(double w, double h, bool recursive = TRUE); + void SetSize(double w, double h, bool recursive = true); - // Returns TRUE if it settled down + // Returns true if it settled down bool Recompute(); // New members @@ -68,7 +65,7 @@ public: // in case it had to find it recursively. wxOGLConstraint *FindConstraint(long id, wxCompositeShape **actualComposite = NULL); - // Returns TRUE if something changed + // Returns true if something changed bool Constrain(); // Make this composite into a container by creating one wxDivisionShape @@ -77,7 +74,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 @@ -92,7 +89,7 @@ public: // of the composite that is not in the divisions list. wxShape *FindContainerImage(); - // Returns TRUE if division is a descendant of this container + // Returns true if division is a descendant of this container bool ContainsDivision(wxDivisionShape *division); inline wxList& GetDivisions() const { return (wxList&) m_divisions; } @@ -122,7 +119,7 @@ protected: #define DIVISION_SIDE_RIGHT 3 #define DIVISION_SIDE_BOTTOM 4 -class wxDivisionShape: public wxCompositeShape +class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape { DECLARE_DYNAMIC_CLASS(wxDivisionShape) public: @@ -132,7 +129,7 @@ class wxDivisionShape: public wxCompositeShape void OnDraw(wxDC& dc); void OnDrawContents(wxDC& dc); - bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = TRUE); + bool OnMovePre(wxDC& dc, double x, double y, double oldX, double oldY, bool display = true); void OnDragLeft(bool draw, double x, double y, int keys, int attachment = 0); void OnBeginDragLeft(double x, double y, int keys, int attachment = 0); void OnEndDragLeft(double x, double y, int keys, int attachment = 0); @@ -141,7 +138,7 @@ class wxDivisionShape: public wxCompositeShape // Don't want this kind of composite to resize its subdiagrams, so // override composite's SetSize. - void SetSize(double w, double h, bool recursive = TRUE); + void SetSize(double w, double h, bool recursive = true); // Similarly for calculating size: it's fixed at whatever SetSize // set it to, not in terms of children. @@ -152,7 +149,7 @@ class wxDivisionShape: public wxCompositeShape void MakeMandatoryControlPoints(); void ResetMandatoryControlPoints(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif @@ -162,12 +159,12 @@ class wxDivisionShape: public wxCompositeShape // Divide horizontally (wxHORIZONTAL) or vertically (wxVERTICAL) bool Divide(int direction); - // Resize adjoining divisions at the given side. If test is TRUE, + // Resize adjoining divisions at the given side. If test is true, // just see whether it's possible for each adjoining region, - // returning FALSE if it's not. + // returning false if it's not. bool ResizeAdjoining(int side, double newPos, bool test); - // Adjust a side, returning FALSE if it's not physically possible. + // Adjust a side, returning false if it's not physically possible. bool AdjustLeft(double left, bool test); bool AdjustTop(double top, bool test); bool AdjustRight(double right, bool test); @@ -191,10 +188,10 @@ class wxDivisionShape: public wxCompositeShape inline void SetHandleSide(int side) { m_handleSide = side; } inline int GetHandleSide() const { return m_handleSide; } - inline void SetLeftSidePen(wxPen *pen) { m_leftSidePen = pen; } - inline wxPen *GetLeftSidePen() const { return m_leftSidePen; } - inline void SetTopSidePen(wxPen *pen) { m_topSidePen = pen; } - inline wxPen *GetTopSidePen() const { return m_topSidePen; } + inline void SetLeftSidePen(const wxPen *pen) { m_leftSidePen = pen; } + inline wxPen *GetLeftSidePen() const { return wx_const_cast(wxPen*, m_leftSidePen); } + inline void SetTopSidePen(const wxPen *pen) { m_topSidePen = pen; } + inline wxPen *GetTopSidePen() const { return wx_const_cast(wxPen*, m_topSidePen); } void SetLeftSideColour(const wxString& colour); void SetTopSideColour(const wxString& colour); @@ -217,8 +214,8 @@ class wxDivisionShape: public wxCompositeShape int m_handleSide; // Side at which handle is legal - wxPen* m_leftSidePen; - wxPen* m_topSidePen; + const wxPen* m_leftSidePen; + const wxPen* m_topSidePen; wxString m_leftSideColour; wxString m_topSideColour; wxString m_leftSideStyle;