## wxCompositeShape

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

Derived from

wxRectangleShape

See also

wxCompositeShape overview

Members

wxCompositeShape::wxCompositeShape
wxCompositeShape::~wxCompositeShape
wxCompositeShape::AddChild
wxCompositeShape::AddConstraint
wxCompositeShape::CalculateSize
wxCompositeShape::ContainsDivision
wxCompositeShape::DeleteConstraint
wxCompositeShape::DeleteConstraintsInvolvingChild
wxCompositeShape::FindConstraint
wxCompositeShape::FindContainerImage
wxCompositeShape::GetConstraints
wxCompositeShape::GetDivisions
wxCompositeShape::MakeContainer
wxCompositeShape::OnCreateDivision
wxCompositeShape::Recompute
wxCompositeShape::RemoveChild

### wxCompositeShape::wxCompositeShape

wxCompositeShape()

Constructor.

### wxCompositeShape::~wxCompositeShape

~wxCompositeShape()

Destructor.

### wxCompositeShape::AddChild

void AddChild(wxShape *child, wxShape *addAfter = NULL)

Adds a child shape to the composite. If addAfter is non-NULL, the shape will be added after this shape.

### wxCompositeShape::AddConstraint

wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint)

wxOGLConstraint * AddConstraint(int type, wxShape *constraining, wxList&constrained)

wxOGLConstraint * AddConstraint(int type, wxShape *constraining, wxShape *constrained)

Adds a constraint to the composite.

### wxCompositeShape::CalculateSize

void CalculateSize()

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

### wxCompositeShape::ContainsDivision

bool FindContainerImage(wxDivisionShape *division)

Returns TRUE if division is a descendant of this container.

### wxCompositeShape::DeleteConstraint

void DeleteConstraint(wxOGLConstraint *constraint)

Deletes constraint from composite.

### wxCompositeShape::DeleteConstraintsInvolvingChild

void DeleteConstraintsInvolvingChild(wxShape *child)

This function deletes constraints which mention the given child. Used when deleting a child from the composite.

### wxCompositeShape::FindConstraint

wxOGLConstraint * FindConstraint(long id, wxCompositeShape **actualComposite)

Finds the constraint with the given id, also returning the actual composite the constraint was in, in case that composite was a descendant of this composite.

### wxCompositeShape::FindContainerImage

wxShape * FindContainerImage()

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

### wxCompositeShape::GetConstraints

wxList& GetConstraints() const

Returns a reference to the list of constraints.

### wxCompositeShape::GetDivisions

wxList& GetDivisions() const

Returns a reference to the list of divisions.

### wxCompositeShape::MakeContainer

void MakeContainer()

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

### wxCompositeShape::OnCreateDivision

wxDivisionShape * OnCreateDivision()

Called when a new division shape is required. Can be overriden to allow an application to use a different class of division.

### wxCompositeShape::Recompute

bool Recompute()

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

### wxCompositeShape::RemoveChild

void RemoveChild(wxShape *child)

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