GimpUi.ResourceChooser¶
- Subclasses:
 GimpUi.BrushChooser,GimpUi.FontChooser,GimpUi.GradientChooser,GimpUi.PaletteChooser,GimpUi.PatternChooser
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)
  | 
|
  | 
|
  | 
Virtual Methods¶
  | 
Properties¶
- Inherited:
 Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/co  | 
The label to be used next to the button  | 
||
r/w  | 
The currently selected resource  | 
||
r/w/co  | 
The title to be used for the resource selection popup dialog  | 
Child Properties¶
- Inherited:
 
Style Properties¶
- Inherited:
 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
The   | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class GimpUi.ResourceChooser(*args, **kwargs)¶
 - Bases:
 - Abstract:
 Yes
- Structure:
 
A button which pops up a resource selection dialog.
Responsibilities:
implementing outer container widget,
managing clicks and popping up a remote chooser,
having a resource property,
signaling when user selects resource
receiving drag,
triggering draws of the button interior (by subclass) and draws of remote popup chooser.
Collaborations:
owned by
GimpUi.ProcedureDialogvia GimpPropWidgetresource property usually bound to a
Gimp.Configfor a GimpPluginProcedure.communicates using GimpResourceSelect with remote GimpPDBDialog, to choose an installed
Gimp.Resourceowned by core.
Subclass responsibilities:
creating interior widgets
drawing the interior (a preview of the chosen resource)
declaring which interior widgets are drag destinations
declaring which interior widgets are clickable (generate “clicked” signal)
generate “clicked” (delegating to
Gtk.Buttonor implementing from mouse events)
New in version 3.0.
- get_label()¶
 - Returns:
 the [class`Gtk`.Widget] showing the label text.
- Return type:
 
Returns the label widget.
New in version 3.0.
- get_resource()¶
 - Returns:
 an internal copy of the resource which must not be freed.
- Return type:
 
Gets the currently selected resource.
New in version 3.0.
- set_resource(resource)¶
 - Parameters:
 resource (
Gimp.Resource) – Resource to set.
Sets the currently selected resource. This will select the resource in both the button and any chooser popup.
New in version 3.0.
- do_draw_interior() virtual¶
 
- do_resource_set(resource, dialog_closing) virtual¶
 - Parameters:
 resource (
Gimp.Resource) –dialog_closing (
bool) –
Signal Details¶
- GimpUi.ResourceChooser.signals.resource_set(resource_chooser, resource, dialog_closing)¶
 - Signal Name:
 resource-set- Flags:
 - Parameters:
 resource_chooser (
GimpUi.ResourceChooser) – The object which received the signalresource (
GObject.Object) – the currently selected resource.dialog_closing (
bool) – whether the dialog was closed or not.
The
::resource-setsignal is emitted when the user selects a resource.New in version 3.0.
Property Details¶
- GimpUi.ResourceChooser.props.label¶
 - Name:
 label- Type:
 - Default Value:
 - Flags:
 
Label text with mnemonic.
New in version 3.0.
- GimpUi.ResourceChooser.props.resource¶
 - Name:
 resource- Type:
 - Default Value:
 - Flags:
 
The currently selected resource.
New in version 3.0.
- GimpUi.ResourceChooser.props.title¶
 - Name:
 title- Type:
 - Default Value:
 'Resource Selection'- Flags:
 
The title to be used for the resource selection popup dialog.
New in version 3.0.