GimpUi.ImageChooser

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.ImageChooser GimpUi.ImageChooser Gtk.Box Gtk.Box Gtk.Box->GimpUi.ImageChooser 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 (title, label, image)

get_image ()

get_label ()

set_image (image)

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)

Name

Type

Flags

Short Description

image

Gimp.Image

r/w/en

The currently selected image

label

str

r/w/co

The label to be used next to the button

title

str

r/w/co

The title to be used for the image selection popup dialog

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

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

Fields

Inherited:

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

Class Details

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

Gtk.Box

Abstract:

No

Structure:

GimpUi.ImageChooserClass

The chooser contains an optional label and a button which queries the core process to pop up an image selection dialog.

New in version 3.0.

classmethod new(title, label, image)
Parameters:
  • title (str or None) – Title of the dialog to use or None to use the default title.

  • label (str or None) – Button label or None for no label.

  • image (Gimp.Image or None) – Initial image.

Returns:

A [class`GimpUi`.ImageChooser.

Return type:

Gtk.Widget

Creates a new Gtk.Widget that lets a user choose an image.

When image is None, initial choice is from context.

New in version 3.0.

get_image()
Returns:

an internal copy of the image which must not be freed.

Return type:

Gimp.Image

Gets the currently selected image.

New in version 3.0.

get_label()
Returns:

the [class`Gtk`.Widget] showing the label text.

Return type:

Gtk.Widget

Returns the label widget.

New in version 3.0.

set_image(image)
Parameters:

image (Gimp.Image) – Image to set.

Sets the currently selected image. This will select the image in both the button and any chooser popup.

New in version 3.0.

Property Details

GimpUi.ImageChooser.props.image
Name:

image

Type:

Gimp.Image

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The currently selected image.

New in version 3.0.

GimpUi.ImageChooser.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Label text with mnemonic.

New in version 3.0.

GimpUi.ImageChooser.props.title
Name:

title

Type:

str

Default Value:

'Image Selection'

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The title to be used for the image selection popup dialog.

New in version 3.0.