GimpUi.ProcedureDialog¶
Methods¶
- Inherited:
GimpUi.Dialog (4), Gtk.Dialog (14), Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/c |
The |
||
r/w/co |
The |
Style Properties¶
- Inherited:
Signals¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class GimpUi.ProcedureDialog(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(procedure, config, title)¶
- Parameters:
procedure (
Gimp.Procedure) – the associatedGimp.Procedure.config (
Gimp.ProcedureConfig) – aGimp.ProcedureConfigfrom which properties will be turned into widgets.
- Returns:
the newly created
GimpUi.ProcedureDialog.- Return type:
Creates a new dialog for procedure using widgets generated from properties of config. A
Nonetitle will only be accepted if a menu label was set withGimp.Procedure.set_menu_label() (this menu label will then be used as dialog title instead). If neither an explicit label nor a procedure menu label was set, the call will fail.As for all
Gtk.Window, the returnedGimpUi.ProcedureDialogobject is owned by GTK and its initial reference is stored in an internal list of top-level windows. To delete the dialog, callGtk.Widget.destroy().
- fill(properties)¶
-
Populate self with the widgets corresponding to every listed properties. If the list is
None, self will be filled by the whole list of properties of the associatedGimp.Procedure, in the defined order:gimp_procedure_dialog_fill_list (dialog, NULL);Nevertheless if you only wish to display a partial list of properties, or if you wish to change the display order, then you have to give an explicit list:
gimp_procedure_dialog_fill (dialog, "property-1", "property-2", NULL);Note: you do not have to call
GimpUi.ProcedureDialog.get_widget() on every property before calling this function unless you want a given property to be represented by an alternative widget type. By default, each property will get a default representation according to its type.
- fill_box(container_id, properties)¶
- Parameters:
- Returns:
the
Gtk.Boxrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates and populates a new
Gtk.Boxwith widgets corresponding to every listed properties. If the list is empty, the created box will be filled by the whole list of properties of the associatedGimp.Procedure, in the defined order. This is similar of howGimpUi.ProcedureDialog.fill() works except that it creates a new widget which is not inside self itself.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- fill_expander(container_id, title_id, invert_title, contents_id)¶
- Parameters:
- Returns:
the
Gtk.Widgetrepresenting container_id. The object belongs to self and must not be freed.- Return type:
Creates a new
Gtk.Expanderand packs title_id as its title and contents_id as content. If title_id represents a boolean property, its value will be used to expand theGtk.Expander. If invert_title isTrue, then expand binding is inverted.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- fill_flowbox(container_id, properties)¶
- Parameters:
- Returns:
the
Gtk.FlowBoxrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates and populates a new
Gtk.FlowBoxwith widgets corresponding to every listed properties. If the list is empty, the created flowbox will be filled by the whole list of properties of the associatedGimp.Procedure, in the defined order. This is similar of howGimpUi.ProcedureDialog.fill() works except that it creates a new widget which is not inside self itself.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- fill_frame(container_id, title_id, invert_title, contents_id)¶
- Parameters:
- Returns:
the
Gtk.Widgetrepresenting container_id. The object belongs to self and must not be freed.- Return type:
Creates a new
Gtk.Frameand packs title_id as its title and contents_id as its child. If title_id represents a boolean property, its value will be used to renders contents_id sensitive or not. If invert_title isTrue, then sensitivity binding is inverted.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- fill_notebook(container_id, label_list, page_list)¶
- Parameters:
- Returns:
the
Gtk.Notebookrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates and populates a new
Gtk.Notebookwith widgets corresponding to every listed properties. This is similar of howGimpUi.ProcedureDialog.fill() works except that it creates a new widget which is not inside self itself.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- fill_paned(container_id, orientation, child1_id, child2_id)¶
- Parameters:
- Returns:
the
Gtk.Panedrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates and populates a new
Gtk.Panedcontaining widgets corresponding to child1_id and child2_id. This is similar of howGimpUi.ProcedureDialog.fill() works except that it creates a new widget which is not inside self itself.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- fill_scrolled_window(container_id, contents_id)¶
- Parameters:
- Returns:
the
Gtk.ScrolledWindowrepresenting contents_id. The object belongs to self and must not be freed.- Return type:
Creates and populates a new
Gtk.ScrolledWindowwith a widget corresponding to the declared content id.The container_id must be a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created container. This ID can later be used together with property names to be packed in other containers or inside self itself.
- get_color_widget(property, editable, type)¶
- Parameters:
property (
str) – name of theGegl.Colorproperty to build a widget for. It must be a property of theGimp.Procedureself has been created for.editable (
bool) – whether the color can be edited or is only for display.type (
GimpUi.ColorAreaType) – theGimpUi.ColorAreaType.
- Returns:
a
GimpUi.LabelColorrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new widget for property which must necessarily be a
Gegl.Colorproperty. This must be used instead ofGimpUi.ProcedureDialog.get_widget() when you want aGimpUi.LabelColorwhich is not customizable for a color property, or when to set a specific type.If a widget has already been created for this procedure, it will be returned instead (whatever its actual widget type).
- get_drawable_preview(preview_id, drawable)¶
- Parameters:
preview_id (
str) – the ID ofGimpUi.DrawablePreview.drawable (
Gimp.Drawable) – theGimp.Drawable.
- Returns:
the
Gtk.Widgetrepresenting preview_id. The object belongs to self and must not be freed.- Return type:
Gets or creates a new
GimpUi.DrawablePreviewfor drawable. If a widget with the preview_id has already been created for this procedure, it will be returned instead.The preview_id ID can later be used together with property names to be packed in other containers or inside self itself.
- get_int_combo(property, store)¶
- Parameters:
property (
str) – name of the int property to build a combo for. It must be a property of theGimp.Procedureself has been created for.store (
GimpUi.IntStore) – theGimpUi.IntStorewhich will be used.
- Returns:
the
Gtk.Widgetrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new
GimpUi.LabelIntWidgetfor property which must necessarily be an integer or boolean property. This must be used instead ofGimpUi.ProcedureDialog.get_widget() when you want to create a combo box from an integer property.If a widget has already been created for this procedure, it will be returned instead (whatever its actual widget type).
- get_int_radio(property, store)¶
- Parameters:
property (
str) – name of the int property to build radio buttons for. It must be a property of theGimp.Procedureself has been created for.store (
GimpUi.IntStore) – theGimpUi.IntStorewhich will be used.
- Returns:
the
Gtk.Widgetrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new #GimpLabelIntRadioFrame for property which must necessarily be an integer, enum or boolean property. This must be used instead of
GimpUi.ProcedureDialog.get_widget() when you want to create a group ofGtk.RadioButton-s from an integer property.If a widget has already been created for this procedure, it will be returned instead (whatever its actual widget type).
- get_label(label_id, text, is_markup, with_mnemonic)¶
- Parameters:
- Returns:
the
Gtk.Widgetrepresenting label_id. The object belongs to self and must not be freed.- Return type:
Creates a new
Gtk.Labelwith text. It can be useful for packing textual information in between property settings.If label_id is an existing string property of the
Gimp.ProcedureConfigassociated to self, then it will sync to the property value. In this case, text should beNone.If label_id is a unique ID which is neither the name of a property of the
Gimp.ProcedureConfigassociated to self, nor is it the ID of any previously created label or container, it will be initialized to text. This ID can later be used together with property names to be packed in other containers or inside self itself.
- get_scale_entry(property, factor)¶
- Parameters:
property (
str) – name of the int property to build a combo for. It must be a property of theGimp.Procedureself has been created for.factor (
float) – a display factor for the range shown by the widget.
- Returns:
the
Gtk.Widgetrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new
GimpUi.ScaleEntryfor property which must necessarily be an integer or double property. This can be used instead ofGimpUi.ProcedureDialog.get_widget() in particular if you want to tweak the display factor. A typical example is showing a [0.0, 1.0] range as [0.0, 100.0] instead (factor = 100.0).If a widget has already been created for this procedure, it will be returned instead (whatever its actual widget type).
- get_size_entry(property, property_is_pixel, unit_property, unit_format, update_policy, resolution)¶
- Parameters:
property (
str) – name of the int property to build an entry for. It must be a property of theGimp.Procedureself has been created for.property_is_pixel (
bool) – whenTrue, the property value is in pixels, and in the selected unit otherwise.unit_property (
str) – name of unit property.unit_format (
str) – a printf-like unit-format string used for unit labels.update_policy (
GimpUi.SizeEntryUpdatePolicy) – how the automatic pixel <-> real-world-unit calculations should be done.resolution (
float) – the resolution (in dpi) for the field.
- Returns:
the
Gtk.Widgetrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new
GimpUi.SizeEntryfor property which must necessarily be an integer or double property. The associated unit_property must be aGimp.Unitor integer property.If a widget has already been created for this procedure, it will be returned instead (whatever its actual widget type).
- get_spin_scale(property, factor)¶
- Parameters:
property (
str) – name of the int or double property to build aGimpUi.SpinScalefor. It must be a property of theGimp.Procedureself has been created for.factor (
float) – a display factor for the range shown by the widget. It must be set to 1.0 for integer properties.
- Returns:
the
Gtk.Widgetrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new
GimpUi.SpinScalefor property which must necessarily be an integer or double property. This can be used instead ofGimpUi.ProcedureDialog.get_widget() in particular if you want to tweak the display factor. A typical example is showing a [0.0, 1.0] range as [0.0, 100.0] instead (factor = 100.0).If a widget has already been created for this procedure, it will be returned instead (whatever its actual widget type).
- get_widget(property, widget_type)¶
- Parameters:
property (
str) – name of the property to build a widget for. It must be a property of theGimp.Procedureself has been created for.widget_type (
GObject.GType) – alternative widget type.GObject.TYPE_NONEwill create the default type of widget for the associated property type.
- Returns:
the
Gtk.Widgetrepresenting property. The object belongs to self and must not be freed.- Return type:
Creates a new
Gtk.Widgetfor 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 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
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.
%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 a [enum`Gimp`.FileChooserAction.ANY] action. If you intend to display a widget for a file param spec, you should always set it to a more specific action. See [method`Gimp`.Procedure.add_file_argument].
%G_TYPE_PARAM_UNIT:
%GIMP_TYPE_UNIT_COMBO_BOX
If the widget_type is not supported for the actual type of property, the function will fail. To keep the default, set to
GObject.TYPE_NONE.If a widget has already been created for this procedure, it will be returned instead (even if with a different widget_type).
- run()¶
-
Show self and only returns when the user finished interacting with it (either validating choices or canceling).
- set_ok_label(ok_label)¶
- Parameters:
ok_label (
str) – a label to replace the OK button’s text.
Changes the “OK” button’s label of self to ok_label.
- set_sensitive(property, sensitive, config, config_property, config_invert)¶
- Parameters:
property (
str) – name of a property of theGimp.Procedureself has been created for.sensitive (
bool) – whether the widget associated to property should be sensitive.config (
GObject.ObjectorNone) – an optional config object.config_property (
strorNone) – name of a property of config.config_invert (
bool) – whether to negate the value of config_property.
Sets sensitivity of the widget associated to property in self. If config is
None, then it is set to the value of sensitive. Otherwise sensitive is ignored and sensitivity is bound to the value of config_property of config (or the negation of this value if config_reverse isTrue).
- set_sensitive_if_in(property, config, config_property, values, in_values)¶
- Parameters:
property (
str) – name of a property of theGimp.Procedureself has been created for.config (
GObject.ObjectorNone) – an optional config object (ifNone, property's config will be used).config_property (
str) – name of a property of config.values (
Gimp.ValueArray) – an array of GValues which could be values of config_property.in_values (
bool) – whether property should be sensitive when config_property is one of values, or the opposite.
Sets sensitivity of the widget associated to property in self if the value of config_property in config is equal to one of values.
If config is
None, then the configuration object of self is used.If in_values is
False, then the widget is set sensitive if the value of config_property is **not** in values.
- do_fill_end(procedure, config) virtual¶
- Parameters:
procedure (
Gimp.Procedure) –config (
Gimp.ProcedureConfig) –
- do_fill_start(procedure, config) virtual¶
- Parameters:
procedure (
Gimp.Procedure) –config (
Gimp.ProcedureConfig) –
Property Details¶
- GimpUi.ProcedureDialog.props.config¶
- Name:
config- Type:
- Default Value:
- Flags:
The
Gimp.ProcedureConfigthis dialog is editing
- GimpUi.ProcedureDialog.props.procedure¶
- Name:
procedure- Type:
- Default Value:
- Flags:
The
Gimp.Procedurethis dialog is used with