<?xml version="1.0"?>
<page id="GimpUi.CellRendererToggle.new"
      type="topic"
      style="constructor"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="GimpUi.CellRendererToggle" group="constructor" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gtk.CellRenderer</api:type>
      </api:returns>
      <api:name>gimp_cell_renderer_toggle_new</api:name>
      <api:arg>
        <api:type>String</api:type>
        <api:name>icon_name</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.CellRendererToggle.new</title>
  <synopsis><code mime="text/x-gjs">
function new(icon_name: String): <link href="../Gtk-3.0/Gtk.CellRenderer.html">Gtk.CellRenderer</link> {
    // Gjs wrapper for gimp_cell_renderer_toggle_new()
}
  </code></synopsis>
  <p>Creates a custom version of the <link href="../Gtk-3.0/Gtk.CellRendererToggle.html">Gtk.CellRendererToggle</link>. Instead of
showing the standard toggle button, it shows a named 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.</p>
  <p>Since 2.2</p>
<terms>
<item>
<title><code>icon_name</code></title>
  <p>the icon name of the icon to use for the active state</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>a new <link xref="GimpUi.CellRendererToggle"/></p>
</item>
</terms>

</page>
