GimpUi.coordinates_new
Description: Reference for GimpUi.coordinates_new

### Function

# GimpUicoordinates_new

#### Declaration [src]

    GtkWidget*
    gimp_coordinates_new (
      GimpUnit* unit,
      const gchar* unit_format,
      gboolean menu_show_pixels,
      gboolean menu_show_percent,
      gint spinbutton_width,
      GimpSizeEntryUpdatePolicy update_policy,
      gboolean chainbutton_active,
      gboolean chain_constrains_ratio,
      const gchar* xlabel,
      gdouble x,
      gdouble xres,
      gdouble lower_boundary_x,
      gdouble upper_boundary_x,
      gdouble xsize_0,
      gdouble xsize_100,
      const gchar* ylabel,
      gdouble y,
      gdouble yres,
      gdouble lower_boundary_y,
      gdouble upper_boundary_y,
      gdouble ysize_0,
      gdouble ysize_100
    )

#### Description [src]

Convenience function that creates a `GimpSizeEntry` with two fields for x/y coordinates/sizes with a `GimpChainButton` attached to constrain either the two fields’ values or the ratio between them.

#### Parameters

`unit`

  Type: `GimpUnit`

  The initial unit of the `GimpUnitMenu`.

  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 `GimpUnitMenu` should contain an item for GIMP_UNIT_PIXEL.

`menu_show_percent`

  Type: `gboolean`

  `TRUE` if the `GimpUnitMenu` should contain an item for GIMP_UNIT_PERCENT.

`spinbutton_width`

  Type: `gint`

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

`update_policy`

  Type: `GimpSizeEntryUpdatePolicy`

  The update policy for the `GimpSizeEntry`.

`chainbutton_active`

  Type: `gboolean`

  `TRUE` if the attached `GimpChainButton` should be active.

`chain_constrains_ratio`

  Type: `gboolean`

  `TRUE` if the chainbutton should constrain the fields’ aspect ratio. If `FALSE`, the values will be constrained.

`xlabel`

  Type: `const gchar*`

  The label for the X coordinate.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`x`

  Type: `gdouble`

  The initial value of the X coordinate.

`xres`

  Type: `gdouble`

  The horizontal resolution in DPI.

`lower_boundary_x`

  Type: `gdouble`

  The lower boundary of the X coordinate.

`upper_boundary_x`

  Type: `gdouble`

  The upper boundary of the X coordinate.

`xsize_0`

  Type: `gdouble`

  The X value which will be treated as 0%.

`xsize_100`

  Type: `gdouble`

  The X value which will be treated as 100%.

`ylabel`

  Type: `const gchar*`

  The label for the Y coordinate.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`y`

  Type: `gdouble`

  The initial value of the Y coordinate.

`yres`

  Type: `gdouble`

  The vertical resolution in DPI.

`lower_boundary_y`

  Type: `gdouble`

  The lower boundary of the Y coordinate.

`upper_boundary_y`

  Type: `gdouble`

  The upper boundary of the Y coordinate.

`ysize_0`

  Type: `gdouble`

  The Y value which will be treated as 0%.

`ysize_100`

  Type: `gdouble`

  The Y value which will be treated as 100%.

#### Return value

Type: `GtkWidget`

The new `GimpSizeEntry`.

The caller of the function takes ownership of the data, and is responsible for freeing it.