### 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.

~IGraphicGroup

      public:
      virtual ~IGraphicGroup()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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.

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

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

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

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

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.

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.

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.

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

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.

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

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

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.

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.

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

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.

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.

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

GraphicDeque

      typedef IVPtrDeque < IMGraphic * > GraphicDeque

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IGraphicGroup - Inherited Member Functions and Data

#### Inherited Public Functions

  IGraphicHierarchy

  -     virtual ~IGraphicHierarchy()

  -     virtual IGraphicIterator* createIterator() const = 0

  -     virtual void draw(IGrafPort&) const = 0

  -     virtual IGRect2D geometricBounds() const = 0

  -     virtual IGRect2D
          looseFitBounds( const IGrafPort* = 0 ) const = 0

  -     virtual void transformBy(const IGrafMatrix&) = 0

  IMDrawable

  -     virtual ~IMDrawable()

  -     bool operator !=(const IMDrawable&) const

  IMGraphic

  -     virtual ~IMGraphic()

  -     virtual void
          adoptAttributeState( IAttributeState* adoptedAttributeState )

  -     virtual void adoptBundle(IGrafBundle* adoptedBundle)

  -     virtual const IAttributeState* attributeState() const

  -     virtual const IGrafBundle* bundle() const

  -     virtual void draw(IGrafPort& port) const = 0

  -     IMGraphic()

  -     virtual IAttributeState* orphanAttributeState()

  -     virtual IGrafBundle* orphanBundle()

  -     virtual void
          rotateBy( GDegrees,
                    const IGPoint2D& centerOfRotation = IGPoint2D::origin ( ) )

  -     virtual void
          scaleBy( const IGPoint2D&,
                   const IGPoint2D& centerOfScale = IGPoint2D::origin ( ) )

  -     virtual void translateBy(const IGPoint2D&)

  IMStreamable

  -     virtual ~IMStreamable()

  -     void externalizeToStream(IDataStream& towhere) const

  -     void internalizeFromStream(IDataStream& fromwhere)

  -     virtual const ITypeRepresentation&
          typeRepresentation() const = 0

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IGraphicHierarchy

  -     IGraphicHierarchy(const IGraphicHierarchy&)

  -     IGraphicHierarchy(IGrafBundle* adoptBundle)

  -     IGraphicHierarchy()

  -     IGraphicHierarchy&
          operator =( const IGraphicHierarchy& source )

  IMDrawable

  -     IMDrawable(const IMDrawable&)

  -     IMDrawable()

  -     IMDrawable& operator =(const IMDrawable& source)

  IMGraphic

  -     IMGraphic(const IMGraphic&)

  -     IMGraphic(IGrafBundle* adoptedBundle)

  -     IMGraphic& operator =(const IMGraphic& source)

  -     virtual void resetTimeStamp()

  -     void setHit(bool flag)

  -     virtual void setTimeStamp(const unsigned long&)

  -     virtual unsigned long timeStamp() const

  -     virtual void updateTimeStamp()

  IMStreamable

  -     IMStreamable()

  -     IMStreamable(const IMStreamable& other)

  -     virtual void readFromStream(IDataStream& fromwhere) = 0

  -     virtual void writeToStream(IDataStream& towhere) const = 0

#### Inherited Protected Data

  - None