pub struct Palette(/* private fields */);Expand description
The palettes’ state, one per window group
(AppHandle::window_group): open or not, the query.
Need (dialog): a command palette.
Implementations§
Source§impl Palette
impl Palette
Sourcepub fn is_open(&self) -> bool
pub fn is_open(&self) -> bool
Whether it is open in the current window group (the main window’s outside a pass or a command).
Sourcepub fn is_open_in(&self, group: ViewportId) -> bool
pub fn is_open_in(&self, group: ViewportId) -> bool
Whether it is open in a window group.
Sourcepub fn open_groups(&self) -> Vec<ViewportId>
pub fn open_groups(&self) -> Vec<ViewportId>
The window groups it is open in.
Sourcepub fn open(&self, context: WhenContext)
pub fn open(&self, context: WhenContext)
Opens it in the current window group, offering what applies in
context.
Sourcepub fn open_in(&self, group: ViewportId, context: WhenContext)
pub fn open_in(&self, group: ViewportId, context: WhenContext)
Opens it in a window group, offering what applies in context.
Sourcepub fn pick_in(&self, group: ViewportId, context: WhenContext, pick: QuickPick)
pub fn pick_in(&self, group: ViewportId, context: WhenContext, pick: QuickPick)
Opens it in a window group on a quick pick: its choices in place
of the commands, run in context.
Sourcepub fn pick_of(&self, group: ViewportId) -> Option<QuickPick>
pub fn pick_of(&self, group: ViewportId) -> Option<QuickPick>
The quick pick it shows in a window group, if any.
Sourcepub fn window(&self) -> Option<ViewportId>
pub fn window(&self) -> Option<ViewportId>
The window it is shown in, in the current window group, once open
and drawn: in the main window’s group, the one the user worked in
when it opened (AppHandle::active_window).
Sourcepub fn window_in(&self, group: ViewportId) -> Option<ViewportId>
pub fn window_in(&self, group: ViewportId) -> Option<ViewportId>
The window it is shown in, in a window group, once open and drawn.
Sourcepub fn context_in(&self, group: ViewportId) -> Option<WhenContext>
pub fn context_in(&self, group: ViewportId) -> Option<WhenContext>
The context it was opened in, in a window group: what it offers and runs in.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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