Class: TTextColorStyle

Declaration: LineLayoutStyles.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TColorStyle

Inherited By:

None.

Purpose:

TTextColorStyle, derived from TColorStyle, describes a color. Its main use is for styling text and paragraphs.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class should not be derived except by clients implementing their own version of Line Layout.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TTextColorStyle::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: TTextColorStyle::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: TTextColorStyle::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: TTextColorStyle::GetYellow

static const TTextColorStyle & GetYellow ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default yellow value.

Calling Context:

Call to get a yellow style object.

Parameters:

Return Value:

A yellow style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetMagenta

static const TTextColorStyle & GetMagenta ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default magenta value.

Calling Context:

Call to get a magenta style object.

Parameters:

Return Value:

A magenta style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetCyan

static const TTextColorStyle & GetCyan ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default cyan value.

Calling Context:

Call to get a cyan style object.

Parameters:

Return Value:

A cyan style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetGreen

static const TTextColorStyle & GetGreen ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default green value.

Calling Context:

Call to get a green style object.

Parameters:

Return Value:

A green style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetBlue

static const TTextColorStyle & GetBlue ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default blue value.

Calling Context:

Call to get a blue style object.

Parameters:

Return Value:

A blue style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetRed

static const TTextColorStyle & GetRed ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default red value.

Calling Context:

Call to get a red style object.

Parameters:

Return Value:

A red style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetWhite

static const TTextColorStyle & GetWhite ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default white value.

Calling Context:

Call to get a white style object.

Parameters:

Return Value:

A white style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::GetBlack

static const TTextColorStyle & GetBlack ()

Interface Category:

API.

Purpose:

Returns a const color style object with the default black value.

Calling Context:

Call to get a black style object.

Parameters:

Return Value:

A black style object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TTextColorStyle::~TTextColorStyle

virtual ~ TTextColorStyle ()

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: TTextColorStyle::TTextColorStyle

  1. TTextColorStyle ()
  2. TTextColorStyle (const TAttributeState & paint)
  3. TTextColorStyle (const TTextColorStyle & style)
  4. TTextColorStyle (const TColor & color)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructs a color style with a specified value.
  3. Copy constructor.
  4. Constructs a color style with a specified value.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to construct a color style with a particular value.
  3. Called to copy an object.
  4. Called to construct a color style with a particular value. This constructor needs to create some derived class of TAttributeState to use to hold the color passed in as an argument and does so by creating a TGrafBundle. This is very inefficient in memory use, because a TGrafBundle is large and because the storage for the color is fully owned by this object.

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.