#include <string>
if (focused) {
text(
"> " + label +
" "),
});
}
return text(
" " + label +
" ");
});
};
int main() {
Instance(
"focus",
focus),
}));
return 0;
}
static ScreenInteractive Fullscreen()
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Element focusCursorBarBlinking(Element)
Same as focus, but set the cursor shape to be a blinking bar.
std::function< Element(Element)> Decorator
std::shared_ptr< ComponentBase > Component
Element focusCursorUnderlineBlinking(Element)
Same as focus, but set the cursor shape to be a blinking underline.
Element focusCursorBar(Element)
Same as focus, but set the cursor shape to be a still block.
Element focusCursorBlock(Element)
Same as focus, but set the cursor shape to be a still block.
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Element hbox(Elements)
A container displaying elements horizontally one by one.
Element focusCursorUnderline(Element)
Same as focus, but set the cursor shape to be a still underline.
Element text(std::wstring text)
Display a piece of unicode text.
Element focus(Element)
Set the child to be the one in focus globally.
Element focusCursorBlockBlinking(Element)
Same as focus, but set the cursor shape to be a blinking block.