Sign in Join
FPDoc Onlineexperiment

TFormattingWriter class

In unit WFormat

Abstract base class for formatted document writers

Declaration

pascal
TFormattingWriter = class

Descends from it: THTMLWriter TMarkdownWriter TTextWriter TTexWriter

Description

TFormattingWriter is an abstract base class that defines the interface for creating formatted documents. It provides methods for document structure (headers, paragraphs), text formatting (bold, italic, underline), tables, and lists. Descendant classes implement the specific formatting for different output formats such as HTML, LaTeX, or plain text.

The class writes output to a stream provided during construction. Most methods are virtual and should be overridden by descendant classes to provide format-specific implementation.

See also

Properties

Streamprotected

Methods

CreatepublicCreates a new formatting writer instance
EscapeTextpublicEscapes text for the target format
DumppublicWrites raw text directly to the output stream
DumpLnpublicWrites raw text followed by line ending to the output stream
WritepublicWrites escaped text to the output stream
WriteFmtpublicWrites formatted text using Format function
DocumentStartpublicBegins a new document
DocumentEndpublicEnds the current document
HeaderpublicWrites a complete header at the specified level
HeaderStartpublicBegins a header at the specified level
HeaderEndpublicEnds a header at the specified level
ParagraphStartpublicBegins a new paragraph
ParagraphEndpublicEnds the current paragraph
LineBreakpublicInserts a line break
RulepublicInserts a horizontal rule
BoldStartpublicBegins bold text formatting
BoldEndpublicEnds bold text formatting
ItalicStartpublicBegins italic text formatting
ItalicEndpublicEnds italic text formatting
UnderlineStartpublicBegins underlined text formatting
UnderlineEndpublicEnds underlined text formatting
PreformatStartpublicBegins preformatted text block
PreformatEndpublicEnds preformatted text block
TableStartpublicBegins a table with specified columns and border
TableEndpublicEnds the current table
RowStartpublicBegins a new table row
RowEndpublicEnds the current table row
RowNextpublicMoves to the next table row
CellStartpublicBegins a new table cell
CellEndpublicEnds the current table cell
CellNextpublicMoves to the next table cell
HeaderCellStartpublicBegins a new table header cell
HeaderCellEndpublicEnds the current table header cell
HeaderCellNextpublicMoves to the next table header cell
ListStartpublicBegins a list of the specified type
ListEndpublicEnds a list of the specified type
ListItemStartpublicBegins a new list item
ListItemEndpublicEnds the current list item
ListItempublicCreates a complete list item with text
DefinitionItempublicCreates a definition list item with name and description
WriteListpublicWrites a complete list from string list

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