FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
textarea.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. 無断複写・転載を禁じます。
2// このソースコードの使用は、LICENSEファイルにあるMITライセンスに従います。
3#include <memory> // アロケータ、__shared_ptr_access、shared_ptr用
4#include <string> // 文字列用
5
6#include "ftxui/component/captured_mouse.hpp" // ftxui用
7#include "ftxui/component/component.hpp" // Input、Renderer、ResizableSplitLeft用
8#include "ftxui/component/component_base.hpp" // ComponentBase、Component用
9#include "ftxui/component/screen_interactive.hpp" // ScreenInteractive用
10#include "ftxui/dom/elements.hpp" // operator|、separator、text、Element、flex、vbox、border用
11
12int main() {
13 using namespace ftxui;
14
15 std::string content_1;
16 std::string content_2;
17 auto textarea_1 = Input(&content_1);
18 auto textarea_2 = Input(&content_2);
19 int size = 50;
20 auto layout = ResizableSplitLeft(textarea_1, textarea_2, &size);
21
22 auto component = Renderer(layout, [&] {
23 return vbox({
24 text("Input:"),
25 separator(),
26 layout->Render() | flex,
27 }) |
28 border;
29 });
30
31 auto screen = ScreenInteractive::Fullscreen();
32 screen.Loop(component);
33}
FTXUI ftxui:: 名前空間
Definition animation.hpp:9
int main()
Definition textarea.cpp:12