## GcrViewerWidget

GcrViewerWidget — A widget which shows certificates or keys

## Synopsis

                        GcrViewerWidget;
                        GcrViewerWidgetClass;
    GcrViewerWidget *   gcr_viewer_widget_new               (void);
    void                gcr_viewer_widget_load_data         (GcrViewerWidget *self,
                                                             const gchar *display_name,
                                                             const guchar *data,
                                                             gsize n_data);
    void                gcr_viewer_widget_load_file         (GcrViewerWidget *self,
                                                             GFile *file);
    GcrParser *         gcr_viewer_widget_get_parser        (GcrViewerWidget *self);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----GtkBin
                               +----GtkScrolledWindow
                                     +----GcrDisplayScrolled
                                           +----GcrViewerWidget

## Implemented Interfaces

GcrViewerWidget implements AtkImplementorIface, GtkBuildable and GcrViewer.

## Properties

      "parser"                   GcrParser*            : Read

## Signals

      "added"                                          : Run Last

## Description

A viewer widget which can display certificates and keys that are located in files.

## Details

### GcrViewerWidget

    typedef struct _GcrViewerWidget GcrViewerWidget;

A viewer widget object.

### GcrViewerWidgetClass

    typedef struct _GcrViewerWidgetClass GcrViewerWidgetClass;

Class for GcrViewerWidget

### gcr_viewer_widget_new ()

    GcrViewerWidget *   gcr_viewer_widget_new               (void);

Create a new viewer widget.

Returns : | A new GcrViewerWidget object. [transfer full]

### gcr_viewer_widget_load_data ()

    void                gcr_viewer_widget_load_data         (GcrViewerWidget *self,
                                                             const gchar *display_name,
                                                             const guchar *data,
                                                             gsize n_data);

Parse and load some data to be displayed into the viewer widgets. The data may contain multiple parseable items if the format can contain multiple items.

`self` : | a viewer widget
`display_name` : | label for the loaded data. [allow-none]
`data` : | data to load. [array length=n_data]
`n_data` : | length of data to load

### gcr_viewer_widget_load_file ()

    void                gcr_viewer_widget_load_file         (GcrViewerWidget *self,
                                                             GFile *file);

Display contents of a file in the viewer widget. Multiple files can be loaded.

`self` : | a viewer widget
`file` : | a file to load

### gcr_viewer_widget_get_parser ()

    GcrParser *         gcr_viewer_widget_get_parser        (GcrViewerWidget *self);

Get the parser used to parse loaded data into viewable items.

`self` : | a viewer widget
Returns : | the parser. [transfer none]

## Property Details

### The `"parser"` property

      "parser"                   GcrParser*            : Read

The parser used to parse loaded data into viewable items.

## Signal Details

### The `"added"` signal

    void                user_function                      (GcrViewerWidget *self,
                                                            GObject         *renderer,
                                                            GcrParsed       *parsed,
                                                            gpointer         user_data)      : Run Last

This signal is emitted when an item is added to the viewer widget.

`self` : | the viewer widget
`renderer` : | the renderer that was added. [type Gcr.Renderer]
`parsed` : | the parsed item that was added. [type Gcr.Parsed]
`user_data` : | user data set when the signal handler was connected.