FTXUI 6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
examples/component/slider.cpp
浏览该文件的文档.
1#include "ftxui/component/captured_mouse.hpp" // 适用于 ftxui
2#include "ftxui/component/component.hpp" // 适用于 滑块
3#include "ftxui/component/screen_interactive.hpp" // 适用于 ScreenInteractive
4
5using namespace ftxui;
6
7int main() {
9 int value = 50;
10 auto slider = Slider("Value:", &value, 0, 100, 1);
11 screen.Loop(slider);
12}
13
14// 版权所有 2020 Arthur Sonzogni. 保留所有权利。
15// 此源代码的使用受 MIT 许可的约束,MIT 许可可在
16// LICENSE 文件中找到。
static ScreenInteractive TerminalOutput()
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase
Component Slider(SliderOption< T > options)
任意方向的滑块。