mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 08:28:09 +08:00
Start the gauge widget.
This commit is contained in:
4
examples/separator/CMakeLists.txt
Normal file
4
examples/separator/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
add_executable(separator_example
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(separator_example PRIVATE ftxui)
|
26
examples/separator/main.cpp
Normal file
26
examples/separator/main.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "ftxui/core/screen.hpp"
|
||||
#include "ftxui/core/dom/elements.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::dom;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"left-column"),
|
||||
separator(),
|
||||
flex(vbox(
|
||||
flex(center(text(L"right-column"))),
|
||||
separator(),
|
||||
center(text(L"bottom-column"))
|
||||
))
|
||||
);
|
||||
auto screen = ftxui::Screen::WholeTerminal();
|
||||
Render(screen, document.get());
|
||||
|
||||
std::cout << screen.ToString();
|
||||
|
||||
getchar();
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user