### Function

# GimpUi coordinates_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` | `None`
| The initial unit of the `GimpUnitMenu`.
`unit_format` | `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` | `gboolean`
| `TRUE` if the `GimpUnitMenu` should contain an item for GIMP_UNIT_PIXEL.
`menu_show_percent` | `gboolean`
| `TRUE` if the `GimpUnitMenu` should contain an item for GIMP_UNIT_PERCENT.
`spinbutton_width` | `gint`
| The horizontal size of the `GimpSizeEntry`‘s `GtkSpinButton`‘s.
`update_policy` | `GimpSizeEntryUpdatePolicy`
| The update policy for the `GimpSizeEntry`.
`chainbutton_active` | `gboolean`
| `TRUE` if the attached `GimpChainButton` should be active.
`chain_constrains_ratio` | `gboolean`
| `TRUE` if the chainbutton should constrain the fields’ aspect ratio. If `FALSE`, the values will be constrained.
`xlabel` | `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` | `gdouble`
| The initial value of the X coordinate.
`xres` | `gdouble`
| The horizontal resolution in DPI.
`lower_boundary_x` | `gdouble`
| The lower boundary of the X coordinate.
`upper_boundary_x` | `gdouble`
| The upper boundary of the X coordinate.
`xsize_0` | `gdouble`
| The X value which will be treated as 0%.
`xsize_100` | `gdouble`
| The X value which will be treated as 100%.
`ylabel` | `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` | `gdouble`
| The initial value of the Y coordinate.
`yres` | `gdouble`
| The vertical resolution in DPI.
`lower_boundary_y` | `gdouble`
| The lower boundary of the Y coordinate.
`upper_boundary_y` | `gdouble`
| The upper boundary of the Y coordinate.
`ysize_0` | `gdouble`
| The Y value which will be treated as 0%.
`ysize_100` | `gdouble`
| The Y value which will be treated as 100%.

#### Return value

Returns: | `GtkWidget`
| The new `GimpSizeEntry`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.