Method
GimpUiProcedureDialogget_widget
Declaration [src]
GtkWidget*
gimp_procedure_dialog_get_widget (
GimpProcedureDialog* dialog,
const gchar* property,
GType widget_type
)
Description [src]
Creates a new GtkWidget for property according to the property
type. The following types are possible:
G_TYPE_PARAM_BOOLEAN:GTK_TYPE_CHECK_BUTTON(default)GTK_TYPE_SWITCH
G_TYPE_PARAM_INT,G_TYPE_PARAM_UINT, orG_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(default will depend on the number of choices):GTK_TYPE_COMBO_BOX: 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 usegimp_procedure_dialog_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.
GIMP_TYPE_PARAM_FILE:GTK_FILE_CHOOSER_BUTTON(default): generic file chooser widget using the action mode of the param spec. Note that it won’t work with aGimpFileChooserActionaction. If you intend to display a widget for a file param spec, you should always set it to a more specific action. Seegimp_procedure_add_file_argument().
G_TYPE_PARAM_UNIT:GIMP_TYPE_UNIT_COMBO_BOX
GIMP_TYPE_PARAM_ITEM(any subtype, such as layer, channel or path):GIMP_TYPE_ITEM_CHOOSER(default): a widget allowing to choose among items of the specific subtype, within all images opened in GIMP.GIMP_TYPE_DRAWABLE_CHOOSER(deprecated): this type of widget is now deprecated. You should update your code to request a %GimpItemChooser instead.
GIMP_TYPE_PARAM_IMAGE:GIMP_TYPE_IMAGE_CHOOSER: a widget allowing to choose among images opened in GIMP.
If the widget_type is not supported for the actual type of
property, the function will fail. To keep the default, set to
G_TYPE_NONE.
Note that this function will not ensure that its default returned
widget type will always be the same. If you want to make sure that no
breakage will ensure in your code, in particular if you are further
tweaking the widget with GTK or libgimpui API, you should always
call with the specific widget_type.
If a widget has already been created for this procedure, it will be
returned instead (even if with a different widget_type).
Parameters
property-
Type:
const gchar*Name of the property to build a widget for. It must be a property of the
GimpProceduredialoghas been created for.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. widget_type-
Type:
GTypeAlternative widget type.
G_TYPE_NONEwill create the default type of widget for the associated property type.
Return value
Type: GtkWidget
The GtkWidget representing property. The
object belongs to dialog and must not be freed.
| The data is owned by the instance. |