The ShapeCanvas
class.
Default class constructor. |
|
Add a shape to canvas. |
|
Update the buffer with the background and redraw the full diagram. |
|
Find shape at given position. |
|
Get the diagram associated with this canvas. |
|
Get quick edit mode. |
|
Insert a shape to canvas. |
|
not implemented??? |
|
not implemented??? |
|
not implemented??? |
|
not implemented??? |
|
not implemented??? |
|
not implemented??? |
|
not implemented??? |
|
The mouse event handler. |
|
The paint handler, uses |
|
not implemented??? |
|
The size handler, it initializes the buffer to the size of the window. |
|
Redraw the diagram. |
|
Remove a shape from canvas. |
|
Set the diagram associated with this canvas. |
|
Snap ??? |
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.
parent (wx.Window
) – parent window
id (integer) – window identifier. A value of -1 indicates a default value
pos (tuple or wx.Point
) – the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform
size (tuple or wx.Size
) – the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform
style (integer) – the underlying wx.Window
style
name (str) – the window name
AddShape
(self, object, addAfter = None)¶Add a shape to canvas.
object – the Shape
instance to add
addAfter – None or the Shape
after which
above shape is to be added.
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.
x – the x position
y – the y position
info – ???
notObject – ???
GetBuffer
(self)¶GetDiagram
(self)¶Get the diagram associated with this canvas.
GetQuickEditMode
(self)¶Get quick edit mode.
InsertShape
(self, object)¶Insert a shape to canvas.
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.
object – the Shape
instance to be removed
SetDiagram
(self, diag)¶Set the diagram associated with this canvas.
diag – an instance of Diagram
Snap
(self, x, y)¶Snap ???
x – the x position
y – the y position