29 #include <QtCore/QHash>
41 #define DEFAULT_RENDITION 0
42 #define RE_BOLD (1 << 0)
43 #define RE_BLINK (1 << 1)
44 #define RE_UNDERLINE (1 << 2)
45 #define RE_REVERSE (1 << 3) // Screen only
46 #define RE_INTENSIVE (1 << 3) // Widget only
47 #define RE_CURSOR (1 << 4)
48 #define RE_EXTENDED_CHAR (1 << 5)
197 bool extendedCharMatch(ushort hash , ushort* unicodePoints , ushort length)
const;
204 #endif // CHARACTER_H
An entry in a terminal display's color palette.
static const int LINE_DOUBLEWIDTH
#define DEFAULT_FORE_COLOR
#define DEFAULT_RENDITION
A single character in the terminal which consists of a unicode character value, foreground and backgr...
bool operator!=(const Character &a, const Character &b)
ushort extendedCharHash(ushort *unicodePoints, ushort length) const
#define COLOR_SPACE_DEFAULT
Describes the color of a single character in the terminal.
bool operator==(const Character &a, const Character &b)
quint16 charSequence
Experimental addition which allows a single Character instance to contain more than one unicode chara...
bool isBold(const ColorEntry *base) const
Returns true if this character should always be drawn in bold when it is drawn with the specified pal...
ushort createExtendedChar(ushort *unicodePoints, ushort length)
Adds a sequences of unicode characters to the table and returns a hash code which can be used later t...
quint8 rendition
A combination of RENDITION flags which specify options for drawing the character. ...
unsigned short vt100_graphics[32]
QHash< ushort, ushort * > extendedCharTable
unsigned char LineProperty
friend bool operator==(const Character &a, const Character &b)
Compares two characters and returns true if they have the same unicode character value, rendition and colors.
bool transparent
If true character backgrounds using this color should be transparent.
static const int LINE_WRAPPED
ExtendedCharTable()
Constructs a new character table.
friend bool operator!=(const Character &a, const Character &b)
Compares two characters and returns true if they have different unicode character values...
A table which stores sequences of unicode characters, referenced by hash keys.
bool extendedCharMatch(ushort hash, ushort *unicodePoints, ushort length) const
bool isTransparent(const ColorEntry *palette) const
Returns true if this character has a transparent background when it is drawn with the specified palet...
CharacterColor backgroundColor
The color used to draw this character's background.
bool bold
If true characters drawn using this color should be bold.
ushort * lookupExtendedChar(ushort hash, ushort &length) const
Looks up and returns a pointer to a sequence of unicode characters which was added to the table using...
CharacterColor foregroundColor
The foreground color used to draw this character.
static ExtendedCharTable instance
The global ExtendedCharTable instance.
quint16 character
The unicode character value for this character.
static const int LINE_DEFAULT
Character(quint16 _c= ' ', CharacterColor _f=CharacterColor(COLOR_SPACE_DEFAULT, DEFAULT_FORE_COLOR), CharacterColor _b=CharacterColor(COLOR_SPACE_DEFAULT, DEFAULT_BACK_COLOR), quint8 _r=0)
Constructs a new character.
#define COLOR_SPACE_SYSTEM
static const int LINE_DOUBLEHEIGHT
#define DEFAULT_BACK_COLOR