Skip to main content

CommandContextItem_Impl

Struct CommandContextItem_Impl 

Source
pub struct CommandContextItem_Impl { /* private fields */ }

Implementations§

Source§

impl CommandContextItem_Impl

Source

pub fn critical(&self) -> Result<NotifyLockReadGuard<'_, bool>>

Readonly access to ICommandContextItem::IsCritical.

Makes the item red to indicate that it’s critical and requires attention.

Source

pub fn critical_mut(&self) -> Result<NotifyLockWriteGuard<'_, bool>>

Mutable access to ICommandContextItem::IsCritical.

The shortcut that was requested for this item. This property is used to define the shortcut that will be used to activate the item in the Command Palette.

Notifies the host about the property change when dropping the guard.

Source

pub fn shortcut(&self) -> Result<NotifyLockReadGuard<'_, Option<KeyChord>>>

Readonly access to ICommandContextItem::RequestedShortcut.

The shortcut that was requested for this item. This property is used to define the shortcut that will be used to activate the item in the Command Palette.

Source

pub fn shortcut_mut(&self) -> Result<NotifyLockWriteGuard<'_, Option<KeyChord>>>

Mutable access to ICommandContextItem::RequestedShortcut.

The shortcut that was requested for this item. This property is used to define the shortcut that will be used to activate the item in the Command Palette.

Notifies the host about the property change when dropping the guard.

Methods from Deref<Target = CommandItem_Impl>§

Source

pub fn command( &self, ) -> Result<NotifyLockReadGuard<'_, AgileReference<ICommand>>>

Readonly access to ICommandItem::Command.

The command associated with this item. This is the command that will be executed when the item is activated.

Source

pub fn command_mut( &self, ) -> Result<NotifyLockWriteGuard<'_, AgileReference<ICommand>>>

Mutable access to ICommandItem::Command.

The command associated with this item. This is the command that will be executed when the item is activated.

Notifies the host about the property change when dropping the guard.

Source

pub fn icon( &self, ) -> Result<NotifyLockReadGuard<'_, Option<ComObject<IconInfo>>>>

Readonly access to ICommandItem::Icon.

Preferred over ICommand::Icon of self.command when displaying the icon.

The icon associated with this item. This icon will be displayed next to the item in the Command Palette.

Source

pub fn icon_mut( &self, ) -> Result<NotifyLockWriteGuard<'_, Option<ComObject<IconInfo>>>>

Mutable access to ICommandItem::Icon.

Preferred over ICommand::Icon of self.command when displaying the icon.

The icon associated with this item. This icon will be displayed next to the item in the Command Palette.

Notifies the host about the property change when dropping the guard.

Source

pub fn title(&self) -> Result<NotifyLockReadGuard<'_, HSTRING>>

Readonly access to ICommandItem::Title.

Preferred over ICommand::Name of self.command when displaying the title.

Note that the text displayed for default action (alongside ) is determined by ICommand::Name of self.command, not this title.

The title associated with this item. This title will be displayed as the main text of the item in the Command Palette.

Source

pub fn title_mut(&self) -> Result<NotifyLockWriteGuard<'_, HSTRING>>

Mutable access to ICommandItem::Title.

Preferred over ICommand::Name of self.command when displaying the title.

Note that the text displayed for default action (alongside ) is determined by ICommand::Name of self.command, not this title.

The title associated with this item. This title will be displayed as the main text of the item in the Command Palette.

Notifies the host about the property change when dropping the guard.

Source

pub fn subtitle(&self) -> Result<NotifyLockReadGuard<'_, HSTRING>>

Readonly access to ICommandItem::Subtitle.

The subtitle associated with this item. This subtitle will be displayed below the item in the Command Palette.

Source

pub fn subtitle_mut(&self) -> Result<NotifyLockWriteGuard<'_, HSTRING>>

Mutable access to ICommandItem::Subtitle.

The subtitle associated with this item. This subtitle will be displayed below the item in the Command Palette.

Notifies the host about the property change when dropping the guard.

Source

pub fn more(&self) -> Result<NotifyLockReadGuard<'_, Vec<ContextItem>>>

Readonly access to ICommandItem::MoreCommands.

An array of additional commands that can be displayed in a submenu. This property is used to define a list of related commands that can be executed from the Command Palette.

Source

pub fn more_mut(&self) -> Result<NotifyLockWriteGuard<'_, Vec<ContextItem>>>

Mutable access to ICommandItem::MoreCommands.

An array of additional commands that can be displayed in a submenu. This property is used to define a list of related commands that can be executed from the Command Palette.

Notifies the host about the property change when dropping the guard.

Trait Implementations§

Source§

impl ComObjectInterface<ICommandContextItem> for CommandContextItem_Impl

Source§

fn as_interface_ref(&self) -> InterfaceRef<'_, ICommandContextItem>

Gets a borrowed interface that is implemented by T.
Source§

impl ComObjectInterface<ICommandItem> for CommandContextItem_Impl

Source§

fn as_interface_ref(&self) -> InterfaceRef<'_, ICommandItem>

Gets a borrowed interface that is implemented by T.
Source§

impl ComObjectInterface<IContextItem> for CommandContextItem_Impl

Source§

fn as_interface_ref(&self) -> InterfaceRef<'_, IContextItem>

Gets a borrowed interface that is implemented by T.
Source§

impl ComObjectInterface<IInspectable> for CommandContextItem_Impl

Source§

fn as_interface_ref(&self) -> InterfaceRef<'_, IInspectable>

Gets a borrowed interface that is implemented by T.
Source§

impl ComObjectInterface<INotifyPropChanged> for CommandContextItem_Impl

Source§

fn as_interface_ref(&self) -> InterfaceRef<'_, INotifyPropChanged>

Gets a borrowed interface that is implemented by T.
Source§

impl ComObjectInterface<IUnknown> for CommandContextItem_Impl

Source§

fn as_interface_ref(&self) -> InterfaceRef<'_, IUnknown>

Gets a borrowed interface that is implemented by T.
Source§

impl Deref for CommandContextItem_Impl

Source§

type Target = CommandContextItem

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl ICommandContextItem_Impl for CommandContextItem_Impl

Source§

impl ICommandItem_Impl for CommandContextItem_Impl

Source§

impl IContextItem_Impl for CommandContextItem_Impl

Source§

impl INotifyPropChanged_Impl for CommandContextItem_Impl

Source§

fn PropChanged( &self, handler: Ref<'_, TypedEventHandler<IInspectable, IPropChangedEventArgs>>, ) -> Result<i64>

Source§

fn RemovePropChanged(&self, token: i64) -> Result<()>

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.