GtkShortcutLabel

GtkShortcutLabel — Displays a keyboard shortcut

Properties

char * accelerator Read / Write
char * disabled-text Read / Write

Types and Values

Object Hierarchy

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

Implemented Interfaces

GtkShortcutLabel implements GtkAccessible, 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 char *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 char *
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 char *accelerator);

Sets the accelerator to be displayed by self .

Parameters

self

a GtkShortcutLabel

 

accelerator

the new accelerator

 

gtk_shortcut_label_get_disabled_text ()

const char *
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 char *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”              char *

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”            char *

The text that is displayed when no accelerator is set.

Owner: GtkShortcutLabel

Flags: Read / Write

Default value: NULL