Gtk.ShortcutsShortcut¶
class — extends Widget, Accessible, Buildable, ConstraintTarget
:::warning Deprecated since 4.18 This API is deprecated. :::
A GtkShortcutsShortcut represents a single keyboard shortcut or gesture
with a short text.
This widget is only meant to be used with GtkShortcutsWindow.
Properties¶
accel_size_group¶
:::warning Deprecated since 4.18 This API is deprecated. :::
The size group for the accelerator portion of this shortcut.
This is used internally by GTK, and must not be modified by applications.
accelerator¶
:::warning Deprecated since 4.18 This API is deprecated. :::
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 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.
action_name¶
:::warning Deprecated since 4.18 This API is deprecated. :::
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 Application.set_accels_for_action, and
setting ShortcutsShortcut.accelerator is not necessary.
direction¶
:::warning Deprecated since 4.18 This API is deprecated. :::
The text direction for which this shortcut is active.
If the shortcut is used regardless of the text direction,
set this property to TextDirection.NONE.
icon¶
:::warning Deprecated since 4.18 This API is deprecated. :::
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.
icon_set¶
:::warning Deprecated since 4.18 This API is deprecated. :::
True if an icon has been set.
shortcut_type¶
:::warning Deprecated since 4.18 This API is deprecated. :::
The type of shortcut that is represented.
subtitle¶
:::warning Deprecated since 4.18 This API is deprecated. :::
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.
subtitle_set¶
:::warning Deprecated since 4.18 This API is deprecated. :::
True if a subtitle has been set.
title¶
:::warning Deprecated since 4.18 This API is deprecated. :::
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.
title_size_group¶
:::warning Deprecated since 4.18 This API is deprecated. :::
The size group for the textual portion of this shortcut.
This is used internally by GTK, and must not be modified by applications.