Package wx :: Package lib :: Package ogl :: Class CompositeShape
[frames | no frames]

Type CompositeShape

     object --+            
              |            
ShapeEvtHandler --+        
                  |        
              Shape --+    
                      |    
         RectangleShape --+
                          |
                         CompositeShape

Known Subclasses:
DivisionShape

This is an object with a list of child objects, and a list of size and positioning constraints between the children.

Derived from:
wxRectangleShape

Method Summary
  __init__(self)
  AddChild(self, child, addAfter)
Adds a child shape to the composite.
  AddConstraint(self, constraint)
Adds a constraint to the composite.
  AddSimpleConstraint(self, type, constraining, constrained)
Add a constraint of the given type to the composite.
  CalculateSize(self)
Calculates the size and position of the composite based on child sizes and positions.
  Constrain(self)
  ContainsDivision(self, division)
Returns TRUE if division is a descendant of this container.
  Delete(self)
Fully disconnect this shape from parents, children, the canvas, etc.
  DeleteConstraint(self, constraint)
Deletes constraint from composite.
  DeleteConstraintsInvolvingChild(self, child)
This function deletes constraints which mention the given child.
  FindConstraint(self, cId)
Finds the constraint with the given id.
  FindContainerImage(self)
Finds the image used to visualize a container.
  GetConstraints(self)
Return the list of constraints.
  GetDivisions(self)
Return the list of divisions.
  MakeContainer(self)
Makes this composite into a container by creating one child DivisionShape.
  OnBeginDragLeft(self, x, y, keys, attachment)
  OnCreateDivision(self)
  OnDragLeft(self, draw, x, y, keys, attachment)
  OnDraw(self, dc)
  OnDrawContents(self, dc)
  OnEndDragLeft(self, x, y, keys, attachment)
  OnErase(self, dc)
  OnMovePre(self, dc, x, y, old_x, old_y, display)
  OnRightClick(self, x, y, keys, attachment)
  Recompute(self)
Recomputes any constraints associated with the object.
  RemoveChild(self, child)
Removes the child from the composite and any constraint relationships, but does not delete the child.
  RemoveChildFromConstraints(self, child)
  SetSize(self, w, h, recursive)

Class Variable Summary

Method Details

AddChild(self, child, addAfter=None)

Adds a child shape to the composite.

If addAfter is not None, the shape will be added after this shape.

AddConstraint(self, constraint)

Adds a constraint to the composite.

AddSimpleConstraint(self, type, constraining, constrained)

Add a constraint of the given type to the composite.

constraining is the shape doing the constraining constrained is a list of shapes being constrained

CalculateSize(self)

Calculates the size and position of the composite based on child sizes and positions.

ContainsDivision(self, division)

Returns TRUE if division is a descendant of this container.

Delete(self)

Fully disconnect this shape from parents, children, the canvas, etc.

Overrides:
wx.lib.ogl.Shape.Delete

DeleteConstraint(self, constraint)

Deletes constraint from composite.

DeleteConstraintsInvolvingChild(self, child)

This function deletes constraints which mention the given child.

Used when deleting a child from the composite.

FindConstraint(self, cId)

Finds the constraint with the given id.

Returns a tuple of the constraint and the actual composite the constraint was in, in case that composite was a descendant of this composit.

Returns None if not found.

FindContainerImage(self)

Finds the image used to visualize a container. This is any child of the composite that is not in the divisions list.

GetConstraints(self)

Return the list of constraints.

GetDivisions(self)

Return the list of divisions.

MakeContainer(self)

Makes this composite into a container by creating one child DivisionShape.

Recompute(self)

Recomputes any constraints associated with the object. If FALSE is returned, the constraints could not be satisfied (there was an inconsistency).

Overrides:
wx.lib.ogl.Shape.Recompute

RemoveChild(self, child)

Removes the child from the composite and any constraint relationships, but does not delete the child.


Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:20 2007 http://epydoc.sf.net