Class: TSpaceWithinParagraphStyle

Declaration: TextParagraphStyles.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TAbstractParagraphStyle

Inherited By:

None.

Purpose:

TSpaceWithinParagraphStyle, derived from TAbstractParagraphStyle, is a style applied to a text paragraph for setting the line spacing (also known as leading ) within the paragraph. TSpaceWithinParagraphStyle utilizes two variables that determine the line spacing: an InterlineFixedAmount, and an InterlineAutoFactor. The actual baseline-to-baseline spacing is determined by adding the InterlineFixedAmount to the product of the InterlineAutoFactor and a calculated automatic leading value. Set InterlineAutoFactor to 1.0 and InterlineFixedAmount to 0 for conventional automatic leading. Setting InterlineAutoFactor to a different nonzero amount results in a correspondingly higher or lower value than the calculated value, since it's multiplied by the factor. For example, set InterlineAutoFactor to 1.1 to get 10% extra space on auto-spaced lines, or to .8 to get 20% less space (before adding InterlineFixedAmount). Set InterlineFixedAmount to a nonzero value to adjust the calculated automatic leading value (multiplied by the InterlineAutoFactor) by that number of units, where each unit is 1/72 of an inch, approximately one point. For example, setting InterlineFixedAmount to 2 specifies two additional units of leading. To set a fixed baseline-to-baseline line spacing measurement, set InterlineAutoFactor to 0 and InterlineFixedAmount to the desired baseline-to-baseline number of units of 1/72 of an inch.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::TSpaceWithinParagraphStyle

  1. TSpaceWithinParagraphStyle (GTextCoordinate interlineFixedAmount, GTextCoordinate interlineAutoFactor =0.0)
  2. TSpaceWithinParagraphStyle (const TSpaceWithinParagraphStyle &)
  3. TSpaceWithinParagraphStyle ()

Interface Category:

API.

Purpose:

  1. Constructor for creating a TSpaceWithinParagraphStyle with the specified InterlineFixedAmount and InterlineAutoFactor values.
  2. Copy constructor.
  3. Default constructor. This initializes interlineFixedAmount to 0.0 and interlineAutoFactor to 1.0, thus specifying conventional automatic leading.

Calling Context:

  1. Called to construct a TSpaceWithinParagraphStyle with the specified values.
  2. Called to copy an object.
  3. Called by the stream-in operators. Can also be called by clients that want conventional automatic leading.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::~TSpaceWithinParagraphStyle

virtual ~ TSpaceWithinParagraphStyle ()

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: TSpaceWithinParagraphStyle::GetName

virtual const TStyleName & GetName () const

Interface Category:

API.

Purpose:

Returns the paragraph style name, which is a token created from the class name TSpaceWithinParagraphStyle.

Calling Context:

Called to determine the name of this style.

Parameters:

Return Value:

A constant reference to the paragraph style name, which is a token created from the class name TSpaceWithinParagraphStyle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TAbstractParagraphStyle function.

Member Function: TSpaceWithinParagraphStyle::operator==

bool operator ==(const TStyle & style) const

Interface Category:

API.

Purpose:

Tests whether this object is equivalent to the argument object.

Calling Context:

Called to test equivalence of the two objects on either side of the ==symbol.

Parameters:

Return Value:

Returns true if the objects are equivalent.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::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:

Not multithread safe.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::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:

Not multithread safe.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::GetInterlineFixedAmount

virtual GTextCoordinate GetInterlineFixedAmount () const

Interface Category:

API.

Purpose:

Returns the InterlineFixedAmount. This is the number of units to be added (if positive) or subtracted (if negative) from the product of the InterlineAutoFactor and the calculated automatic leading value in order to determine the baseline-to-baseline line spacing measurement. A unit is 1/72 of an inch, approximately one point.

Calling Context:

May be called directly by client.

Parameters:

Return Value:

The InterlineFixedAmount value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::GetInterlineAutoFactor

virtual GTextCoordinate GetInterlineAutoFactor () const

Interface Category:

API.

Purpose:

Returns the InterlineAutoFactor. This is the factor to be multiplied by the calculated automatic leading value before adding InterlineFixedAmount to determine the baseline-to-baseline line spacing measurement. If InterlineAutoFactor =0.0, then no automatic leading is performed, and InterlineFixedAmount determines the interline spacing. If InterlineAutoFactor is nonzero, then an automatic leading amount is calculated and multiplied by the factor, and then the InterlineFixedAmount is added to the result to determine the line spacing. Thus, if InterlineAutoFactor is greater than 1, then the calculated leading value is increased by a corresponding percentage. For example, an interlineAutoFactor of 1.1 specifies a 10% increase, and 1.3 a 30% increase. If InterlineAutoFactor is less than 1 but greater than zero, then the calculated leading value is decreased by a corresponding percentage. For example, a factor of .8 specifies a 20% decrease, and .6 a 40% decrease.

Calling Context:

May be called directly by client.

Parameters:

Return Value:

The InterlineAutoFactor, the factor to be multiplied by the calculated automatic leading value before adding InterlineFixedAmount to determine the baseline-to-baseline line spacing measurement.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSpaceWithinParagraphStyle::SetInterlineFixedAmount

virtual void SetInterlineFixedAmount (GTextCoordinate interlineFixedAmount)

Interface Category:

API.

Purpose:

Sets the InterlineFixedAmount. This is the number of units to be added (if positive) or subtracted (if negative) from the product of the InterlineAutoFactor and the calculated automatic leading value in order to determine the baseline-to-baseline line spacing measurement. A unit is 1/72 of an inch, approximately one point.

Calling Context:

Protected member function: to be called only by derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is protected.

Member Function: TSpaceWithinParagraphStyle::SetInterlineAutoFactor

virtual void SetInterlineAutoFactor (GTextCoordinate interlineAutoFactor)

Interface Category:

API.

Purpose:

Sets the InterlineAutoFactor. This is the factor to be multiplied by the calculated automatic leading value before adding InterlineFixedAmount to determine the baseline-to-baseline line spacing measurement. If InterlineAutoFactor =0.0, then no automatic leading is performed, and InterlineFixedAmount determines the interline spacing. If InterlineAutoFactor is nonzero, then an automatic leading amount is calculated and multiplied by the factor, and then the InterlineFixedAmount is added to the result to determine the line spacing. Thus, if InterlineAutoFactor is greater than 1, then the calculated leading value is increased by a corresponding percentage. For example, an interlineAutoFactor of 1.1 specifies a 10% increase, and 1.3 a 30% increase. If InterlineAutoFactor is less than 1 but greater than zero, then the calculated leading value is decreased by a corresponding percentage. For example, a factor of .8 specifies a 20% decrease, and .6 a 40% decrease.

Calling Context:

Protected member function: to be called only by derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is protected.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.