mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 04:31:34 +08:00
Update README.md
This commit is contained in:
parent
283f0fed08
commit
f17acfba4c
@ -1,31 +1,29 @@
|
|||||||
#
|
# Level of abstractions:
|
||||||
* Level 0: terminal output.
|
* Level 0: terminal output.
|
||||||
* Level 1: ftxui::Screen
|
* Level 1: ftxui::Screen
|
||||||
* Level 2: ftxui::Node
|
* Level 2: ftxui::Node
|
||||||
* Level 3: ftxui::Component
|
* Level 3: ftxui::Component
|
||||||
|
|
||||||
## Level 0: terminal output.
|
## Level 0: terminal output.
|
||||||
The terminal you know, you can append text on it. It is represented by
|
This is std::cout. You can send text to it.
|
||||||
std::cout.
|
|
||||||
|
|
||||||
## Level 1: ftxui::Screen
|
## Level 1: ftxui::Screen
|
||||||
A rectangular grid of characters.
|
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
|
## Level 2: ftxui::Node
|
||||||
A hierarchical set of element.
|
A hierarchial set of element.
|
||||||
They handle layout and Render themself on the screen.
|
They handle layout and render themself on the screen (level 1)
|
||||||
See ftxui/dom/elements.hpp
|
See ftxui/dom/elements.hpp
|
||||||
|
|
||||||
You can make implement your own.
|
You can make implement your own.
|
||||||
|
|
||||||
## Level 3: ftxui::Component
|
## Level 3: ftxui::Component
|
||||||
A hierarchical set of component. A component render itself by producing
|
A hierarchical set of components.
|
||||||
ftxui::Node in Component::Render().
|
Components store some state and react to events:
|
||||||
|
|
||||||
Some component can handle events:
|
|
||||||
* keyboard
|
* keyboard
|
||||||
* mouse
|
* mouse
|
||||||
* terminal event
|
* terminal event
|
||||||
|
Components renders themself by producing ftxui::Node (Level 2)
|
||||||
|
|
||||||
Implement your own!
|
Implement your own!
|
||||||
|
Loading…
Reference in New Issue
Block a user