mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Add {Const,}StringRef to simplify components.
This commit is contained in:
@@ -1,24 +1,19 @@
|
||||
#include "ftxui/component/checkbox.hpp"
|
||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||
#include "ftxui/component/component.hpp" // for Checkbox, Make
|
||||
#include "ftxui/component/container.hpp" // for Container
|
||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component
|
||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||
#include "ftxui/component/component.hpp" // for Checkbox, Vertical
|
||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||
|
||||
using namespace ftxui;
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
std::wstring build_examples_label = L"Build examples";
|
||||
std::wstring build_tests_label = L"Build tests";
|
||||
std::wstring use_webassembly_label = L"Use WebAssembly";
|
||||
|
||||
bool build_examples_state = false;
|
||||
bool build_tests_state = false;
|
||||
bool use_webassembly_state = true;
|
||||
|
||||
auto component = Container::Vertical({
|
||||
Checkbox(&build_examples_label, &build_examples_state),
|
||||
Checkbox(&build_tests_label, &build_tests_state),
|
||||
Checkbox(&use_webassembly_label, &use_webassembly_state),
|
||||
Checkbox("Build examples", &build_examples_state),
|
||||
Checkbox("Build tests", &build_tests_state),
|
||||
Checkbox("Use WebAssembly", &use_webassembly_state),
|
||||
});
|
||||
|
||||
auto screen = ScreenInteractive::TerminalOutput();
|
||||
|
Reference in New Issue
Block a user