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. 著作權所有。
2// 本原始碼的使用受 MIT 授權條款約束,詳情請參閱 LICENSE 檔案。
3#include <string> // for string, allocator, basic_string
4#include <vector> // for vector
5
6#include "ftxui/component/captured_mouse.hpp" // for ftxui
7#include "ftxui/component/component.hpp" // for Radiobox
8#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
9
10using namespace ftxui;
11
12int main() {
13 std::vector<std::string> radiobox_list = {
14 "Use gcc",
15 "Use clang",
16 "Use emscripten",
17 "Use tcc",
18 };
19 int selected = 0;
20
22 screen.Loop(Radiobox(&radiobox_list, &selected));
23 return 0;
24}
static ScreenInteractive TerminalOutput()
Component Radiobox(RadioboxOption options)
元素清單,只能選擇一個。
FTXUI 的 ftxui:: 命名空間
Definition animation.hpp:10