mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-22 20:58:10 +08:00
Fix format. Try compile on Windows.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "ftxui/component/checkbox.hpp"
|
||||
|
||||
#include "ftxui/component/component.hpp"
|
||||
#include "ftxui/component/container.hpp"
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
@@ -6,25 +7,26 @@
|
||||
using namespace ftxui;
|
||||
|
||||
class MyComponent : public Component {
|
||||
private:
|
||||
CheckBox box_1_;
|
||||
CheckBox box_2_;
|
||||
CheckBox box_3_;
|
||||
Container container_ = Container::Vertical();
|
||||
public:
|
||||
MyComponent() {
|
||||
Add(&container_);
|
||||
container_.Add(&box_1_);
|
||||
container_.Add(&box_2_);
|
||||
container_.Add(&box_3_);
|
||||
box_1_.label = L"Build examples";
|
||||
box_2_.label = L"Build tests";
|
||||
box_3_.label = L"Use WebAssembly";
|
||||
box_3_.state = true;
|
||||
}
|
||||
private:
|
||||
CheckBox box_1_;
|
||||
CheckBox box_2_;
|
||||
CheckBox box_3_;
|
||||
Container container_ = Container::Vertical();
|
||||
|
||||
public:
|
||||
MyComponent() {
|
||||
Add(&container_);
|
||||
container_.Add(&box_1_);
|
||||
container_.Add(&box_2_);
|
||||
container_.Add(&box_3_);
|
||||
box_1_.label = L"Build examples";
|
||||
box_2_.label = L"Build tests";
|
||||
box_3_.label = L"Use WebAssembly";
|
||||
box_3_.state = true;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int main(int argc, const char* argv[]) {
|
||||
auto screen = ScreenInteractive::TerminalOutput();
|
||||
MyComponent component;
|
||||
screen.Loop(&component);
|
||||
|
Reference in New Issue
Block a user