X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/220f2d5c4d561b4ea7dd87a6d972a0e87b9ec558..7f5d8b0085b0140f62fb49dd8a0e50ed895e4632:/contrib/include/wx/ogl/basic.h diff --git a/contrib/include/wx/ogl/basic.h b/contrib/include/wx/ogl/basic.h index 1127a23ef2..47b68d3de1 100644 --- a/contrib/include/wx/ogl/basic.h +++ b/contrib/include/wx/ogl/basic.h @@ -12,21 +12,17 @@ #ifndef _OGL_BASIC_H_ #define _OGL_BASIC_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "basic.h" #endif + #define OGL_VERSION 2.0 #ifndef DEFAULT_MOUSE_TOLERANCE #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 +106,7 @@ class wxControlPoint; class wxShapeRegion; class wxShape; -#ifdef PROLOGIO +#if wxUSE_PROLOGIO class WXDLLEXPORT wxExpr; class WXDLLEXPORT wxExprDatabase; #endif @@ -124,7 +120,7 @@ class WXDLLEXPORT wxExprDatabase; -class wxShapeEvtHandler: public wxObject, public wxClientDataContainer +class WXDLLIMPEXP_OGL wxShapeEvtHandler: public wxObject, public wxClientDataContainer { DECLARE_DYNAMIC_CLASS(wxShapeEvtHandler) @@ -182,14 +178,14 @@ class wxShapeEvtHandler: public wxObject, public wxClientDataContainer // Does the copy - override for new event handlers which might store // app-specific data. - virtual void CopyData(wxShapeEvtHandler& copy) {}; + virtual void CopyData(wxShapeEvtHandler& WXUNUSED(copy)) {}; private: wxShapeEvtHandler* m_previousHandler; wxShape* m_handlerShape; }; -class wxShape: public wxShapeEvtHandler +class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler { DECLARE_ABSTRACT_CLASS(wxShape) @@ -228,7 +224,7 @@ class wxShape: public wxShapeEvtHandler virtual void OnEraseContents(wxDC& dc); virtual void OnHighlight(wxDC& dc); virtual void OnLeftClick(double x, double y, int keys = 0, int attachment = 0); - virtual void OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0) {} + virtual void OnLeftDoubleClick(double WXUNUSED(x), double WXUNUSED(y), int WXUNUSED(keys) = 0, int WXUNUSED(attachment) = 0) {} virtual void OnRightClick(double x, double y, int keys = 0, int attachment = 0); virtual void OnSize(double x, double y); virtual bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE); @@ -299,8 +295,6 @@ class wxShape: public wxShapeEvtHandler void SetPen(wxPen *pen); void SetBrush(wxBrush *brush); - inline void SetClientData(wxObject *client_data) { m_clientData = client_data; }; - inline wxObject *GetClientData() const { return m_clientData; }; virtual void Show(bool show); virtual bool IsShown() const { return m_visible; } @@ -346,7 +340,7 @@ class wxShape: public wxShapeEvtHandler virtual wxFont *GetFont(int regionId = 0) const; virtual void SetTextColour(const wxString& colour, int regionId = 0); virtual wxString GetTextColour(int regionId = 0) const; - virtual inline int GetNumberOfTextRegions() const { return m_regions.Number(); } + virtual inline int GetNumberOfTextRegions() const { return m_regions.GetCount(); } virtual void SetRegionName(const wxString& name, int regionId = 0); // Get the name representing the region for this image alone. @@ -360,7 +354,7 @@ class wxShape: public wxShapeEvtHandler virtual int GetRegionId(const wxString& name); // Construct names for regions, unique even for children of a composite. - virtual void NameRegions(const wxString& parentName = ""); + virtual void NameRegions(const wxString& parentName = wxEmptyString); // Get list of regions inline wxList& GetRegions() const { return (wxList&) m_regions; } @@ -383,7 +377,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); @@ -520,9 +514,6 @@ class wxShape: public wxShapeEvtHandler wxBrush GetBackgroundBrush(); - private: - wxObject* m_clientData; - protected: wxShapeEvtHandler* m_eventHandler; bool m_formatted; @@ -571,7 +562,7 @@ class wxShape: public wxShapeEvtHandler long m_branchStyle; }; -class wxPolygonShape: public wxShape +class WXDLLIMPEXP_OGL wxPolygonShape: public wxShape { DECLARE_DYNAMIC_CLASS(wxPolygonShape) public: @@ -618,7 +609,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 @@ -626,7 +617,7 @@ class wxPolygonShape: public wxShape int GetNumberOfAttachments() const; bool GetAttachmentPosition(int attachment, double *x, double *y, int nth = 0, int no_arcs = 1, wxLineShape *line = NULL); - bool AttachmentIsValid(int attachment); + bool AttachmentIsValid(int attachment) const; // Does the copying for this object void Copy(wxShape& copy); @@ -644,7 +635,7 @@ class wxPolygonShape: public wxShape double m_originalHeight; }; -class wxRectangleShape: public wxShape +class WXDLLIMPEXP_OGL wxRectangleShape: public wxShape { DECLARE_DYNAMIC_CLASS(wxRectangleShape) public: @@ -657,7 +648,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 @@ -679,7 +670,7 @@ protected: double m_cornerRadius; }; -class wxTextShape: public wxRectangleShape +class WXDLLIMPEXP_OGL wxTextShape: public wxRectangleShape { DECLARE_DYNAMIC_CLASS(wxTextShape) public: @@ -687,15 +678,15 @@ 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 void Copy(wxShape& copy); }; -class wxEllipseShape: public wxShape +class WXDLLIMPEXP_OGL wxEllipseShape: public wxShape { DECLARE_DYNAMIC_CLASS(wxEllipseShape) public: @@ -709,7 +700,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 @@ -732,7 +723,7 @@ protected: double m_height; }; -class wxCircleShape: public wxEllipseShape +class WXDLLIMPEXP_OGL wxCircleShape: public wxEllipseShape { DECLARE_DYNAMIC_CLASS(wxCircleShape) public: