Class: TUnderlineStyle

Declaration: LineLayoutStyles.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TLineStyle

Inherited By:

TDoubleUnderlineStyle

Purpose:

TUnderlineStyle, derived from TLineStyle, controls the placement and thickness of an underline. Units are assumed to be fractions of a point (approximately: 1/72 of an inch). A TUnderlineStyle is positioned relative to the baseline and descent of the text. An offset factor of 0 positions the underline on the baseline, and an offset factor of 1 on the descent. See the description of TLineStyle for more information.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive classes to provide different types of underlining.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TUnderlineStyle::GetUnderlineName

virtual TToken & GetUnderlineName () const

Interface Category:

API.

Purpose:

Returns the name of this specific underlining class. Underlining classes have additional underline names identifying the type of underlining; they share the same style name because you cannot apply more than one type of underlining style to the same character.

Calling Context:

Call to get the underline name of this class, for example, when comparing object.

Parameters:

Return Value:

The underline name of this class as a TToken instance.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TUnderlineStyle::GetName

virtual const TStyleName & GetName () const

Interface Category:

API.

Purpose:

Returns the style's internal name. This is not necessarily the class name. For example, there are related underlining styles that are each separate derived classes. However, because they are mutually exclusive, they share the same internal name.

Calling Context:

Called when the name associated with an object is needed; for example, when comparing objects.

Parameters:

Return Value:

The TToken for the associated name.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TUnderlineStyle::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: TUnderlineStyle::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: TUnderlineStyle::operator==

virtual bool operator ==(const TStyle & thatStyle) const

Interface Category:

API.

Purpose:

Equality operator.

Calling Context:

Called to compare two objects.

Parameters:

Return Value:

Returns true if the objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TUnderlineStyle::~TUnderlineStyle

virtual ~ TUnderlineStyle ()

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:

None.

Member Function: TUnderlineStyle::TUnderlineStyle

  1. TUnderlineStyle ()
  2. TUnderlineStyle (const TUnderlineStyle &)
  3. TUnderlineStyle (GCoordinate offsetFromBaseline, GCoordinate thickness, bool coverSpaces =true, bool useCharacterBaseline =false)
  4. TUnderlineStyle (const TAttributeState & paint, GCoordinate offsetFromBaseline, GCoordinate thickness, bool coverSpaces =true, bool useCharacterBaseline =false)
  5. TUnderlineStyle (GCoordinate offsetIncrement, GCoordinate offsetFactor, GCoordinate thicknessIncrement, GCoordinate thicknessFactor, bool coverSpaces =true, bool useCharacterBaseline =false)
  6. TUnderlineStyle (const TAttributeState & paint, GCoordinate offsetIncrement, GCoordinate offsetFactor, GCoordinate thicknessIncrement, GCoordinate thicknessFactor, bool coverSpaces =true, bool useCharacterBaseline =false)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.
  3. Constructs a style object with specific values.
  4. Constructs a style object with specific values.
  5. Constructs a style object with specific values.
  6. Constructs a style object with specific values.

Calling Context:

  1. Called by the stream-in operators and anyone who wants to create an underline style with default color (black), thickness (factor 0, increment 1) and offset (factor 0, increment 0). This puts a black underline, one pixel thick, on the text's baseline. The coverSpaces flag is set to true and the useCharacterBaseline flag to false.
  2. Called to copy an object.
  3. Call to construct a style object with specific values.
  4. Call to construct a style object with specific values.
  5. Call to construct a style object with specific values.
  6. Call to construct a style object with specific values.

Parameters:

Return Value:

None.

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.