TTextWriter class
Plain text output writer with line wrapping and formatting support
Declaration
TTextWriter = class(TFormattingWriter)Inheritance
- TTextWriter
- TFormattingWriter
Descends from it: TStreamWriter TStringWriter
Description
TTextWriter generates plain text output from formatted content.
The writer supports automatic line wrapping at configurable line lengths, headers with underline characters (= for level 0-1, - for level 2+), ASCII-formatted tables with borders and column alignment, lists with numbered or bullet formatting, and preformatted text blocks with indentation.
Text formatting is rendered using asterisks for bold (*text*), underscores for italic and underline (_text_).
See also
- TFormattingWriter
Properties
CurrentLine | protected | |
MaxLineLength | public | Maximum line length for text wrapping |
Methods
Create | public | Creates a new text writer instance |
Destroy | public | Destroys the text writer instance |
EscapeText | public | Returns the input text unchanged |
DocumentStart | public | Begins document output with title |
DocumentEnd | public | Completes document output |
HeaderStart | public | Begins header section |
HeaderEnd | public | Completes header section with underline |
ParagraphStart | public | Begins paragraph |
ParagraphEnd | public | Completes paragraph with blank line |
LineBreak | public | Forces line break |
Rule | public | Writes horizontal rule |
BoldStart | public | Begins bold formatting with asterisk |
BoldEnd | public | Ends bold formatting with asterisk |
ItalicStart | public | Begins italic formatting with underscore |
ItalicEnd | public | Ends italic formatting with underscore |
UnderlineStart | public | Begins underline formatting with underscore |
UnderlineEnd | public | Ends underline formatting with underscore |
PreformatStart | public | Begins preformatted text section |
PreformatEnd | public | Ends preformatted text section |
TableStart | public | Begins ASCII table with specified columns |
TableEnd | public | Completes table output |
RowStart | public | Begins table row |
RowEnd | public | Completes table row with formatting |
CellStart | public | Begins table cell |
CellEnd | public | Completes table cell |
HeaderCellStart | public | Begins table header cell |
HeaderCellEnd | public | Completes table header cell |
ListStart | public | Begins list with specified type |
ListEnd | public | Completes list and reduces indentation |
ListItemStart | public | Begins list item with numbering or bullet |
ListItemEnd | public | Completes list item |
ListItem | public | Writes complete list item with text |
DefinitionItem | public | Writes definition item with term and description |
Write | public | Writes text with line wrapping |
Inherited
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
