24 std::vector<std::vector<std::string>> menu_entries = {
42 int menu_selected_global = 0;
43 auto menu_global = Container::Vertical(
49 &menu_selected_global);
52 int g = menu_selected_global;
56 text(
"menu_selected_global = " + std::to_string(g)),
57 text(
"menu_selected[0] = " +
59 text(
"menu_selected[1] = " +
61 text(
"menu_selected[2] = " +
63 text(
"Value = " + value),
68 auto global = Container::Horizontal({
static ScreenInteractive TerminalOutput()
Component Menu(MenuOption options)
文字列表。選定的元素會被聚焦。
Component Renderer(Component child, std::function< Element()>)
回傳一個新的元件,類似於 |child|,但使用 |render| 作為 Component::Render() 事件。
Component Window(WindowOptions option)
一個可拖曳/可調整大小的視窗。要使用多個視窗,它們必須透過 Container::Stacked({...}) 元件堆疊。
virtual void Render(Screen &screen)
Element window(Element title, Element content, BorderStyle border=ROUNDED)
繪製帶有標題和邊框的視窗。
Element flex(Element)
使子元素按比例擴展以佔據容器中剩餘的空間。
Element text(std::wstring text)
顯示一段 Unicode 文字。
Element vbox(Elements)
一個垂直一個接一個顯示元素的容器。
std::shared_ptr< ComponentBase > Component