mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-20 10:38:09 +08:00
Add menu styles.
This commit is contained in:
31
examples/dom/dbox.cpp
Normal file
31
examples/dom/dbox.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "ftxui/screen.hpp"
|
||||
#include "ftxui/dom/elements.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::dom;
|
||||
auto document =
|
||||
dbox(
|
||||
frame(
|
||||
vbox(
|
||||
text(L"line_1"),
|
||||
text(L"line_2"),
|
||||
text(L"line_3"),
|
||||
text(L"line_4"),
|
||||
text(L"line_5")
|
||||
)
|
||||
),
|
||||
center(
|
||||
frame(
|
||||
text(L"overlay")
|
||||
)
|
||||
)
|
||||
);
|
||||
auto screen = ftxui::Screen::TerminalOutput(document);
|
||||
Render(screen, document.get());
|
||||
|
||||
std::cout << screen.ToString();
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user