FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
examples/component/radiobox.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#include <string> // for string, allocator, basic_string
5#include <vector> // for vector
6
7#include "ftxui/component/captured_mouse.hpp" // for ftxui
8#include "ftxui/component/component.hpp" // for Radiobox
9#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
10
11using namespace ftxui;
12
13int main() {
14 std::vector<std::string> radiobox_list = {
15 "Use gcc",
16 "Use clang",
17 "Use emscripten",
18 "Use tcc",
19 };
20 int selected = 0;
21
23 screen.Loop(Radiobox(&radiobox_list, &selected));
24 return 0;
25}
static ScreenInteractive TerminalOutput()
Component Radiobox(RadioboxOption options)
A list of element, where only one can be selected.
The FTXUI ftxui:: namespace.
Definition animation.hpp:10