## GtkShortcutLabel GtkShortcutLabel — Displays a keyboard shortcut |

## Functions

GtkWidget * | gtk_shortcut_label_new ()
const gchar * | gtk_shortcut_label_get_accelerator ()
void | gtk_shortcut_label_set_accelerator ()
const gchar * | gtk_shortcut_label_get_disabled_text ()
void | gtk_shortcut_label_set_disabled_text ()

## Properties

gchar * | accelerator | Read / Write
gchar * | disabled-text | Read / Write

## Types and Values

| GtkShortcutLabel

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkShortcutLabel

## Implemented Interfaces

GtkShortcutLabel implements AtkImplementorIface, GtkBuildable and GtkConstraintTarget.

## Includes

    #include <gtk/gtk.h>

## Description

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

## Functions

### gtk_shortcut_label_new ()

    GtkWidget *
    gtk_shortcut_label_new (const gchar *accelerator);

Creates a new GtkShortcutLabel with `accelerator` set.

#### Parameters

accelerator | the initial accelerator |

#### Returns

a newly-allocated GtkShortcutLabel.

[transfer full]

### gtk_shortcut_label_get_accelerator ()

    const gchar *
    gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self);

Retrieves the current accelerator of `self` .

#### Parameters

self | a GtkShortcutLabel |

#### Returns

the current accelerator.

[transfer none][nullable]

### gtk_shortcut_label_set_accelerator ()

    void
    gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self,
                                        const gchar *accelerator);

Sets the accelerator to be displayed by `self` .

#### Parameters

self | a GtkShortcutLabel |
accelerator | the new accelerator |

### gtk_shortcut_label_get_disabled_text ()

    const gchar *
    gtk_shortcut_label_get_disabled_text (GtkShortcutLabel *self);

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

#### Parameters

self | a GtkShortcutLabel |

#### Returns

the current text displayed when no accelerator is set.

[transfer none][nullable]

### gtk_shortcut_label_set_disabled_text ()

    void
    gtk_shortcut_label_set_disabled_text (GtkShortcutLabel *self,
                                          const gchar *disabled_text);

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

#### Parameters

self | a GtkShortcutLabel |
disabled_text | the text to be displayed when no accelerator is set |

## Types and Values

### GtkShortcutLabel

    typedef struct _GtkShortcutLabel GtkShortcutLabel;

## Property Details

### The `“accelerator”` property

      “accelerator”              gchar *

The accelerator that `self` displays. See “accelerator” for the accepted syntax.

Owner: GtkShortcutLabel

Flags: Read / Write

Default value: NULL

### The `“disabled-text”` property

      “disabled-text”            gchar *

The text that is displayed when no accelerator is set.

Owner: GtkShortcutLabel

Flags: Read / Write

Default value: NULL

## See Also

GtkCellRendererAccel