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 行恒真不受它影响)。

Source

pub fn do_assemble(&mut self) -> String

「装配(按勾选)」:按勾选过滤工厂表 → boot(带 cfg 回灌口径)。

失败 = 显形回执,不锁(审核定案:装配失败留在配置相)。

Source

pub fn do_start(&mut self) -> String

「启动运行」:engine.start() + ready 标记 + 账户清点; 全壳 Running 才置装配锁(有壳没起来 = 不锁,运维面留修路)。

Source

pub fn export_plugin_list(&mut self, dir: &str) -> String

「导出启动清单」:勾选 → --from 可用文件(一行一名;ek-station 读路同形)。

只导无界面面认得的行(ek-station 工厂表 = default_kinds):ui/tq 是 ek-ui 宿主自带的工厂,headless 路线没有这两名 —— 混进清单会让 --from 直接报错。 被跳过的行在回执里显形,不静默。

Source

pub fn render_setup_panel(&mut self, ui: &mut Ui)

组件配置面板(Setup 相中央面板;判据 U-S1a 的查控件面在此,判据面可见)。

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 + Send + Sync> ⓘ

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, 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