Modularize display code and add representation of wrapped line flag
This commit is contained in:
+11
-1
@@ -60,13 +60,16 @@ namespace Terminal {
|
||||
class Row {
|
||||
public:
|
||||
std::vector<Cell> cells;
|
||||
bool wrap;
|
||||
|
||||
Row( size_t s_width )
|
||||
: cells( s_width )
|
||||
: cells( s_width ), wrap( false )
|
||||
{}
|
||||
|
||||
void insert_cell( int col );
|
||||
void delete_cell( int col );
|
||||
|
||||
void reset( void );
|
||||
};
|
||||
|
||||
class SavedCursor {
|
||||
@@ -161,6 +164,13 @@ namespace Terminal {
|
||||
|
||||
void move_rows_autoscroll( int rows );
|
||||
|
||||
Row *get_row( int row )
|
||||
{
|
||||
if ( row == -1 ) row = ds.get_cursor_row();
|
||||
|
||||
return &rows[ row ];
|
||||
}
|
||||
|
||||
inline Cell *get_cell( void )
|
||||
{
|
||||
return &rows[ ds.get_cursor_row() ].cells[ ds.get_cursor_col() ];
|
||||
|
||||
Reference in New Issue
Block a user