23 for (
auto& it : event.
input()) {
24 codes +=
" " + std::to_string((
unsigned int)it);
32 std::vector<Event> keys;
39 for (
size_t i = std::max(0, (
int)keys.size() - 20); i < keys.size(); ++i) {
40 children.push_back(
text(
Code(keys[i])));
42 return vbox(children);
50 for (
size_t i = std::max(0, (
int)keys.size() - 20); i < keys.size(); ++i) {
51 children.push_back(
text(keys[i].DebugString()));
53 return vbox(children);
61 keys.push_back(event);
static ScreenInteractive TerminalOutput()
const std::string & input() const
Component Renderer(Component child, std::function< Element()>)
Retorna un nuevo Componente, similar a |child|, pero usando |render| como el evento Component::Render...
Component ResizableSplitLeft(Component main, Component back, int *main_size)
Una división horizontal entre dos componentes, configurable usando el ratón.
Representa un evento. Puede ser un evento de pulsación de tecla, un redimensionamiento de terminal,...
Element text(std::wstring text)
Muestra un fragmento de texto Unicode.
Element separator()
Dibuja una separación vertical u horizontal entre otros dos elementos.
Element border(Element)
Draw a border around the element.
El espacio de nombres ftxui:: de FTXUI.
std::vector< Element > Elements
Component CatchEvent(Component child, std::function< bool(Event)>)
std::string Code(Event event)