Make use of Box instead of my custom Region struct

This commit is contained in:
Clement Roblot
2024-10-31 20:57:45 +07:00
committed by ArthurSonzogni
parent b352e13253
commit 011b9a1426
4 changed files with 24 additions and 29 deletions

View File

@@ -10,6 +10,7 @@
#include "ftxui/screen/image.hpp" // for Pixel, Image
#include "ftxui/screen/terminal.hpp" // for Dimensions
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
namespace ftxui {
@@ -62,6 +63,11 @@ class Screen : public Image {
Cursor cursor() const { return cursor_; }
void SetCursor(Cursor cursor) { cursor_ = cursor; }
bool selection_enabled = false;
CapturedMouse selection_pending;
Box selection_region;
std::string selection_text;
// Store an hyperlink in the screen. Return the id of the hyperlink. The id is
// used to identify the hyperlink when the user click on it.
uint8_t RegisterHyperlink(const std::string& link);