pub struct Shell { /* private fields */ }Expand description
The frame.
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn new(
spec: ShellSpec,
window: &mut Window,
cx: &mut Context<'_, Self>,
) -> Self
pub fn new( spec: ShellSpec, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
The frame for spec; adds the frame’s commands to the registry and focuses the frame.
Bind the keys after (Registry::bind_keys), once every command is registered.
Sourcepub fn workspace(&self) -> &WorkspaceSpec
pub fn workspace(&self) -> &WorkspaceSpec
The workspace shown.
Sourcepub fn set_workspace(&mut self, id: &str, cx: &mut Context<'_, Self>) -> bool
pub fn set_workspace(&mut self, id: &str, cx: &mut Context<'_, Self>) -> bool
Shows the workspace id; whether there is one.
Sourcepub fn workspace_id(&self) -> SharedString
pub fn workspace_id(&self) -> SharedString
The id of the workspace shown.
Replaces the menu row of the workspace id; whether there is one.
Sourcepub fn set_overlay(
&mut self,
view: Option<AnyView>,
window: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn set_overlay( &mut self, view: Option<AnyView>, window: &mut Window, cx: &mut Context<'_, Self>, )
Shows view over everything (a help sheet, a dialog), or takes it away (None).
Sourcepub fn has_overlay(&self) -> bool
pub fn has_overlay(&self) -> bool
Whether an overlay is shown.
Sourcepub fn settings_index(&self, title: &str) -> Option<usize>
pub fn settings_index(&self, title: &str) -> Option<usize>
Whether the Settings section title exists (0 is Appearance, then the app’s).
Sourcepub fn set_status(
&mut self,
status: impl Into<SharedString>,
cx: &mut Context<'_, Self>,
)
pub fn set_status( &mut self, status: impl Into<SharedString>, cx: &mut Context<'_, Self>, )
Sets the status line.
Sourcepub fn status(&self) -> &SharedString
pub fn status(&self) -> &SharedString
The status line.
Sourcepub fn set_project(
&mut self,
project: Option<SharedString>,
cx: &mut Context<'_, Self>,
)
pub fn set_project( &mut self, project: Option<SharedString>, cx: &mut Context<'_, Self>, )
Sets the project named in the title bar (None: none open).
Sourcepub fn open_search(&mut self, window: &mut Window, cx: &mut Context<'_, Self>)
pub fn open_search(&mut self, window: &mut Window, cx: &mut Context<'_, Self>)
Opens the search over every command.
Sourcepub fn open_search_with(
&mut self,
filter: Option<(SharedString, Filter)>,
window: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn open_search_with( &mut self, filter: Option<(SharedString, Filter)>, window: &mut Window, cx: &mut Context<'_, Self>, )
Opens the search over the commands filter accepts, titled title (Process ▸ “Find an
operation…”: one kind of command); every command when None. Open already: closes it.
Sourcepub fn settings_section(&self) -> Option<usize>
pub fn settings_section(&self) -> Option<usize>
The Settings section shown, when Settings is open (0 is Appearance).
Trait Implementations§
impl EventEmitter<ShellEvent> for Shell
Auto Trait Implementations§
impl !RefUnwindSafe for Shell
impl !Send for Shell
impl !Sync for Shell
impl !UnwindSafe for Shell
impl Forget for Shell
impl Freeze for Shell
impl Move for Shell
impl Unpin for Shell
impl UnsafeUnpin for Shell
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.impl<T> ErasedDestructor for Twhere
T: 'static,
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