Skip to content

THTMLWriter

HTML implementation of formatting writer

Declaration

Source position: whtml.pp line 30

type

  THTMLWriter = class(TFormattingWriter)
  public
    constructor Create;
    procedure TagStart;
    procedure TagEnd;
    function EscapeText : string;
    procedure DocumentStart;
    procedure DocumentEnd;
    procedure HeaderStart;
    procedure HeaderEnd;
    procedure ParagraphStart;
    procedure ParagraphEnd;
    procedure LineBreak;
    procedure Rule;
    procedure BoldStart;
    procedure BoldEnd;
    procedure ItalicStart;
    procedure ItalicEnd;
    procedure UnderlineStart;
    procedure UnderlineEnd;
    procedure PreformatStart;
    procedure PreformatEnd;
    procedure TableStart;
    procedure TableEnd;
    procedure RowStart;
    procedure RowEnd;
    procedure CellStart;
    procedure CellEnd;
    procedure HeaderCellStart;
    procedure HeaderCellEnd;
    procedure ListStart;
    procedure ListEnd;
    procedure ListItemStart;
    procedure ListItemEnd;
    procedure DefinitionItem;
    procedure FormStart;
    procedure FormEnd;
    procedure EmitInput(const Name: string; const Value: string);
    procedure EmitInput(const Name: string; const Value: string; 
                   const Attrs: string);
    procedure EmitPasswordInput;
    procedure EmitCheckBox(const Name: string; const Value: string);
    procedure EmitCheckBox(const Name: string; const Value: string; 
                      Checked: Boolean);
    procedure EmitRadioButton(const Name: string; const Value: string);
    procedure EmitRadioButton(const Name: string; const Value: string; 
                         Checked: Boolean);
    procedure EmitArea;
    procedure EmitComboBox(const Name: string; const Value: string; 
                      Items: TStrings; UseValues: Boolean);
    procedure EmitComboBox(const Name: string; const Value: string; 
                      Items: TStrings);
    procedure EmitButton;
    procedure EmitSubmitButton;
    procedure EmitResetButton;
    procedure EmitHiddenVar;
  end;

Description

THTMLWriter is a concrete implementation of TFormattingWriter that generates HTML output. It implements all formatting methods to produce valid HTML markup including document structure, text formatting, tables, lists, and HTML forms. The class properly escapes HTML special characters and generates standard HTML tags.

Methods

Member Visibility Description
BoldEnd public Ends HTML bold formatting
BoldStart public Begins HTML bold formatting
CellEnd public Ends HTML table cell
CellStart public Begins HTML table cell
Create public Creates a new HTML writer instance
DefinitionItem public Creates HTML definition list item
DocumentEnd public Ends the HTML document
DocumentStart public Begins an HTML document
EmitArea public Emits HTML textarea for multi-line input
EmitButton public Emits HTML button input
EmitCheckBox public Emits HTML checkbox input
EmitComboBox public Emits HTML select dropdown list
EmitHiddenVar public Emits HTML hidden input field
EmitInput public Emits HTML input field
EmitPasswordInput public Emits HTML password input field
EmitRadioButton public Emits HTML radio button input
EmitResetButton public Emits HTML reset button
EmitSubmitButton public Emits HTML submit button
EscapeText public Escapes HTML special characters
FormEnd public Ends HTML form
FormStart public Begins HTML form with action and method
HeaderCellEnd public Ends HTML table header cell
HeaderCellStart public Begins HTML table header cell
HeaderEnd public Ends HTML header tag at specified level
HeaderStart public Begins HTML header tag at specified level
ItalicEnd public Ends HTML italic formatting
ItalicStart public Begins HTML italic formatting
LineBreak public Inserts HTML line break tag
ListEnd public Ends HTML list of specified type
ListItemEnd public Ends HTML list item
ListItemStart public Begins HTML list item
ListStart public Begins HTML list of specified type
ParagraphEnd public Ends HTML paragraph tag
ParagraphStart public Begins HTML paragraph tag
PreformatEnd public Ends HTML preformatted text block
PreformatStart public Begins HTML preformatted text block
RowEnd public Ends HTML table row
RowStart public Begins HTML table row
Rule public Inserts HTML horizontal rule tag
TableEnd public Ends HTML table
TableStart public Begins HTML table with optional border
TagEnd public Writes a closing HTML tag
TagStart public Writes an opening HTML tag with optional attributes
UnderlineEnd public Ends HTML underline formatting
UnderlineStart public Begins HTML underline formatting
See all Methods

See also

Name Description
TFormattingWriter
ListTags HTML tags for different list types