Sign in Join
FPDoc Onlineexperiment

TTextWriter class

In unit WText

Plain text output writer with line wrapping and formatting support

Declaration

pascal
TTextWriter = class(TFormattingWriter)

Inheritance

  1. TTextWriter
  2. 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

CurrentLineprotected
MaxLineLengthpublicMaximum line length for text wrapping

Methods

CreatepublicCreates a new text writer instance
DestroypublicDestroys the text writer instance
EscapeTextpublicReturns the input text unchanged
DocumentStartpublicBegins document output with title
DocumentEndpublicCompletes document output
HeaderStartpublicBegins header section
HeaderEndpublicCompletes header section with underline
ParagraphStartpublicBegins paragraph
ParagraphEndpublicCompletes paragraph with blank line
LineBreakpublicForces line break
RulepublicWrites horizontal rule
BoldStartpublicBegins bold formatting with asterisk
BoldEndpublicEnds bold formatting with asterisk
ItalicStartpublicBegins italic formatting with underscore
ItalicEndpublicEnds italic formatting with underscore
UnderlineStartpublicBegins underline formatting with underscore
UnderlineEndpublicEnds underline formatting with underscore
PreformatStartpublicBegins preformatted text section
PreformatEndpublicEnds preformatted text section
TableStartpublicBegins ASCII table with specified columns
TableEndpublicCompletes table output
RowStartpublicBegins table row
RowEndpublicCompletes table row with formatting
CellStartpublicBegins table cell
CellEndpublicCompletes table cell
HeaderCellStartpublicBegins table header cell
HeaderCellEndpublicCompletes table header cell
ListStartpublicBegins list with specified type
ListEndpublicCompletes list and reduces indentation
ListItemStartpublicBegins list item with numbering or bullet
ListItemEndpublicCompletes list item
ListItempublicWrites complete list item with text
DefinitionItempublicWrites definition item with term and description
WritepublicWrites text with line wrapping

Inherited

From TFormattingWriter (9)

CellNext Dump DumpLn Header HeaderCellNext RowNext Stream WriteFmt WriteList

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.