X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a2c03984a3c4d2b9e432db24eb4338ed797b933..1d529ef7eed851db9d007821decb9639e4e7fc16:/contrib/include/wx/ogl/basic.h diff --git a/contrib/include/wx/ogl/basic.h b/contrib/include/wx/ogl/basic.h index 588258afd7..8a2debc068 100644 --- a/contrib/include/wx/ogl/basic.h +++ b/contrib/include/wx/ogl/basic.h @@ -16,6 +16,14 @@ #pragma interface "basic.h" #endif +#ifndef wxUSE_DEPRECATED +#define wxUSE_DEPRECATED 1 +#endif + +#if wxUSE_DEPRECATED +#include +#endif + #define OGL_VERSION 2.0 #ifndef DEFAULT_MOUSE_TOLERANCE @@ -119,7 +127,7 @@ class WXDLLEXPORT wxExprDatabase; -class wxShapeEvtHandler: public wxObject, public wxClientDataContainer +class WXDLLIMPEXP_OGL wxShapeEvtHandler: public wxObject, public wxClientDataContainer { DECLARE_DYNAMIC_CLASS(wxShapeEvtHandler) @@ -184,7 +192,7 @@ class wxShapeEvtHandler: public wxObject, public wxClientDataContainer wxShape* m_handlerShape; }; -class wxShape: public wxShapeEvtHandler +class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler { DECLARE_ABSTRACT_CLASS(wxShape) @@ -392,6 +400,7 @@ class wxShape: public wxShapeEvtHandler int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); virtual int GetNumberOfAttachments() const; virtual bool AttachmentIsValid(int attachment) const; + virtual wxList& GetAttachments() { return m_attachmentPoints; } // Only get the attachment position at the _edge_ of the shape, ignoring // branching mode. This is used e.g. to indicate the edge of interest, not the point @@ -498,7 +507,8 @@ class wxShape: public wxShapeEvtHandler // Rotate about the given axis by the given amount in radians. virtual void Rotate(double x, double y, double theta); - virtual inline double GetRotation() const { return m_rotation; } + virtual double GetRotation() const { return m_rotation; } + virtual void SetRotation(double rotation) { m_rotation = rotation; } void ClearAttachments(); @@ -520,7 +530,7 @@ class wxShape: public wxShapeEvtHandler wxPen* m_pen; wxBrush* m_brush; wxFont* m_font; - wxColour* m_textColour; + wxColour m_textColour; wxString m_textColourName; wxShapeCanvas* m_canvas; wxList m_lines; @@ -561,7 +571,7 @@ class wxShape: public wxShapeEvtHandler long m_branchStyle; }; -class wxPolygonShape: public wxShape +class WXDLLIMPEXP_OGL wxPolygonShape: public wxShape { DECLARE_DYNAMIC_CLASS(wxPolygonShape) public: @@ -621,10 +631,17 @@ class wxPolygonShape: public wxShape void Copy(wxShape& copy); inline wxList *GetPoints() { return m_points; } + inline wxList *GetOriginalPoints() { return m_originalPoints; } // Rotate about the given axis by the given amount in radians virtual void Rotate(double x, double y, double theta); + double GetOriginalWidth() const { return m_originalWidth; } + double GetOriginalHeight() const { return m_originalHeight; } + + void SetOriginalWidth(double w) { m_originalWidth = w; } + void SetOriginalHeight(double h) { m_originalHeight = h; } + private: wxList* m_points; wxList* m_originalPoints; @@ -634,7 +651,7 @@ class wxPolygonShape: public wxShape double m_originalHeight; }; -class wxRectangleShape: public wxShape +class WXDLLIMPEXP_OGL wxRectangleShape: public wxShape { DECLARE_DYNAMIC_CLASS(wxRectangleShape) public: @@ -646,6 +663,7 @@ class wxRectangleShape: public wxShape void OnDraw(wxDC& dc); void SetSize(double x, double y, bool recursive = TRUE); void SetCornerRadius(double rad); // If > 0, rounded corners + double GetCornerRadius() const { return m_cornerRadius; } #if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); @@ -669,7 +687,7 @@ protected: double m_cornerRadius; }; -class wxTextShape: public wxRectangleShape +class WXDLLIMPEXP_OGL wxTextShape: public wxRectangleShape { DECLARE_DYNAMIC_CLASS(wxTextShape) public: @@ -685,7 +703,7 @@ class wxTextShape: public wxRectangleShape void Copy(wxShape& copy); }; -class wxEllipseShape: public wxShape +class WXDLLIMPEXP_OGL wxEllipseShape: public wxShape { DECLARE_DYNAMIC_CLASS(wxEllipseShape) public: @@ -722,7 +740,7 @@ protected: double m_height; }; -class wxCircleShape: public wxEllipseShape +class WXDLLIMPEXP_OGL wxCircleShape: public wxEllipseShape { DECLARE_DYNAMIC_CLASS(wxCircleShape) public: