<?xml version="1.0"?>
<page id="GimpUi.ProcedureDialog.get_widget"
      type="topic"
      style="method"
      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.ProcedureDialog" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gtk.Widget</api:type>
      </api:returns>
      <api:name>gimp_procedure_dialog_get_widget</api:name>
      <api:arg>
        <api:type>String</api:type>
        <api:name>property</api:name>
      </api:arg>
      <api:arg>
        <api:type>GObject.Type</api:type>
        <api:name>widget_type</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.ProcedureDialog.prototype.get_widget</title>
  <synopsis><code mime="text/x-gjs">
function get_widget(property: String, widget_type: GObject.Type): <link href="../Gtk-3.0/Gtk.Widget.html">Gtk.Widget</link> {
    // Gjs wrapper for gimp_procedure_dialog_get_widget()
}
  </code></synopsis>
  <p>Creates a new <link href="../Gtk-3.0/Gtk.Widget.html">Gtk.Widget</link> for <code>property</code> according to the property
type. The following types are possible:</p>  <p>- %G_TYPE_PARAM_BOOLEAN:
    * %GTK_TYPE_CHECK_BUTTON (default)
    * %GTK_TYPE_SWITCH
- %G_TYPE_PARAM_INT or %G_TYPE_PARAM_DOUBLE:
    * %GIMP_TYPE_LABEL_SPIN (default): a spin button with a label.
    * %GIMP_TYPE_SCALE_ENTRY: a scale entry with label.
    * %GIMP_TYPE_SPIN_SCALE: a spin scale with label embedded.
    * %GIMP_TYPE_SPIN_BUTTON: a spin button with no label.
- %G_TYPE_PARAM_STRING:
    * %GIMP_TYPE_LABEL_ENTRY (default): an entry with a label.
    * %GTK_TYPE_ENTRY: an entry with no label.
    * %GTK_TYPE_TEXT_VIEW: a text view with no label.
- %GIMP_TYPE_CHOICE:
    * %GTK_TYPE_COMBO_BOX (default): a combo box displaying every
      choice.
    * %GIMP_TYPE_INT_RADIO_FRAME: a frame with radio buttons.
- %GEGL_TYPE_COLOR:
    * %GIMP_TYPE_LABEL_COLOR (default): a color button with a label.
        Please use <link xref="GimpUi.ProcedureDialog.get_color_widget"/> for a
        non-editable color area with a label.
    * %GIMP_TYPE_COLOR_BUTTON: a color button with no label.
    * %GIMP_TYPE_COLOR_AREA: a color area with no label.
- %G_TYPE_PARAM_FILE:
    * %GTK_FILE_CHOOSER_BUTTON (default): generic file chooser button
    in %GTK_FILE_CHOOSER_ACTION_OPEN mode. Please use
    <link xref="GimpUi.ProcedureDialog.get_file_chooser"/> to create buttons in
    other modes.</p>  <p>If the <code>widget_type</code> is not supported for the actual type of
<code>property</code>, the function will fail. To keep the default, set to
%G_TYPE_NONE.</p>  <p>If a widget has already been created for this procedure, it will be
returned instead (even if with a different <code>widget_type</code>).</p>

<terms>
<item>
<title><code>property</code></title>
  <p>name of the property to build a widget for. It must be
              a property of the <link href="../Gimp-3.0/Gimp.Procedure.html">Gimp.Procedure</link> <code>dialog</code> has been
              created for.</p>
</item>
<item>
<title><code>widget_type</code></title>
  <p>alternative widget type. %G_TYPE_NONE will create the
              default type of widget for the associated property
              type.</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>the <link href="../Gtk-3.0/Gtk.Widget.html">Gtk.Widget</link> representing <code>property</code>. The
                          object belongs to <code>dialog</code> and must not be
                          freed.</p>
</item>
</terms>

</page>
