Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible
Inherited By:
None.
Purpose:
Provides a basic interface for drawing lines of non-editable text, such as for menu items, buttons, labels, and so on. This text can be styled. Each TTextDisplay has a default font, point size, and color which are used to determine how to draw the text if these values are not otherwise set.
As with other classes, TTextDisplay supports the use of styled text. If the text contained by a TTextDisplay object has explicit font, point size, or color set (by using the TText::AddStyles function), this information will be used. The default font, point size, and color used by TTextDisplay are only applied where the text does not itself have explicit values set. In order to force all text to have the same font, point size, or color, it will be necessary to remove all such styles from the text, either before passing the text into the TTextDisplay object, or by using the appropriate set functions on TTextDisplay (SetFont, SetColor, SetPointSize), with the stripExistingStyleFromText parameter set to true.
TTextDisplay supports two ways to position the text:
- Provide a boundary rectangle. The TTextDisplay will attempt to break lines so that the text will fit within the boundary rectangle. TTextDisplays do *not* guarantee that the text can be squeezed into the boundary rectangle.
The width of the boundary rectangle determines where breaking takes place if the text is horizontal, and the height of the boundary rectangle determines where breaking takes place if the text is vertical.
- Provide a baseline origin and a breaking distance. The TTextDisplay will position the first line using the baseline origin and break lines to fit within the breaking distance.
The breaking distance is a horizontal distance if the text is horizontal and a vertical distance if the text is vertical.
If the breaking distance is kInfinity, then only text containing explicit line breaking characters (a paragraph or line separator) will be broken.
Note, the line origin is not the same as the upper-left corner of the boundary rectangle. Text positioning is quite complex. The origin used by TTextDisplay and other text-drawing classes is the point at which the drawing of text begins. The exact interpretation of the origin depends on positioning information provided by the object's line orientation.
For example, for standard Roman text, which is drawn in left-to-right lines which start at the top and work down, the origin is the point at the left edge of the base of the text at on the first line. For much Japanese or Chinese text, which is drawn as top-to-bottom lines which start at the right and work left, the origin is the point at the top of the base of the text on the first line.
As a rule, the text origin can be visualized as the position of an invisible period preceding the text.
These two approaches can be used interchangeably. If you specify a boundary rectangle, you can still query for the baseline origin of the first line of text and the breaking distance. If you specify a baseline origin and breaking distance, you can still query for a boundary rectangle (one of the width and the height will be the breaking distance and the other kInfinity).
The exact relationship between the two approaches depends on information from the line orientation object. (Insert examples here.)
No line breaking at all will occur if the line breaking is set to kNeverBreakLines, even if the text has an explicit line breaking character. This is to provide a performance enhancement, as a TTextDisplay is much faster if it doesn't have to check for line breaks. Menus, windows titles, and similar clients would probably want to use this.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
It should not be necessary to derive this class.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
virtual ~ TTextDisplay ()
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: TTextDisplay::operator=
TTextDisplay & operator =(const TTextDisplay &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
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: TTextDisplay::operator==
bool operator ==(const TTextDisplay &) 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: TTextDisplay::operator>>=
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:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::operator<<=
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:
Multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Overrides inherited MCollectible function.
Calling Context:
Same as for base class.
Parameters:
Return Value:
The numeric value of the hash.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::IsEqual
virtual bool IsEqual (const MCollectible *) const
Interface Category:
API.
Purpose:
Overrides inherited MCollectible function.
Calling Context:
Same as MCollectible function.
Parameters:
Return Value:
Returns true if the objects match.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetDefaultFontPointSizeStyle
static const TFontPointSizeStyle & GetDefaultFontPointSizeStyle ()
Interface Category:
API.
Purpose:
Returns the default TFontPointSizeStyle object for your system.
Calling Context:
Call to retrieve this object.
Parameters:
Return Value:
The default TFontPointSizeStyle object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetDefaultTextColorStyle
static const TTextColorStyle & GetDefaultTextColorStyle ()
Interface Category:
API.
Purpose:
Returns the default TTextColorStyle object for your system.
Calling Context:
Call to retrieve this object.
Parameters:
Return Value:
The default TTextColorStyle object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetText
void SetText (const TText & text)
Interface Category:
API.
Purpose:
Sets the text to be displayed.
Calling Context:
Call to specify the text to be displayed.
Parameters:
- const TText & text -The text to be displayed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::AdoptText
virtual void AdoptText (TText * text)
Interface Category:
API.
Purpose:
Adopts the text instance to be displayed.
Calling Context:
Call to have the text instance adopted by the text display.
Parameters:
- TText * text -The text instance to be adopted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::CloneText
virtual TText * CloneText () const
Interface Category:
API.
Purpose:
Returns a copy of the text instance to be displayed. The caller owns the storage for the returned object.
Calling Context:
Call to get a copy of the text instance to be displayed.
Parameters:
Return Value:
Copy of the text instance to be displayed.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::OrphanText
virtual TText * OrphanText ()
Interface Category:
API.
Purpose:
Orphans the text instance to be displayed. The caller owns the storage for the returned object. The text display now contains an empty text instance.
Calling Context:
Call to orphan the text instance to be displayed.
Parameters:
Return Value:
The text instance to be displayed.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetText
virtual const TText * GetText () const
Interface Category:
API.
Purpose:
Returns a reference to the text to be displayed. The caller does not own the storage for the returned object.
Calling Context:
Call to get a reference to the text to be displayed.
Parameters:
Return Value:
A reference to the text to be displayed.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetOrigin
virtual void SetOrigin (const TGPoint & where)
Interface Category:
API.
Purpose:
Sets the origin at which to display the text.
Calling Context:
Call to set the origin at which to display the text.
Parameters:
- const TGPoint & where -The origin at which to display the text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetOrigin
virtual void GetOrigin (TGPoint & origin) const
Interface Category:
API.
Purpose:
Returns the origin at which to display the text.
Calling Context:
Called when displaying the text.
Parameters:
- TGPoint & origin -The origin at which to display the text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetFontSubstitutionProcessing
virtual void SetFontSubstitutionProcessing (const bool &)
Interface Category:
API.
Purpose:
Specifies whether font substitution processing should occur before the text is displayed.
Calling Context:
Call to change the current setting. By default, font substitution processing does occur.
Parameters:
- const bool & -Whether or not font substitution processing should occur.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetFontSubstitutionProcessing
virtual bool GetFontSubstitutionProcessing () const
Interface Category:
API.
Purpose:
Queries whether font substitution processing should occur before the text is displayed.
Calling Context:
Called when displaying the text.
Parameters:
Return Value:
Returns true if font substitution processing should occur.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Recomputes the layout and draws the text.
Calling Context:
Call to display the text.
Parameters:
- TGrafPort & port -The grafport within which to draw the text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetBounds
virtual void GetBounds (TGRect & bounds) const
Interface Category:
API.
Purpose:
Recomputes the layout and returns the bounds of the text display.
Calling Context:
Call to get the bounds of the text display.
Parameters:
- TGRect & bounds -The bounds of the text display.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::CreateLineInformationIterator
virtual TLineInformationIterator * CreateLineInformationIterator () const
Interface Category:
API.
Purpose:
Creates a TLineInformationIterator to use to access information about the line positioning of a TTextDisplay object.
Calling Context:
Called by clients who need to access information about the line positioning of a TTextDisplay object.
Parameters:
Return Value:
Returns a TLineInformationIterator to use in obtaining information about the line positioning of a TTextDisplay object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetLineCount
virtual unsigned long GetLineCount () const
Interface Category:
API.
Purpose:
Returns the number of lines used to display the text in a TTextDisplay object.
Calling Context:
Used by clients to determine the number of lines used to display the text in a TTextDisplay object.
Parameters:
Return Value:
The number of lines used to display the text in a TTextDisplay object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetBreakingDistance
virtual GCoordinate GetBreakingDistance () const
Interface Category:
API.
Purpose:
Determines the width used by a TTextDisplay object at which lines will be broken.
Calling Context:
Used to determine the width used by a TTextDisplay object at which lines will be broken.
Parameters:
Return Value:
The width used by a TTextDisplay object at which lines will be broken.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetBreakingDistance
virtual void SetBreakingDistance (const GCoordinate &)
Interface Category:
API.
Purpose:
Sets the width used by a TTextDisplay object at which lines will be broken.
Calling Context:
Used to set the width used by a TTextDisplay object at which lines will be broken.
Parameters:
- const GCoordinate & -The width used by a TTextDisplay object at which lines are to be broken.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetLineBreaking
virtual ELineBreaking GetLineBreaking () const
Interface Category:
API.
Purpose:
Finds out if a TTextDisplay object will break lines.
Calling Context:
Used to find out if a TTextDisplay object will break lines.
Parameters:
Return Value:
A ELineBreaking value indicating if a TTextDisplay object will break lines.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetLineBreaking
virtual void SetLineBreaking (ELineBreaking)
Interface Category:
API.
Purpose:
Sets a TTextDisplay object to break lines.
Calling Context:
Used to set a TTextDisplay object to break lines or not.
Parameters:
- ELineBreaking -Determines whether a TTextDisplay object breaks lines or not.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetTextClipping
virtual ETextClipping GetTextClipping () const
Interface Category:
API.
Purpose:
Finds out if a TTextDisplay object will clip its display to its boundary rectangle or not.
Calling Context:
Used to find out if a TTextDisplay object will clip its display to its boundary rectangle or not.
Parameters:
Return Value:
A ETextClipping value indicating if a TTextDisplay object will clip its display to its boundary rectangle or not.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetTextClipping
virtual void SetTextClipping (ETextClipping)
Interface Category:
API.
Purpose:
Sets a TTextDisplay object to clip its display to its boundary rectangle.
Calling Context:
Used to set a TTextDisplay object to clip its display to its boundary rectangle or not.
Parameters:
- ETextClipping -Determines whether a TTextDisplay object clips its display to its boundary rectangle or not.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetBoundaryRectangle
virtual TGRect GetBoundaryRectangle () const
Interface Category:
API.
Purpose:
Returns a rectangle within which the text drawn by a TTextDisplay object should fit. This may be smaller or larger than the actual boundaries of the object's text.
Calling Context:
Used to find out the rectangle within which the text drawn by a TTextDisplay object should fit.
Parameters:
Return Value:
The rectangle within which the text drawn by a TTextDisplay object should fit.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetBoundaryRectangle
virtual void SetBoundaryRectangle (const TGRect &)
Interface Category:
API.
Purpose:
Sets the rectangle within which the text drawn by a TTextDisplay object should fit. The text may or may not actually fit within this rectangle; SetTextClipping can be used to confine the actual drawing of text to this rectangle.
This rectangle is also set by providing an origin and breaking distance. The two are interchangeable.
Calling Context:
Used to set rectangle within which the text drawn by a TTextDisplay object should fit.
Parameters:
- const TGRect & -The rectangle within which the text drawn by a TTextDisplay object should fit.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetTextBounds
virtual TGRect GetTextBounds () const
Interface Category:
API.
Purpose:
Returns the smallest TGRect within which the text of a TTextDisplay object will fit when drawn. This may be larger or smaller than the object's boundary rectangle.
Calling Context:
Used to obtain smallest TGRect within which the text of a TTextDisplay object will fit when drawn.
Parameters:
Return Value:
The smallest TGRect within which the text of a TTextDisplay object will fit when drawn.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::Invalidate
void Invalidate ()
Interface Category:
API.
Purpose:
To provide faster redrawing of text, a TTextDisplay object caches its drawing. This avoids the rather lengthy operation of relaying the text out before every draw.
This function forces a TTextDisplay object to clear its drawing cache.
Calling Context:
Used when the text contained by a TTextDisplay object is changed directly. Changing the text object directly does not signal the TTextDisplay object to clear its drawing cache; this function makes it possible to force the cache clearing.
As a rule, clients should not directly alter the text contained by a TTextDisplay object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetTextColorStyle
virtual const TTextColorStyle * GetTextColorStyle () const
Interface Category:
API.
Purpose:
Returns a pointer to the TTextColorStyle used to provide a default color for the text contained by a TTextDisplay object.
Calling Context:
Used to obtain a pointer to the TTextColorStyle used to provide a default color for the text contained by a TTextDisplay object.
For example, menus use this call when to obtain color information.
Parameters:
Return Value:
A pointer to the TTextColorStyle used to provide a default color for the text contained by a TTextDisplay object. This storage is owned by TTextDisplay and may be a pointer to a static global. Do not directly alter the TTextColorStyle to which this points!
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetFontPointSizeStyle
virtual const TFontPointSizeStyle * GetFontPointSizeStyle () const
Interface Category:
API.
Purpose:
Returns a pointer to the TFontPointSizeStyle used to provide a default point size for the text contained by a TTextDisplay object.
Calling Context:
Used to obtain a pointer to the TFontPointSizeStyle used to provide a default point size for the text contained by a TTextDisplay object.
Parameters:
Return Value:
A pointer to the TFontPointSizeStyle used to provide a default point size for the text contained by a TTextDisplay object. This storage is owned by TTextDisplay and may be a pointer to a static global. Do not directly alter the TFontPointSizeStyle to which this points!
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetLineOrientation
virtual void GetLineOrientation (TMultiLineOrientation &) const
Interface Category:
API.
Purpose:
Returns the TMultiLineOrientation instance used to lay out the text line.
Calling Context:
This could be used by a client who wishes to query a TTextDisplay regarding its positioning (vertical or horizontal), justification (left, right, center), and so on.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetLineOrientation
virtual void SetLineOrientation (const TMultiLineOrientation &)
Interface Category:
API.
Purpose:
Sets the TMultiLineOrientation object used to lay out the text.
Calling Context:
Called to change the orientation of the text after the TTextDisplay object has been created.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetPointSize
- virtual void SetPointSize (const TFontPointSizeStyle & size, bool stripExistingStyleFromText =false)
- virtual void SetPointSize (GCoordinate size, bool stripExistingStyleFromText =false)
Interface Category:
API.
Purpose:
Sets the default point size used to display the text. If the text instance contains point size styling information, this is used instead.
Calling Context:
- Call to set the default point size used to display the text.
- Call to set the default point size used to display the text. This version of the function creates a TFontPointSizeStyle which is stored by the TTextDisplay.
Parameters:
- const TFontPointSizeStyle & size -The color to use in displaying the text where the text does not have an explicit TTextColorStyle set.
- bool stripExistingStyleFromText =false -If true, this parameter will force all existing TFontPointSizeStyle to be stripped from the text. This would force all the text to have the same point size, but makes a permanent change to the text being displayed.
- GCoordinate size -The color to use in displaying the text where the text does not have an explicit TTextColorStyle set. This parameter is used to construct a TFontPointSizeStyle which is stored internally by the TTextDisplay.
- bool stripExistingStyleFromText =false -If true, this parameter will force all existing TFontPointSizeStyle to be stripped from the text. This would force all the text to have the same point size, but makes a permanent change to the text being displayed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetColor
- virtual void SetColor (const TTextColorStyle & color, bool stripExistingStyleFromText =false)
- virtual void SetColor (const TColor & color, bool stripExistingStyleFromText =false)
Interface Category:
API.
Purpose:
Sets the default color used to display the text. If the text instance contains color styling information, this is used instead.
Calling Context:
- Called to set the default color for displaying the text using a TTextColorStyle.
- Called to set the default color for displaying the text using a TColor.
Parameters:
- const TTextColorStyle & color -The color to use in displaying the text where the text does not have an explicit TTextColorStyle set.
- bool stripExistingStyleFromText =false -If true, this parameter will force all existing TTextColorStyles to be stripped from the text. This would force all the text to have the same color, but makes a permanent change to the text being displayed.
- const TColor & color -The color to use in displaying the text where the text does not have an explicit TTextColorStyle set. This creates a TTextColorStyle which is stored by the TTextDisplay object. In the absence of information on how the color is to be stored in the TTextColorStyle, the default mechanism for doing so is used, which is very inefficient in memory use.
- bool stripExistingStyleFromText =false -If true, this parameter will force all existing TTextColorStyles to be stripped from the text. This would force all the text to have the same color, but makes a permanent change to the text being displayed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetDefaultLocaleLineOrientation
static const TMultiLineOrientation & GetDefaultLocaleLineOrientation ()
Interface Category:
API.
Purpose:
Returns the default TMultiLineOrientation object for your system.
Calling Context:
Used to provide a default value for the TMultiLineOrientation parameter in the various TTextDisplay constructors.
Parameters:
Return Value:
The default TMultiLineOrientation object for your system.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- TTextDisplay ()
- TTextDisplay (const TTextDisplay & text)
- TTextDisplay (const TText & text)
- TTextDisplay (const TText & text, const TFontFamilyStyle & font, const TFontPointSizeStyle & size =TTextDisplay :: GetDefaultFontPointSizeStyle (), const TTextColorStyle & color =TTextDisplay :: GetDefaultTextColorStyle (), const TMultiLineOrientation & orient =TTextDisplay :: GetDefaultLocaleLineOrientation ())
- TTextDisplay (const TText & text, const TFontFamilyStyle & font, const TFontPointSizeStyle & size, const TTextColorStyle & color, const TMultiLineOrientation & orient, const bool & useFontSubstitution)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Constructs a text display with the specified text and system default values for font, point size, and so on.
- Constructs a text display with the specified values or with default values.
- Constructs a text display with the specified values.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
- Called to create a text display with the system default values.
- Call to construct a text display with particular values or with default values.
- Call to construct a text display with particular values.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetFontFamilyStyle
virtual const TFontFamilyStyle * GetFontFamilyStyle () const
Interface Category:
API.
Purpose:
Returns a pointer to the TFontFamilyStyle used to provide the font for the text contained by a TTextDisplay object.
Calling Context:
Called to obtain a pointer to the font.
Parameters:
Return Value:
A pointer to the TFontFamilyStyle used as a default font for this TTextDisplay object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::SetFont
virtual void SetFont (const TFontFamilyStyle & family, bool stripExistingStyleFromText =false)
Interface Category:
API.
Purpose:
Sets the default font for a TTextDisplay object. The default font is the font to be used wherever the font is not explicitly set on the text.
Calling Context:
Call to set the default font used by the TTextDisplay object.
Parameters:
- const TFontFamilyStyle & family -The font to use as the default font.
- bool stripExistingStyleFromText =false -If true, this parameter will force all existing TFontFamilyStyle to be stripped from the text. This would force all the text to have the same font, but makes a permanent change to the text being displayed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TTextDisplay::GetDefaultFontFamilyStyle
static const TFontFamilyStyle & GetDefaultFontFamilyStyle ()
Interface Category:
API.
Purpose:
Returns the default TFontFamilyStyle object for your system.
Calling Context:
Call to retrieve this object.
Parameters:
Return Value:
The default TFontFamilyStyle object.
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.