GimpMemsizeEntry

GimpMemsizeEntry — A composite widget that allows to enter a memory size.

Synopsis




            GimpMemsizeEntry;
GtkWidget*  gimp_memsize_entry_new          (guint64 value,
                                             guint64 lower,
                                             guint64 upper);
void        gimp_memsize_entry_set_value    (GimpMemsizeEntry *entry,
                                             guint64 value);
guint64     gimp_memsize_entry_get_value    (GimpMemsizeEntry *entry);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----GimpMemsizeEntry

Implemented Interfaces

GimpMemsizeEntry implements AtkImplementorIface.

Signals


"value-changed"
            void        user_function      (GimpMemsizeEntry *gimpmemsizeentry,
                                            gpointer          user_data)             : Run first

Description

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

Details

GimpMemsizeEntry

typedef struct _GimpMemsizeEntry GimpMemsizeEntry;

The GimpSizeEntry struct is considered private.


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.

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.

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.

entry : a GimpMemsizeEntry
Returns : the current value of entry (in Bytes).

Signal Details

The "value-changed" signal

void        user_function                  (GimpMemsizeEntry *gimpmemsizeentry,
                                            gpointer          user_data)             : Run first

gimpmemsizeentry : the object which received the signal.
user_data : user data set when the signal handler was connected.