mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 16:38:09 +08:00
Add Changelog and remove flag.
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
#include "ftxui/component/component.hpp"
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
#include <memory> // for shared_ptr, allocator, __shared_ptr_access
|
||||
|
||||
#include "ftxui/component/component.hpp" // for Renderer, ResizableSplitBottom, ResizableSplitLeft, ResizableSplitRight, ResizableSplitTop
|
||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||
#include "ftxui/dom/elements.hpp" // for Element, operator|, text, center, border
|
||||
|
||||
using namespace ftxui;
|
||||
|
||||
int main() {
|
||||
auto screen = ScreenInteractive::Fullscreen();
|
||||
|
||||
int main(){
|
||||
auto screen = ftxui::ScreenInteractive::Fullscreen();
|
||||
auto testComponent = ftxui::Renderer([](){return ftxui::text("test Component");});
|
||||
screen.Loop(testComponent);
|
||||
return 0;
|
||||
std::string a = "aa";
|
||||
|
||||
auto component = Renderer([a] {
|
||||
|
||||
std::vector<Element> elements;
|
||||
|
||||
for (auto i = 0; i < 10; ++i) {
|
||||
elements.push_back(window(text(a), paragraph(a)));
|
||||
}
|
||||
|
||||
return vbox(elements);
|
||||
});
|
||||
|
||||
auto renderer =
|
||||
Renderer(component, [&] { return component->Render() | border; });
|
||||
|
||||
screen.Loop(renderer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user