CtkCellRendererAccel

CtkCellRendererAccel — Renders a keyboard accelerator in a cell

Functions

Properties

guint accel-key Read / Write
CtkCellRendererAccelMode accel-mode Read / Write
CdkModifierType accel-mods Read / Write
guint keycode Read / Write

Signals

void accel-cleared Run Last
void accel-edited Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── CtkCellRenderer
            ╰── CtkCellRendererText
                ╰── CtkCellRendererAccel

Includes

#include <ctk/ctk.h>

Description

CtkCellRendererAccel 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.

The CtkCellRendererAccel cell renderer was added in CTK+ 2.10.

Functions

ctk_cell_renderer_accel_new ()

CtkCellRenderer *
ctk_cell_renderer_accel_new (void);

Creates a new CtkCellRendererAccel.

Returns

the new cell renderer

Since: 2.10

Types and Values

struct CtkCellRendererAccel

struct CtkCellRendererAccel;

enum CtkCellRendererAccelMode

Determines if the edited accelerators are CTK+ accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by CTK+ are allowed, and the accelerators are rendered in the same way as they are in menus.

Members

CTK_CELL_RENDERER_ACCEL_MODE_CTK

CTK+ accelerators mode

 

CTK_CELL_RENDERER_ACCEL_MODE_OTHER

Other accelerator mode

 

Property Details

The “accel-key” property

  “accel-key”                guint

The keyval of the accelerator.

Owner: CtkCellRendererAccel

Flags: Read / Write

Allowed values: <= G_MAXINT

Default value: 0

Since: 2.10


The “accel-mode” property

  “accel-mode”               CtkCellRendererAccelMode

Determines if the edited accelerators are CTK+ accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by CTK+ are allowed, and the accelerators are rendered in the same way as they are in menus.

Owner: CtkCellRendererAccel

Flags: Read / Write

Default value: CTK_CELL_RENDERER_ACCEL_MODE_CTK

Since: 2.10


The “accel-mods” property

  “accel-mods”               CdkModifierType

The modifier mask of the accelerator.

Owner: CtkCellRendererAccel

Flags: Read / Write

Since: 2.10


The “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: CtkCellRendererAccel

Flags: Read / Write

Allowed values: <= G_MAXINT

Default value: 0

Since: 2.10

Signal Details

The “accel-cleared” signal

void
user_function (CtkCellRendererAccel *accel,
               char                 *path_string,
               gpointer              user_data)

Gets emitted when the user has removed the accelerator.

Parameters

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

Since: 2.10


The “accel-edited” signal

void
user_function (CtkCellRendererAccel *accel,
               char                 *path_string,
               guint                 accel_key,
               CdkModifierType       accel_mods,
               guint                 hardware_keycode,
               gpointer              user_data)

Gets emitted when the user has selected a new accelerator.

Parameters

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

Since: 2.10