mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2025-01-05 05:29:36 +00:00
git-svn-id: svn://qnap.local/TwoTerm/trunk@1892 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
436c81bdf1
commit
786c120805
@ -74,6 +74,15 @@ void Screen::setFlag(uint8_t flag)
|
|||||||
_flag = flag;
|
_flag = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Screen::setFlagBit(uint8_t bit)
|
||||||
|
{
|
||||||
|
_flag |= bit;
|
||||||
|
}
|
||||||
|
void Screen::clearFlagBit(uint8_t bit)
|
||||||
|
{
|
||||||
|
_flag &= ~bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Screen::putc(uint8_t c, bool incrementX)
|
void Screen::putc(uint8_t c, bool incrementX)
|
||||||
{
|
{
|
||||||
|
29
Screen.h
29
Screen.h
@ -27,6 +27,30 @@ typedef struct CharInfo {
|
|||||||
|
|
||||||
} CharInfo;
|
} CharInfo;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct ViewPort {
|
||||||
|
|
||||||
|
|
||||||
|
iRect frame;
|
||||||
|
|
||||||
|
union flags
|
||||||
|
{
|
||||||
|
unsigned wrap:1;
|
||||||
|
unsigned advance:1;
|
||||||
|
unsigned lineFeed:1;
|
||||||
|
unsigned scroll:1;
|
||||||
|
|
||||||
|
flags()
|
||||||
|
{
|
||||||
|
wrap = 0;
|
||||||
|
advance = 0;
|
||||||
|
lineFeed = 0;
|
||||||
|
scroll = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
} flags;
|
||||||
|
};
|
||||||
|
|
||||||
class Screen {
|
class Screen {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -37,7 +61,7 @@ public:
|
|||||||
static const unsigned FlagBold = 0x04;
|
static const unsigned FlagBold = 0x04;
|
||||||
static const unsigned FlagUnderscore = 0x08;
|
static const unsigned FlagUnderscore = 0x08;
|
||||||
static const unsigned FlagBlink = 0x10;
|
static const unsigned FlagBlink = 0x10;
|
||||||
static const unsigned FlagSelected = 0x20;
|
static const unsigned FlagSelected = 0x8000;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -81,6 +105,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void setFlag(uint8_t flag);
|
void setFlag(uint8_t flag);
|
||||||
|
void setFlagBit(uint8_t bit);
|
||||||
|
void clearFlagBit(uint8_t bit);
|
||||||
|
|
||||||
|
|
||||||
void putc(uint8_t c, bool incrementX = true);
|
void putc(uint8_t c, bool incrementX = true);
|
||||||
CharInfo getc(int x, int y) const;
|
CharInfo getc(int x, int y) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user