GtkCellRendererAccel — Renders a keyboard accelerator in a cell
guint | accel-key | Read / Write |
GtkCellRendererAccelMode | accel-mode | Read / Write |
GdkModifierType | accel-mods | Read / Write |
guint | keycode | Read / Write |
void | accel-cleared | Run Last |
void | accel-edited | Run Last |
GObject ╰── GInitiallyUnowned ╰── GtkCellRenderer ╰── GtkCellRendererText ╰── GtkCellRendererAccel
#include <gtk/gtk.h>
GtkCellRendererAccel displays a keyboard accelerator (i.e. a key combination like Control + a
). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination.
GtkCellRenderer *
gtk_cell_renderer_accel_new (void
);
Creates a new GtkCellRendererAccel.
the new cell renderer
typedef struct _GtkCellRendererAccel GtkCellRendererAccel;
Determines if the edited accelerators are GTK accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK are allowed, and the accelerators are rendered in the same way as they are in menus.
GTK_CELL_RENDERER_ACCEL_MODE_GTK | GTK accelerators mode | |
GTK_CELL_RENDERER_ACCEL_MODE_OTHER | Other accelerator mode |
“accel-key”
property“accel-key” guint
The keyval of the accelerator.
Owner: GtkCellRendererAccel
Flags: Read / Write
Allowed values: <= G_MAXINT
Default value: 0
“accel-mode”
property“accel-mode” GtkCellRendererAccelMode
Determines if the edited accelerators are GTK accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK are allowed, and the accelerators are rendered in the same way as they are in menus.
Owner: GtkCellRendererAccel
Flags: Read / Write
Default value: GTK_CELL_RENDERER_ACCEL_MODE_GTK
“accel-mods”
property“accel-mods” GdkModifierType
The modifier mask of the accelerator.
Owner: GtkCellRendererAccel
Flags: Read / Write
“keycode”
property“keycode” guint
The hardware keycode of the accelerator. Note that the hardware keycode is only relevant if the key does not have a keyval. Normally, the keyboard configuration should assign keyvals to all keys.
Owner: GtkCellRendererAccel
Flags: Read / Write
Allowed values: <= G_MAXINT
Default value: 0
“accel-cleared”
signalvoid user_function (GtkCellRendererAccel *accel, char *path_string, gpointer user_data)
Gets emitted when the user has removed the accelerator.
accel | the object reveiving the signal | |
path_string | the path identifying the row of the edited cell | |
user_data | user data set when the signal handler was connected. |
Flags: Run Last
“accel-edited”
signalvoid user_function (GtkCellRendererAccel *accel, char *path_string, guint accel_key, GdkModifierType accel_mods, guint hardware_keycode, gpointer user_data)
Gets emitted when the user has selected a new accelerator.
accel | the object reveiving the signal | |
path_string | the path identifying the row of the edited cell | |
accel_key | the new accelerator keyval | |
accel_mods | the new acclerator modifier mask | |
hardware_keycode | the keycode of the new accelerator | |
user_data | user data set when the signal handler was connected. |
Flags: Run Last
© 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/GtkCellRendererAccel.html