Skip to main content

Shell

Struct Shell 

Source
pub struct Shell { /* private fields */ }
Expand description

The frame.

Implementations§

Source§

impl Shell

Source

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.

Source

pub fn registry(&self) -> &Registry

The registry (the app’s commands and the frame’s).

Source

pub fn workspace(&self) -> &WorkspaceSpec

The workspace shown.

Source

pub fn set_workspace(&mut self, id: &str, cx: &mut Context<'_, Self>) -> bool

Shows the workspace id; whether there is one.

Source

pub fn workspace_id(&self) -> SharedString

The id of the workspace shown.

Source

pub fn set_menus( &mut self, id: &str, menus: Vec<MenuSpec>, cx: &mut Context<'_, Self>, ) -> bool

Replaces the menu row of the workspace id; whether there is one.

Source

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

Source

pub fn has_overlay(&self) -> bool

Whether an overlay is shown.

Source

pub fn settings_index(&self, title: &str) -> Option<usize>

Whether the Settings section title exists (0 is Appearance, then the app’s).

Source

pub fn set_status( &mut self, status: impl Into<SharedString>, cx: &mut Context<'_, Self>, )

Sets the status line.

Source

pub fn status(&self) -> &SharedString

The status line.

Source

pub fn set_project( &mut self, project: Option<SharedString>, cx: &mut Context<'_, Self>, )

Sets the project named in the title bar (None: none open).

Source

pub fn search(&self) -> Option<Entity<Search>>

The search, when open.

Opens the search over every command.

Source

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.

Source

pub fn settings_section(&self) -> Option<usize>

The Settings section shown, when Settings is open (0 is Appearance).

Source

pub fn show_settings( &mut self, section: Option<usize>, window: &mut Window, cx: &mut Context<'_, Self>, )

Opens Settings at section (0: Appearance, then the app’s in order), or closes it.

Source

pub fn set_look(&mut self, look: Look, cx: &mut Context<'_, Self>)

Sets the look and tells the app.

Trait Implementations§

Source§

impl EventEmitter<ShellEvent> for Shell

Source§

impl Render for Shell

Source§

fn render( &mut self, window: &mut Window, cx: &mut Context<'_, Self>, ) -> impl IntoElement

Render this view into an element tree.

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

Source§

fn downcast(&self) -> &T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> Upcast<T> for T

Source§

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

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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