当前位置:网站首页>Ftxui basic notes (Hello World)
Ftxui basic notes (Hello World)
2022-07-23 07:45:00 【51CTO】
The procedure is as follows , Build a single framework , You need to create a ftxui::Element, And show it in ftxui::Screen On .
The effect after compilation and execution is as follows :

Module list
Project by 3 Modules :
ftxui/screen Defined a ftxui::Screen, One ftxui::Pixel The grid of .
ftxui/dom It's the main module . It defines a set of hierarchical ftxui::Element. An element is in ftxui::Screen Something is drawn on . It responds to the size of the container .
ftxui/component If the program needs to respond to user input , You need this module . It defines a set of ftxui::Component. These components can be used to navigate the program by using arrow keys and interacting with widgets such as check boxes . You can also make your own components . Users can use the arrow keys to navigate , And with the check box / Input box /... Wait for widgets to interact . You can create your own components .
The button procedure is as follows :

ftxui::component The module defines generating response user events ( keyboard 、 Mouse, etc. ) The logic of interactive components .
ftxui::ScreenInteractive Defines a main loop of rendering components .
ftxui::Component It's pointing ftxui::ComponentBase Shared pointer to . The latter defines :
ftxui::ComponentBase::Render(): How to render the interface .
ftxui::ComponentBase::OnEvent(): How to respond to events .
ftxui::ComponentBase::Add(): Construct the parent-child relationship between two components . The component tree is used to define how to navigate using the keyboard .
ftxui::Element For rendering a single frame .
ftxui::Component For rendering dynamic user interface , Generate multiple frames , And update its status according to the event .
边栏推荐
- 直播实录 | 37 手游如何用 StarRocks 实现用户画像分析
- VR panoramic zoo, a zoo business card with different achievements
- 4G传输模块的功能应用
- 11.37万的星瑞是怎样一个产品和表现力?一起来看看吧
- 局域网SDN硬核技术内幕 21 亢龙有悔——规格与限制(中)
- Summary in the development process BaseService provides a public access service file for all controllers or services to reduce repeated injection
- ROS based navigation framework
- RS485 communication OSI model network layer
- [technology popularization] alliance chain layer2- on a new possibility
- 局域网SDN技术硬核内幕 8 从二层交换到三层路由
猜你喜欢
随机推荐
局域网SDN技术硬核内幕 7 从二层到大二层
2022就业季惊喜来袭!正版Adobe软件,终于能正经白嫖一把了
Leetcode 757 set the intersection size to at least 2[sort greedy] the leetcode path of heroding
The new idea 2022.2 was officially released, and the new features are really fragrant
《postgresql指南--内幕探索》第二章 进程与内存架构
局域网SDN技术硬核内幕 6 分布式任意播网关
Application of workflow engine in vivo marketing automation
升级poi-tl版本1.12.0与旧版poi(4.1.2)、easyexcel之间的依赖冲突解决
LaTeX编写中文实验进展汇报
Summary in the development process BaseService provides a public access service file for all controllers or services to reduce repeated injection
Redis——JedisConnectionException Could not get a resource from the pool
remove函数的实现
ETL工具(数据同步)
文本攻击方法开源代码汇总
Report on the progress of writing Chinese experiments by latex
Clever use of curl
Chapter 2 how to use sourcetree to update code locally
Alibaba Cloud Security Center's best practices for vulnerability repair
Codeforces Round #809 (Div. 2) A - D1
避错,常见Appium相关问题及解决方案









