Files
FTXUI/examples/component/checkbox.cpp

27 lines
897 B
C++
Raw Normal View History

2019-01-12 22:25:49 +01:00
#include "ftxui/component/checkbox.hpp"
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for Checkbox, Vertical
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
2019-01-12 22:25:49 +01:00
using namespace ftxui;
2021-05-13 11:44:47 +02:00
int main(int argc, const char* argv[]) {
2021-05-09 20:32:27 +02:00
bool build_examples_state = false;
bool build_tests_state = false;
bool use_webassembly_state = true;
2021-05-13 11:44:47 +02:00
auto component = Container::Vertical({
Checkbox("Build examples", &build_examples_state),
Checkbox("Build tests", &build_tests_state),
Checkbox("Use WebAssembly", &use_webassembly_state),
2021-05-09 20:32:27 +02:00
});
2020-03-22 22:32:44 +01:00
2019-01-19 22:06:05 +01:00
auto screen = ScreenInteractive::TerminalOutput();
2021-05-13 11:44:47 +02:00
screen.Loop(component);
2019-01-12 22:25:49 +01:00
return 0;
}
2020-09-06 13:46:56 +02:00
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.