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.
- TSpaceWithinParagraphStyle (GTextCoordinate interlineFixedAmount, GTextCoordinate interlineAutoFactor =0.0)
- TSpaceWithinParagraphStyle (const TSpaceWithinParagraphStyle &)
- TSpaceWithinParagraphStyle ()
Interface Category:
API.
Purpose:
- Constructor for creating a TSpaceWithinParagraphStyle with the specified InterlineFixedAmount and InterlineAutoFactor values.
- Copy constructor.
- Default constructor. This initializes interlineFixedAmount to 0.0 and interlineAutoFactor to 1.0, thus specifying conventional automatic leading.
Calling Context:
- Called to construct a TSpaceWithinParagraphStyle with the specified values.
- Called to copy an object.
- Called by the stream-in operators. Can also be called by clients that want conventional automatic leading.
Parameters:
- GTextCoordinate interlineFixedAmount -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.
- GTextCoordinate interlineAutoFactor =0.0 -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 (the default), then no automatic leading is performed, and interlineFixedAmount determines the interline spacing. If interlineAutoFactor =1.0, and interlineFixedAmount =0, then conventional automatic leading is done. If interlineAutoFactor is greater than 1, then the calculated leading value is increased by a corresponding percentage. For example, set interlineAutoFactor to 1.1 for a 10% increase. If interlineAutoFactor is less than 1 but greater than zero, then the calculated leading value is decreased by a corresponding percentage. For example, set it to .8 for a 20% decrease.
- const TSpaceWithinParagraphStyle & -The object to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
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:
- const TStyle & style -The style object to be compared to this object.
Return Value:
Returns true if the objects are equivalent.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself 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.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself 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.
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.
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.
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:
- GTextCoordinate interlineFixedAmount -The InterlineFixedAmount to be added or subtracted from the product of the InterlineAutoFactor and the calculated automatic leading value in order to determine the baseline-to-baseline line spacing measurement, in units of 1/72 of an inch.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is protected.
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:
- GTextCoordinate interlineAutoFactor -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.
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.