# GimpUi.ResourceChooser

    const GimpUi = imports.gi.GimpUi;

    let resourceChooser = new GimpUi.ResourceChooser({
        label: value,
        title: value,
    });

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 GimpProcedureDialog via GimpPropWidget - resource property usually bound to a GimpConfig for a GimpPluginProcedure. - communicates using GimpResourceSelect with remote GimpPDBDialog, to choose an installed GimpResource owned 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 GtkButton or implementing from mouse events)

Since 3.0

## Hierarchy

- GObject.Object
  - GObject.InitiallyUnowned
    - Gtk.Widget
      - Gtk.Container
        - Gtk.Box
          - GimpUi.ResourceChooser

## Methods

- GimpUi.ResourceChooser.prototype.get_label
- GimpUi.ResourceChooser.prototype.get_resource
- GimpUi.ResourceChooser.prototype.set_resource

## Properties

- label
- resource
- title

## Signals

- resource-set

## Virtual functions

- GimpUi.ResourceChooser::draw_interior
- GimpUi.ResourceChooser::resource_set