[]Struct gtk::ShortcutsShortcut

pub struct ShortcutsShortcut(_, _);

A ShortcutsShortcut represents a single keyboard shortcut or gesture with a short text. This widget is only meant to be used with ShortcutsWindow.

Feature: v3_20

Implements

BoxExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, OrientableExt, WidgetExtManual, BuildableExtManual

Implementations

impl ShortcutsShortcut[src]

pub fn set_property_accel_size_group<P: IsA<SizeGroup> + SetValueOptional>(
    &self,
    accel_size_group: Option<&P>
)
[src]

The size group for the accelerator portion of this shortcut.

This is used internally by GTK+, and must not be modified by applications.

pub fn get_property_accelerator(&self) -> Option<GString>[src]

The accelerator(s) represented by this object. This property is used if ShortcutsShortcut:shortcut-type is set to ShortcutType::Accelerator.

The syntax of this property is (an extension of) the syntax understood by gtk_accelerator_parse. Multiple accelerators can be specified by separating them with a space, but keep in mind that the available width is limited. It is also possible to specify ranges of shortcuts, using ... between the keys. Sequences of keys can be specified using a + or & between the keys.

Examples:

  • A single shortcut: <ctl>``<alt>delete
  • Two alternative shortcuts: <shift>a Home
  • A range of shortcuts: <alt>1...<alt>9
  • Several keys pressed together: Control_L&Control_R
  • A sequence of shortcuts or keys: <ctl>c+<ctl>x

Use + instead of & when the keys may (or have to be) pressed sequentially (e.g use t+t for 'press the t key twice').

Note that <, > and & need to be escaped as <, > and & when used in .ui files.

pub fn set_property_accelerator(&self, accelerator: Option<&str>)[src]

The accelerator(s) represented by this object. This property is used if ShortcutsShortcut:shortcut-type is set to ShortcutType::Accelerator.

The syntax of this property is (an extension of) the syntax understood by gtk_accelerator_parse. Multiple accelerators can be specified by separating them with a space, but keep in mind that the available width is limited. It is also possible to specify ranges of shortcuts, using ... between the keys. Sequences of keys can be specified using a + or & between the keys.

Examples:

  • A single shortcut: <ctl>``<alt>delete
  • Two alternative shortcuts: <shift>a Home
  • A range of shortcuts: <alt>1...<alt>9
  • Several keys pressed together: Control_L&Control_R
  • A sequence of shortcuts or keys: <ctl>c+<ctl>x

Use + instead of & when the keys may (or have to be) pressed sequentially (e.g use t+t for 'press the t key twice').

Note that <, > and & need to be escaped as <, > and & when used in .ui files.

pub fn get_property_action_name(&self) -> Option<GString>[src]

A detailed action name. If this is set for a shortcut of type ShortcutType::Accelerator, then GTK+ will use the accelerators that are associated with the action via GtkApplicationExt::set_accels_for_action, and setting ShortcutsShortcut::accelerator is not necessary.

Feature: v3_22

pub fn set_property_action_name(&self, action_name: Option<&str>)[src]

A detailed action name. If this is set for a shortcut of type ShortcutType::Accelerator, then GTK+ will use the accelerators that are associated with the action via GtkApplicationExt::set_accels_for_action, and setting ShortcutsShortcut::accelerator is not necessary.

Feature: v3_22

pub fn get_property_icon(&self) -> Option<Icon>[src]

An icon to represent the shortcut or gesture. This property is used if ShortcutsShortcut:shortcut-type is set to ShortcutType::Gesture. For the other predefined gesture types, GTK+ provides an icon on its own.

pub fn set_property_icon<P: IsA<Icon> + SetValueOptional>(
    &self,
    icon: Option<&P>
)
[src]

An icon to represent the shortcut or gesture. This property is used if ShortcutsShortcut:shortcut-type is set to ShortcutType::Gesture. For the other predefined gesture types, GTK+ provides an icon on its own.

pub fn get_property_icon_set(&self) -> bool[src]

true if an icon has been set.

pub fn set_property_icon_set(&self, icon_set: bool)[src]

true if an icon has been set.

pub fn get_property_shortcut_type(&self) -> ShortcutType[src]

The type of shortcut that is represented.

pub fn set_property_shortcut_type(&self, shortcut_type: ShortcutType)[src]

The type of shortcut that is represented.

pub fn get_property_subtitle(&self) -> Option<GString>[src]

The subtitle for the shortcut or gesture.

This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK+ provides a subtitle on its own.

pub fn set_property_subtitle(&self, subtitle: Option<&str>)[src]

The subtitle for the shortcut or gesture.

This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK+ provides a subtitle on its own.

pub fn get_property_subtitle_set(&self) -> bool[src]

true if a subtitle has been set.

pub fn set_property_subtitle_set(&self, subtitle_set: bool)[src]

true if a subtitle has been set.

pub fn get_property_title(&self) -> Option<GString>[src]

The textual description for the shortcut or gesture represented by this object. This should be a short string that can fit in a single line.

pub fn set_property_title(&self, title: Option<&str>)[src]

The textual description for the shortcut or gesture represented by this object. This should be a short string that can fit in a single line.

pub fn set_property_title_size_group<P: IsA<SizeGroup> + SetValueOptional>(
    &self,
    title_size_group: Option<&P>
)
[src]

The size group for the textual portion of this shortcut.

This is used internally by GTK+, and must not be modified by applications.

pub fn connect_property_accel_size_group_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_accelerator_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_action_name_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_direction_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_icon_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_icon_set_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_shortcut_type_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_subtitle_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_subtitle_set_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_title_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_title_size_group_notify<F: Fn(&ShortcutsShortcut) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for ShortcutsShortcut

impl Debug for ShortcutsShortcut

impl Display for ShortcutsShortcut[src]

impl Eq for ShortcutsShortcut

impl Hash for ShortcutsShortcut

impl IsA<Box> for ShortcutsShortcut

impl IsA<Buildable> for ShortcutsShortcut

impl IsA<Container> for ShortcutsShortcut

impl IsA<Orientable> for ShortcutsShortcut

impl IsA<Widget> for ShortcutsShortcut

impl Ord for ShortcutsShortcut

impl<T: ObjectType> PartialEq<T> for ShortcutsShortcut

impl<T: ObjectType> PartialOrd<T> for ShortcutsShortcut

impl StaticType for ShortcutsShortcut

Auto Trait Implementations

impl RefUnwindSafe for ShortcutsShortcut

impl !Send for ShortcutsShortcut

impl !Sync for ShortcutsShortcut

impl Unpin for ShortcutsShortcut

impl UnwindSafe for ShortcutsShortcut

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.