wx.lib.ogl.composit.DivisionShape¶
A DivisionShape
class is a composite with special properties,
to be used for containment. It’s a subdivision of a container.
A containing node image consists of a composite with a main child shape
such as rounded rectangle, plus a list of division objects.
It needs to be a composite because a division contains pieces
of diagram.
Note
A container has at least one wxDivisionShape for consistency. This can be subdivided, so it turns into two objects, then each of these can be subdivided, etc.
Class Hierarchy¶
Known Superclasses¶
wx.lib.ogl.composit.CompositeShape
Methods Summary¶
Default class constructor. |
|
Adjust a side. |
|
Adjust a side. |
|
Adjust a side. |
|
not implemented??? |
|
Divide this division into two further divisions. |
|
Return the division on the bottom side of this division. |
|
Return the side which the handle appears on. |
|
Return the division on the left side of this division. |
|
Return the colour used for drawing the left side of the division. |
|
Return the pen used for drawing the left side of the division. |
|
Return the style used for the left side of the division. |
|
Return the division on the right side of this division. |
|
Return the division on the top side of this division. |
|
Return the colour used for drawing the top side of the division. |
|
Return the pen used for drawing the top side of the division. |
|
Return the style used for the top side of the division. |
|
Make control points. |
|
Make mandatory control points. |
|
The begin drag left handler. |
|
The drag left handler. |
|
The draw handler. |
|
The draw contents handler. |
|
The end drag left handler. |
|
The move ‘pre’ handler. |
|
The right click handler. |
|
Popup menu handler. |
|
Reset control points. |
|
Reset mandatory control points. |
|
Resize adjoining divisions at the given side. |
|
Set the the division on the bottom side of this division. |
|
Sets the side which the handle appears on. |
|
Set the the division on the left side of this division. |
|
Set the colour for drawing the left side of the division. |
|
Set the colour for drawing the left side of the division. |
|
Set the left side style. |
|
Set the the division on the right side of this division. |
|
Set the size. |
|
Set the the division on the top side of this division. |
|
Set the colour for drawing the top side of the division. |
|
Set the colour for drawing the top side of the division. |
|
Set the top side style. |
Class API¶
- class DivisionShape(CompositeShape)¶
A
DivisionShape
class is a composite with special properties, to be used for containment. It’s a subdivision of a container. A containing node image consists of a composite with a main child shape such as rounded rectangle, plus a list of division objects. It needs to be a composite because a division contains pieces of diagram.Note
A container has at least one wxDivisionShape for consistency. This can be subdivided, so it turns into two objects, then each of these can be subdivided, etc.
Methods¶
- __init__(self)¶
Default class constructor.
- AdjustLeft(self, left, test)¶
Adjust a side.
- Parameters:
left – desired left position ???
test – if True just a test
- Returns:
False if it’s not physically possible to adjust it to this point.
- AdjustRight(self, right, test)¶
Adjust a side.
- Parameters:
right – desired right position ???
test – if True just a test
- Returns:
False if it’s not physically possible to adjust it to this point.
- AdjustTop(self, top, test)¶
Adjust a side.
- Parameters:
top – desired top position ???
test – if True just a test
- Returns:
False if it’s not physically possible to adjust it to this point.
- CalculateSize(self)¶
not implemented???
- Divide(self, direction)¶
Divide this division into two further divisions.
- Parameters:
direction –
wx.HORIZONTAL
for horizontal orwx.VERTICAL
for vertical division.
- EditEdge(self, side)¶
- GetBottomSide(self)¶
Return the division on the bottom side of this division.
- GetHandleSide(self)¶
Return the side which the handle appears on.
- GetLeftSide(self)¶
Return the division on the left side of this division.
- GetLeftSideColour(self)¶
Return the colour used for drawing the left side of the division.
- GetLeftSidePen(self)¶
Return the pen used for drawing the left side of the division.
- GetLeftSideStyle(self)¶
Return the style used for the left side of the division.
- GetRightSide(self)¶
Return the division on the right side of this division.
- GetTopSide(self)¶
Return the division on the top side of this division.
- GetTopSideColour(self)¶
Return the colour used for drawing the top side of the division.
- GetTopSidePen(self)¶
Return the pen used for drawing the top side of the division.
- GetTopSideStyle(self)¶
Return the style used for the top side of the division.
- MakeControlPoints(self)¶
Make control points.
- MakeMandatoryControlPoints(self)¶
Make mandatory control points.
- OnBeginDragLeft(self, x, y, keys=0, attachment=0)¶
The begin drag left handler.
- OnDragLeft(self, draw, x, y, keys=0, attachment=0)¶
The drag left handler.
- OnDraw(self, dc)¶
The draw handler.
- OnDrawContents(self, dc)¶
The draw contents handler.
- OnEndDragLeft(self, x, y, keys=0, attachment=0)¶
The end drag left handler.
- OnMovePre(self, dc, x, y, oldx, oldy, display=True)¶
The move ‘pre’ handler.
- OnRightClick(self, x, y, keys=0, attachment=0)¶
The right click handler.
- PopupMenu(self, x, y)¶
Popup menu handler.
- ResetControlPoints(self)¶
Reset control points.
- ResetMandatoryControlPoints(self)¶
Reset mandatory control points.
- ResizeAdjoining(self, side, newPos, test)¶
Resize adjoining divisions at the given side.
- Parameters:
side – can be one of
Side option
Description
DIVISION_SIDE_NONE
no side
DIVISION_SIDE_LEFT
Left side
DIVISION_SIDE_TOP
Top side
DIVISION_SIDE_RIGHT
Right side
DIVISION_SIDE_BOTTOM
Bottom side
- Parameters:
newPos – new position
test – if True, just see whether it’s possible for each adjoining region, returning False if it’s not.
- SetBottomSide(self, shape)¶
Set the the division on the bottom side of this division.
- SetHandleSide(self, side)¶
Sets the side which the handle appears on.
- Parameters:
side – Either DIVISION_SIDE_LEFT or DIVISION_SIDE_TOP.
- SetLeftSide(self, shape)¶
Set the the division on the left side of this division.
- SetLeftSideColour(self, colour)¶
Set the colour for drawing the left side of the division.
- SetLeftSidePen(self, pen)¶
Set the colour for drawing the left side of the division.
- SetLeftSideStyle(self, style)¶
Set the left side style.
- Parameters:
style – valid values ???
- SetRightSide(self, shape)¶
Set the the division on the right side of this division.
- SetSize(self, w, h, recursive=True)¶
Set the size.
- Parameters:
w – the width
h – the height
recursive – True recurse all children
- SetTopSide(self, shape)¶
Set the the division on the top side of this division.
- SetTopSideColour(self, colour)¶
Set the colour for drawing the top side of the division.
- SetTopSidePen(self, pen)¶
Set the colour for drawing the top side of the division.
- SetTopSideStyle(self, style)¶
Set the top side style.
- Parameters:
style – valid values ???