|
FTXUI 6.1.9
C++ functional terminal UI.
|
Loop 是一個用於管理元件事件循環的類別。 More...
#include <loop.hpp>
Public Member Functions | |
| Loop (ScreenInteractive *screen, Component component) | |
| 迴圈是 Component 和 ScreenInteractive 的包裝器。 它用於在終端機中執行元件。 | |
| ~Loop () | |
| bool | HasQuitted () |
| 迴圈是否已退出。 | |
| void | RunOnce () |
執行迴圈。讓 component 處理所有待處理的任務/事件。 如果前一個影格失效,可能會繪製一個新影格。 在迴圈完成之前返回 true。 | |
| void | RunOnceBlocking () |
等待至少一個事件被處理並執行 Loop::RunOnce()。 | |
| void | Run () |
| 執行迴圈,阻塞當前執行緒,直到迴圈退出。 | |
| Loop (const Loop &)=default | |
| Loop (Loop &&)=delete | |
| Loop & | operator= (Loop &&)=delete |
| Loop (const ScreenInteractive &)=delete | |
| Loop & | operator= (const Loop &)=delete |
Loop 是一個用於管理元件事件循環的類別。
它負責執行元件、處理事件,並 更新畫面。
Loop 類別旨在與 ScreenInteractive 物件一起使用, 該物件代表終端機畫面。
範例
| Loop | ( | ScreenInteractive * | screen, |
| Component | component ) |
迴圈是 Component 和 ScreenInteractive 的包裝器。 它用於在終端機中執行元件。
| [in] | screen | 要使用的螢幕。 |
| [in] | component | 要執行的元件。 |
|
delete |
| void RunOnce | ( | ) |
| void RunOnceBlocking | ( | ) |
等待至少一個事件被處理並執行 Loop::RunOnce()。