FIX 4.0 Demo 1.0
Loading...
Searching...
No Matches
fix40::client::tui Namespace Reference

Classes

struct  MessagePanelState
 
struct  OrderListState
 订单列表状态 More...
 
struct  OrderPanelState
 下单面板状态 More...
 
struct  SearchBoxState
 搜索框状态 More...
 
class  TuiApp
 TUI 主应用 More...
 

Functions

Element AccountPanelComponent (const std::shared_ptr< ClientState > &state)
 创建账户资金面板
 
Element HeaderComponent (const std::shared_ptr< ClientState > &state)
 创建顶部状态栏
 
Component MessagePanelComponent (std::shared_ptr< MessagePanelState > panelState, const std::shared_ptr< ClientState > &state)
 
Component OrderListComponent (std::shared_ptr< OrderListState > listState, std::shared_ptr< ClientApp > app, const std::shared_ptr< ClientState > &state)
 创建订单列表组件
 
Component OrderPanelComponent (std::shared_ptr< OrderPanelState > panelState, std::shared_ptr< ClientApp > app, std::shared_ptr< ClientState > state)
 创建下单面板组件
 
Element PositionPanelComponent (const std::shared_ptr< ClientState > &state)
 创建持仓面板
 
Component SearchBoxComponent (std::shared_ptr< SearchBoxState > searchState, std::shared_ptr< ClientApp > app, std::shared_ptr< ClientState > state, std::function< void(const std::string &)> onSelect)
 创建合约搜索框组件
 
Color colorPrimary ()
 
Color colorSuccess ()
 
Color colorDanger ()
 
Color colorWarning ()
 
Color colorMuted ()
 
Color profitColor (double value)
 
Color sideColor (const std::string &side)
 
Element styledBorder (Element inner, const std::string &title)
 
std::string formatMoney (double value)
 
std::string formatPercent (double value)
 
std::string formatQty (int64_t qty)
 

Function Documentation

◆ AccountPanelComponent()

ftxui::Element fix40::client::tui::AccountPanelComponent ( const std::shared_ptr< ClientState > &  state)

创建账户资金面板

显示详细的账户资金信息

Here is the call graph for this function:

◆ colorDanger()

Color fix40::client::tui::colorDanger ( )
inline

◆ colorMuted()

Color fix40::client::tui::colorMuted ( )
inline

◆ colorPrimary()

Color fix40::client::tui::colorPrimary ( )
inline

◆ colorSuccess()

Color fix40::client::tui::colorSuccess ( )
inline

◆ colorWarning()

Color fix40::client::tui::colorWarning ( )
inline

◆ formatMoney()

std::string fix40::client::tui::formatMoney ( double  value)
inline
Here is the caller graph for this function:

◆ formatPercent()

std::string fix40::client::tui::formatPercent ( double  value)
inline
Here is the caller graph for this function:

◆ formatQty()

std::string fix40::client::tui::formatQty ( int64_t  qty)
inline
Here is the caller graph for this function:

◆ HeaderComponent()

ftxui::Element fix40::client::tui::HeaderComponent ( const std::shared_ptr< ClientState > &  state)

创建顶部状态栏

显示:连接状态、用户ID、动态权益、可用资金

Here is the call graph for this function:

◆ MessagePanelComponent()

ftxui::Component fix40::client::tui::MessagePanelComponent ( std::shared_ptr< MessagePanelState panelState,
const std::shared_ptr< ClientState > &  state 
)

◆ OrderListComponent()

ftxui::Component fix40::client::tui::OrderListComponent ( std::shared_ptr< OrderListState listState,
std::shared_ptr< ClientApp app,
const std::shared_ptr< ClientState > &  state 
)

创建订单列表组件

Here is the call graph for this function:

◆ OrderPanelComponent()

ftxui::Component fix40::client::tui::OrderPanelComponent ( std::shared_ptr< OrderPanelState panelState,
std::shared_ptr< ClientApp app,
std::shared_ptr< ClientState state 
)

创建下单面板组件

◆ PositionPanelComponent()

ftxui::Element fix40::client::tui::PositionPanelComponent ( const std::shared_ptr< ClientState > &  state)

创建持仓面板

显示持仓列表

Here is the call graph for this function:

◆ profitColor()

Color fix40::client::tui::profitColor ( double  value)
inline
Here is the caller graph for this function:

◆ SearchBoxComponent()

ftxui::Component fix40::client::tui::SearchBoxComponent ( std::shared_ptr< SearchBoxState searchState,
std::shared_ptr< ClientApp app,
std::shared_ptr< ClientState state,
std::function< void(const std::string &)>  onSelect 
)

创建合约搜索框组件

支持:

  • 输入时自动搜索
  • 下拉列表显示搜索结果
  • 键盘上下选择
  • 回车确认选择
Parameters
searchState搜索状态
app客户端应用
state客户端状态
onSelect选择回调

◆ sideColor()

Color fix40::client::tui::sideColor ( const std::string &  side)
inline
Here is the caller graph for this function:

◆ styledBorder()

Element fix40::client::tui::styledBorder ( Element  inner,
const std::string &  title 
)
inline