Save and restore cursor
This commit is contained in:
@@ -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 );
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user