FIX 4.0 Demo 1.0
Loading...
Searching...
No Matches
app.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <ftxui/component/component.hpp>
9#include <ftxui/component/screen_interactive.hpp>
10#include "../client_state.hpp"
11#include "../client_app.hpp"
15#include <memory>
16
17namespace fix40::client::tui {
18
29class TuiApp {
30public:
31 TuiApp(std::shared_ptr<ClientState> state, std::shared_ptr<ClientApp> app);
32
36 void run();
37
41 void requestExit();
42
46 void refresh();
47
48private:
49 ftxui::Component createMainComponent();
50
51 std::shared_ptr<ClientState> state_;
52 std::shared_ptr<ClientApp> app_;
53 ftxui::ScreenInteractive screen_;
54
55 // 组件状态
56 std::shared_ptr<OrderPanelState> orderPanelState_;
57 std::shared_ptr<OrderListState> orderListState_;
58 std::shared_ptr<SearchBoxState> searchBoxState_;
59 std::shared_ptr<MessagePanelState> messagePanelState_;
60};
61
62} // namespace fix40::client::tui
TUI 主应用
Definition app.hpp:29
void refresh()
刷新界面
Definition app.cpp:43
void run()
运行 TUI(阻塞)
Definition app.cpp:34
void requestExit()
请求退出
Definition app.cpp:39
消息面板组件(可聚焦/可滚动)
Definition app.cpp:15
下单面板和订单列表组件
合约搜索框组件(带预测补全)