Skip to main content

Change

Enum Change 

Source
#[non_exhaustive]
pub enum Change {
Show 36 variants Move(PanelId, Area), MoveInWindow(PanelId, String, Area), Show(PanelId), Open(PanelId, OpenPlace, Option<PanelId>), NewInstance(PanelId, OpenPlace, Option<PanelId>), Hide(PanelId), Focus(PanelId), Fold(Area, bool), FoldWindow(String, Area, bool), Place(Area, Placement), Detach(PanelId), Attach(PanelId), CloseWindow(PanelId), JoinWindow(PanelId, PanelId), DetachGroup(PanelId), JoinWindowGroup(PanelId, PanelId), JoinGroup(PanelId, PanelId), DockBack(PanelId), OpenPalette(PanelId), Float(PanelId, [f32; 2]), FloatGroup(PanelId, [f32; 2]), Dock(PanelId, Area), DockGroup(PanelId, Area), Group(Vec<PanelId>, PanelId, Join), Ungroup(PanelId, [f32; 2]), UngroupTabs(PanelId, [f32; 2]), CloseGroup(PanelId), MovePalette(PanelId, [f32; 2]), ResizePalette(PanelId, Option<[f32; 2]>), ResizePaletteAt(PanelId, [f32; 2], [f32; 2]), Roll(PanelId, bool), Pin(PanelId, bool), Flyout(PanelId, bool), FlyoutSize(PanelId, f32), Zen(bool), Arrange(PanelId, Arrangement),
}
Expand description

A change of the workbench, as a step runs it.

New kinds of change come with new features: a match on it keeps a _ arm.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Move(PanelId, Area)

§

MoveInWindow(PanelId, String, Area)

A panel moves to an area of an application window other than the main one: the panel, the window’s id, the area (workbench.move with window). A tab dropped there runs it after the drop.

§

Show(PanelId)

A panel is shown: closed, back where it was (pop.panel.open’s last).

§

Open(PanelId, OpenPlace, Option<PanelId>)

A panel opens here (in the tab group holding the panel given, else the focused panel’s) or in an area, moved there when open elsewhere (pop.panel.open); OpenPlace::Last is Change::Show.

§

NewInstance(PanelId, OpenPlace, Option<PanelId>)

A new instance of a panel declared with several opens (its kind, then where, as Change::Open): pop.panel.open with instance: "new".

§

Hide(PanelId)

A panel is closed: an instance (<kind>#<n>) is dropped with its payload, any other keeps its place for when it opens again.

§

Focus(PanelId)

§

Fold(Area, bool)

An area folded to its strip (true) or unfolded.

§

FoldWindow(String, Area, bool)

An application window’s area folded to its strip (true) or unfolded: the window’s id, then as Change::Fold (workbench.fold with window).

§

Place(Area, Placement)

A side area lies beside the centre or over it.

§

Detach(PanelId)

A panel moved to a window of its own.

§

Attach(PanelId)

A detached panel docked back in its area.

§

CloseWindow(PanelId)

A detached panel’s window closed (by default: docked back, with the panels that joined it as tabs).

§

JoinWindow(PanelId, PanelId)

A panel joins a detached window as a tab: the window holding the second panel.

§

DetachGroup(PanelId)

The tab group holding a panel (all its tabs, in order, its shown tab kept) moves to a window of its own (workbench.detach with group).

§

JoinWindowGroup(PanelId, PanelId)

The tab group holding a panel joins a detached window, after its tabs: the window holding the second panel (workbench.join_window with group).

§

JoinGroup(PanelId, PanelId)

A panel docks in the tab group holding the second one (docked), after its tabs, shown: out of where it was, floating, detached or docked.

§

DockBack(PanelId)

A floating or detached panel docks back: where it floated from (its area, among the same tabs), else in its own area.

§

OpenPalette(PanelId)

A palette opens: floating (where it was, or cascaded), or docked when it may not float.

§

Float(PanelId, [f32; 2])

A panel floats over the interface, its top-left at a place (in points from the workbench’s top-left).

§

FloatGroup(PanelId, [f32; 2])

The docked tab group holding a panel floats whole, its top-left at a place: one floating group of tabs, in order; Dock back puts it back as it was (palette.float with group).

§

Dock(PanelId, Area)

A floating panel docks in an area (taken out of its group).

§

DockGroup(PanelId, Area)

Every member of a floating panel’s group docks in an area, as tabs.

§

Group(Vec<PanelId>, PanelId, Join)

Floating panels join the group of another one: above it, below it, or as tabs.

§

Ungroup(PanelId, [f32; 2])

A floating panel comes out of its group, alone at a place.

§

UngroupTabs(PanelId, [f32; 2])

The tab group a floating panel is a tab of, nested in a stack, comes out of the stack whole, at a place.

§

CloseGroup(PanelId)

Every member of a floating panel’s group closes.

§

MovePalette(PanelId, [f32; 2])

A floating panel moves.

§

ResizePalette(PanelId, Option<[f32; 2]>)

A floating panel’s group is resized (its frame, in points), or sized by its content again (None).

§

ResizePaletteAt(PanelId, [f32; 2], [f32; 2])

A floating panel’s group is resized and moved at once (its size, then its place): a left or top edge dragged.

§

Roll(PanelId, bool)

A floating panel rolls up to its header band (true) or down.

§

Pin(PanelId, bool)

A floating panel is pinned (true) or unpinned.

§

Flyout(PanelId, bool)

A folded side area’s panel opens alone over the centre (true), or closes.

§

FlyoutSize(PanelId, f32)

The width of a panel’s flyout, in points.

§

Zen(bool)

Zen mode on (true: only the centre is shown) or off.

§

Arrange(PanelId, Arrangement)

The row, column or grid holding a panel’s group is laid out again.

Trait Implementations§

Source§

impl Clone for Change

Source§

fn clone(&self) -> Change

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Change

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Change

Source§

fn eq(&self, other: &Change) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Change

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: 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.
§

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.
§

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.
§

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.
§

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

§

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.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

§

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

§

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

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,