GimpUi.prop_toggle_new
Description: Reference for GimpUi.prop_toggle_new

### Function

# GimpUiprop_toggle_new

unstable since: 3.2

#### Declaration [src]

    GtkWidget*
    gimp_prop_toggle_new (
      GObject* config,
      const gchar* property_name,
      const gchar* icon_name,
      const gchar* label,
      GtkWidget** image_out
    )

#### Description [src]

Creates a `GtkToggleButton` that sets the specified boolean property.

If `icon_name` is `NULL`, `label` will be used. If `label` is `NULL` too, the `property_name`‘s nick will be used as label.

Available since: 3.2

#### Parameters

`config`

  Type: `GObject`

  Object to which property is attached.

  The data is owned by the caller of the function.

`property_name`

  Type: `const gchar*`

  Name of boolean property controlled by the toggle button.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`icon_name`

  Type: `const gchar*`

  Icon to display in the toggle.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`label`

  Type: `const gchar*`

  Label to give the toggle (including mnemonic).

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`image_out`

  Type: `GtkWidget`

  The generated `GtkImage` if `icon_name` was not `NULL`.

  The argument will be set by the function.
  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `GtkWidget`

The newly `GtkToggleButton`.

The caller of the function takes ownership of the data, and is responsible for freeing it.