## GimpMemSizeEntry

GimpMemSizeEntry — A composite widget to enter a memory size.

## Functions

GtkWidget * | gimp_memsize_entry_new ()
void | gimp_memsize_entry_set_value ()
guint64 | gimp_memsize_entry_get_value ()

## Signals

void | value-changed | Run First

## Types and Values

| GimpMemsizeEntry

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkBox
                            ╰── GimpMemsizeEntry

## Implemented Interfaces

GimpMemsizeEntry implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

Similar to a GimpSizeEntry but instead of lengths, this widget is used to let the user enter memory sizes. A combo box allows one to switch between Kilobytes, Megabytes and Gigabytes. Used in the GIMP preferences dialog.

## Functions

### gimp_memsize_entry_new ()

    GtkWidget *
    gimp_memsize_entry_new (guint64 value,
                            guint64 lower,
                            guint64 upper);

Creates a new GimpMemsizeEntry which is a GtkHBox with a GtkSpinButton and a GtkOptionMenu all setup to allow the user to enter memory sizes.

#### Parameters

value | the initial value (in Bytes) |
lower | the lower limit for the value (in Bytes) |
upper | the upper limit for the value (in Bytes) |

#### Returns

Pointer to the new GimpMemsizeEntry.

### gimp_memsize_entry_set_value ()

    void
    gimp_memsize_entry_set_value (GimpMemsizeEntry *entry,
                                  guint64 value);

Sets the `entry` 's value. Please note that the GimpMemsizeEntry rounds the value to full Kilobytes.

#### Parameters

entry | a GimpMemsizeEntry |
value | the new value (in Bytes) |

### gimp_memsize_entry_get_value ()

    guint64
    gimp_memsize_entry_get_value (GimpMemsizeEntry *entry);

Retrieves the current value from a GimpMemsizeEntry.

#### Parameters

entry | a GimpMemsizeEntry |

#### Returns

the current value of `entry` (in Bytes).

## Types and Values

### GimpMemsizeEntry

    typedef struct _GimpMemsizeEntry GimpMemsizeEntry;

## Signal Details

### The `“value-changed”` signal

    void
    user_function (GimpMemsizeEntry *gimpmemsizeentry,
                   gpointer          user_data)

Flags: Run First