Unit 'wformat' Package
[Overview][Constants][Types][Classes][Index] [#fcl]

TFormattingWriter

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Abstract base class for formatted document writers

Declaration

Source position: wformat.pp line 32

type TFormattingWriter = class

public

  constructor Create(); virtual;

  

Creates a new formatting writer instance

  function EscapeText(); virtual;

  

Escapes text for the target format

  procedure Dump();

  

Writes raw text directly to the output stream

  procedure DumpLn();

  

Writes raw text followed by line ending to the output stream

  procedure Write(); virtual;

  

Writes escaped text to the output stream

  procedure WriteFmt();

  

Writes formatted text using Format function

  procedure DocumentStart(); virtual;

  

Begins a new document

  procedure DocumentEnd; virtual;

  

Ends the current document

  procedure Header();

  

Writes a complete header at the specified level

  procedure HeaderStart(); virtual;

  

Begins a header at the specified level

  procedure HeaderEnd(); virtual;

  

Ends a header at the specified level

  procedure ParagraphStart; virtual;

  

Begins a new paragraph

  procedure ParagraphEnd; virtual;

  

Ends the current paragraph

  procedure LineBreak; virtual;

  

Inserts a line break

  procedure Rule; virtual;

  

Inserts a horizontal rule

  procedure BoldStart; virtual;

  

Begins bold text formatting

  procedure BoldEnd; virtual;

  

Ends bold text formatting

  procedure ItalicStart; virtual;

  

Begins italic text formatting

  procedure ItalicEnd; virtual;

  

Ends italic text formatting

  procedure UnderlineStart; virtual;

  

Begins underlined text formatting

  procedure UnderlineEnd; virtual;

  

Ends underlined text formatting

  procedure PreformatStart; virtual;

  

Begins preformatted text block

  procedure PreformatEnd; virtual;

  

Ends preformatted text block

  procedure TableStart(); virtual;

  

Begins a table with specified columns and border

  procedure TableEnd; virtual;

  

Ends the current table

  procedure RowStart; virtual;

  

Begins a new table row

  procedure RowEnd; virtual;

  

Ends the current table row

  procedure RowNext;

  

Moves to the next table row

  procedure CellStart; virtual;

  

Begins a new table cell

  procedure CellEnd; virtual;

  

Ends the current table cell

  procedure CellNext;

  

Moves to the next table cell

  procedure HeaderCellStart; virtual;

  

Begins a new table header cell

  procedure HeaderCellEnd; virtual;

  

Ends the current table header cell

  procedure HeaderCellNext;

  

Moves to the next table header cell

  procedure ListStart(); virtual;

  

Begins a list of the specified type

  procedure ListEnd(); virtual;

  

Ends a list of the specified type

  procedure ListItemStart; virtual;

  

Begins a new list item

  procedure ListItemEnd; virtual;

  

Ends the current list item

  procedure ListItem();

  

Creates a complete list item with text

  procedure DefinitionItem(); virtual;

  

Creates a definition list item with name and description

  procedure WriteList();

  

Writes a complete list from string list

end;

Inheritance

TFormattingWriter

  

Abstract base class for formatted document writers

|

TObject

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

TListType

  

Enumeration defining supported list types


Documentation generated on: Jan 16 2026