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)
46 #define RE_INTENSIVE (1 << 3)
47 #define RE_CURSOR (1 << 4)
48 #define RE_EXTENDED_CHAR (1 << 5)
#define COLOR_SPACE_SYSTEM
#define COLOR_SPACE_DEFAULT
#define DEFAULT_FORE_COLOR
#define DEFAULT_BACK_COLOR
static const int LINE_DOUBLEHEIGHT
unsigned char LineProperty
unsigned short vt100_graphics[32]
static const int LINE_WRAPPED
bool operator!=(const Character &a, const Character &b)
bool operator==(const Character &a, const Character &b)
#define DEFAULT_RENDITION
static const int LINE_DOUBLEWIDTH
static const int LINE_DEFAULT
Describes the color of a single character in the terminal.
A single character in the terminal which consists of a unicode character value, foreground and backgr...
CharacterColor backgroundColor
The color used to draw this character's background.
bool isTransparent(const ColorEntry *palette) const
Returns true if this character has a transparent background when it is drawn with the specified palet...
quint16 charSequence
Experimental addition which allows a single Character instance to contain more than one unicode chara...
friend bool operator!=(const Character &a, const Character &b)
Compares two characters and returns true if they have different unicode character values,...
friend bool operator==(const Character &a, const Character &b)
Compares two characters and returns true if they have the same unicode character value,...
CharacterColor foregroundColor
The foreground color used to draw this character.
quint16 character
The unicode character value for this character.
quint8 rendition
A combination of RENDITION flags which specify options for drawing the character.
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...
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.
An entry in a terminal display's color palette.
bool bold
If true characters drawn using this color should be bold.
bool transparent
If true character backgrounds using this color should be transparent.
A table which stores sequences of unicode characters, referenced by hash keys.
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...
static ExtendedCharTable instance
The global ExtendedCharTable instance.
ushort extendedCharHash(ushort *unicodePoints, ushort length) const
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...
QHash< ushort, ushort * > extendedCharTable
ExtendedCharTable()
Constructs a new character table.
bool extendedCharMatch(ushort hash, ushort *unicodePoints, ushort length) const
std::string hash(hash_fptr hash_fcn, const std::string &str, int result_buf_len)