## SeahorseWidget SeahorseWidget — wrapping gtk-builder widgets to simplify usage. |

## Synopsis

    #include <seahorse-widget.h>

                        SeahorseWidget;
    SeahorseWidget*     seahorse_widget_new                 (const gchar *name,
                                                             GtkWindow *parent);
    SeahorseWidget*     seahorse_widget_new_allow_multiple  (const gchar *name,
                                                             GtkWindow *parent);
    SeahorseWidget*     seahorse_widget_find                (const gchar *name);
    const gchar*        seahorse_widget_get_name            (SeahorseWidget *swidget);
    GtkWidget*          seahorse_widget_get_toplevel        (SeahorseWidget *swidget);
    GtkWidget*          seahorse_widget_get_widget          (SeahorseWidget *swidget,
                                                             const char *identifier);
    void                seahorse_widget_show                (SeahorseWidget *swidget);
    void                seahorse_widget_show_help           (SeahorseWidget *swidget);
    void                seahorse_widget_set_visible         (SeahorseWidget *swidget,
                                                             const char *identifier,
                                                             gboolean visible);
    void                seahorse_widget_set_sensitive       (SeahorseWidget *swidget,
                                                             const char *identifier,
                                                             gboolean sensitive);
    void                seahorse_widget_destroy             (SeahorseWidget *swidget);

## Description

## Details

### SeahorseWidget

    typedef struct {
        GtkObject parent;

        GtkBuilder *gtkbuilder;
        gchar *name;
    } SeahorseWidget;

A window created from a gtkbuilder file.

- All SeahorseWidget objects are destroyed when the SeahorseContext goes bye-bye. - Implements fun GtkUIManager stuff.

Signals: destroy: The window was destroyed.

Properties: name: (gchar*) The name of the gtkbuilder file to load.

GtkObject `parent`; | The parent GtkObject
GtkBuilder *`gtkbuilder`; | The GtkBuilder object for the SeahorseWidget
gchar *`name`; | The name of the gtkbuilder file

### seahorse_widget_new ()

    SeahorseWidget*     seahorse_widget_new                 (const gchar *name,
                                                             GtkWindow *parent);

Creates a new SeahorseWidget. Date is read from the gtk-builder file seahorse-`name`%.xml

`name` : | Name of widget, filename part of gtkbuilder file, and name of main window
`parent` : | GtkWindow to make the parent of the new swidget
Returns : | The new SeahorseWidget, or NULL if the widget already exists

### seahorse_widget_new_allow_multiple ()

    SeahorseWidget*     seahorse_widget_new_allow_multiple  (const gchar *name,
                                                             GtkWindow *parent);

Creates a new SeahorseWidget without checking if it already exists.

`name` : | Name of widget, filename part of gtkbuilder file, and name of main window
`parent` : | GtkWindow to make the parent of the new swidget
Returns : | The new SeahorseWidget

### seahorse_widget_find ()

    SeahorseWidget*     seahorse_widget_find                (const gchar *name);

`name` : | The name to look for
Returns : | The widget with the `name` or NULL if not found

### seahorse_widget_get_name ()

    const gchar*        seahorse_widget_get_name            (SeahorseWidget *swidget);

`swidget` : | The widget to get the name for
Returns : | The name of the widget

### seahorse_widget_get_toplevel ()

    GtkWidget*          seahorse_widget_get_toplevel        (SeahorseWidget *swidget);

Return the top level widget in this seahorse widget

`swidget` : | The seahorse widget
Returns : | The top level widget

### seahorse_widget_get_widget ()

    GtkWidget*          seahorse_widget_get_widget          (SeahorseWidget *swidget,
                                                             const char *identifier);

`swidget` : | a SeahorseWidget
`identifier` : | the name of the widget to get
Returns : | the widget named `identifier` in `swidget`

### seahorse_widget_show ()

    void                seahorse_widget_show                (SeahorseWidget *swidget);

Show the toplevel widget in the gtkbuilder file.

`swidget` : | SeahorseWidget to show

### seahorse_widget_show_help ()

    void                seahorse_widget_show_help           (SeahorseWidget *swidget);

Show help appropriate for the top level widget.

`swidget` : | The SeahorseWidget.

### seahorse_widget_set_visible ()

    void                seahorse_widget_set_visible         (SeahorseWidget *swidget,
                                                             const char *identifier,
                                                             gboolean visible);

`swidget` : | the SeahorseWidget
`identifier` : | The identifier of the widget to set visibility for
`visible` : | TRUE to show the widget, FALSE to hide it

### seahorse_widget_set_sensitive ()

    void                seahorse_widget_set_sensitive       (SeahorseWidget *swidget,
                                                             const char *identifier,
                                                             gboolean sensitive);

Sets the widget `identifier` 's sensitivity to `sensitive`

`swidget` : | the SeahorseWidget to find the widget `identifier` in
`identifier` : | the name of the widget to set sensitive
`sensitive` : | TRUE if the widget should be switched to sensitive

### seahorse_widget_destroy ()

    void                seahorse_widget_destroy             (SeahorseWidget *swidget);

Unrefs `swidget`.

`swidget` : | SeahorseWidget to destroy