ShortcutLabel
-
class ShortcutLabel(**properties: Any)
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
GtkShortcutLabel
displays a single keyboard shortcut or gesture.
The main use case for GtkShortcutLabel
is inside a ShortcutsWindow
.
Constructors
-
class ShortcutLabel
-
classmethod new(accelerator: str) → Widget
Creates a new GtkShortcutLabel
with accelerator
set.
- Parameters:
accelerator – the initial accelerator
Methods
-
class ShortcutLabel
-
get_accelerator() → str | None
Retrieves the current accelerator of self
.
-
get_disabled_text() → str | None
Retrieves the text that is displayed when no accelerator is set.
-
set_accelerator(accelerator: str) → None
Sets the accelerator to be displayed by self
.
- Parameters:
accelerator – the new accelerator
-
set_disabled_text(disabled_text: str) → None
Sets the text to be displayed by self
when no accelerator is set.
- Parameters:
disabled_text – the text to be displayed when no accelerator is set
Properties
-
class ShortcutLabel
-
props.accelerator: str
The type of the None singleton.
-
props.disabled_text: str
The type of the None singleton.