mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2026-01-23 11:16:26 +00:00
tabTo, insertc, deletec for TextPort.
git-svn-id: svn://qnap.local/TwoTerm/trunk@2023 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
@@ -137,29 +137,7 @@ void Screen::putc(TextPort *textPort, uint8_t c)
|
||||
|
||||
|
||||
|
||||
void Screen::tabTo(TextPort *textPort, unsigned xPos)
|
||||
{
|
||||
if (!textPort) textPort = &_port;
|
||||
|
||||
CharInfo clear(' ', _flag);
|
||||
iPoint cursor = textPort->absoluteCursor();
|
||||
|
||||
xPos = std::min((int)xPos, textPort->frame.width() - 1);
|
||||
|
||||
_updates.push_back(cursor);
|
||||
|
||||
for (unsigned x = textPort->cursor.x; x < xPos; ++x)
|
||||
{
|
||||
|
||||
_screen[cursor.y][x + textPort->frame.minX()] = clear;
|
||||
}
|
||||
|
||||
textPort->cursor.x = xPos;
|
||||
if (textPort != &_port) _port.cursor = textPort->absoluteCursor();
|
||||
|
||||
_updates.push_back(_port.cursor);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user