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 |
gint |
The number of input fields. |
|
unit |
None |
The initial unit. |
|
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 |
|
|
menu_show_percent |
gboolean |
|
|
show_refval |
gboolean |
|
|
spinbutton_width |
gint |
The minimal horizontal size of the |
|
update_policy |
GimpSizeEntryUpdatePolicy |
How the automatic pixel <-> real-world-unit calculations should be done. |
Return value
Returns: | GtkWidget |
A Pointer to the new |
|
The data is owned by the called function. |