First stab at modularizing (broken build)
This commit is contained in:
+4
-45
@@ -7,30 +7,10 @@
|
||||
#include <deque>
|
||||
|
||||
#include "parser.hpp"
|
||||
#include "terminalframebuffer.hpp"
|
||||
#include "terminalactionstate.hpp"
|
||||
|
||||
namespace Terminal {
|
||||
class Cell {
|
||||
public:
|
||||
Cell *overlapping_cell;
|
||||
std::vector<wchar_t> contents;
|
||||
std::vector<Cell *> overlapped_cells;
|
||||
char fallback; /* first character is combining character */
|
||||
|
||||
Cell();
|
||||
|
||||
Cell( const Cell & );
|
||||
Cell & operator=( const Cell & );
|
||||
|
||||
void reset( void );
|
||||
};
|
||||
|
||||
class Row {
|
||||
public:
|
||||
std::vector<Cell> cells;
|
||||
|
||||
Row( size_t s_width );
|
||||
};
|
||||
|
||||
class Emulator {
|
||||
friend void Parser::Print::act_on_terminal( Emulator * );
|
||||
friend void Parser::Execute::act_on_terminal( Emulator * );
|
||||
@@ -42,17 +22,10 @@ namespace Terminal {
|
||||
|
||||
private:
|
||||
Parser::UTF8Parser parser;
|
||||
|
||||
int width, height;
|
||||
int cursor_col, cursor_row;
|
||||
int combining_char_col, combining_char_row;
|
||||
|
||||
std::deque<Row> rows;
|
||||
std::string params;
|
||||
std::string dispatch_chars;
|
||||
Framebuffer fb;
|
||||
ActionState as;
|
||||
|
||||
std::string terminal_to_host;
|
||||
std::string errors;
|
||||
|
||||
/* action methods */
|
||||
void print( Parser::Print *act );
|
||||
@@ -63,14 +36,6 @@ namespace Terminal {
|
||||
void CSI_dispatch( Parser::CSI_Dispatch *act );
|
||||
void Esc_dispatch( Parser::Esc_Dispatch *act );
|
||||
|
||||
void scroll( int N );
|
||||
void autoscroll( void );
|
||||
void newgrapheme( void );
|
||||
|
||||
void parse_params( void );
|
||||
std::vector<int> parsed_params;
|
||||
int getparam( size_t N, int defaultval );
|
||||
|
||||
/* CSI and Escape methods */
|
||||
void CSI_EL( void );
|
||||
void CSI_ED( void );
|
||||
@@ -80,15 +45,9 @@ namespace Terminal {
|
||||
|
||||
public:
|
||||
Emulator( size_t s_width, size_t s_height );
|
||||
~Emulator();
|
||||
|
||||
std::string input( char c, int debug_fd );
|
||||
|
||||
void resize( size_t s_width, size_t s_height );
|
||||
|
||||
size_t get_width( void ) { return width; }
|
||||
size_t get_height( void ) { return height; }
|
||||
|
||||
void debug_printout( int fd );
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user