4#ifndef FTXUI_COMPONENT_APP_HPP
5#define FTXUI_COMPONENT_APP_HPP
35class FTXUI_EXPORT(COMPONENT) App :
public Screen {
42 static App FixedSize(
int dimx,
int dimy);
54 static App FullscreenPrimaryScreen();
59 static App FullscreenAlternateScreen();
73 App& operator=(App&&) noexcept;
74 App(const App&) = delete;
75 App& operator=(const App&) = delete;
86 void TrackMouse(
bool enable = true);
100 void HandlePipedInput(
bool enable = true);
103 static App* Active();
129 void ForceHandleCtrlC(
bool force = true);
133 void ForceHandleCtrlZ(
bool force = true);
139 void Post(
Task task);
143 void PostEvent(Event event);
147 static
void PostEventOrExecute(
Closure closure);
151 void RequestAnimationFrame();
162 std::
string GetSelection();
165 void SelectionChange(std::function<
void()> callback);
170 const std::
string& TerminalName() const;
173 int TerminalVersion() const;
176 const std::
string& TerminalEmulatorName() const;
179 const std::
string& TerminalEmulatorVersion() const;
182 const std::vector<
int>& TerminalCapabilities() const;
185 std::vector<std::
string> TerminalCapabilityNames() const;
197 void RunOnce(const
Component& component);
198 void RunOnceBlocking(
Component component);
201 bool HandleSelection(
bool handled, Event event);
203 std::
string ResetCursorPosition();
205 void RequestCursorPosition(
bool force = false);
207 void TerminalSend(std::string_view);
208 void TerminalFlush();
210 void InstallPipedInputHandling();
211 void InstallTerminalInfo();
213 void Signal(
int signal);
215 size_t FetchTerminalEvents();
217 void PostAnimationTask();
220 explicit App(std::unique_ptr<Internal> internal,
int dimx,
int dimy);
222 std::unique_ptr<Internal> internal_;
229 static void Signal(App& s,
int signal) { s.Signal(signal); }
L'espace de noms FTXUI ftxui::
std::unique_ptr< CapturedMouseInterface > CapturedMouse
std::variant< Event, Closure, AnimationTask > Task
std::function< void()> Closure
std::shared_ptr< ComponentBase > Component