mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-23 13:28:08 +08:00
Refactor directory structure.
The goal is to increase the separation in between: * ftxui::screen * ftxui::dom * ftxui::component
This commit is contained in:
@@ -3,16 +3,15 @@
|
||||
|
||||
#include "ftxui/component/component_horizontal.hpp"
|
||||
#include "ftxui/component/menu.hpp"
|
||||
#include "ftxui/screen_interactive.hpp"
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui;
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::dom;
|
||||
|
||||
class MyComponent : ComponentHorizontal {
|
||||
public:
|
||||
MyComponent(ftxui::component::Delegate* delegate)
|
||||
MyComponent(Delegate* delegate)
|
||||
: ComponentHorizontal(delegate),
|
||||
menu_1(delegate->NewChild()),
|
||||
menu_2(delegate->NewChild()),
|
||||
@@ -76,8 +75,7 @@ class MyComponent : ComponentHorizontal {
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
//auto screen = ftxui::ScreenInteractive::TerminalOutput();
|
||||
auto screen = ftxui::ScreenInteractive::Fullscreen();
|
||||
auto screen = ScreenInteractive::TerminalOutput();
|
||||
MyComponent component(screen.delegate());
|
||||
component.on_enter = screen.ExitLoopClosure();
|
||||
screen.Loop();
|
||||
|
Reference in New Issue
Block a user