X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0fc1a7137cccc829a34b3527c768db7d7ac83437..6f5f3ca0fef2c0982d9b38483321f9e67ff9f516:/utils/ogl/src/composit.h diff --git a/utils/ogl/src/composit.h b/utils/ogl/src/composit.h index eac0eff62a..c667e38d87 100644 --- a/utils/ogl/src/composit.h +++ b/utils/ogl/src/composit.h @@ -17,7 +17,7 @@ #endif class wxDivisionShape; -class OGLConstraint; +class wxOGLConstraint; /* * A composite object is an invisible rectangle surrounding all children @@ -35,14 +35,14 @@ public: void OnDraw(wxDC& dc); void OnDrawContents(wxDC& dc); void OnErase(wxDC& dc); - bool OnMovePre(wxDC& dc, float x, float y, float oldX, float oldY, bool display = TRUE); - void OnDragLeft(bool draw, float x, float y, int keys, int attachment = 0); - void OnBeginDragLeft(float x, float y, int keys, int attachment = 0); - void OnEndDragLeft(float x, float y, int keys, int attachment = 0); + 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(float x, float y, int keys, int attachment = 0); + void OnRightClick(double x, double y, int keys, int attachment = 0); - void SetSize(float w, float h, bool recursive = TRUE); + void SetSize(double w, double h, bool recursive = TRUE); // Returns TRUE if it settled down bool Recompute(); @@ -51,11 +51,11 @@ public: void AddChild(wxShape *child, wxShape *addAfter = NULL); void RemoveChild(wxShape *child); - OGLConstraint *AddConstraint(OGLConstraint *constraint); - OGLConstraint *AddConstraint(int type, wxShape *constraining, wxList& constrained); - OGLConstraint *AddConstraint(int type, wxShape *constraining, wxShape *constrained); + wxOGLConstraint *AddConstraint(wxOGLConstraint *constraint); + wxOGLConstraint *AddConstraint(int type, wxShape *constraining, wxList& constrained); + wxOGLConstraint *AddConstraint(int type, wxShape *constraining, wxShape *constrained); - void DeleteConstraint(OGLConstraint *constraint); + void DeleteConstraint(wxOGLConstraint *constraint); // Delete constraints that involve this child. void DeleteConstraintsInvolvingChild(wxShape *child); @@ -66,7 +66,7 @@ public: // Find constraint, also returning actual composite the constraint was in, // in case it had to find it recursively. - OGLConstraint *FindConstraint(long id, wxCompositeShape **actualComposite = NULL); + wxOGLConstraint *FindConstraint(long id, wxCompositeShape **actualComposite = NULL); // Returns TRUE if something changed bool Constrain(); @@ -79,14 +79,13 @@ public: #ifdef PROLOGIO // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); + void WriteAttributes(wxExpr *clause); + void ReadAttributes(wxExpr *clause); // In case the object has constraints it needs to read in in a different pass void ReadConstraints(wxExpr *clause, wxExprDatabase *database); #endif // Does the copying for this object - void Copy(wxCompositeShape& copy); - wxShape *PrivateCopy(); + void Copy(wxShape& copy); virtual wxDivisionShape *OnCreateDivision(); @@ -101,8 +100,8 @@ public: inline wxList& GetConstraints() const { return (wxList&) m_constraints; } protected: - float m_oldX; - float m_oldY; + double m_oldX; + double m_oldY; wxList m_constraints; wxList m_divisions; // In case it's a container }; @@ -134,16 +133,16 @@ class wxDivisionShape: public wxCompositeShape void OnDraw(wxDC& dc); void OnDrawContents(wxDC& dc); - bool OnMovePre(wxDC& dc, float x, float y, float oldX, float oldY, bool display = TRUE); - void OnDragLeft(bool draw, float x, float y, int keys, int attachment = 0); - void OnBeginDragLeft(float x, float y, int keys, int attachment = 0); - void OnEndDragLeft(float x, float y, int keys, int attachment = 0); + 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(float x, float y, int keys = 0, int attachment = 0); + void OnRightClick(double x, double y, int keys = 0, int attachment = 0); // Don't want this kind of composite to resize its subdiagrams, so // override composite's SetSize. - void SetSize(float w, float 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. @@ -156,12 +155,11 @@ class wxDivisionShape: public wxCompositeShape #ifdef PROLOGIO // Prolog database stuff - void WritePrologAttributes(wxExpr *clause); - void ReadPrologAttributes(wxExpr *clause); + void WriteAttributes(wxExpr *clause); + void ReadAttributes(wxExpr *clause); #endif // Does the copying for this object - void Copy(wxDivisionShape& copy); - wxShape *PrivateCopy(); + void Copy(wxShape& copy); // Divide horizontally (wxHORIZONTAL) or vertically (wxVERTICAL) bool Divide(int direction); @@ -169,20 +167,20 @@ class wxDivisionShape: public wxCompositeShape // 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. - bool ResizeAdjoining(int side, float newPos, bool test); + bool ResizeAdjoining(int side, double newPos, bool test); // Adjust a side, returning FALSE if it's not physically possible. - bool AdjustLeft(float left, bool test); - bool AdjustTop(float top, bool test); - bool AdjustRight(float right, bool test); - bool AdjustBottom(float bottom, bool test); + bool AdjustLeft(double left, bool test); + bool AdjustTop(double top, bool test); + bool AdjustRight(double right, bool test); + bool AdjustBottom(double bottom, bool test); // Edit style of left or top side void EditEdge(int side); // Popup menu - void PopupMenu(float x, float y); - + void PopupMenu(double x, double y); + inline void SetLeftSide(wxDivisionShape *shape) { m_leftSide = shape; } inline void SetTopSide(wxDivisionShape *shape) { m_topSide = shape; } inline void SetRightSide(wxDivisionShape *shape) { m_rightSide = shape; }