## GimpCellRendererToggle GimpCellRendererToggle — A GtkCellRendererToggle that displays icons instead of a checkbox. |

## Functions

GtkCellRenderer * | gimp_cell_renderer_toggle_new ()
void | gimp_cell_renderer_toggle_clicked ()

## Properties

gchar * | stock-id | Read / Write / Construct
gint | stock-size | Read / Write / Construct

## Signals

void | clicked | Run Last

## Types and Values

| GimpCellRendererToggle

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkCellRenderer
                    ╰── GtkCellRendererToggle
                        ╰── GimpCellRendererToggle

## Description

A GtkCellRendererToggle that displays icons instead of a checkbox.

## Functions

### gimp_cell_renderer_toggle_new ()

    GtkCellRenderer *
    gimp_cell_renderer_toggle_new (const gchar *stock_id);

Creates a custom version of the GtkCellRendererToggle. Instead of showing the standard toggle button, it shows a stock icon if the cell is active and no icon otherwise. This cell renderer is for example used in the Layers treeview to indicate and control the layer's visibility by showing `GIMP_STOCK_VISIBLE`.

#### Parameters

stock_id | the stock_id of the icon to use for the active state |

#### Returns

a new GimpCellRendererToggle

Since: GIMP 2.2

### gimp_cell_renderer_toggle_clicked ()

    void
    gimp_cell_renderer_toggle_clicked (GimpCellRendererToggle *cell,
                                       const gchar *path,
                                       GdkModifierType state);

Emits the "clicked" signal from a GimpCellRendererToggle.

#### Parameters

cell | a GimpCellRendererToggle |
path | the path to the clicked row |
state | the modifier state |

Since: GIMP 2.2

## Types and Values

### GimpCellRendererToggle

    typedef struct _GimpCellRendererToggle GimpCellRendererToggle;

## Property Details

### The `“stock-id”` property

      “stock-id”                 gchar *

Flags: Read / Write / Construct

Default value: NULL

### The `“stock-size”` property

      “stock-size”               gint

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 4

## Signal Details

### The `“clicked”` signal

    void
    user_function (GimpCellRendererToggle *gimpcellrenderertoggle,
                   gchar                  *arg1,
                   GdkModifierType         arg2,
                   gpointer                user_data)

Flags: Run Last