## GimpCellRendererToggle

GimpCellRendererToggle —

## Synopsis

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

## Object Hierarchy

      GObject
       +----GtkObject
             +----GtkCellRenderer
                   +----GtkCellRendererToggle
                         +----GimpCellRendererToggle

## Properties

      "stock-id"             gchararray            : Read / Write / Construct
      "stock-size"           gint                  : Read / Write / Construct

## Signal Prototypes

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

## Description

## Details

### GimpCellRendererToggle

    typedef struct _GimpCellRendererToggle GimpCellRendererToggle;

### 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`.

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

`cell` : | a GimpCellRendererToggle
`path` : |
`state` : |

Since GIMP 2.2

## Properties

### The "`stock-id`" property

      "stock-id"             gchararray            : Read / Write / Construct

Default value: NULL

### The "`stock-size`" property

      "stock-size"           gint                  : Read / Write / Construct

Allowed values: >= 0

Default value: 4

## Signals

### The "clicked" signal

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

`gimpcellrenderertoggle` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.