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.
__init__ |
Default class constructor. |
AdjustLeft |
Adjust a side. |
AdjustRight |
Adjust a side. |
AdjustTop |
Adjust a side. |
CalculateSize |
not implemented??? |
Divide |
Divide this division into two further divisions. |
EditEdge |
|
GetBottomSide |
Return the division on the bottom side of this division. |
GetHandleSide |
Return the side which the handle appears on. |
GetLeftSide |
Return the division on the left side of this division. |
GetLeftSideColour |
Return the colour used for drawing the left side of the division. |
GetLeftSidePen |
Return the pen used for drawing the left side of the division. |
GetLeftSideStyle |
Return the style used for the left side of the division. |
GetRightSide |
Return the division on the right side of this division. |
GetTopSide |
Return the division on the top side of this division. |
GetTopSideColour |
Return the colour used for drawing the top side of the division. |
GetTopSidePen |
Return the pen used for drawing the top side of the division. |
GetTopSideStyle |
Return the style used for the top side of the division. |
MakeControlPoints |
Make control points. |
MakeMandatoryControlPoints |
Make mandatory control points. |
OnBeginDragLeft |
The begin drag left handler. |
OnDragLeft |
The drag left handler. |
OnDraw |
The draw handler. |
OnDrawContents |
The draw contens handler. |
OnEndDragLeft |
The end drag left handler. |
OnMovePre |
The move ‘pre’ handler. |
OnRightClick |
The right click handler. |
PopupMenu |
Popup menu handler. |
ResetControlPoints |
Reset control points. |
ResetMandatoryControlPoints |
Reset mandatory control points. |
ResizeAdjoining |
Resize adjoining divisions at the given side. |
SetBottomSide |
Set the the division on the bottom side of this division. |
SetHandleSide |
Sets the side which the handle appears on. |
SetLeftSide |
Set the the division on the left side of this division. |
SetLeftSideColour |
Set the colour for drawing the left side of the division. |
SetLeftSidePen |
Set the colour for drawing the left side of the division. |
SetLeftSideStyle |
Set the left side style. |
SetRightSide |
Set the the division on the right side of this division. |
SetSize |
Set the size. |
SetTopSide |
Set the the division on the top side of this division. |
SetTopSideColour |
Set the colour for drawing the top side of the division. |
SetTopSidePen |
Set the colour for drawing the top side of the division. |
SetTopSideStyle |
Set the top side style. |
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.
__init__
(self)¶Default class constructor.
AdjustLeft
(self, left, test)¶Adjust a side.
Parameters: |
|
---|---|
Returns: | False if it’s not physically possible to adjust it to this point. |
AdjustRight
(self, right, test)¶Adjust a side.
Parameters: |
|
---|---|
Returns: | False if it’s not physically possible to adjust it to this point. |
AdjustTop
(self, top, test)¶Adjust a side.
Parameters: |
|
---|---|
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 or wx.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 contens 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: |
|
---|
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: |
|
---|
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 ??? |
---|