Phoenix Logo

phoenix_title wx.lib.ogl.divided.DividedShape

A DividedShape is a rectangle with a number of vertical divisions. Each division may have its text formatted with independent characteristics, and the size of each division relative to the whole image may be specified.


class_hierarchy Class Hierarchy

Inheritance diagram for class DividedShape:

method_summary Methods Summary

__init__ Default class constructor.
AttachmentIsValid Is the attachment valid?
EditRegions Edit the region colours and styles. Not implemented.
GetAttachmentPosition Get the attachment position.
GetNumberOfAttachments Get the number of attachments.
MakeControlPoints Make the control points.
MakeMandatoryControlPoints Make the mandatory control points.
OnDraw The draw handler.
OnDrawContents The draw contents handler.
OnRightClick The right click handler.
ResetControlPoints Reset the control points.
ResetMandatoryControlPoints Reset the mandatory control points.
SetRegionSizes Set all region sizes according to proportions and this object
SetSize Set the size.

api Class API



class DividedShape(RectangleShape)

A DividedShape is a rectangle with a number of vertical divisions. Each division may have its text formatted with independent characteristics, and the size of each division relative to the whole image may be specified.


Methods



__init__(self, w, h)

Default class constructor.

Parameters:
  • w – width of rectangle
  • h – heigth of rectangle


AttachmentIsValid(self, attachment)

Is the attachment valid?

Parameters:attachment – the attachment


EditRegions(self)

Edit the region colours and styles. Not implemented.



GetAttachmentPosition(self, attachment, nth = 0, no_arcs = 1, line = None)

Get the attachment position.

Attachment points correspond to regions in the divided box.

Parameters:
  • attachment – the attachment ???
  • nth – get nth attachment ???
  • no_arcs – ???
  • line – ???


GetNumberOfAttachments(self)

Get the number of attachments.

There are two attachments for each region (left and right), plus one on the top and one on the bottom.



MakeControlPoints(self)

Make the control points.



MakeMandatoryControlPoints(self)

Make the mandatory control points.



OnDraw(self, dc)

The draw handler.



OnDrawContents(self, dc)

The draw contents handler.



OnRightClick(self, x, y, keys = 0, attachment = 0)

The right click handler.



ResetControlPoints(self)

Reset the control points.

Note

May only have the region handles, (n - 1) of them



ResetMandatoryControlPoints(self)

Reset the mandatory control points.



SetRegionSizes(self)

Set all region sizes according to proportions and this object total size.



SetSize(self, w, h, recursive = True)

Set the size.

Parameters:
  • w – width of rectangle
  • h – heigth of rectangle
  • recursive – not implemented