Struct ksni::menu::RadioItem

source ·
pub struct RadioItem {
    pub label: String,
    pub enabled: bool,
    pub visible: bool,
    pub icon_name: String,
    pub icon_data: Vec<u8>,
    pub shortcut: Vec<Vec<String>>,
    pub disposition: Disposition,
}
Expand description

Items of RadioGroup

Fields§

§label: String

Text of the item, except that: -# two consecutive underscore characters “__” are displayed as a single underscore, -# any remaining underscore characters are not displayed at all, -# the first of those remaining underscore characters (unless it is the last character in the string) indicates that the following character is the access key.

§enabled: bool

Whether the item can be activated or not.

§visible: bool

True if the item is visible in the menu.

§icon_name: String

Icon name of the item, following the freedesktop.org icon spec.

§icon_data: Vec<u8>

PNG data of the icon.

§shortcut: Vec<Vec<String>>

The shortcut of the item. Each array represents the key press in the list of keypresses. Each list of strings contains a list of modifiers and then the key that is used. The modifier strings allowed are: “Control”, “Alt”, “Shift” and “Super”.

  • A simple shortcut like Ctrl+S is represented as: [[“Control”, “S”]]
  • A complex shortcut like Ctrl+Q, Alt+X is represented as: [[“Control”, “Q”], [“Alt”, “X”]]
§disposition: Disposition

How the menuitem feels the information it’s displaying to the user should be presented.

Trait Implementations§

source§

impl Default for RadioItem

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.