Save and restore cursor

This commit is contained in:
Keith Winstein
2011-01-31 23:30:16 -05:00
parent ad29a350d6
commit a33d4f9b40
3 changed files with 60 additions and 1 deletions
+17
View File
@@ -31,6 +31,18 @@ namespace Terminal {
Row( size_t s_width );
};
class SavedCursor {
public:
int cursor_col, cursor_row;
std::vector<int> renditions;
/* character set shift state */
bool auto_wrap_mode;
bool origin_mode;
/* state of selective erase */
SavedCursor();
};
class DrawState {
private:
int width, height;
@@ -47,6 +59,8 @@ namespace Terminal {
std::vector<int> renditions;
SavedCursor save;
public:
bool next_print_will_wrap;
bool origin_mode;
@@ -82,6 +96,9 @@ namespace Terminal {
void add_rendition( int x ) { renditions.push_back( x ); }
const std::vector<int> get_renditions( void ) { return renditions; }
void save_cursor( void );
void restore_cursor( void );
DrawState( int s_width, int s_height );
};