diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-01-11 22:32:47 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-01-11 22:32:47 +0100 |
commit | b972e26307d0f87ffdc5b9a88d95ab3fe319d067 (patch) | |
tree | 728e0e7d6145248db1708720d2c215d8bda757c9 /buffer.h | |
parent | 7ee15dee3eb9b8d0fc49206b9fd9a56e84bd0a1a (diff) |
Show basic prompt
Diffstat (limited to 'buffer.h')
-rw-r--r-- | buffer.h | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -13,9 +13,6 @@ using namespace std; class Manager; class Buffer{ - TextBlob tb; - Manager *manager; - struct Cell{ char c; bool special; @@ -26,18 +23,25 @@ class Buffer{ i64 fromx; //starting at what x into the line does this screen line have text vector<Cell> cells; }; - vector<ScreenLine> screen; - i64 lastWidth=-1,lastHeight=-1; //excluding the gutter struct Cursorpos{ i64 line,x; }; - Cursorpos cursor={0,0}; struct Screenpos{ i64 y,x; }; + Manager *const manager; + const bool singleLineMode=false; + + TextBlob tb; + + vector<ScreenLine> screen; + i64 lastWidth=-1,lastHeight=-1; //excluding the gutter + + Cursorpos cursor={0,0}; + vector<ScreenLine> layoutLine(const string &line,i64 linenum,i64 width); void performInitialLayout(i64 width,i64 height); void renewLayout(i64 topLine,i64 topPart,i64 width,i64 height); @@ -52,7 +56,10 @@ public: string filename; Buffer(Manager *manager); + Buffer(Manager *manager,bool singleLineMode); void receive(const Command &cmd); void show(i64 atx,i64 aty,i64 width,i64 height); + + string getText() const; }; |