3#ifndef FTXUI_COMPONENT_LOOP_HPP
4#define FTXUI_COMPONENT_LOOP_HPP
13using Component = std::shared_ptr<ComponentBase>;
14class ScreenInteractive;
bool HasQuitted()
ループが終了したかどうか。
Loop(const ScreenInteractive &)=delete
void Run()
ループが終了するまで、現在のスレッドをブロックしてループを実行します。
Loop(ScreenInteractive *screen, Component component)
LoopはComponentとScreenInteractiveのラッパーです。 これはターミナルでコンポーネントを実行するために使用されます。
Loop & operator=(const Loop &)=delete
void RunOnce()
ループを実行します。componentに保留中のすべてのタスク/イベントを処理させます。 前のフレームが無効になった場合、新しいフレームが描画される可能性があります。 ループが完了するまでtrueを返し...
Loop(const Loop &)=default
Loop & operator=(Loop &&)=delete
void RunOnceBlocking()
少なくとも1つのイベントが処理されるのを待ち、Loop::RunOnce()を実行します。
Loopは、コンポーネントのイベントループを管理するクラスです。
ScreenInteractive はイベントを処理し、メインループを実行し、コンポーネントを管理できる Screen です。
std::shared_ptr< ComponentBase > Component