Constructor
GimpUiSizeEntrynew
Declaration [src]
GtkWidget*
gimp_size_entry_new (
gint number_of_fields,
GimpUnit* unit,
const gchar* unit_format,
gboolean menu_show_pixels,
gboolean menu_show_percent,
gboolean show_refval,
gint spinbutton_width,
GimpSizeEntryUpdatePolicy update_policy
)
Description [src]
Creates a new GimpSizeEntry widget.
To have all automatic calculations performed correctly, set up the widget in the following order:
-
gimp_size_entry_new() -
(for each additional input field)
gimp_size_entry_add_field() -
gimp_size_entry_set_unit()
For each input field:
-
gimp_size_entry_set_resolution() -
gimp_size_entry_set_refval_boundaries()(or gimp_size_entry_set_value_boundaries()) -
gimp_size_entry_set_size() -
gimp_size_entry_set_refval()(or gimp_size_entry_set_value())
The GimpSizeEntry is derived from GtkGrid and will have
an empty border of one cell width on each side plus an empty column left
of the GimpUnitComboBox to allow the caller to add labels or a
GimpChainButton.
Parameters
number_of_fields-
Type:
gintThe number of input fields.
unit-
Type:
GimpUnitThe initial unit.
The data is owned by the caller of the function. unit_format-
Type:
const gchar*A printf-like unit-format string as is used with gimp_unit_menu_new().
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. menu_show_pixels-
Type:
gbooleanTRUEif the unit menu should contain an item for GIMP_UNIT_PIXEL (ignored if theupdate_policyis not GIMP_SIZE_ENTRY_UPDATE_NONE). menu_show_percent-
Type:
gbooleanTRUEif the unit menu should contain an item for GIMP_UNIT_PERCENT. show_refval-
Type:
gbooleanTRUEif you want an extra “reference value” spinbutton per input field. spinbutton_width-
Type:
gintThe minimal horizontal size of the
GtkSpinButton‘s. update_policy-
Type:
GimpSizeEntryUpdatePolicyHow the automatic pixel <-> real-world-unit calculations should be done.
Return value
Type: GtkWidget
A Pointer to the new GimpSizeEntry widget.
| The data is owned by the called function. |