virtual void DeleteAllShapes();
virtual void ShowAll(bool show);
+ // Find a shape by its id
+ wxShape* FindShape(long id) const;
+
inline void SetMouseTolerance(int tol) { m_mouseTolerance = tol; }
inline int GetMouseTolerance() const { return m_mouseTolerance; }
inline wxList *GetShapeList() const { return m_shapeList; }
+ inline int GetCount() const { return m_shapeList->Number(); }
// Make sure all text that should be centred, is centred.
void RecentreAll(wxDC& dc);
#ifdef PROLOGIO
- // Prolog database stuff
virtual bool SaveFile(const wxString& filename);
virtual bool LoadFile(const wxString& filename);
wxList* m_shapeList;
};
+class wxLineCrossing: public wxObject
+{
+public:
+ wxLineCrossing() { m_lineShape1 = NULL; m_lineShape2 = NULL; }
+ wxRealPoint m_pt1; // First line
+ wxRealPoint m_pt2;
+ wxRealPoint m_pt3; // Second line
+ wxRealPoint m_pt4;
+ wxRealPoint m_intersect;
+ wxLineShape* m_lineShape1;
+ wxLineShape* m_lineShape2;
+};
+
+class wxLineCrossings: public wxObject
+{
+public:
+ wxLineCrossings();
+ ~wxLineCrossings();
+
+ void FindCrossings(wxDiagram& diagram);
+ void DrawCrossings(wxDiagram& diagram, wxDC& dc);
+ void ClearCrossings();
+
+public:
+ wxList m_crossings;
+};
+
#endif
// _OGL_OGLDIAG_H_