Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TGraphicHierarchy
Inherited By:
None.
Purpose:
TGraphicGroup is a concrete class, derived from TGraphicHierarchy, that implements a conglomeration of graphics as a tree structure. This class does not currently support non-tree data structures, such as Directed Acyclic Graphs (DAGs). A TGraphicGroup fully owns all of the MGraphics in its hierarchy: deleting the TGraphicGroup also deletes all its MGraphics.
TGraphicGroup creates a shallow iterator which traverses only one level of a tree structure. To iterate through the entire hierarchy of a TGraphicGroup, create the iterators recursively. In other words, use the TGraphicIterator member functions to access each node, creating a new iterator and traversing the hierarchy at that node.
TGraphicGroup has a transformation matrix that is used for transforming each MGraphic in the hierarchy when the MGraphic is rendered. Each time you invoke TGraphicGroup::TransformBy, the TGraphicGroup concatenates the specified matrix with the existing matrix.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TGraphicGroup ()
- TGraphicGroup (const TGraphicGroup &)
- TGraphicGroup (TGrafBundle * adoptedBundle)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Constructs a TGraphicGroup and adopts the specified bundle.
Calling Context:
- Called by the stream-in operators. You can also call this function directly.
- Called to copy an object.
- Call this function directly.
Parameters:
- Takes no parameters.
- const TGraphicGroup & -The graphic group to be copied.
- TGrafBundle * adoptedBundle -The attribute bundle to be adopted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TGraphicGroup ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::AdoptLast
virtual void AdoptLast (MGraphic * obj)
Interface Category:
API.
Purpose:
Adopts the specified MGraphic as the last child in the hierarchy.
Calling Context:
Call this function directly.
Parameters:
- MGraphic * obj -The graphic object to be adopted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::AdoptFirst
virtual void AdoptFirst (MGraphic * obj)
Interface Category:
API.
Purpose:
Adopts the specified MGraphic as the first child in the hierarchy.
Calling Context:
Call this function directly.
Parameters:
- MGraphic * obj -The graphic object to be adopted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual MGraphic * Orphan (const MGraphic & obj)
Interface Category:
API.
Purpose:
Orphans the specified MGraphic.
Calling Context:
Call this function directly.
Parameters:
- const MGraphic & obj -The graphic object to be orphaned.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::OrphanLast
virtual MGraphic * OrphanLast ()
Interface Category:
API.
Purpose:
Orphans the last child in the hierarchy.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::OrphanFirst
virtual MGraphic * OrphanFirst ()
Interface Category:
API.
Purpose:
Orphans the first child in the hierarchy.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Count () const
Interface Category:
API.
Purpose:
Determines how many MGraphics are in this TGraphicGroup.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the number of graphic objects in this graphic group.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::CreateIterator
virtual TGraphicIterator * CreateIterator () const
Interface Category:
API.
Purpose:
Creates a TGraphicGroupIterator that iterates this TGraphicGroup's children. Note: the iterator only iterates one level deep.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns an iterator.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws this TGraphicGroup, by iterating on all its children, using the specified TGrafPort.
Calling Context:
Call this function directly. It also calls itself recursively as it descends through the hierarchy.
Parameters:
- TGrafPort & port -The grafport used to render the graphic group.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::GetGeometricBounds
virtual TGRect GetGeometricBounds () const
Interface Category:
API.
Purpose:
Gets the rectangular bounds (as a TGRect) of this TGraphicGroup without the influence of the GrafBundle.
Calling Context:
Called during hit detection. You can also call this function directly.
Parameters:
Return Value:
Returns the rectangle that bounds the underlying geometry of this graphic group.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::GetLooseFitBounds
virtual TGRect GetLooseFitBounds (const TGrafPort* =NIL) const
Interface Category:
API.
Purpose:
Gets the rectangular bounds (as a TGRect) of this TGraphicGroup, taking into consideration the influence of the GrafBundle.
Calling Context:
Call this function directly.
Parameters:
- const TGrafPort * =NIL -The graphics port used for accessing hierarchical bundles.
Return Value:
Returns the rectangle that bounds this graphic group loosely.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::GetMatrix
const TGrafMatrix * GetMatrix () const
Interface Category:
API.
Purpose:
Gets this TGraphicGroup's TGrafMatrix.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the object's graphic transformation matrix.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::TransformBy
virtual void TransformBy (const TGrafMatrix &)
Interface Category:
API.
Purpose:
Concatenates the specified matrix with the existing matrix. The concatenated matrix is used to transform the entire group.
Calling Context:
Call this function directly.
Parameters:
- const TGrafMatrix & -The matrix to be concatenated with the graphic group's matrix.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::operator=
TGraphicGroup & operator =(const TGraphicGroup & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
Returns a const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::operator==
bool operator ==(const TGraphicGroup & source) const
Interface Category:
API.
Purpose:
Tests two TGraphicGroups for equality, by determining whether all the MGraphics in their hierarchies are equal.
Calling Context:
Call this function by using the operator in an expression.
Parameters:
- const TGraphicGroup & source -The graphic group to be compared with this one.
Return Value:
Returns true if the hierarchies of this graphic group and the parameter are equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::operator!=
bool operator != (const TGraphicGroup & source) const
Interface Category:
API.
Purpose:
Tests two TGraphicGroups for inequality, by determining whether all the MGraphics in their hierarchies are different.
Calling Context:
Call this function by using the operator in an expression.
Parameters:
- const TGraphicGroup & source -The graphic group to be compared with this one.
Return Value:
Returns true if the hierarchies of this graphic group and the argument are not equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::operator>>=
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream that the object is streamed out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::operator<<=
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream that the object is streamed in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup::operatorTGraphicGroup*
virtual operator TGraphicGroup * ()
Interface Category:
API.
Purpose:
Allows users to RTTI a particular MGraphic and determine if it is a TGraphicGroup or not.
Calling Context:
Call it as a casting operator for a pointer.
Parameters:
Return Value:
NIL or pointer to a TGraphicGroup.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.