14 auto screen = App::Fullscreen();
23 auto RendererInfo = [](
const std::string& name,
int*
size) {
25 return text(name +
": " + std::to_string(*size)) |
center;
29 auto left = RendererInfo(
"Left", &left_size);
30 auto right = RendererInfo(
"Right", &right_size);
31 auto top = RendererInfo(
"Top", &top_size);
32 auto bottom = RendererInfo(
"Bottom", &bottom_size);
34 auto container = middle;
43 screen.Loop(renderer);
Component ResizableSplitTop(Component main, Component back, int *main_size)
マウスで設定可能な、2つのコンポーネント間の垂直分割。
Component Renderer(Component child, std::function< Element()>)
|child| に似た、|render| をComponent::Render()イベントとして 使用する新しいComponentを返します。
Component ResizableSplitRight(Component main, Component back, int *main_size)
マウスで設定可能な、2つのコンポーネント間の水平分割。
Component ResizableSplitBottom(Component main, Component back, int *main_size)
マウスで設定可能な、2つのコンポーネント間の垂直分割。
Component ResizableSplitLeft(Component main, Component back, int *main_size)
マウスで設定可能な、2つのコンポーネント間の水平分割。
Element text(std::string_view text)
UTF8エンコードされたユニコードテキストを表示します。
Decorator size(WidthOrHeight direction, Constraint constraint, int value)
要素のサイズに制約を適用する。
Element center(Element child)
要素を水平方向および垂直方向に中央揃えします。
Element border(Element child)
要素の周囲にボーダーを描画します。