1#ifndef FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
2#define FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
22using Component = std::shared_ptr<ComponentBase>;
23class ScreenInteractivePrivate;
60 enum class Dimension {
66 Dimension dimension_ = Dimension::Fixed;
67 bool use_alternative_screen_ =
false;
71 bool use_alternative_screen);
76 std::string set_cursor_position;
77 std::string reset_cursor_position;
79 std::atomic<bool> quit_ =
false;
80 std::thread event_listener_;
81 std::thread animation_listener_;
82 bool animation_requested_ =
false;
88 bool mouse_captured =
false;
89 bool previous_frame_resized_ =
false;
static void SigStop(ScreenInteractive &s)
static ScreenInteractive TerminalOutput()
static ScreenInteractive FixedSize(int dimx, int dimy)
void PostEvent(Event event)
static ScreenInteractive FitComponent()
static ScreenInteractive Fullscreen()
static ScreenInteractive * Active()
CapturedMouse CaptureMouse()
void RequestAnimationFrame()
Closure ExitLoopClosure()
Closure WithRestoredIO(Closure)
Decorate a function. It executes the same way, but with the currently active screen terminal hooks te...
A rectangular grid of Pixel.
std::chrono::time_point< Clock > TimePoint
std::unique_ptr< CapturedMouseInterface > CapturedMouse
std::unique_ptr< ReceiverImpl< T > > Receiver
std::unique_ptr< SenderImpl< T > > Sender
std::variant< Event, Closure, AnimationTask > Task
std::function< void()> Closure
std::shared_ptr< ComponentBase > Component
Represent an event. It can be key press event, a terminal resize, or more ...