pub struct ShellWorkspaceState {
pub panels: Vec<ShellPanelState>,
pub splits: HashMap<String, PersistentSplitState>,
pub scroll_groups: Vec<ScrollSyncGroup>,
pub focused_panel: Option<String>,
pub restored_focus: Option<FocusRestoreTarget>,
}Fields§
§panels: Vec<ShellPanelState>§splits: HashMap<String, PersistentSplitState>§scroll_groups: Vec<ScrollSyncGroup>§focused_panel: Option<String>§restored_focus: Option<FocusRestoreTarget>Implementations§
Source§impl ShellWorkspaceState
impl ShellWorkspaceState
pub fn new() -> Self
pub fn panel(&self, id: &str) -> Option<&ShellPanelState>
pub fn panel_mut(&mut self, id: &str) -> Option<&mut ShellPanelState>
pub fn upsert_panel(&mut self, panel: ShellPanelState)
pub fn visible_panels_in_region<'a>( &'a self, region: &'a ShellRegion, ) -> impl Iterator<Item = &'a ShellPanelState> + 'a
pub fn set_focused_panel( &mut self, id: impl Into<String>, restore: FocusRestoreTarget, )
pub fn apply_scroll( &mut self, group_id: &str, source: &str, offset: UiPoint, ) -> Vec<String>
pub fn layout_for_size(&self, size: UiSize) -> ShellLayoutPlan
pub fn layout(&self, viewport: UiRect) -> ShellLayoutPlan
Trait Implementations§
Source§impl Clone for ShellWorkspaceState
impl Clone for ShellWorkspaceState
Source§fn clone(&self) -> ShellWorkspaceState
fn clone(&self) -> ShellWorkspaceState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShellWorkspaceState
impl Debug for ShellWorkspaceState
Source§impl Default for ShellWorkspaceState
impl Default for ShellWorkspaceState
Source§fn default() -> ShellWorkspaceState
fn default() -> ShellWorkspaceState
Returns the “default value” for a type. Read more
Source§impl PartialEq for ShellWorkspaceState
impl PartialEq for ShellWorkspaceState
Source§fn eq(&self, other: &ShellWorkspaceState) -> bool
fn eq(&self, other: &ShellWorkspaceState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ShellWorkspaceState
Auto Trait Implementations§
impl Freeze for ShellWorkspaceState
impl RefUnwindSafe for ShellWorkspaceState
impl Send for ShellWorkspaceState
impl Sync for ShellWorkspaceState
impl Unpin for ShellWorkspaceState
impl UnsafeUnpin for ShellWorkspaceState
impl UnwindSafe for ShellWorkspaceState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.