pub struct UiShared { /* private fields */ }Expand description
插件面板与宿主观察线程共用的观测状态。
Implementations§
Sourcepub fn update_tick(&self, t: &TickData)
pub fn update_tick(&self, t: &TickData)
落一条 tick(eTick. 裸键上屏;逐 symbol 覆盖)。
Sourcepub fn tick_count(&self) -> usize
pub fn tick_count(&self) -> usize
tick 库格数。
Sourcepub fn order_form(&self) -> OrderForm
pub fn order_form(&self) -> OrderForm
下单表单只读快照。
Sourcepub fn set_order_form(&self, f: OrderForm)
pub fn set_order_form(&self, f: OrderForm)
下单表单写(渲染侧每控件改动即写)。
Sourcepub fn selected_exchange(&self) -> String
pub fn selected_exchange(&self) -> String
选中交易所(行情二级 tab 态;行情行单击 = 带入下单面板见 render 侧)。
Sourcepub fn set_selected_exchange(&self, s: impl Into<String>)
pub fn set_selected_exchange(&self, s: impl Into<String>)
选中交易所写。
Sourcepub fn topleft_tab(&self) -> TopLeftTab
pub fn topleft_tab(&self) -> TopLeftTab
左上组当前 tab。
Sourcepub fn set_topleft_tab(&self, t: TopLeftTab)
pub fn set_topleft_tab(&self, t: TopLeftTab)
左上组 tab 写。
Sourcepub fn bottomright_tab(&self) -> BottomRightTab
pub fn bottomright_tab(&self) -> BottomRightTab
右下组当前 tab。
Sourcepub fn set_bottomright_tab(&self, t: BottomRightTab)
pub fn set_bottomright_tab(&self, t: BottomRightTab)
右下组 tab 写。
Sourcepub fn cycle_theme(&self) -> Theme
pub fn cycle_theme(&self) -> Theme
菜单钮一键循环:切到下一主题并返回。
Sourcepub fn ops_window_open(&self) -> bool
pub fn ops_window_open(&self) -> bool
运维窗开合。
Sourcepub fn set_ops_window_open(&self, v: bool)
pub fn set_ops_window_open(&self, v: bool)
运维窗开合写。
Sourcepub fn ctp_window_open(&self) -> bool
pub fn ctp_window_open(&self) -> bool
CTP 配置窗开合。
Sourcepub fn set_ctp_window_open(&self, v: bool)
pub fn set_ctp_window_open(&self, v: bool)
CTP 配置窗开合写。
Sourcepub fn kline_symbols(&self) -> Vec<String>
pub fn kline_symbols(&self) -> Vec<String>
已开 K线窗合约表(多开,去重)。
Sourcepub fn open_kline(&self, symbol: impl Into<String>)
pub fn open_kline(&self, symbol: impl Into<String>)
开 K线窗(去重;日志留痕可断言)。
Sourcepub fn close_kline(&self, symbol: &str)
pub fn close_kline(&self, symbol: &str)
关 K线窗(窗关闭钮 → 出表)。
Sourcepub fn contracts_window_open(&self) -> bool
pub fn contracts_window_open(&self) -> bool
查询合约窗开合。
Sourcepub fn set_contracts_window_open(&self, v: bool)
pub fn set_contracts_window_open(&self, v: bool)
查询合约窗开合写。
Sourcepub fn update_contract(&self, c: &ContractData)
pub fn update_contract(&self, c: &ContractData)
落一条合约(eContract. 裸键上屏)。
Sourcepub fn contracts(&self, pattern: &str) -> Vec<ContractData>
pub fn contracts(&self, pattern: &str) -> Vec<ContractData>
合约查询(Python ContractManager 口径:留空 = 全部)。
Sourcepub fn contract_count(&self) -> usize
pub fn contract_count(&self) -> usize
合约库格数。
Sourcepub fn contract_query(&self) -> String
pub fn contract_query(&self) -> String
查询串读写。
Sourcepub fn set_contract_query(&self, q: impl Into<String>)
pub fn set_contract_query(&self, q: impl Into<String>)
查询串写。
Sourcepub fn toggle_contract_selection(&self, en_symbol: &str)
pub fn toggle_contract_selection(&self, en_symbol: &str)
勾选翻转(en_symbol)。
Sourcepub fn selected_contracts(&self) -> Vec<String>
pub fn selected_contracts(&self) -> Vec<String>
当前勾选集。
Sourcepub fn clear_logs(&self)
pub fn clear_logs(&self)
清空日志(渲染“清空日志“按钮 / 测试)。
Sourcepub fn logs_snapshot(&self) -> (Vec<String>, u64)
pub fn logs_snapshot(&self) -> (Vec<String>, u64)
日志只读快照 + 溢出计数。
Sourcepub fn set_snapshot(&self, snap: BusSnap)
pub fn set_snapshot(&self, snap: BusSnap)
落一次服务快照(eTimer 节流回调)。
Sourcepub fn request_stop(&self)
pub fn request_stop(&self)
置关窗信号(eframe App 关窗钩子调用)。
Sourcepub fn drain_cmds(&self) -> Vec<UiCmd>
pub fn drain_cmds(&self) -> Vec<UiCmd>
取走全部指令(eTimer 节拍辞行)。
Sourcepub fn pending_confirm(&self) -> Option<String>
pub fn pending_confirm(&self) -> Option<String>
当前待二次确认目标(Some = 二次确认中)。
Sourcepub fn confirm_step(&self, name: &str) -> ConfirmStep
pub fn confirm_step(&self, name: &str) -> ConfirmStep
确认步进:同名二点 = 发令(Fired),异名 = 迁移(Switched),首点 = 进入待确认。
Sourcepub fn confirm_cancel(&self)
pub fn confirm_cancel(&self)
清除待确认(取消钮)。
Sourcepub fn market(&self) -> &MarketStore
pub fn market(&self) -> &MarketStore
行情库直读(读写两用:worker 写,渲染读)。
Sourcepub fn set_trade_snap(&self, ts: TradeSnap)
pub fn set_trade_snap(&self, ts: TradeSnap)
交易监控快照写(ui 插件 eTimer 拍)。
Sourcepub fn trade_snap(&self) -> Arc<TradeSnap> ⓘ
pub fn trade_snap(&self) -> Arc<TradeSnap> ⓘ
交易监控快照读(渲染)。
Sourcepub fn set_ctp_form(&self, f: CtpForm)
pub fn set_ctp_form(&self, f: CtpForm)
CTP 配置表单写。
Sourcepub fn row_selected(&self, table: &str, key: &str) -> bool
pub fn row_selected(&self, table: &str, key: &str) -> bool
该行是否为所属表的选中行(渲染判断;无键 = 未选)。
Sourcepub fn select_row(&self, table: &str, key: &str)
pub fn select_row(&self, table: &str, key: &str)
设所属表的选中行(每表一行;同键重复点 = 保持)。
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.