33 auto menu = Container::Vertical(
54 hbox(
text(
"selected = "),
text(std::to_string(selected))),
61 screen.Loop(renderer);
63 std::cout <<
"Selected element = " << selected << std::endl;
static ScreenInteractive TerminalOutput()
AnimatedColorsOption animated_colors
Component MenuEntry(MenuEntryOption options)
一個特定的菜單條目。它們可以放入 Container::Vertical 中以形成菜單。
Component Renderer(Component child, std::function< Element()>)
回傳一個新的元件,類似於 |child|,但使用 |render| 作為 Component::Render() 事件。
virtual void Render(Screen &screen)
Decorator bgcolor(Color)
使用背景顏色進行裝飾。
Element text(std::wstring text)
顯示一段 Unicode 文字。
Element separator()
在兩個元素之間繪製垂直或水平分隔線。
Element vbox(Elements)
一個垂直一個接一個顯示元素的容器。
Color 是一個在終端使用者介面中表示顏色的類別。
Element hbox(Elements)
一個逐一水平顯示元素的容器。
Element frame(Element)
允許元素顯示在「虛擬」區域內。其大小可以大於其容器。在這種情況下,只會顯示較小的一部分。視圖可滾動以使聚焦元素可見。
AnimatedColorOption foreground
AnimatedColorOption background