IGraphicGroup

IGraphicGroup is a concrete class, derived from IGraphicHierarchy. IGraphicGroup provides a concrete class, derived from IGraphicHierarchy. IGraphicGroup implements a conglomeration of graphics as a tree structure. All children of the group are fully owned. This implementation is limited to the creation of Trees. DAGS are not yet supported. Later utilities may be provided for the support of DAGs.


IGraphicGroup - Member Functions and Data by Group

Constructors & Destructor

Use the constructors and destructor in this group to create and destroy objects of class IGraphicGroup.


[view class]
~IGraphicGroup
public:
virtual ~IGraphicGroup()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IGraphicGroup
This function constructs an object of class IGraphicsGroup.


Overload 1
public:
IGraphicGroup(IGrafBundle* adoptedBundle)
Use this constructor to create an IGraphicGroup that adopts the specified bundle.

adoptedBundle
The attribute bundle to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
Copy constructor.
public:
IGraphicGroup(const IGraphicGroup&)
Use this constructor to create an object of class IGraphicGroup that is copied from the given one.

const IGraphicGroup&
The graphic group to be copied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Default constructor.
public:
IGraphicGroup()
Use this constructor to create an IGraphicGroup object with zero bounds.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Adding and Removing Graphics to the Group

Use the functions in this group to change the graphics in the group. For example, you can use these functions to orphan, or release, the first, the last, or a specific IMGraphic object or to adopt an IMGraphic object as the first or the last child in the hierarchy.


[view class]
adoptFirst
public:
virtual void adoptFirst(IMGraphic* obj)
Adopts the specified IMGraphic as the first child in the hierarchy.

obj
The graphic object to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
adoptLast
public:
virtual void adoptLast(IMGraphic* obj)
Adopts the specified IMGraphic as the last child in the hierarchy.

obj
The graphic object to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphan
public:
virtual IMGraphic* orphan(const IMGraphic& obj)
Orphans the specified IMGraphic.

obj
The graphic object to be orphaned.

Return
The orphaned graphic object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanFirst
public:
virtual IMGraphic* orphanFirst()
Orphans the first child in the hierarchy.

None

Return
The orphaned graphic object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanLast
public:
virtual IMGraphic* orphanLast()
Orphans the last child in the hierarchy.

None

Return
The orphaned graphic object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Assignment Operator

Use the operator in this group to assign the given graphics group to the target one.


[view class]
operator =
public:
IGraphicGroup& operator =(const IGraphicGroup& source)
Assignment operator.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Creating a Graphics Group Iterator

Use the function in this group to create a graphics group iterator.


[view class]
createIterator
public:
virtual IGraphicIterator* createIterator() const
Creates a IGraphicGroupIterator that iterates this IGraphicGroup's children.

None

Return
An iterator.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining Bounding Information

Use the functions in this group to get the bounding information for the graphics group.


[view class]
geometricBounds
public:
virtual IGRect2D geometricBounds() const
Gets the bounding rectangle of the IGraphicHierarchy's geometry, without considering any area added by the bundle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
looseFitBounds
public:
virtual IGRect2D looseFitBounds(const IGrafPort* = 0) const
Returns the entire graphic's bounding rectangle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining Information About the Graphics Group

Use the functions in this group to obtain information about the graphics group, such as how many IMGraphics it contains or if it intersects a given given rectangle or ti obtain its IGrafMatrix.


[view class]
count
public:
virtual long count() const
Determines how many IMGraphics are in this IGraphicGroup.

None

Return
The number of graphic objects in this graphic group.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
intersects
public:
virtual bool intersects(const IGRect2D& rect) const
This function determines if the object intersects the given rectangle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
matrix
public:
const IGrafMatrix* matrix() const
Gets this IGraphicGroup's IGrafMatrix.

None

Return
The object's graphic transformation matrix.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Rendering the Group of Graphics

Use the function in this group to draw the group of graphics to the port.


[view class]
draw
public:
virtual void draw(IGrafPort& port) const
Draws the group of graphics to the given graphics port.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Streaming an Object In and Out

Use the functions in this group to stream the graphics group in from and out to the given stream.


[view class]
readFromStream
protected:
virtual void readFromStream(IDataStream& toWhere)
Reads a graphics group in from the given stream.

fromWhere
The stream from which the graphics group is read in.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
writeToStream
protected:
virtual void writeToStream(IDataStream& toWhere) const
Writes the IGraphicGroup object out the the stream specified by toWhere.

toWhere
The stream that the graphics group is written out to.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Testing the IGraphicGroup and IMDrawable Objects for Equality

Use the function in this group to determine whether the given IMDrawable object and the current IGraphicGroup objects are equal.


[view class]
operator ==
public:
virtual bool operator ==(const IMDrawable&) const
Tests this IGraphicGroup and IMDrawable for equality.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Transforming the Graphics Group

Use the function in this group to change the shape of the graphics and their positions.


[view class]
transformBy
public:
virtual void transformBy(const IGrafMatrix&)
Transforms the IGraphicGroups shape and position by applying the specified transformation matrix.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IGraphicGroup - Type Definitions


[view class]
GraphicDeque
typedef IVPtrDeque < IMGraphic * > GraphicDeque

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IGraphicGroup - Inherited Member Functions and Data

Inherited Public Functions

IGraphicHierarchy
IMDrawable
IMGraphic
IMStreamable

Inherited Public Data

Inherited Protected Functions

IGraphicHierarchy
IMDrawable
IMGraphic
IMStreamable

Inherited Protected Data