StyleSheet

Defines style data for the Concrete GUI.

Constructors

this
this()

Creates a default stylesheet.

Members

Functions

addChrFormatting
void addChrFormatting(CharacterFormattingInfo!Bitmap8Bit frmt, string ID)

Adds a character formatting to the stylesheet with the given identifier. IMPORTANT: ID of "default" must be set at least in order to ensure fallback capabilities!

addFontset
void addFontset(Fontset!Bitmap8Bit f, string ID)

Adds a fontset to the stylesheet with the given ID. IMPORTANT: ID of "default" must be set at least in order to ensure fallback capabilities!

duplicateChrFormatting
void duplicateChrFormatting(string src, string dest)

Duplicates character formatting for multiple IDs.

getChrFormatting
CharacterFormattingInfo!Bitmap8Bit getChrFormatting(string ID)

Returns the character formatting with the given ID, or the default one if not found.

getColor
ubyte getColor(string colorName)

Returns the color that matches the name, or 0 if not found.

getFontset
Fontset!Bitmap8Bit getFontset(string ID)

Returns the fontset with the given ID, or the default one if not found.

getImage
Bitmap8Bit getImage(string name)

Returns the image that matches the name, or null if not found.

setColor
void setColor(ubyte c, string colorName)

Sets the given color to the supplied name to be recalled by element draw functions.

setImage
void setImage(Bitmap8Bit bitmap, string name)

Sets the image of the given name.

Static variables

defaultpaletteforGUI
enum Color[] defaultpaletteforGUI;

Default color palette. First 16 colors are reserved for GUI defaults in a single workspace, second 16 colors are of the RGBI standard, the rest could be used for other GUI elements such as backgrounds and icons

Variables

_chrFormat
HashMap!(string, CharacterFormattingInfo!Bitmap8Bit) _chrFormat;

Character formatting

color
HashMap!(string, ubyte) color;

Colors are identified by strings.

drawParameters
HashMap!(string, int) drawParameters;

Draw parameters are used for border thickness, padding, etc...

font
HashMap!(string, Fontset!Bitmap8Bit) font;

Fonts stored here.

images
HashMap!(string, Bitmap8Bit) images;

For icons, pattern fills, etc...

pattern
HashMap!(string, ubyte[]) pattern;

Stores line patterns.

Meta