FTXUI
7.1.0
C++ functional terminal UI.
Loading...
Searching...
No Matches
examples/component/slider.cpp
Go to the documentation of this file.
1
// Copyright 2025 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
5
#include "
ftxui/component/app.hpp
"
// for App
6
#include "
ftxui/component/captured_mouse.hpp
"
// for ftxui
7
#include "
ftxui/component/component.hpp
"
// for Slider
8
9
using namespace
ftxui
;
10
11
int
main
() {
12
auto
screen = App::TerminalOutput();
13
int
value
= 50;
14
auto
slider =
Slider
(
"Value:"
, &
value
, 0, 100, 1);
15
screen.Loop(slider);
16
}
17
18
// Copyright 2020 Arthur Sonzogni. All rights reserved.
19
// Use of this source code is governed by the MIT license that can be found in
20
// the LICENSE file.
app.hpp
captured_mouse.hpp
component.hpp
main
int main()
Definition
examples/component/slider.cpp:11
ftxui
The FTXUI ftxui:: namespace.
Definition
animation.hpp:11
ftxui::Slider
Component Slider(SliderOption< T > options)
A slider in any direction.
Definition
src/ftxui/component/slider.cpp:315
ftxui::value
int value
Definition
elements.hpp:195