GimpUi.prop_switch_new
Description: Reference for GimpUi.prop_switch_new

### Function

# GimpUiprop_switch_new

since: 3.0

#### Declaration [src]

    GtkWidget*
    gimp_prop_switch_new (
      GObject* config,
      const gchar* property_name,
      const gchar* label,
      GtkWidget** label_out,
      GtkWidget** switch_out
    )

#### Description [src]

Creates a `GtkBox` with a switch and a label that displays and sets the specified boolean property. If `label` is `NULL`, the `property_name`‘s nick will be used as label.

Available since: 3.0

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

  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 checkbutton (including mnemonic).

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

`label_out`

  Type: `GtkWidget`

  The generated `GtkLabel`.

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

`switch_out`

  Type: `GtkWidget`

  The generated `GtkSwitch`.

  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 created box containing a `GtkSwitch`.

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