GimpUi.MemsizeEntry

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GimpUi.MemsizeEntry GimpUi.MemsizeEntry Gtk.Box Gtk.Box Gtk.Box->GimpUi.MemsizeEntry Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (value, lower, upper)

get_spinbutton ()

get_value ()

set_value (value)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

value-changed

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class GimpUi.MemsizeEntry(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

GimpUi.MemsizeEntryClass

Similar to a GimpUi.SizeEntry 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.

classmethod new(value, lower, upper)
Parameters:
  • value (int) – the initial value (in Bytes)

  • lower (int) – the lower limit for the value (in Bytes)

  • upper (int) – the upper limit for the value (in Bytes)

Returns:

Pointer to the new GimpUi.MemsizeEntry.

Return type:

Gtk.Widget

Creates a new GimpUi.MemsizeEntry which is a Gtk.HBox with a Gtk.SpinButton and a #GtkOptionMenu all setup to allow the user to enter memory sizes.

get_spinbutton()
Returns:

the entry’s #GtkSpinbutton.

Return type:

Gtk.SpinButton

New in version 3.0.

get_value()
Returns:

the current value of self (in Bytes).

Return type:

int

Retrieves the current value from a GimpUi.MemsizeEntry.

set_value(value)
Parameters:

value (int) – the new value (in Bytes)

Sets the self's value. Please note that the GimpUi.MemsizeEntry rounds the value to full Kilobytes.

Signal Details

GimpUi.MemsizeEntry.signals.value_changed(memsize_entry)
Signal Name:

value-changed

Flags:

RUN_FIRST

Parameters:

memsize_entry (GimpUi.MemsizeEntry) – The object which received the signal