mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-16 16:08:08 +08:00
We can catch mouse events
This commit is contained in:

committed by
ArthurSonzogni

parent
75abd75b67
commit
1325256aa9
@@ -26,6 +26,15 @@ struct Event;
|
||||
using Component = std::shared_ptr<ComponentBase>;
|
||||
class ScreenInteractivePrivate;
|
||||
|
||||
typedef struct {
|
||||
|
||||
uint16_t startx = 0;
|
||||
uint16_t endx = 0;
|
||||
uint16_t starty = 0;
|
||||
uint16_t endy = 0;
|
||||
bool changed = false;
|
||||
} Region;
|
||||
|
||||
class ScreenInteractive : public Screen {
|
||||
public:
|
||||
// Constructors:
|
||||
@@ -82,6 +91,8 @@ class ScreenInteractive : public Screen {
|
||||
void RunOnceBlocking(Component component);
|
||||
|
||||
void HandleTask(Component component, Task& task);
|
||||
bool selectableCatchEvent(Event event);
|
||||
std::string getSelection(void);
|
||||
void Draw(Component component);
|
||||
void ResetCursorPosition();
|
||||
|
||||
@@ -126,6 +137,8 @@ class ScreenInteractive : public Screen {
|
||||
bool force_handle_ctrl_c_ = true;
|
||||
bool force_handle_ctrl_z_ = true;
|
||||
|
||||
Region selectedRegion;
|
||||
|
||||
// The style of the cursor to restore on exit.
|
||||
int cursor_reset_shape_ = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user