# GimpUi.SizeEntry

    const GimpUi = imports.gi.GimpUi;

    let sizeEntry = new GimpUi.SizeEntry();

This widget is used to enter pixel distances/sizes and resolutions.

You can specify the number of fields the widget should provide. For each field automatic mappings are performed between the field's "reference value" and its "value".

There is a GimpUi.UnitComboBox right of the entry fields which lets you specify the Gimp.Unit of the displayed values.

For each field, there can be one or two Gtk.SpinButton's to enter "value" and "reference value". If you specify @show_refval as false in GimpUi.SizeEntry.new there will be only one Gtk.SpinButton and the GimpUi.UnitComboBox will contain an item for selecting GIMP_UNIT_PIXEL.

The "reference value" is either of GIMP_UNIT_PIXEL or dpi, depending on which GimpUi.SizeEntryUpdatePolicy you specify in GimpUi.SizeEntry.new. The "value" is either the size in pixels mapped to the size in a real-world-unit (see Gimp.Unit) or the dpi value mapped to pixels per real-world-unit.

## Hierarchy

- GObject.Object
  - GObject.InitiallyUnowned
    - Gtk.Widget
      - Gtk.Container
        - Gtk.Grid
          - GimpUi.SizeEntry

## Constructors

- GimpUi.SizeEntry.new

## Methods

- GimpUi.SizeEntry.prototype.add_field
- GimpUi.SizeEntry.prototype.attach_label
- GimpUi.SizeEntry.prototype.get_help_widget
- GimpUi.SizeEntry.prototype.get_n_fields
- GimpUi.SizeEntry.prototype.get_refval
- GimpUi.SizeEntry.prototype.get_unit
- GimpUi.SizeEntry.prototype.get_unit_combo
- GimpUi.SizeEntry.prototype.get_update_policy
- GimpUi.SizeEntry.prototype.get_value
- GimpUi.SizeEntry.prototype.grab_focus
- GimpUi.SizeEntry.prototype.set_activates_default
- GimpUi.SizeEntry.prototype.set_pixel_digits
- GimpUi.SizeEntry.prototype.set_refval
- GimpUi.SizeEntry.prototype.set_refval_boundaries
- GimpUi.SizeEntry.prototype.set_refval_digits
- GimpUi.SizeEntry.prototype.set_resolution
- GimpUi.SizeEntry.prototype.set_size
- GimpUi.SizeEntry.prototype.set_unit
- GimpUi.SizeEntry.prototype.set_value
- GimpUi.SizeEntry.prototype.set_value_boundaries
- GimpUi.SizeEntry.prototype.show_unit_menu

## Signals

- refval-changed
- unit-changed
- value-changed