mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
Added a callback on selection change
This commit is contained in:
committed by
ArthurSonzogni
parent
70a6a04e80
commit
dc70091203
@@ -70,6 +70,8 @@ class ScreenInteractive : public Screen {
|
||||
|
||||
// Selection API.
|
||||
// TODO: Implement somethings here.
|
||||
std::string GetSelectedContent(void);
|
||||
void onSelectionModified(std::function<void(void)> callback);
|
||||
|
||||
private:
|
||||
void ExitNow();
|
||||
@@ -141,6 +143,8 @@ class ScreenInteractive : public Screen {
|
||||
int selection_start_y_ = 0;
|
||||
int selection_end_x_ = 0;
|
||||
int selection_end_y_ = 0;
|
||||
bool selection_changed = false;
|
||||
std::function<void(void)> selection_changed_callback_ = nullptr;
|
||||
|
||||
friend class Loop;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user