TextParserTempl

Parses text from XML/ETML

See "ETML.md" for info.

Constraints: * Due to the poor documentation of the replacement XML libraries, I have to use Phobos's own and outdated library. * <text> chunks are mandatory with ID. * Currently line formatting (understrike, etc.) is not supported, and every line uses default formatting.

Constructors

this
this()

Constructor with no arguments

this
this(string _input)

Creates a new instance with a select string input.

Members

Functions

defaultFormatting
CharacterFormattingInfo!BitmapType defaultFormatting()

Gets the default formatting

defaultFormatting
CharacterFormattingInfo!BitmapType defaultFormatting(CharacterFormattingInfo!BitmapType val)

Sets the default formatting

input
string input()

Returns the root/output element Sets/gets the input

parse
void parse()

Parses the formatted text, then returns the output.

reset
void reset()

Resets the output, but keeps the public parameters. Input must be set to default or to new target separately.

Variables

chrFrmt
CharacterFormattingInfo!BitmapType[] chrFrmt;

All character format, that has been parsed so far

colorStack
uint[] colorStack;
Undocumented in source.
fontStack
Fontset!BitmapType[] fontStack;

Fonttype formatting stack. Used for referring back to previous font types.

fontsets
Fontset!BitmapType[string] fontsets;

Fontset name association table

icons
BitmapType[string] icons;

Icon name association table

output
TextTempl!BitmapType[string] output;

All texts found within the ETML file

Meta