wx.lib.ogl.canvas.ShapeCanvas¶
The ShapeCanvas
class.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
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 ??? |
Class API¶
- class ShapeCanvas(wx.ScrolledWindow)¶
The
ShapeCanvas
class.
Methods¶
- __init__(self, parent=None, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.BORDER, name='ShapeCanvas')¶
Default class constructor.
Default class constructor.
- Parameters:
parent (
wx.Window
) – parent windowid (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 platformsize (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 platformstyle (integer) – the underlying
wx.Window
stylename (str) – the window name
- AddShape(self, object, addAfter=None)¶
Add a shape to canvas.
- Parameters:
object – the
Shape
instance to addaddAfter – 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.
- Parameters:
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.
- 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:
x – the x position
y – the y position