X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bb0cd285ac73fb25396d53f7f52db6f3ca77b63..6164d85e896743b16a0cf8b0610f5d17ceb47f36:/utils/ogl/src/composit.h diff --git a/utils/ogl/src/composit.h b/utils/ogl/src/composit.h index 832d9b04c1..505667c2bd 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(); @@ -78,9 +78,8 @@ public: void CalculateSize(); #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 @@ -100,8 +99,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 }; @@ -133,16 +132,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. @@ -154,9 +153,8 @@ class wxDivisionShape: public wxCompositeShape void ResetMandatoryControlPoints(); #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(wxShape& copy); @@ -167,20 +165,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; }