Modularize display code and add representation of wrapped line flag

This commit is contained in:
Keith Winstein
2011-02-09 15:30:50 -05:00
parent 1ee54cd70a
commit 71dfd5a763
7 changed files with 141 additions and 104 deletions
+30
View File
@@ -0,0 +1,30 @@
#ifndef TERMINALDISPLAY_HPP
#define TERMINALDISPLAY_HPP
#include "terminalframebuffer.hpp"
namespace Terminal {
class Display {
private:
bool initialized;
Framebuffer last_frame;
std::string current_rendition_string;
int cursor_x, cursor_y;
int x, y;
std::string str;
void put_cell( Framebuffer &f );
public:
Display( int width, int height )
: initialized( false ), last_frame( width, height ),
current_rendition_string(), cursor_x( -1 ), cursor_y( -1 ),
x( 0 ), y( 0 ), str( "" )
{}
std::string new_frame( Framebuffer &f );
void invalidate( void ) { initialized = false; }
};
}
#endif