From f17acfba4ce67f5dea407305db741a112aa25a03 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Mon, 3 Feb 2020 16:05:41 +0100 Subject: [PATCH] Update README.md --- include/ftxui/README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/include/ftxui/README.md b/include/ftxui/README.md index 65de2513..b8ba039a 100644 --- a/include/ftxui/README.md +++ b/include/ftxui/README.md @@ -1,31 +1,29 @@ -# +# Level of abstractions: * Level 0: terminal output. * Level 1: ftxui::Screen * Level 2: ftxui::Node * Level 3: ftxui::Component ## Level 0: terminal output. - The terminal you know, you can append text on it. It is represented by - std::cout. + This is std::cout. You can send text to it. ## Level 1: ftxui::Screen A rectangular grid of characters. - Use Terminal::ToString() to append its content into the console. + Use Terminal::ToString() to append its content to the console (level 0). ## Level 2: ftxui::Node - A hierarchical set of element. - They handle layout and Render themself on the screen. + A hierarchial set of element. + They handle layout and render themself on the screen (level 1) See ftxui/dom/elements.hpp You can make implement your own. ## Level 3: ftxui::Component - A hierarchical set of component. A component render itself by producing - ftxui::Node in Component::Render(). - - Some component can handle events: + A hierarchical set of components. + Components store some state and react to events: * keyboard * mouse * terminal event + Components renders themself by producing ftxui::Node (Level 2) Implement your own!