## gimppatternmenu

gimppatternmenu — A widget for selecting patterns.

## Synopsis

    GtkWidget*  gimp_pattern_select_widget_new  (const gchar *title,
                                                 const gchar *pattern_name,
                                                 GimpRunPatternCallback callback,
                                                 gpointer data);
    void        gimp_pattern_select_widget_close
                                                (GtkWidget *widget);
    void        gimp_pattern_select_widget_set  (GtkWidget *widget,
                                                 const gchar *pattern_name);

## Description

A widget for selecting patterns.

## Details

### gimp_pattern_select_widget_new ()

    GtkWidget*  gimp_pattern_select_widget_new  (const gchar *title,
                                                 const gchar *pattern_name,
                                                 GimpRunPatternCallback callback,
                                                 gpointer data);

Creates a new GtkWidget that completely controls the selection of a pattern. This widget is suitable for placement in a table in a plug-in dialog.

`title` : | Title of the dialog to use or `NULL` to use the default title.
`pattern_name` : | Initial pattern name or `NULL` to use current selection.
`callback` : | A function to call when the selected pattern changes.
`data` : | A pointer to arbitary data to be used in the call to `callback`.
Returns : | A GtkWidget that you can use in your UI.

### gimp_pattern_select_widget_close ()

    void        gimp_pattern_select_widget_close
                                                (GtkWidget *widget);

Closes the popup window associated with `widget`.

`widget` : | A pattern select widget.

### gimp_pattern_select_widget_set ()

    void        gimp_pattern_select_widget_set  (GtkWidget *widget,
                                                 const gchar *pattern_name);

Sets the current pattern for the pattern select widget. Calls the callback function if one was supplied in the call to `gimp_pattern_select_widget_new()`.

`widget` : | A pattern select widget.
`pattern_name` : | Pattern name to set. NULL means no change.