private:
bool checked[3] = {false, false, false};
float slider = 50;
public:
Impl() {
Slider(
"Slider", &slider, 0.f, 100.f),
}));
}
};
}
int main() {
int window_1_left = 20;
int window_1_top = 10;
int window_1_width = 40;
int window_1_height = 20;
.inner = DummyWindowContent(),
.title = "First window",
.left = &window_1_left,
.top = &window_1_top,
.width = &window_1_width,
.height = &window_1_height,
});
.inner = DummyWindowContent(),
.title = "My window",
.left = 40,
.top = 20,
});
.inner = DummyWindowContent(),
.title = "My window",
.left = 60,
.top = 30,
});
.inner = DummyWindowContent(),
});
window_1,
window_2,
window_3,
window_4,
window_5,
});
return text(
"window_1: " +
std::to_string(window_1_width) + "x" +
std::to_string(window_1_height) + " + " +
std::to_string(window_1_left) + "," +
std::to_string(window_1_top));
});
display_win_1,
window_container,
});
screen.Loop(layout);
return EXIT_SUCCESS;
}
It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...
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...
Component Stacked(Components children)
A list of components to be stacked on top of each other. Events are propagated to the first component...
std::shared_ptr< T > Make(Args &&... args)
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Window(WindowOptions option)
A draggeable / resizeable window. To use multiple of them, they must be stacked using Container::Stac...
Element text(std::wstring text)
Display a piece of unicode text.
Component Slider(SliderOption< T > options)
A slider in any direction.
Component Checkbox(CheckboxOption options)
Draw checkable element.
std::shared_ptr< ComponentBase > Component