GtkShortcutLabel — Displays a keyboard shortcut
| GtkWidget * | gtk_shortcut_label_new () |
| const char * | gtk_shortcut_label_get_accelerator () |
| void | gtk_shortcut_label_set_accelerator () |
| const char * | gtk_shortcut_label_get_disabled_text () |
| void | gtk_shortcut_label_set_disabled_text () |
| char * | accelerator | Read / Write |
| char * | disabled-text | Read / Write |
GObject
╰── GInitiallyUnowned
╰── GtkWidget
╰── GtkShortcutLabel
GtkShortcutLabel implements GtkAccessible, GtkBuildable and GtkConstraintTarget.
#include <gtk/gtk.h>
GtkShortcutLabel is a widget that represents a single keyboard shortcut or gesture in the user interface.
GtkWidget *
gtk_shortcut_label_new (const char *accelerator); Creates a new GtkShortcutLabel with accelerator set.
accelerator | the initial accelerator |
const char *
gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self); Retrieves the current accelerator of self .
self |
the current accelerator.
[transfer none][nullable]
void gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self,const char *accelerator);
Sets the accelerator to be displayed by self .
self | ||
accelerator | the new accelerator |
const char *
gtk_shortcut_label_get_disabled_text (GtkShortcutLabel *self); Retrieves the text that is displayed when no accelerator is set.
self |
the current text displayed when no accelerator is set.
[transfer none][nullable]
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.
self | ||
disabled_text | the text to be displayed when no accelerator is set |
typedef struct _GtkShortcutLabel GtkShortcutLabel;
“accelerator” property“accelerator” char *
The accelerator that self displays. See “accelerator” for the accepted syntax.
Owner: GtkShortcutLabel
Flags: Read / Write
Default value: NULL
“disabled-text” property“disabled-text” char *
The text that is displayed when no accelerator is set.
Owner: GtkShortcutLabel
Flags: Read / Write
Default value: NULL
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkShortcutLabel.html