pub struct StageApp { /* private fields */ }Expand description
启动阶段机 App(桌面 = ekapp 与 ek-ui 主程序共用的唯一窗口面; 0.9.5 收编:原 ekapp bin 自带的 DesktopApp 副本已删,单源在此)。
Implementations§
Source§impl StageApp
impl StageApp
Sourcepub fn new_setup(
engine: Arc<MainEngine>,
shared: Arc<UiShared>,
kinds: Vec<PlugKind>,
store: Option<Store>,
ready_marker: Option<PathBuf>,
) -> Self
pub fn new_setup( engine: Arc<MainEngine>, shared: Arc<UiShared>, kinds: Vec<PlugKind>, store: Option<Store>, ready_marker: Option<PathBuf>, ) -> Self
配置相起步(桌面 ekapp 用:开窗时引擎未装配未启动)。
Sourcepub fn set_selected(&mut self, name: &str, on: bool)
pub fn set_selected(&mut self, name: &str, on: bool)
勾选开关(判据面与后续持久化用)。
ui 行恒勾短路(S4b 纪律,0.9.10 修隐藏 bug:旧写法 on && name != UI_NAME
对 ui 行的任何调用都写 false = 数据口能把主界面勾掉,渲染口灰显管不住它)。
Sourcepub fn do_assemble(&mut self) -> String
pub fn do_assemble(&mut self) -> String
「装配」(0.9.10 并入「启动运行」一钮,界面无独立装配钮;do_start
未装配时自动先走这一步)。
pub 只给判据面分步验状态机(装配态/失败态单独钉)。
失败 = 显形回执,不锁、不起跑(用户 0.9.10 裁定:「装配失败就正常提示 报错,然后等待用户」—— 留在配置相,勾可改、钮可再点)。
Sourcepub fn do_start(&mut self) -> String
pub fn do_start(&mut self) -> String
「启动运行」(0.9.10 一钮两义,用户裁定「启动的时候自然要先装配再运行」): 未装配 → 先按勾选装配,装配成功才起跑;装配失败 = 提示报错、留在配置相 等用户(不起跑、不锁,勾可改钮可再点 —— 0.9.10 裁定)。
已装配(装配失败后重试等)→ 直接起跑。engine.start() + ready 标记 +
账户清点;全壳 Running 才置装配锁(有壳没起来 = 不锁,运维面留修路)。
Sourcepub fn render_setup_panel(&mut self, ui: &mut Ui)
pub fn render_setup_panel(&mut self, ui: &mut Ui)
组件配置面板(Setup 相中央面板;判据 U-S1a 的查控件面在此,判据面可见)。
0.9.10 收口(用户两条裁定):
- 表格 = 主界面同一张表格:
pinned_table(表格层)—— 列宽首帧按内容 量(装载/组件列收小、说明列吃剩余),表头带/行线/悬停整行跳色全部同源, 不再手搭 Grid(Grid 均分列宽 = 用户报的「内容很短列很宽」病根)。 - 按钮只剩一个「启动运行」:装配并入(点钮 = 按勾选装配 → 起跑;装配
失败 = 提示报错留在本相等用户)。参数面/档案包/导出启动清单三钮连功能
一起铲(0.9.10 裁定「功能代码要连根铲」;守护路
--pick/--from不受影响)。
Trait Implementations§
Source§impl App for StageApp
impl App for StageApp
Source§fn update(&mut self, ctx: &Context, _frame: &mut Frame)
fn update(&mut self, ctx: &Context, _frame: &mut Frame)
Called each time the UI needs repainting, which may be many times per second. Read more
Source§fn save(&mut self, _storage: &mut dyn Storage)
fn save(&mut self, _storage: &mut dyn Storage)
Called on shutdown, and perhaps at regular intervals. Allows you to save state. Read more
Source§fn on_exit(&mut self, _gl: Option<&Context>)
fn on_exit(&mut self, _gl: Option<&Context>)
Called once on shutdown, after
Self::save. Read moreSource§fn auto_save_interval(&self) -> Duration
fn auto_save_interval(&self) -> Duration
Time between automatic calls to
Self::saveSource§fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
Background color values for the app, e.g. what is sent to
gl.clearColor. Read moreSource§fn persist_egui_memory(&self) -> bool
fn persist_egui_memory(&self) -> bool
Controls whether or not the egui memory (window positions etc) will be
persisted (only if the “persistence” feature is enabled).
Source§fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
A hook for manipulating or filtering raw input before it is processed by
Self::update. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for StageApp
impl !UnwindSafe for StageApp
impl Freeze for StageApp
impl Send for StageApp
impl Sync for StageApp
impl Unpin for StageApp
impl UnsafeUnpin for StageApp
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.