Gtk.ShortcutLabel

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box Gtk.ShortcutLabel Gtk.ShortcutLabel Gtk.Box->Gtk.ShortcutLabel Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (accelerator)

get_accelerator ()

get_disabled_text ()

set_accelerator (accelerator)

set_disabled_text (disabled_text)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

accelerator

str

r/w

Accelerator

disabled-text

str

r/w

Disabled text

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class Gtk.ShortcutLabel(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

Gtk.ShortcutLabelClass

Gtk.ShortcutLabel is a widget that represents a single keyboard shortcut or gesture in the user interface.

classmethod new(accelerator)[source]
Parameters:

accelerator (str) – the initial accelerator

Returns:

a newly-allocated Gtk.ShortcutLabel

Return type:

Gtk.Widget

Creates a new Gtk.ShortcutLabel with accelerator set.

New in version 3.22.

get_accelerator()[source]
Returns:

the current accelerator.

Return type:

str or None

Retrieves the current accelerator of self.

New in version 3.22.

get_disabled_text()[source]
Returns:

the current text displayed when no accelerator is set.

Return type:

str or None

Retrieves the text that is displayed when no accelerator is set.

New in version 3.22.

set_accelerator(accelerator)[source]
Parameters:

accelerator (str) – the new accelerator

Sets the accelerator to be displayed by self.

New in version 3.22.

set_disabled_text(disabled_text)[source]
Parameters:

disabled_text (str) – the text to be displayed when no accelerator is set

Sets the text to be displayed by self when no accelerator is set.

New in version 3.22.

Property Details

Gtk.ShortcutLabel.props.accelerator
Name:

accelerator

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The accelerator that self displays. See Gtk.ShortcutsShortcut :accelerator for the accepted syntax.

New in version 3.22.

Gtk.ShortcutLabel.props.disabled_text
Name:

disabled-text

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The text that is displayed when no accelerator is set.

New in version 3.22.