Function

GimpUiprop_coordinates_new

since: 2.4

Declaration [src]

GtkWidget*
gimp_prop_coordinates_new (
  GObject* config,
  const gchar* x_property_name,
  const gchar* y_property_name,
  const gchar* unit_property_name,
  const gchar* unit_format,
  GimpSizeEntryUpdatePolicy update_policy,
  gdouble xresolution,
  gdouble yresolution,
  gboolean has_chainbutton
)

Description [src]

Creates a GimpSizeEntry to set and display two double or int properties, which will usually represent X and Y coordinates, and their associated unit property.

Available since: 2.4

Parameters

config

Type: GObject

Object to which property is attached.

The data is owned by the caller of the function.
x_property_name

Type: const gchar*

Name of int or double property for X coordinate.

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

Type: const gchar*

Name of int or double property for Y coordinate.

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

Type: const gchar*

Name of unit property.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
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.
update_policy

Type: GimpSizeEntryUpdatePolicy

How the automatic pixel <-> real-world-unit calculations should be done.

xresolution

Type: gdouble

The resolution (in dpi) for the X coordinate.

yresolution

Type: gdouble

The resolution (in dpi) for the Y coordinate.

has_chainbutton

Type: gboolean

Whether to add a chainbutton to the size entry.

Return value

Type: GtkWidget

A new GimpSizeEntry widget.

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