A canvas for drawing diagrams on.
Derived from
wxScrolledWindow
See also
Members
wxShapeCanvas::wxShapeCanvas
wxShapeCanvas::~wxShapeCanvas
wxShapeCanvas::AddShape
wxShapeCanvas::FindShape
wxShapeCanvas::FindFirstSensitiveShape
wxShapeCanvas::GetDiagram
wxShapeCanvas::GetGridSpacing
wxShapeCanvas::GetMouseTolerance
wxShapeCanvas::GetShapeList
wxShapeCanvas::GetQuickEditMode
wxShapeCanvas::InsertShape
wxShapeCanvas::OnBeginDragLeft
wxShapeCanvas::OnBeginDragRight
wxShapeCanvas::OnEndDragLeft
wxShapeCanvas::OnEndDragRight
wxShapeCanvas::OnDragLeft
wxShapeCanvas::OnDragRight
wxShapeCanvas::OnLeftClick
wxShapeCanvas::OnRightClick
wxShapeCanvas::Redraw
wxShapeCanvas::RemoveShape
wxShapeCanvas::SetDiagram
wxShapeCanvas::Snap
wxShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBORDER)
Constructor.
~wxShapeCanvas()
Destructor.
void AddShape(wxShape *shape, wxShape *addAfter = NULL)
Adds a shape to the diagram. If addAfter is non-NULL, the shape will be added after this one.
wxShape * FindShape(double x1, double y, int *attachment, wxClassInfo *info = NULL, wxShape *notImage = NULL)
Find a shape under this mouse click. Returns the shape (or NULL), and the nearest attachment point.
If info is non-NULL, a shape whose class which is a descendant of the desired class is found.
If notImage is non-NULL, shapes which are descendants of notImage are ignored.
wxShape * FindFirstSensitiveShape(double x1, double y, int *attachment, int op)
Finds the first sensitive shape whose sensitivity filter matches op, working up the hierarchy of composites until one (or none) is found.
wxDiagram* GetDiagram() const
Returns the canvas associated with this diagram.
double GetGridSpacing() const
Returns the grid spacing.
int GetMouseTolerance() const
Returns the tolerance within which a mouse move is ignored.
wxList* GetShapeList() const
Returns a pointer to the internal shape list.
bool GetQuickEditMode() const
Returns quick edit mode for the associated diagram.
void InsertShape(wxShape* shape)
Inserts a shape at the front of the shape list.
void OnBeginDragLeft(double x, double y, int keys = 0)
Called when the start of a left-button drag event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
keys is a bit list of the following:
See also wxShapeCanvas::OnDragLeft, wxShapeCanvas::OnEndDragLeft.
void OnBeginDragRight(double x, double y, int keys = 0)
Called when the start of a right-button drag event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
keys is a bit list of the following:
See also wxShapeCanvas::OnDragRight, wxShapeCanvas::OnEndDragRight.
void OnEndDragLeft(double x, double y, int keys = 0)
Called when the end of a left-button drag event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
keys is a bit list of the following:
See also wxShapeCanvas::OnDragLeft, wxShapeCanvas::OnBeginDragLeft.
void OnEndDragRight(double x, double y, int keys = 0)
Called when the end of a right-button drag event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
keys is a bit list of the following:
See also wxShapeCanvas::OnDragRight, wxShapeCanvas::OnBeginDragRight.
void OnDragLeft(bool draw, double x, double y, int keys = 0)
Called when a left-button drag event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
draw is alternately TRUE and FALSE, to assist drawing and erasing.
keys is a bit list of the following:
See also wxShapeCanvas::OnBeginDragLeft, wxShapeCanvas::OnEndDragLeft.
void OnDragRight(bool draw, double x, double y, int keys = 0)
Called when a right-button drag event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
draw is alternately TRUE and FALSE, to assist drawing and erasing.
keys is a bit list of the following:
See also wxShapeCanvas::OnBeginDragRight, wxShapeCanvas::OnEndDragRight.
void OnLeftClick(double x, double y, int keys = 0)
Called when a left click event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
keys is a bit list of the following:
void OnRightClick(double x, double y, int keys = 0)
Called when a right click event on the canvas background is detected by OnEvent. You may override this member; by default it does nothing.
keys is a bit list of the following:
void Redraw()
Calls wxDiagram::Redraw.
void RemoveShape(wxShape *shape)
Calls wxDiagram::RemoveShape.
void SetDiagram(wxDiagram *diagram)
Sets the diagram associated with this diagram.
void Snap(double *x, double *y)
Calls wxDiagram::Snap.