Class: TFontStyle

Declaration: FontStyles.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TStyle

Inherited By:

TFontFamilyStyle TFontScaleStyle TFontTransformStyle

Purpose:

TFontStyle derives from TStyle and is an abstract base class used to describe various attributes of a font. Possible derived classes can implement transformations such as rotate. Font scaling attributes (like point size) are derived from TFontScaleStyle--an abstract base class derived from this one.

Instantiation:

Abstract base class; do not allocate.

Deriving Classes:

Derive a class from this class for any specialization. The value returned from GetCategory should be preserved and the pure virtual function GetName must be overridden to return an unique name. Provided classes include TFontFamilyStyle, TFontScaleStyle (abstract class) and TFontTransformStyle.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TFontStyle::operator=

TFontStyle & operator =(const TFontStyle &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFontStyle::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFontStyle::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFontStyle::GetCategory

virtual const TStyleCategory & GetCategory () const

Interface Category:

API.

Purpose:

Returns the category to which this TFontStyle belongs. A derived class of this class has this TStyleCategory. The TStyleCategory of TStyle is used to group TStyles of the same category together in a TStyleSet so that search functions, such as TStyleSet::MemberByName, can use the TStyleCategory as a search key. The TStyleCategory is defined in Style.h.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the category to which this TFontStyle belongs.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFontStyle::TFontStyle

  1. TFontStyle ()
  2. TFontStyle (const TFontStyle &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

TFontStyle is an abstract base class--all the constructors are protected. Do not instantiate this class.

Member Function: TFontStyle::~TFontStyle

virtual ~TFontStyle ()

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:

Multithread safe.

Other Considerations:

The destructor for TFontStyle is a protected member function.

Member Function: TFontStyle::GetName

virtual const TStyleName & GetName () const

Interface Category:

API.

Purpose:

Returns the name of this TFontStyle. A derived class of TStyle has to return its specific style by this function. The TStyleName of TStyle is used to group TStyles of the same kind together in a TStyleSet so that the search functions, such as TStyleSet::MemberByName, can use the TStyleName as a search key. TStyleName is defined in Style.h.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the name of this TFontStyle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.