GimpUi.DrawableChooser

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.DrawableChooser GimpUi.DrawableChooser Gtk.Box Gtk.Box Gtk.Box->GimpUi.DrawableChooser 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, drawable_type, drawable)

get_drawable ()

get_label ()

set_drawable (drawable)

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

drawable

Gimp.Drawable

r/w/en

The currently selected drawable

drawable-type

GObject.GType

r/w/co

The GObject.GType of the drawable property

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 drawable 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.DrawableChooser(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

GimpUi.DrawableChooserClass

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

New in version 3.0.

classmethod new(title, label, drawable_type, drawable)
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.

  • drawable_type (GObject.GType) – the acceptable subtype of choosable drawables.

  • drawable (Gimp.Drawable or None) – Initial drawable.

Returns:

A [class`GimpUi`.DrawableChooser.

Return type:

Gtk.Widget

Creates a new Gtk.Widget that lets a user choose a drawable which must be of type drawable_type. drawable_type of values GObject.TYPE_NONE and %GIMP_TYPE_DRAWABLE are equivalent. Otherwise it must be a subtype of %GIMP_TYPE_DRAWABLE.

When drawable is None, initial choice is from context.

New in version 3.0.

get_drawable()
Returns:

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

Return type:

Gimp.Drawable

Gets the currently selected drawable.

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_drawable(drawable)
Parameters:

drawable (Gimp.Drawable) – Drawable to set.

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

New in version 3.0.

Property Details

GimpUi.DrawableChooser.props.drawable
Name:

drawable

Type:

Gimp.Drawable

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The currently selected drawable.

New in version 3.0.

GimpUi.DrawableChooser.props.drawable_type
Name:

drawable-type

Type:

GObject.GType

Default Value:

<GType GimpDrawable>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Allowed drawable types, which must be either GIMP_TYPE_DRAWABLE or a subtype.

New in version 3.0.

GimpUi.DrawableChooser.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Label text with mnemonic.

New in version 3.0.

GimpUi.DrawableChooser.props.title
Name:

title

Type:

str

Default Value:

'Drawable Selection'

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

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

New in version 3.0.