ScroogeXHTML for Object Pascal 9.3
Loading...
Searching...
No Matches
SxTypes.pas File Reference

Classes

class  TCharacterProperties
 A class which stores character properties. More...
class  TFontDescriptor
 A class which stores a font table font definition. More...
class  TParagraphProperties
 A class which stores paragraph properties. More...
class  TPictureInformation
 Class which stores picture informations. More...
class  TReaderProperties
 A class which stores the current reader state. More...
struct  TTokenDef
 A TTokenDef object stores the description of a RTF token. More...

Typedefs

typedef set< TFontOptionTFontConversionOptions
 Set of conversion options.
typedef set< TFontStyleTFontStyles
 Set of font styles.
typedef set< TMarginConversionFlagTMarginConversionFlags
 Set of margin conversion flags.

Enumerations

enum  TDirection { diLTR , diRTL }
 Enum for supported text directions. More...
enum  TDocumentType { dtHTML_50 , dtXHTML_10_Strict }
 Enum for all available output document types. More...
enum  TFontFamily {
  ffNil , ffRoman , ffSwiss , ffModern ,
  ffScript , ffDecor , ffTech , ffBidi
}
 used in the tokenTable to specify a RTF font family More...
enum  TFontOption {
  opFontName , opFontSize , opFontStyle , opFontColor ,
  opFontBGColor , opFontHLColor
}
enum  TFontSizeScale { fsPoint , fsEM , fsEX , fsPercent }
 Enum for all supported font size units. More...
enum  TFontStyle { fsBold , fsItalic , fsUnderline , fsStrikeOut }
 Enum for all supported font styles. More...
enum  TInternalState { isNorm , isBin , isHex }
 RTF reader internal states. More...
enum  TLogLevel {
  logDebug , logInfo , logWarning , logError ,
  logFatal
}
 Enum for logging levels. More...
enum  TMarginConversionFlag { mcConvertBottomMargin , mcConvertTopMargin }
enum  TNoRTFHeaderAction { acReturnEmptyString , acRaiseException }
enum  TOrderedListStyleType { lsNone , lsDecimal , lsLowerAlpha , lsUpperAlpha }
 Enum for CSS list-style-type for ordered lists. More...
enum  TParagraphAlignment { paLeftJustify , paRightJustify , paCenter , paJustify }
 Enum for supported horizontal alignments. More...
enum  TRTFDestination {
  destIgnore , destFontTable , destFileTable , destColorTable ,
  destStyleSheet , destRevisionTable , destTemplate , destBodyText ,
  destBkmkStart , destBkmkEnd , destInformation , destUpr ,
  destParagraphNumbering , destPicture , destPnText , destField ,
  destFldInst , destFldRslt , destListTable , destList ,
  destListOverrideTable , destListOverride , destListLevel
}
 used in the tokenTable to specify the RTF destination (KeyType = ktDest) More...
enum  TRTFFunction {
  fnctBin , fnctHex , fnctSkipDest , fnctPlain ,
  fnctSkipWord , fnctLinebreak , fnctMiddot , fnctNonshppict
}
 used in the tokenTable to specify the RTF special function More...
enum  TRTFKeyType {
  ktChar , ktDest , ktProp , ktFnct ,
  ktFamily
}
 Used in the tokenTable to identify the token type. More...
enum  TRTFProperty {
  propANSI , propMAC , propPlain , propLeftInd ,
  propRightInd , propFirstInd , propSpaceBefore , propSpaceAfter ,
  propParBGColor , propParBox , propBold , propItalic ,
  propUnderline , propHidden , propJustL , propJustC ,
  propJustR , propJustified , propPard , propRed ,
  propGreen , propBlue , propFontSize , propFontNumber ,
  propFontColor , propFontCharSet , propFontBGColor , propFontHLColor ,
  propStrikeOut , propPnLvl , propPnLvlCont , propDefLang ,
  propDeff , propSuper , propSub , propNoSuper ,
  propLanguage , propLTR , propRTL , propLTRPar ,
  propRTLPar , propUnicode , propUnicodeSkip , propEMF ,
  propPNG , propJPEG , propPICT , propWMF ,
  propBMP , propPicW , propPicH , propWGoal ,
  propHGoal , propScaleX , propScaleY , propLISTID ,
  propLISTTEMPLATEID , propLISTOVERRIDE_INDEX , propLEVELNFC
}
 Used in the tokenTable to identify the associated property (KeyType = ktProp). More...
enum  TUnOrderedListStyleType { ulNone , ulBullet , ulDisc }
 Enum for CSS list-style-type for unordered lists. More...
enum  TVerticalAlignment { vaBaseline , vaSub , vaSuper }
 Enum for numbering levels. More...

Functions

TBytes ToBytes (const RawByteString AValue)

Variables

const ALL_FONT_CONVERSION_OPTIONS
const ContentTypeUTF_8 = "text/html; charset=UTF-8"
const CrLf = #13#10
const dcBlack = "#000000"
const dcBlue = "#0000ff"
const DEFAULT_FONT_COLOR = "#000000"
const DEFAULT_FONT_NAME = "Times,serif"
const DEFAULT_FONT_SIZE = 12
const DEFAULT_TAB_STRING = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
const maxToken = 136
 size of token definition table
const NL_BODY = 10
const NL_BULLET = 11
const NL_NONE = 0
const array[0..maxToken] of TTokenDef TokenTable
 the RTF token definition table
const XML_DECLARATION = "<?xml version='1.0'?>"

Typedef Documentation

◆ TFontConversionOptions

Set of conversion options.

◆ TFontStyles

typedef set< TFontStyle> TFontStyles

Set of font styles.

◆ TMarginConversionFlags

Set of margin conversion flags.

Enumeration Type Documentation

◆ TDirection

enum TDirection

Enum for supported text directions.

Enumerator
diLTR 

Left-to-right text direction.

diRTL 

Right-to-left text direction.

◆ TDocumentType

Enum for all available output document types.

Enumerator
dtHTML_50 

HTML5.

dtXHTML_10_Strict 

XHTML 1.0 Strict.

◆ TFontFamily

used in the tokenTable to specify a RTF font family

Enumerator
ffNil 

No font family.

ffRoman 

Roman font family.

ffSwiss 

Swiss font family.

ffModern 

Modern font family.

ffScript 

Script font family.

ffDecor 

Decorative font family.

ffTech 

Technical font family.

ffBidi 

Bidirectional font family.

◆ TFontOption

Enumerator
opFontName 

Font name.

opFontSize 

Font size.

opFontStyle 

Font style.

opFontColor 

Font color.

opFontBGColor 

Font background color.

opFontHLColor 

Font highlight color.

◆ TFontSizeScale

Enum for all supported font size units.

Represents the units for font size scaling.

Enumerator
fsPoint 

Font size in points.

fsEM 

Font size relative to the element's font size.

fsEX 

Font size relative to the height of the element's 'x' character.

fsPercent 

Font size as a percentage.

◆ TFontStyle

enum TFontStyle

Enum for all supported font styles.

Enumerator
fsBold 

Bold text.

fsItalic 

Italic text.

fsUnderline 

Underlined text.

fsStrikeOut 

Strikethrough text.

◆ TInternalState

RTF reader internal states.

Enumerator
isNorm 

Normal text state.

isBin 

Binary data state.

isHex 

Hexadecimal data state.

◆ TLogLevel

enum TLogLevel

Enum for logging levels.

Represents the severity of log messages.

Enumerator
logDebug 

Debug-level messages.

logInfo 

Informational messages.

logWarning 

Warning messages.

logError 

Error messages.

logFatal 

Fatal error messages.

◆ TMarginConversionFlag

Enumerator
mcConvertBottomMargin 

Convert bottom margin.

mcConvertTopMargin 

Convert top margin.

◆ TNoRTFHeaderAction

Enumerator
acReturnEmptyString 

Return an empty string.

acRaiseException 

Raise an exception.

◆ TOrderedListStyleType

Enum for CSS list-style-type for ordered lists.

Enumerator
lsNone 

No list style.

lsDecimal 

Decimal numbers.

lsLowerAlpha 

Lowercase alphabetic.

lsUpperAlpha 

Uppercase alphabetic.

◆ TParagraphAlignment

Enum for supported horizontal alignments.

Enumerator
paLeftJustify 

Align text to the left.

paRightJustify 

Align text to the right.

paCenter 

Center the text.

paJustify 

Justify the text.

◆ TRTFDestination

used in the tokenTable to specify the RTF destination (KeyType = ktDest)

Enumerator
destIgnore 

Ignore destination.

destFontTable 

Font table.

destFileTable 

File table.

destColorTable 

Color table.

destStyleSheet 

Style sheet.

destRevisionTable 

Revision table.

destTemplate 

Template.

destBodyText 

Body text.

destBkmkStart 

Bookmark start.

destBkmkEnd 

Bookmark end.

destInformation 

Document information.

destUpr 

Unicode representation.

destParagraphNumbering 

Paragraph numbering.

destPicture 

Picture.

destPnText 

Paragraph numbering text.

destField 

Field.

destFldInst 

Field instruction.

destFldRslt 

Field result.

destListTable 

List table.

destList 

List.

destListOverrideTable 

List override table.

destListOverride 

List override.

destListLevel 

List level.

◆ TRTFFunction

used in the tokenTable to specify the RTF special function

Enumerator
fnctBin 

Binary data.

fnctHex 

Hexadecimal data.

fnctSkipDest 

Skip destination.

fnctPlain 

Plain text.

fnctSkipWord 

Skip word.

fnctLinebreak 

Line break.

fnctMiddot 

Middle dot.

fnctNonshppict 

Non-shape picture.

◆ TRTFKeyType

Used in the tokenTable to identify the token type.

Enumerator
ktChar 

Character token.

ktDest 

Destination token.

ktProp 

Property token.

ktFnct 

Function token.

ktFamily 

Font family token.

◆ TRTFProperty

Used in the tokenTable to identify the associated property (KeyType = ktProp).

Enumerator
propANSI 

ANSI encoding.

propMAC 

Mac encoding.

propPlain 

Plain text.

propLeftInd 

Left indent.

propRightInd 

Right indent.

propFirstInd 

First line indent.

propSpaceBefore 

Space before paragraph.

propSpaceAfter 

Space after paragraph.

propParBGColor 

Paragraph background color.

propParBox 

Paragraph box.

propBold 

Bold text.

propItalic 

Italic text.

propUnderline 

Underlined text.

propHidden 

Hidden text.

propJustL 

Left justified.

propJustC 

Center justified.

propJustR 

Right justified.

propJustified 

Fully justified.

propPard 

Default paragraph properties.

propRed 

Red color component.

propGreen 

Green color component.

propBlue 

Blue color component.

propFontSize 

Font size.

propFontNumber 

Font number.

propFontColor 

Font color.

propFontCharSet 

Font character set.

propFontBGColor 

Font background color.

propFontHLColor 

Font highlight color.

propStrikeOut 

Strikethrough text.

propPnLvl 

Paragraph numbering level.

propPnLvlCont 

Paragraph numbering continuation.

propDefLang 

Default language.

propDeff 

Default font.

propSuper 

Superscript text.

propSub 

Subscript text.

propNoSuper 

No superscript or subscript.

propLanguage 

Language property.

propLTR 

Left-to-right text direction.

propRTL 

Right-to-left text direction.

propLTRPar 

Left-to-right paragraph direction.

propRTLPar 

Right-to-left paragraph direction.

propUnicode 

Unicode text.

propUnicodeSkip 

Unicode skip.

propEMF 

Enhanced Metafile format.

propPNG 

PNG image format.

propJPEG 

JPEG image format.

propPICT 

PICT image format.

propWMF 

Windows Metafile format.

propBMP 

Bitmap image format.

propPicW 

Picture width.

propPicH 

Picture height.

propWGoal 

Desired picture width.

propHGoal 

Desired picture height.

propScaleX 

Horizontal scaling.

propScaleY 

Vertical scaling.

propLISTID 

List ID.

propLISTTEMPLATEID 

List template ID.

propLISTOVERRIDE_INDEX 

List override index.

propLEVELNFC 

Level numbering format code.

◆ TUnOrderedListStyleType

Enum for CSS list-style-type for unordered lists.

Represents the list-style-type for unordered lists in CSS.

Enumerator
ulNone 

No list style.

ulBullet 

Bullet points.

ulDisc 

Disc points.

◆ TVerticalAlignment

Enum for numbering levels.

Enum for supported vertical alignments.

Enumerator
vaBaseline 

Align to baseline.

vaSub 

Subscript.

vaSuper 

Superscript.

Function Documentation

◆ ToBytes()

TBytes ToBytes ( const RawByteString AValue)

Variable Documentation

◆ ALL_FONT_CONVERSION_OPTIONS

const ALL_FONT_CONVERSION_OPTIONS
Initial value:
=
@ opFontHLColor
Font highlight color.
Definition SxTypes.pas:75
@ opFontColor
Font color.
Definition SxTypes.pas:73
@ opFontStyle
Font style.
Definition SxTypes.pas:72
@ opFontName
Font name.
Definition SxTypes.pas:70
@ opFontSize
Font size.
Definition SxTypes.pas:71
@ opFontBGColor
Font background color.
Definition SxTypes.pas:74

◆ ContentTypeUTF_8

const ContentTypeUTF_8 = "text/html; charset=UTF-8"

◆ CrLf

const CrLf = #13#10

◆ dcBlack

const dcBlack = "#000000"

◆ dcBlue

const dcBlue = "#0000ff"

◆ DEFAULT_FONT_COLOR

const DEFAULT_FONT_COLOR = "#000000"

◆ DEFAULT_FONT_NAME

const DEFAULT_FONT_NAME = "Times,serif"

◆ DEFAULT_FONT_SIZE

const DEFAULT_FONT_SIZE = 12

◆ DEFAULT_TAB_STRING

const DEFAULT_TAB_STRING = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

◆ maxToken

const maxToken = 136

size of token definition table

◆ NL_BODY

const NL_BODY = 10

◆ NL_BULLET

const NL_BULLET = 11

◆ NL_NONE

const NL_NONE = 0

◆ TokenTable

const array [0..maxToken] of TTokenDef TokenTable

the RTF token definition table

◆ XML_DECLARATION

const XML_DECLARATION = "<?xml version='1.0'?>"