Class TGenericHTMLDocGenerator

Unit

Declaration

type TGenericHTMLDocGenerator = class(TDocGenerator)

Description

generates HTML documentation

Extends TDocGenerator and overwrites many of its methods to generate output in HTML (HyperText Markup Language) format.

Hierarchy

Overview

Methods

Protected function MakeHead: string;
Protected function MakeBodyBegin: string; virtual;
Protected function MakeBodyEnd: string; virtual;
Protected function ConvertString(const s: string): string; override;
Protected function ConvertChar(c: char): string; override;
Protected procedure WriteUnit(const HL: integer; const U: TPasUnit); override;
Protected function HtmlString(const S: string): string; override;
Protected function FormatPascalCode(const Line: string): string; override;
Protected function FormatComment(AString: string): string; override;
Protected function FormatHex(AString: string): string; override;
Protected function FormatNumeric(AString: string): string; override;
Protected function FormatFloat(AString: string): string; override;
Protected function FormatString(AString: string): string; override;
Protected function FormatKeyWord(AString: string): string; override;
Protected function FormatCompilerComment(AString: string): string; override;
Protected function CodeString(const s: string): string; override;
Protected function CreateLink(const Item: TBaseItem): string; override;
Protected procedure WriteStartOfCode; override;
Protected procedure WriteEndOfCode; override;
Protected procedure WriteAnchor(const AName: string); overload;
Protected procedure WriteAnchor(const AName, Caption: string); overload;
Protected function Paragraph: string; override;
Protected function EnDash: string; override;
Protected function EmDash: string; override;
Protected function LineBreak: string; override;
Protected function URLLink(const URL: string): string; override;
Protected function URLLink(const URL, LinkDisplay: string): string; override;
Protected procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override;
Protected function MakeItemLink(const Item: TBaseItem; const LinkCaption: string; const LinkContext: TLinkContext): string; override;
Protected function EscapeURL(const AString: string): string; virtual;
Protected function FormatSection(HL: integer; const Anchor: string; const Caption: string): string; override;
Protected function FormatAnchor(const Anchor: string): string; override;
Protected function FormatBold(const Text: string): string; override;
Protected function FormatItalic(const Text: string): string; override;
Protected function FormatWarning(const Text: string): string; override;
Protected function FormatNote(const Text: string): string; override;
Protected function FormatPreformatted(const Text: string): string; override;
Protected function FormatImage(FileNames: TStringList): string; override;
Protected function FormatList(ListData: TListData): string; override;
Protected function FormatTable(Table: TTableData): string; override;
Protected function FormatTableOfContents(Sections: TStringPairVector): string; override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function GetFileExtension: string; override;
Public procedure WriteDocumentation; override;

Properties

Published property Header: string read FHeader write FHeader;
Published property Footer: string read FFooter write FFooter;
Published property HtmlBodyBegin: string read FHtmlBodyBegin write FHtmlBodyBegin;
Published property HtmlBodyEnd: string read FHtmlBodyEnd write FHtmlBodyEnd;
Published property HtmlHead: string read FHtmlHead write FHtmlHead;
Published property CSS: string read FCSS write FCSS;
Published property NumericFilenames: boolean read FNumericFilenames write FNumericFilenames default false;
Published property UseTipueSearch: boolean read FUseTipueSearch write FUseTipueSearch default False;

Description

Methods

Protected function MakeHead: string;

Return common HTML content that goes inside <head>.

Protected function MakeBodyBegin: string; virtual;

Return common HTML content that goes right after <body>.

Protected function MakeBodyEnd: string; virtual;

Return common HTML content that goes right before </body>.

Protected function ConvertString(const s: string): string; override;
 
Protected function ConvertChar(c: char): string; override;

Called by ConvertString to convert a character. Will convert special characters to their html escape sequence -> test

Protected procedure WriteUnit(const HL: integer; const U: TPasUnit); override;
 
Protected function HtmlString(const S: string): string; override;

overrides TDocGenerator.HtmlString.HtmlString to return the string verbatim (TDocGenerator.HtmlString discards those strings)

Protected function FormatPascalCode(const Line: string): string; override;

FormatPascalCode will cause Line to be formatted in the way that Pascal code is formatted in Delphi.

Protected function FormatComment(AString: string): string; override;

FormatComment will cause AString to be formatted in the way that comments other than compiler directives are formatted in Delphi. See: FormatCompilerComment.

Protected function FormatHex(AString: string): string; override;

FormatHex will cause AString to be formatted in the way that Hex are formatted in Delphi.

Protected function FormatNumeric(AString: string): string; override;

FormatNumeric will cause AString to be formatted in the way that Numeric are formatted in Delphi.

Protected function FormatFloat(AString: string): string; override;

FormatFloat will cause AString to be formatted in the way that Float are formatted in Delphi.

Protected function FormatString(AString: string): string; override;

FormatKeyWord will cause AString to be formatted in the way that strings are formatted in Delphi.

Protected function FormatKeyWord(AString: string): string; override;

FormatKeyWord will cause AString to be formatted in the way that reserved words are formatted in Delphi.

Protected function FormatCompilerComment(AString: string): string; override;

FormatCompilerComment will cause AString to be formatted in the way that compiler directives are formatted in Delphi.

Protected function CodeString(const s: string): string; override;

Makes a String look like a coded String, i.e. <CODE>TheString</CODE> in Html.

Protected function CreateLink(const Item: TBaseItem): string; override;

Returns a link to an anchor within a document. HTML simply concatenates the strings with a "#" character between them.

Protected procedure WriteStartOfCode; override;
 
Protected procedure WriteEndOfCode; override;
 
Protected procedure WriteAnchor(const AName: string); overload;
 
Protected procedure WriteAnchor(const AName, Caption: string); overload;

Write an anchor. Note that the Caption is assumed to be already processed with the ConvertString.

Protected function Paragraph: string; override;
 
Protected function EnDash: string; override;
 
Protected function EmDash: string; override;
 
Protected function LineBreak: string; override;
 
Protected function URLLink(const URL: string): string; override;
 
Protected function URLLink(const URL, LinkDisplay: string): string; override;
 
Protected procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override;
 
Protected function MakeItemLink(const Item: TBaseItem; const LinkCaption: string; const LinkContext: TLinkContext): string; override;
 
Protected function EscapeURL(const AString: string): string; virtual;
 
Protected function FormatSection(HL: integer; const Anchor: string; const Caption: string): string; override;
 
Protected function FormatAnchor(const Anchor: string): string; override;
 
Protected function FormatBold(const Text: string): string; override;
 
Protected function FormatItalic(const Text: string): string; override;
 
Protected function FormatWarning(const Text: string): string; override;
 
Protected function FormatNote(const Text: string): string; override;
 
Protected function FormatPreformatted(const Text: string): string; override;
 
Protected function FormatImage(FileNames: TStringList): string; override;
 
Protected function FormatList(ListData: TListData): string; override;
 
Protected function FormatTable(Table: TTableData): string; override;
 
Protected function FormatTableOfContents(Sections: TStringPairVector): string; override;
 
Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public function GetFileExtension: string; override;

Returns HTML file extension ".htm".

Public procedure WriteDocumentation; override;

The method that does everything - writes documentation for all units and creates overview files.

Properties

Published property Header: string read FHeader write FHeader;

some HTML code to be written as header for every page

Published property Footer: string read FFooter write FFooter;

some HTML code to be written as footer for every page

Published property HtmlBodyBegin: string read FHtmlBodyBegin write FHtmlBodyBegin;
 
Published property HtmlBodyEnd: string read FHtmlBodyEnd write FHtmlBodyEnd;
 
Published property HtmlHead: string read FHtmlHead write FHtmlHead;
 
Published property CSS: string read FCSS write FCSS;

the content of the cascading stylesheet

Published property NumericFilenames: boolean read FNumericFilenames write FNumericFilenames default false;

if set to true, numeric filenames will be used rather than names with multiple dots

Published property UseTipueSearch: boolean read FUseTipueSearch write FUseTipueSearch default False;

Enable Tiptue fulltext search. See [https://github.com/pasdoc/pasdoc/wiki/UseTipueSearchOption]


Generated by PasDoc 0.16.0.