TCustomTranslator Class Reference

Abstract translator class. More...

Inheritance diagram for TCustomTranslator:

THTMLTranslator TXHTMLTranslator THTML401StrictTranslator THTML401TransitionalTranslator TXHTML10StrictTranslator TXHTML10TransitionalTranslator TXHTMLBasic10Translator TXHTML11Translator TXHTMLMobileProfile10Translator TXHTML20Translator

List of all members.

Public Member Functions

string BuildLangAttribute (const string Language)
 Returns lang attribute.
AnsiString IndentCrLf ()
 Returns carriage return / line feed and margin.
AnsiString GetFontSizeStyle (const Integer Pt)
 Returns a CSS style for the given font size.
string GetMargin ()
 Returns a sequence of spaces (the left margin).
AnsiString Encode (const WideString S)
 Encode Unicode string using UTF-8.
string GetRootElement ()
 Returns the HTML / XHTML document root element.
string GetCloseEmptyElement ()
 Returns the correct closing bracket for an empty element.
string FormatElement (const string Text, const TCharacterProperties CP)
 Returns text with formatting CSS/HTML/XHTML tags.
string GetDocType ()
 Get the DOCTYPE definition.
string GetDocTypeName ()
 Get the name of the doctype.
string GetParagraph (const string AdditionalStyle, const string AdditionalParams= '')
 returns the start tag for a paragraph element
string GetParagraphStyle (const TParagraphProperties PP)
 Converts the paragraph properties to a style definition.
 SetParOpen (const string TagAndClass, const string DefaultStyle)
 Setter for the 'paragraph open' tag.
string GetStyleParam (const string AdditionalStyle)
 Get style parameter.
Boolean SupportsElement (const string ElementName)
 Returns True if the element is supported by the current doctype.
Boolean SupportsParameter (const string ElementName, const string ParamName)
 Returns True if the element supports the given parameter.
string GetIndentAndDirectionStyle (const TParagraphProperties PP)
 Returns a indent and direction style for the paragraph.
string GetCharacterStyles (const string Text, const TCharacterProperties CP)
 Returns text with styles applied for the given character properties.
boolean IsTransitional ()
 Returns True if the document type is a transitional version.
Boolean IsDocTypeRequired ()
 Returns True if a DOCTYPE declaration is required (see XHTML 1.1).
Boolean IsXml ()
 Returns True if it is an XML based Translator.
 SetFontSizeScale (const TFontSizeScale FSS)
 Setter for the font size scale.


Detailed Description

Abstract translator class.

Member Function Documentation

AnsiString TCustomTranslator::GetFontSizeStyle ( const Integer  Pt  ) 

Returns a CSS style for the given font size.

string TCustomTranslator::GetMargin (  ) 

Returns a sequence of spaces (the left margin).

string TCustomTranslator.GetRootElement (  ) 

Returns the HTML / XHTML document root element.

  • for HTML, this is
    <html> 
  • for XHTML, this is
    <html xmlns="http://www.w3.org/1999/xhtml"> 

Reimplemented in THTMLTranslator, TXHTMLTranslator, and TXHTML20Translator.

string TCustomTranslator.GetCloseEmptyElement (  ) 

Returns the correct closing bracket for an empty element.

Example:
  • in HTML, the linebreak element is
    <br> 
  • in XHTML, the linebreak element is
    <br /> 
Note:
  • For HTML, the function returns
    ">" 
  • For XHTML, the function returns
    " />" 

Reimplemented in THTMLTranslator, and TXHTMLTranslator.

string TCustomTranslator::GetStyleParam ( const string  AdditionalStyle  ) 

Get style parameter.

Add the given style.


Generated on Fri Feb 1 11:24:25 2008 for ScroogeXHTML for Delphi(tm) by  doxygen 1.5.4