![]() |
ScroogeXHTML for Object Pascal 9.1
|
The base class for ScroogeXHTML. More...
Public Member Functions | |
TSxBase () | |
Create a new TSxBase instance. | |
TSxBase (TComponent AOwner) | |
Create a new TSxBase instance. | |
~TSxBase () | |
Destroy TSxBase instance. | |
string | GetCloseEmptyElement () |
returns ' />' or '>' depending on DOCTYPE | |
string | GetEmptyParagraph () |
returns an empty paragraph | |
string | GetLineBreakTag () |
returns the line break element | |
string | GetOrderedListTag () |
get the opening tag for an ordered list | |
string | GetParOpen () |
returns the opening tag for a paragraph without ">" | |
string | GetUnorderedListTag () |
get the opening tag for an unordered list | |
Log (const TLogLevel ALogLevel, const string ALogText) | |
call the log event handler and pass the log level and message | |
ReplaceFont (string &FontName) | |
replace a font name | |
string | TextElementToXHTML (const ISimpleDomTextNode TextElement, TParagraphProperties ParProps) |
convert a text element to HTML / XHTML. | |
VerifySettings () | |
Checks properties for invalid settings. | |
Public Attributes | |
Boolean | ConvertAnchors |
Activates support for anchor conversion. | |
Boolean | ConvertEmptyParagraphs |
Set this property to True to replace empty paragraphs (where the opening <p> tag is followed by the closing </p> tag) by a line break tag (<br />). | |
Boolean | ConvertFields |
Activates support for field conversion. | |
Boolean | ConvertHyperlinks |
Set this property to True to activate hyperlink support. | |
Boolean | ConvertIndent |
Set this property to True if You want to activate support for left and right paragraph indent. | |
Boolean | ConvertLanguage |
Activates support for language conversion. | |
Boolean | ConvertPictures |
Activates support for picture conversion. | |
Boolean | ConvertSpaces |
If two or more spaces are found in sequence, they will be converted to Default: True | |
Boolean | ConvertToPlainText |
Convert to plain text. | |
string | DefaultLanguage |
Use this property to set the default language of the document. | |
TDocumentType | DocumentType |
The document type. | |
TFontConversionOptions | FontConversionOptions |
Set these options to control which character properties are converted. | |
TFontSizeScale | FontSizeScale |
Use this option to set the font size scale. | |
ISxFormatter | Formatter |
The formatter. | |
IHyperlinkURIBuilder | HyperlinkURIBuilder |
Boolean | IncludeDocType |
Include DOCTYPE at the beginning of the document. | |
Boolean | IncludeXMLDeclaration |
Includes the XML declaration line at the beginning of the document. | |
TLogLevel | LogLevel |
This property can be used to control the detail level of the logging procedure. | |
IMarginBuilding | MarginBuilder |
The margin builder. | |
TMarginConversionFlags | MarginConversionFlags |
Flags for paragraph margin conversion. | |
TNoRTFHeaderAction | NoRTFHeaderAction |
Action on missing or invalid RTF header. | |
TSxOptionsHead | OptionsHead |
HTML HEAD options. | |
TSxOptionsOptimize | OptionsOptimize |
Optimization options. | |
string | ParagraphElementAttributes |
The optional attributes to use for the p element. | |
IPictureAdapter | PictureAdapter |
The picture adapter. | |
TPostProcessEventListeners | PostProcessEventListeners |
A list of TPostProcessEventListener instances. | |
TStrings | ReplaceFonts |
Font names which will be replaced. | |
Boolean | RtfEnd |
True -> end of document. | |
string | TabString |
the HTML representation of a TAB charcter | |
ISxTranslator | Translator |
The HTML / XHTML Translator. | |
string | Version |
the ScroogeXHTML version | |
TSxBase events | |
TEncodingEvent | OnAfterEncode |
Event handler which will be called after the encoding. | |
TEncodingEvent | OnBeforeEncode |
Event handler which will be called before the encoding. | |
TLogEvent | OnLog |
Event handler for log messages. | |
TReplaceFontEvent | OnReplaceFont |
This event handler can be used to define a font substition. | |
Protected Member Functions | |
DoPostProcessing (const ISimpleDomDocument ADocument) | |
The base class for ScroogeXHTML.
TSxBase::TSxBase | ( | ) |
Create a new TSxBase instance.
TSxBase::TSxBase | ( | TComponent | AOwner | ) |
Create a new TSxBase instance.
TSxBase::~TSxBase | ( | ) |
Destroy TSxBase instance.
|
protected |
string TSxBase::GetCloseEmptyElement | ( | ) |
returns ' />' or '>' depending on DOCTYPE
string TSxBase::GetEmptyParagraph | ( | ) |
returns an empty paragraph
string TSxBase::GetLineBreakTag | ( | ) |
returns the line break element
string TSxBase::GetOrderedListTag | ( | ) |
get the opening tag for an ordered list
string TSxBase::GetParOpen | ( | ) |
returns the opening tag for a paragraph without ">"
string TSxBase::GetUnorderedListTag | ( | ) |
get the opening tag for an unordered list
TSxBase::Log | ( | const TLogLevel | ALogLevel, |
const string | ALogText ) |
call the log event handler and pass the log level and message
TSxBase::ReplaceFont | ( | string & | FontName | ) |
replace a font name
string TSxBase::TextElementToXHTML | ( | const ISimpleDomTextNode | TextElement, |
TParagraphProperties | ParProps ) |
convert a text element to HTML / XHTML.
This function receives a block of text and its attributes, packaged in a ISimpleDomTextNode object. It will then
TSxBase::VerifySettings | ( | ) |
Checks properties for invalid settings.
Will throw an Exception to indicate bad values.
Boolean TSxBase::ConvertAnchors |
Activates support for anchor conversion.
Boolean TSxBase::ConvertEmptyParagraphs |
Set this property to True to replace empty paragraphs (where the opening <p> tag is followed by the closing </p> tag) by a line break tag (<br />).
Default: False
Boolean TSxBase::ConvertFields |
Activates support for field conversion.
Boolean TSxBase::ConvertHyperlinks |
Set this property to True to activate hyperlink support.
Default: True
Boolean TSxBase::ConvertIndent |
Set this property to True if You want to activate support for left and right paragraph indent.
Default: False
Boolean TSxBase::ConvertLanguage |
Activates support for language conversion.
Boolean TSxBase::ConvertPictures |
Activates support for picture conversion.
Boolean TSxBase::ConvertSpaces |
If two or more spaces are found in sequence, they will be converted to Default: True
Boolean TSxBase::ConvertToPlainText |
Convert to plain text.
string TSxBase::DefaultLanguage |
Use this property to set the default language of the document.
TDocumentType TSxBase::DocumentType |
The document type.
TFontConversionOptions TSxBase::FontConversionOptions |
Set these options to control which character properties are converted.
TFontSizeScale TSxBase::FontSizeScale |
Use this option to set the font size scale.
The following units are supported:
ISxFormatter TSxBase::Formatter |
The formatter.
The hyper link URI builder.
IHyperlinkURIBuilder TSxBase::HyperlinkURIBuilder |
Boolean TSxBase::IncludeDocType |
Include DOCTYPE at the beginning of the document.
Default: True.
Boolean TSxBase::IncludeXMLDeclaration |
Includes the XML declaration line at the beginning of the document.
Default: False
* <?xml version="1.0"?>
TLogLevel TSxBase::LogLevel |
This property can be used to control the detail level of the logging procedure.
Default: logInfo
IMarginBuilding TSxBase::MarginBuilder |
The margin builder.
TMarginConversionFlags TSxBase::MarginConversionFlags |
Flags for paragraph margin conversion.
TNoRTFHeaderAction TSxBase::NoRTFHeaderAction |
Action on missing or invalid RTF header.
TEncodingEvent TSxBase::OnAfterEncode |
Event handler which will be called after the encoding.
TEncodingEvent TSxBase::OnBeforeEncode |
Event handler which will be called before the encoding.
TLogEvent TSxBase::OnLog |
Event handler for log messages.
TReplaceFontEvent TSxBase::OnReplaceFont |
This event handler can be used to define a font substition.
TSxOptionsHead TSxBase::OptionsHead |
HTML HEAD options.
TSxOptionsOptimize TSxBase::OptionsOptimize |
Optimization options.
string TSxBase::ParagraphElementAttributes |
The optional attributes to use for the p element.
Example: ParagraphAttributes := 'class="myclass"'
IPictureAdapter TSxBase::PictureAdapter |
The picture adapter.
TPostProcessEventListeners TSxBase::PostProcessEventListeners |
A list of TPostProcessEventListener instances.
The converter will TPostProcessEventListener instance PostProcess methods, passing a internal DOM representation of the document, which may be modified before it is written to the actual result HTML.
TStrings TSxBase::ReplaceFonts |
Font names which will be replaced.
Boolean TSxBase::RtfEnd |
True -> end of document.
string TSxBase::TabString |
the HTML representation of a TAB charcter
ISxTranslator TSxBase::Translator |
The HTML / XHTML Translator.
string TSxBase::Version |
the ScroogeXHTML version