mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-15 23:48:15 +08:00
Reformat + fix pending selection.
This commit is contained in:
@@ -27,7 +27,6 @@ using Component = std::shared_ptr<ComponentBase>;
|
||||
class ScreenInteractivePrivate;
|
||||
|
||||
typedef struct {
|
||||
|
||||
uint16_t startx = 0;
|
||||
uint16_t endx = 0;
|
||||
uint16_t starty = 0;
|
||||
@@ -76,7 +75,7 @@ class ScreenInteractive : public Screen {
|
||||
void ForceHandleCtrlC(bool force);
|
||||
void ForceHandleCtrlZ(bool force);
|
||||
|
||||
std::string getSelection(void);
|
||||
std::string GetSelection();
|
||||
|
||||
private:
|
||||
void ExitNow();
|
||||
@@ -92,8 +91,8 @@ class ScreenInteractive : public Screen {
|
||||
void RunOnceBlocking(Component component);
|
||||
|
||||
void HandleTask(Component component, Task& task);
|
||||
bool selectableCatchEvent(Event event);
|
||||
void refreshSelection(void);
|
||||
bool HandleSelection(Event event);
|
||||
void RefreshSelection();
|
||||
void Draw(Component component);
|
||||
void ResetCursorPosition();
|
||||
|
||||
@@ -138,8 +137,10 @@ class ScreenInteractive : public Screen {
|
||||
bool force_handle_ctrl_c_ = true;
|
||||
bool force_handle_ctrl_z_ = true;
|
||||
|
||||
Region selectedRegion;
|
||||
std::string selectedText;
|
||||
bool selection_enabled = false;
|
||||
CapturedMouse selection_pending;
|
||||
Region selection_region;
|
||||
std::string selection_text;
|
||||
|
||||
// The style of the cursor to restore on exit.
|
||||
int cursor_reset_shape_ = 1;
|
||||
|
@@ -52,6 +52,12 @@ class Node {
|
||||
};
|
||||
virtual void Check(Status* status);
|
||||
|
||||
// Selection.
|
||||
// Propagated from Parents to Children.
|
||||
virtual void Select(Box selected_area) {
|
||||
// TODO: Implement this.
|
||||
}
|
||||
|
||||
protected:
|
||||
Elements children_;
|
||||
Requirement requirement_;
|
||||
|
Reference in New Issue
Block a user