Skip to main content

StageApp

Struct StageApp 

Source
pub struct StageApp { /* private fields */ }
Expand description

启动阶段机 App(桌面 = ekapp 与 ek-ui 主程序共用的唯一窗口面; 0.9.5 收编:原 ekapp bin 自带的 DesktopApp 副本已删,单源在此)。

Implementations§

Source§

impl StageApp

Source

pub fn new_setup( engine: Arc<MainEngine>, shared: Arc<UiShared>, kinds: Vec<PlugKind>, store: Option<Store>, ready_marker: Option<PathBuf>, ) -> Self

配置相起步(桌面 ekapp 用:开窗时引擎未装配未启动)。

Source

pub fn stage(&self) -> Stage

当前相(判据面读路)。

Source

pub fn picked(&self) -> Vec<String>

勾选项(工厂名表;ui 行恒真)。

Source

pub fn assembled(&self) -> bool

装配相 = 引擎里已有壳(装配已发生)。

Source

pub fn set_selected(&mut self, name: &str, on: bool)

勾选开关(判据面与后续持久化用)。

ui 行恒勾短路(S4b 纪律,0.9.10 修隐藏 bug:旧写法 on && name != UI_NAME 对 ui 行的任何调用都写 false = 数据口能把主界面勾掉,渲染口灰显管不住它)。

Source

pub fn do_assemble(&mut self) -> String

「装配」(0.9.10 并入「启动运行」一钮,界面无独立装配钮;do_start 未装配时自动先走这一步)。

pub 只给判据面分步验状态机(装配态/失败态单独钉)。

失败 = 显形回执,不锁、不起跑(用户 0.9.10 裁定:「装配失败就正常提示 报错,然后等待用户」—— 留在配置相,勾可改、钮可再点)。

Source

pub fn do_start(&mut self) -> String

「启动运行」(0.9.10 一钮两义,用户裁定「启动的时候自然要先装配再运行」): 未装配 → 先按勾选装配,装配成功才起跑;装配失败 = 提示报错、留在配置相 等用户(不起跑、不锁,勾可改钮可再点 —— 0.9.10 裁定)。

已装配(装配失败后重试等)→ 直接起跑。engine.start() + ready 标记 + 账户清点;全壳 Running 才置装配锁(有壳没起来 = 不锁,运维面留修路)。

Source

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

Source§

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)

Called on shutdown, and perhaps at regular intervals. Allows you to save state. Read more
Source§

fn on_exit(&mut self, _gl: Option<&Context>)

Called once on shutdown, after Self::save. Read more
Source§

fn auto_save_interval(&self) -> Duration

Time between automatic calls to Self::save
Source§

fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]

Background color values for the app, e.g. what is sent to gl.clearColor. Read more
Source§

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)

A hook for manipulating or filtering raw input before it is processed by Self::update. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more