We can select in 2D

This commit is contained in:
Clement Roblot
2024-08-02 20:38:17 +07:00
parent 73cd1d0190
commit 9dfbdd168b
3 changed files with 31 additions and 28 deletions

View File

@@ -33,6 +33,14 @@ enum BorderStyle {
EMPTY,
};
typedef struct {
int startx;
int endx;
int starty;
int endy;
} Region;
// Pipe elements into decorator togethers.
// For instance the next lines are equivalents:
// -> text("ftxui") | bold | underlined
@@ -96,8 +104,8 @@ Element canvas(std::function<void(Canvas&)>);
Element bold(Element);
Element dim(Element);
Element inverted(Element);
Element selected(int &start, int &end, Element);
Decorator selected(int &start, int &end);
Element selected(Region &selection, Element);
Decorator selected(Region &selection);
Element underlined(Element);
Element underlinedDouble(Element);
Element blink(Element);