![](../../../Home/Icons/Home.gif)
![](../icons/UpBook.gif)
![](../icons/BookContext.gif)
![](../../../Home/Icons/Search.gif)
![](../../../Home/Icons/Help.gif)
![](../../icons/button_contents.gif)
![](../../icons/button_previous.gif)
The text system uses two mechanisms to format text for display:
- Line Layout, a group of classes that lays out and draws individual lines of text
- The text formatter, part of the Text Editing framework that breaks text into lines, provides paragraph formatting, calculates selection feedback areas, and computes the damaged area when the end user edits the text
Line Layout is currently used by both the Text Editing framework and by the simple text display classes TTextDisplay and TTextGraphic (described in "Displaying static text" on page 68). The Line Layout classes provide the ability to draw any text, regardless of script, and use the font substitution mechanism described in "Font substitution" on page 75. The Line Layout classes also have extensive knowledge of sophisticated typographical features--defined and controlled through the text styling mechanism.
The functionality provided by the Text Editing framework and the static text display mechanisms is designed to be appropriate for a majority of text formatting needs. However, if you want to create your own classes that deal with text layout and display at the line level, you can use the Line Layout classes directly. You should be familiar with the text storage and styling mechanisms, described in Chapter 2, "Character representation," and Chapter 3, "Basic text classes," before using Line Layout.
The text formatter provides a higher level formatting mechanism designed for use with editable text components. The Text Editing framework includes a formatter that creates formatted text based on a single fixed-width panel. In later releases of the CommonPoint application system, the Text Editing framework will provide more sophisticated control over text formatting options. If you want to create your own formatting engine, you can replace the Text Editing framework's formatter by implementing the abstract formatting protocol in TAbstractPanelFormatter.
- Controlling line layout
-
- Creating a text formatter
-
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker