mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
We can retrieve the content of the selection
This commit is contained in:
committed by
ArthurSonzogni
parent
dc70091203
commit
307d8b51bf
@@ -69,8 +69,7 @@ class ScreenInteractive : public Screen {
|
||||
void ForceHandleCtrlZ(bool force);
|
||||
|
||||
// Selection API.
|
||||
// TODO: Implement somethings here.
|
||||
std::string GetSelectedContent(void);
|
||||
std::string GetSelectedContent(Component component);
|
||||
void onSelectionModified(std::function<void(void)> callback);
|
||||
|
||||
private:
|
||||
|
||||
@@ -48,6 +48,8 @@ class Node {
|
||||
// Step 4: Draw this element.
|
||||
virtual void Render(Screen& screen);
|
||||
|
||||
virtual std::string GetSelectedContent(Selection& selection);
|
||||
|
||||
// Layout may not resolve within a single iteration for some elements. This
|
||||
// allows them to request additionnal iterations. This signal must be
|
||||
// forwarded to children at least once.
|
||||
@@ -66,6 +68,7 @@ class Node {
|
||||
void Render(Screen& screen, const Element& element);
|
||||
void Render(Screen& screen, Node* node);
|
||||
void Render(Screen& screen, Node* node, Selection& selection);
|
||||
std::string GetNodeSelectedContent(Screen& screen, Node* node, Selection& selection);
|
||||
|
||||
} // namespace ftxui
|
||||
|
||||
|
||||
Reference in New Issue
Block a user