wx.lib.ogl.canvas.ShapeCanvas¶The ShapeCanvas class.
Methods Summary¶__init__ |
Default class constructor. |
AddShape |
Add a shape to canvas. |
Draw |
Update the buffer with the background and redraw the full diagram. |
FindShape |
Find shape at given position. |
GetDiagram |
Get the diagram associated with this canvas. |
GetQuickEditMode |
Get quick edit mode. |
InsertShape |
Insert a shape to canvas. |
OnBeginDragLeft |
not implemented??? |
OnBeginDragRight |
not implemented??? |
OnDragLeft |
not implemented??? |
OnDragRight |
not implemented??? |
OnEndDragLeft |
not implemented??? |
OnEndDragRight |
not implemented??? |
OnLeftClick |
not implemented??? |
OnMouseEvent |
The mouse event handler. |
OnPaint |
The paint handler, uses BufferedPaintDC to draw the |
OnRightClick |
not implemented??? |
OnSize |
The size handler, it initializes the buffer to the size of the window. |
Redraw |
Redraw the diagram. |
RemoveShape |
Remove a shape from canvas. |
SetDiagram |
Set the diagram associated with this canvas. |
Snap |
Snap ??? |
Class API¶ShapeCanvas(wx.ScrolledWindow)¶The ShapeCanvas class.
__init__(self, parent = None, id = -1, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.BORDER, name = "ShapeCanvas")¶Default class constructor.
Default class constructor.
| Parameters: |
|
|---|
AddShape(self, object, addAfter = None)¶Add a shape to canvas.
| Parameters: |
|
|---|
Draw(self)¶Update the buffer with the background and redraw the full diagram.
FindShape(self, x, y, info = None, notObject = None)¶Find shape at given position.
| Parameters: |
|
|---|
GetDiagram(self)¶Get the diagram associated with this canvas.
GetQuickEditMode(self)¶Get quick edit mode.
InsertShape(self, object)¶Insert a shape to canvas.
| Parameters: | object – the Shape instance to insert |
|---|
OnBeginDragLeft(self, x, y, keys = 0)¶not implemented???
OnBeginDragRight(self, x, y, keys = 0)¶not implemented???
OnDragLeft(self, draw, x, y, keys = 0)¶not implemented???
OnDragRight(self, draw, x, y, keys = 0)¶not implemented???
OnEndDragLeft(self, x, y, keys = 0)¶not implemented???
OnEndDragRight(self, x, y, keys = 0)¶not implemented???
OnLeftClick(self, x, y, keys = 0)¶not implemented???
OnMouseEvent(self, evt)¶The mouse event handler.
OnPaint(self, evt)¶The paint handler, uses BufferedPaintDC to draw the
buffer to the screen.
OnRightClick(self, x, y, keys = 0)¶not implemented???
OnSize(self, evt)¶The size handler, it initializes the buffer to the size of the window.
Redraw(self, dc)¶Redraw the diagram.
RemoveShape(self, object)¶Remove a shape from canvas.
| Parameters: | object – the Shape instance to be removed |
|---|
SetDiagram(self, diag)¶Set the diagram associated with this canvas.
| Parameters: | diag – an instance of Diagram |
|---|
Snap(self, x, y)¶Snap ???
| Parameters: |
|
|---|