Class: Gtk::ShortcutsShortcut

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#accel_size_group=(accel_size_group) ⇒ Gtk::SizeGroup

The size group for the accelerator portion of this shortcut.

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

Parameters:

Returns:

#acceleratorString

The accelerator(s) represented by this object. This property is used if Gtk::ShortcutsShortcut:shortcut-type is set to #GTK_SHORTCUT_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 &lt;, &gt; and &amp; when used in .ui files.

Returns:

  • (String)

    accelerator

#accelerator=(accelerator) ⇒ String

The accelerator(s) represented by this object. This property is used if Gtk::ShortcutsShortcut:shortcut-type is set to #GTK_SHORTCUT_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 &lt;, &gt; and &amp; when used in .ui files.

Parameters:

  • accelerator (String)

Returns:

  • (String)

    accelerator

  • (String)

    accelerator

#action_nameString

A detailed action name. If this is set for a shortcut of type %GTK_SHORTCUT_ACCELERATOR, then GTK+ will use the accelerators that are associated with the action via gtk_application_set_accels_for_action(), and setting Gtk::ShortcutsShortcut::accelerator is not necessary.

Returns:

  • (String)

    action-name

#action_name=(action_name) ⇒ String

A detailed action name. If this is set for a shortcut of type %GTK_SHORTCUT_ACCELERATOR, then GTK+ will use the accelerators that are associated with the action via gtk_application_set_accels_for_action(), and setting Gtk::ShortcutsShortcut::accelerator is not necessary.

Parameters:

  • action_name (String)

Returns:

  • (String)

    action-name

  • (String)

    action-name

#directionGtk::TextDirection

The text direction for which this shortcut is active. If the shortcut is used regardless of the text direction, set this property to #GTK_TEXT_DIR_NONE.

Returns:

#direction=(direction) ⇒ Gtk::TextDirection

The text direction for which this shortcut is active. If the shortcut is used regardless of the text direction, set this property to #GTK_TEXT_DIR_NONE.

Parameters:

Returns:

#iconGio::Icon

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

Returns:

#icon=(icon) ⇒ Gio::Icon

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

Parameters:

Returns:

#icon_set=(icon_set) ⇒ TrueClass

true if an icon has been set.

Parameters:

  • icon_set (TrueClass)

Returns:

  • (TrueClass)

    icon-set

  • (TrueClass)

    icon-set

#icon_set?TrueClass

true if an icon has been set.

Returns:

  • (TrueClass)

    icon-set

#shortcut_typeGtk::ShortcutType

The type of shortcut that is represented.

Returns:

#shortcut_type=(shortcut_type) ⇒ Gtk::ShortcutType

The type of shortcut that is represented.

Parameters:

Returns:

#subtitleString

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.

Returns:

  • (String)

    subtitle

#subtitle=(subtitle) ⇒ String

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.

Parameters:

  • subtitle (String)

Returns:

  • (String)

    subtitle

  • (String)

    subtitle

#subtitle_set=(subtitle_set) ⇒ TrueClass

true if a subtitle has been set.

Parameters:

  • subtitle_set (TrueClass)

Returns:

  • (TrueClass)

    subtitle-set

  • (TrueClass)

    subtitle-set

#subtitle_set?TrueClass

true if a subtitle has been set.

Returns:

  • (TrueClass)

    subtitle-set

#titleString

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.

Returns:

  • (String)

    title

#title=(title) ⇒ String

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.

Parameters:

  • title (String)

Returns:

  • (String)

    title

  • (String)

    title

#title_size_group=(title_size_group) ⇒ Gtk::SizeGroup

The size group for the textual portion of this shortcut.

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

Parameters:

Returns: