IpeGroup Class Reference
[Ipe Objects]

The group object. More...

Inherits IpeFillable.

List of all members.

Public Types

Public Member Functions


Detailed Description

The group object.

Ipe objects can be grouped together, and the resulting composite can be used like any Ipe object.

This is an application of the "Composite" pattern.


Constructor & Destructor Documentation

IpeGroup::IpeGroup (  )  [explicit]

Create empty group (objects added later).

IpeGroup::IpeGroup ( IpeRepository rep,
const IpeXmlAttributes attr 
) [explicit]

Create empty group with these attributes (objects added later).

IpeGroup::IpeGroup ( const IpeGroup rhs  ) 

Copy constructor. Constant time --- components are not copied!

IpeGroup::~IpeGroup (  )  [virtual]

Destructor.


Member Function Documentation

IpeGroup & IpeGroup::operator= ( const IpeGroup rhs  ) 

Assignment operator (constant-time).

IpeObject * IpeGroup::Clone (  )  const [virtual]

Clone a group object (constant-time).

Implements IpeObject.

IpeGroup * IpeGroup::AsGroup (  )  [virtual]

Return pointer to this object.

Reimplemented from IpeObject.

IpeObject::TPinned IpeGroup::pinned (  )  const [virtual]

Return pinning mode of the object.

Reimplemented from IpeObject.

void IpeGroup::Accept ( IpeVisitor visitor  )  const [virtual]

Call VisitGroup of visitor.

Implements IpeObject.

void IpeGroup::SaveAsXml ( IpePainter painter,
IpeStream stream,
IpeString  layer 
) const [virtual]

Save the object in XML format.

Implements IpeObject.

void IpeGroup::Draw ( IpePainter painter  )  const [virtual]

Draw the object.

Implements IpeObject.

void IpeGroup::AddToBBox ( IpeRect box,
const IpeMatrix m 
) const [virtual]

Extend box to include the object transformed by m.

For Ipe objects in a page, don't call this directly. The IpePgObject caches the bounding box, so it is far more efficient to call IpePgObject::BBox.

If called with an empty box, the result of this function is a tight bounding box for the object, with a little leeway in case the boundary is determined by a spline (it has to be approximated to perform this operation).

Implements IpeObject.

double IpeGroup::Distance ( const IpeVector v,
const IpeMatrix m,
double  bound 
) const [virtual]

Return distance of transformed object to point v. If larger than bound, can just return bound.

Implements IpeObject.

void IpeGroup::SnapVtx ( const IpeVector mouse,
const IpeMatrix m,
IpeVector pos,
double &  bound 
) const [virtual]

Compute possible vertex snapping position for transformed object.

Looks only for positions closer than bound. If successful, modify pos and bound.

Implements IpeObject.

void IpeGroup::SnapBnd ( const IpeVector mouse,
const IpeMatrix m,
IpeVector pos,
double &  bound 
) const [virtual]

Compute boundary snapping position for transformed object.

Looks only for positions closer than bound. If successful, modify pos and bound. The default implementation does nothing.

Reimplemented from IpeObject.

int IpeGroup::size (  )  const [inline]

Return number of component objects.

const_iterator IpeGroup::begin (  )  const [inline]

Return iterator for first object.

const_iterator IpeGroup::end (  )  const [inline]

Return iterator for end of sequence.

void IpeGroup::push_back ( const IpeObject obj  ) 

Add an object.

This will panic if the object shares its implementation! The method is only useful right after construction of the group.

void IpeGroup::SaveComponentsAsXml ( IpePainter painter,
IpeStream stream 
) const

Save all the components, one by one, in XML format.

void IpeGroup::CheckStyle ( const IpeStyleSheet sheet,
IpeAttributeSeq seq 
) const [virtual]

Check all symbolic attributes.

Reimplemented from IpeFillable.

IpeAttribute IpeGroup::TextSize (  )  const [inline]

Return font size of text objects in the group.

IpeAttribute IpeGroup::MarkSize (  )  const [inline]

Return size of mark objects in the group.

int IpeGroup::MarkShape (  )  const [inline]

Return shape of mark objects in the group.

bool IpeGroup::HasTexts (  )  const [inline]

Does this group contain any text objects?

bool IpeGroup::HasMarks (  )  const [inline]

Does this group contain any mark objects?

void IpeGroup::SetTextSize ( IpeAttribute  size  ) 

Set font size of text objects in the group.

This is a no op if there are no text objects in the group. It invalidates (and destroys) the XForms stored with all text objects in the group.

void IpeGroup::SetMarkSize ( IpeAttribute  size  ) 

Set size of mark objects in the group.

This is a no op if there are no mark objects in the group.

void IpeGroup::SetMarkShape ( int  shape  ) 

Set shape of mark objects in the group.

This is a no op if there are no mark objects in the group.


The documentation for this class was generated from the following files: