18 Component vlist = Container::Vertical(std::move(children));
28 return std::make_shared<ComponentBase>();
Component Inner(std::vector< Component > children)
Element Render()
绘制组件。 构建一个 ftxui::Element,用于在表示此 ftxui::ComponentBase 的 ftxui::Screen 上绘制。 请覆盖 OnRender() 以修改渲染。
static ScreenInteractive FitComponent()
创建一个 ScreenInteractive,其宽度和高度与正在绘制的组件匹配。
void Loop(Component)
执行主循环。
Component Renderer(Component child, std::function< Element()>)
返回一个新组件,类似于 |child|,但使用 |render| 作为 Component::Render() 事件。
Element text(std::wstring text)
显示一段Unicode文本。
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase
Element hbox(Elements)
一个按水平顺序逐一显示元素的容器。
std::shared_ptr< ComponentBase > Component
Component Collapsible(ConstStringRef label, Component child, Ref< bool > show=false)