13 bool checked[3] = {
false,
false,
false};
18 Add(Container::Vertical({
22 Slider(
"Slider", &slider, 0.f, 100.f),
30 int window_1_left = 20;
31 int window_1_top = 10;
32 int window_1_width = 40;
33 int window_1_height = 20;
37 .title =
"First window",
38 .left = &window_1_left,
40 .width = &window_1_width,
41 .height = &window_1_height,
62 auto window_5 =
Window({});
64 auto window_container = Container::Stacked({
73 return text(
"window_1: " +
74 std::to_string(window_1_width) +
"x" +
75 std::to_string(window_1_height) +
" + " +
76 std::to_string(window_1_left) +
"," +
77 std::to_string(window_1_top));
80 auto layout = Container::Vertical({
Component DummyWindowContent()
void Add(Component children)
新增一個子項。 @param child 要附加的子項。
static ScreenInteractive Fullscreen()
它將自己實作為 ftxui::Element 進行渲染。它透過回應 ftxui::Event 來實現鍵盤導航。
Component Checkbox(CheckboxOption options)
Component Renderer(Component child, std::function< Element()>)
回傳一個新的元件,類似於 |child|,但使用 |render| 作為 Component::Render() 事件。
Component Window(WindowOptions option)
一個可拖曳/可調整大小的視窗。要使用多個視窗,它們必須透過 Container::Stacked({...}) 元件堆疊。
Element text(std::wstring text)
顯示一段 Unicode 文字。
return Make< Impl >(option)
Component Slider(SliderOption< T > options)
std::shared_ptr< ComponentBase > Component