Add text mode handling.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "internal/io/io.h"
|
||||
#include "definitions.h"
|
||||
#include "pch.h"
|
||||
|
||||
namespace bed::internal::ui {
|
||||
@@ -38,9 +38,8 @@ struct CommandIO {
|
||||
uint16_t term_height;
|
||||
uint16_t term_width;
|
||||
BEd &bed;
|
||||
io::IO &io;
|
||||
|
||||
CommandIO(BEd &, io::IO &);
|
||||
CommandIO(BEd &);
|
||||
std::pair<std::string, bool> run();
|
||||
void redraw();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "definitions.h"
|
||||
#include "pch.h"
|
||||
|
||||
namespace bed::internal::ui {
|
||||
struct TextMode {
|
||||
std::string cmd;
|
||||
uint16_t cursor;
|
||||
uint16_t start;
|
||||
uint16_t height;
|
||||
uint16_t term_height;
|
||||
uint16_t term_width;
|
||||
BEd &bed;
|
||||
|
||||
TextMode(BEd &);
|
||||
std::pair<vase::Shard *, bool> run();
|
||||
void grow(size_t required_height);
|
||||
void redraw();
|
||||
};
|
||||
} // namespace bed::internal::ui
|
||||
Reference in New Issue
Block a user