### Constructor

# GimpUi SizeEntry new

#### 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:

1. `gimp_size_entry_new()`

2. (for each additional input field) `gimp_size_entry_add_field()`

3. `gimp_size_entry_set_unit()`

For each input field:

1. `gimp_size_entry_set_resolution()`

2. `gimp_size_entry_set_refval_boundaries()` (or gimp_size_entry_set_value_boundaries())

3. `gimp_size_entry_set_size()`

4. `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: `gint`

  The number of input fields.

`unit`

  Type: `GimpUnit`

  The 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: `gboolean`

  `TRUE` if the unit menu should contain an item for GIMP_UNIT_PIXEL (ignored if the `update_policy` is not GIMP_SIZE_ENTRY_UPDATE_NONE).

`menu_show_percent`

  Type: `gboolean`

  `TRUE` if the unit menu should contain an item for GIMP_UNIT_PERCENT.

`show_refval`

  Type: `gboolean`

  `TRUE` if you want an extra “reference value” spinbutton per input field.

`spinbutton_width`

  Type: `gint`

  The minimal horizontal size of the `GtkSpinButton`‘s.

`update_policy`

  Type: `GimpSizeEntryUpdatePolicy`

  How 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.