pub struct DockState { /* private fields */ }Expand description
The dock layout: the tile tree + a dirty flag so a user layout edit persists.
One field on BrepApp.
Implementations§
Source§impl DockState
impl DockState
Sourcepub fn new(store: &dyn ModelStore) -> Self
pub fn new(store: &dyn ModelStore) -> Self
Load the persisted layout (reconciled against the current pane set), or fall back to the default layout.
Sourcepub fn ui(&mut self, ui: &mut Ui, ctx: DockContext<'_>) -> DockOutcome
pub fn ui(&mut self, ui: &mut Ui, ctx: DockContext<'_>) -> DockOutcome
Draw the dock tree, delegating each visible pane to its panel’s show.
Applies workbench visibility first, then persists if the user re-laid it.
Sourcepub fn state_json(&self, active: bool) -> String
pub fn state_json(&self, active: bool) -> String
The __brepDock verifier global: {active, panes:[{kind,visible,rendered}]}.
active is whether the dock owns the layout right now (false in sketch /
ref-select mode, where the shell draws the viewport directly). When
inactive, no side pane is rendered — the caller passes active=false.
Sourcepub fn show_pane(&mut self, kind: PaneKind)
pub fn show_pane(&mut self, kind: PaneKind)
Surface the pane of kind — make it the ACTIVE tab in its tab group so a
pane sitting behind another tab becomes visible. No-op if it is already
active. Used to bring the History tab forward when a feature is added (a
context-bar create can happen while another side tab is showing), so the
new row is actually seen (app.rs, paired with history.focus_feature).
A pane the active WORKBENCH hides is left alone. Activating its tab would
not show it — Tabs::ensure_active moves active back to a VISIBLE tab
during layout — but it would drag the user off whatever tab they were on
and onto the first visible one, which is worse than doing nothing. Every
caller today is already gated on the workbench that claims the pane, and
the automation entry point refuses the call outright rather than no-op’ing
(see automation::cmd_shell::show_pane); this keeps a future one honest.
Auto Trait Implementations§
impl Freeze for DockState
impl RefUnwindSafe for DockState
impl Send for DockState
impl Sync for DockState
impl Unpin for DockState
impl UnsafeUnpin for DockState
impl UnwindSafe for DockState
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
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>
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>
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)
&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)
&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
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more