### IGraphicHierarchy

  IGraphicHierarchy is an abstract base class that defines a hierarchy protocol. This is the only class that has the protocol for creating an iterator which allows hierarchies to traverse themselves. All clients must define their own set of hierarchies using this abstract base class as its parent class.

### IGraphicHierarchy - Member Functions and Data by Group

### Constructors & Destructor

This group contains the constructors and destructor that create and destroy objects of class IGraphicHierarchy.

~IGraphicHierarchy

      public:
      virtual ~IGraphicHierarchy()

  Destroy's the IGraphicHierarchy object.

Supported Platforms

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

IGraphicHierarchy

  Overload 1
  Constructs an IGraphicHierarchy from a graph bundle.

      protected:
      IGraphicHierarchy(IGrafBundle* adoptBundle)

  adoptBundle
    The graph bundle.

Supported Platforms

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

  Overload 2
  Protected copy constructor.

      protected:
      IGraphicHierarchy(const IGraphicHierarchy&)

Supported Platforms

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

  Overload 3
  Protected default constructor.

      protected:
      IGraphicHierarchy()

Supported Platforms

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

### Assignment Operator

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

operator =

      protected:
      IGraphicHierarchy&
        operator =( const IGraphicHierarchy& source )

  Assignment Operator.

  source
    The object to be copied from.

Supported Platforms

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

### Creating an Iterator

Use the function in this group to create an IGraphicHierarchy iterator.

createIterator

      public:
      virtual IGraphicIterator* createIterator() const = 0

  Creates a IGraphicIterator which iterates through the first level of the hierarchy.

  None

Return
  A graphic iterator for the first level of this hierarchy.

Supported Platforms

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

### Obtaining Bounding Information

Use the functions in this group to get the objects bounding rectangle.

geometricBounds

      public:
      virtual IGRect2D geometricBounds() const = 0

  Gets the bounding rectangle of the IGraphicHierarchy's geometry, without considering any area added by the bundle.

  None

Return
  Returns the bounding rectangle, which is the smallest axis-aligned rectangle that encloses the graphic hierarchy's geometry.

Supported Platforms

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

looseFitBounds

      public:
      virtual IGRect2D
        looseFitBounds( const IGrafPort* = 0 ) const = 0

  Returns the entire graphic's bounding rectangle, taking into account the bundle information.

  IGrafPort
    The graphics port used for accessing hierarchical bundles.

Return
  The bounding rectangle, which is the smallest axis-aligned rectangle that encloses the entire graphic, including any area added by the pen.

Supported Platforms

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

### Rendering the Graphic

Use the function in this group to draw the object to the port.

draw

      public:
      virtual void draw(IGrafPort&) const = 0

  Draws the IGraphicHierarchy to the specific IGrafPort.

  IGrafPort&
    The port to which drawing should go. The port in turn invokes rendering on a particular IGrafDevice

Supported Platforms

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

### Streaming an Object In and Out

Use the functions in this group to stream the object in and out.

readFromStream

      protected:
      virtual void readFromStream(IDataStream& toWhere)

  Reads the object in from the specified stream.

  fromStream
    The stream from which the object is read in.

Supported Platforms

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

writeToStream

      protected:
      virtual void writeToStream(IDataStream& toWhere) const

  Writes the object out to the specified stream.

  toWhere
    The stream to which the object is written out.

Supported Platforms

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

### Testing an IGraphicHierarchy and an IMDrawable Object for Equality

Use the functions in this group to test the IGraphicHierarchy with an IMDrawable object for equality.

operator ==

      public:
      virtual bool operator ==(const IMDrawable&) const

  Tests the IGraphicHierarchy and the IMDrawable for equality. The base class only tests whether the two bundles have equal contents.

  IMDrawable
    A constant reference to the IMDrawable to be compared with this one.

Return
  True if this IGraphicHierarchy and the argument have equal bundles.

Supported Platforms

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

### Transforming the IGraphicHierarchy

Use the function in this group to transform the shape of the object or change its position.

transformBy

      public:
      virtual void transformBy(const IGrafMatrix&) = 0

  Transforms the IGraphicHierarchy's shape and position by applying the specified transformation matrix.

  IGrafMatrix
    A constant reference to the transformation matrix by which the graphic hierarchy's points are multiplied.

Supported Platforms

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

### IGraphicHierarchy - Inherited Member Functions and Data

#### Inherited Public Functions

  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 IGRect2D looseFitBounds(const IGrafPort* = 0) const

  -     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

  IMDrawable

  -     IMDrawable()

  -     IMDrawable(const 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(const IMStreamable& other)

  -     IMStreamable()

  -     virtual void readFromStream(IDataStream& fromwhere) = 0

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

#### Inherited Protected Data

  - None