## GnomeIconSelection GnomeIconSelection |

## Synopsis

    #include <libgnomeui/libgnomeui.h>

    struct              GnomeIconSelection;
    GtkWidget *         gnome_icon_selection_new            (void);
    void                gnome_icon_selection_add_defaults   (GnomeIconSelection *gis);
    void                gnome_icon_selection_add_directory  (GnomeIconSelection *gis,
                                                             const gchar *dir);
    void                gnome_icon_selection_show_icons     (GnomeIconSelection *gis);
    void                gnome_icon_selection_clear          (GnomeIconSelection *gis,
                                                             gboolean not_shown);
    gchar *             gnome_icon_selection_get_icon       (GnomeIconSelection *gis,
                                                             gboolean full_path);
    void                gnome_icon_selection_select_icon    (GnomeIconSelection *gis,
                                                             const gchar *filename);
    void                gnome_icon_selection_stop_loading   (GnomeIconSelection *gis);
    GtkWidget *         gnome_icon_selection_get_gil        (GnomeIconSelection *gis);
    GtkWidget *         gnome_icon_selection_get_box        (GnomeIconSelection *gis);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkVBox
                                           +----GnomeIconSelection

## Implemented Interfaces

GnomeIconSelection implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

## Details

### struct GnomeIconSelection

    struct GnomeIconSelection;

### gnome_icon_selection_new ()

    GtkWidget *         gnome_icon_selection_new            (void);

Creates a new icon selection widget, it uses GnomeIconList for the listing of icons

Returns : | Returns the new object

### gnome_icon_selection_add_defaults ()

    void                gnome_icon_selection_add_defaults   (GnomeIconSelection *gis);

Adds the default pixmap directory into the selection widget. It doesn't show the icons in the selection until you do gnome_icon_selection_show_icons.

`gis` : | GnomeIconSelection to work with

### gnome_icon_selection_add_directory ()

    void                gnome_icon_selection_add_directory  (GnomeIconSelection *gis,
                                                             const gchar *dir);

Adds the icons from the directory `dir` to the selection widget. It doesn't show the icons in the selection until you do gnome_icon_selection_show_icons.

`gis` : | GnomeIconSelection to work with
`dir` : | directory with pixmaps

### gnome_icon_selection_show_icons ()

    void                gnome_icon_selection_show_icons     (GnomeIconSelection *gis);

Shows the icons inside the widget that were added with gnome_icon_selection_add_defaults and gnome_icon_selection_add_directory. Before this function is called the icons aren't actually added to the listing and can't be picked by the user.

`gis` : | GnomeIconSelection to work with

### gnome_icon_selection_clear ()

    void                gnome_icon_selection_clear          (GnomeIconSelection *gis,
                                                             gboolean not_shown);

Clear the currently shown icons, the ones that weren't shown yet are not cleared unless the not_shown parameter is given, in which case even those are cleared.

`gis` : | GnomeIconSelection to work with
`not_shown` : | boolean

### gnome_icon_selection_get_icon ()

    gchar *             gnome_icon_selection_get_icon       (GnomeIconSelection *gis,
                                                             gboolean full_path);

Gets the currently selected icon name, if full_path is true, it returns the full path to the icon, if none is selected it returns NULL

`gis` : | GnomeIconSelection to work with
`full_path` : | boolean
Returns : | internal string, it must not be changed or freed or NULL

### gnome_icon_selection_select_icon ()

    void                gnome_icon_selection_select_icon    (GnomeIconSelection *gis,
                                                             const gchar *filename);

Selects the icon `filename`. This icon must have already been added and shown * (see `gnome_icon_selection_show_icons`)

`gis` : | GnomeIconSelection to work with
`filename` : | icon filename

### gnome_icon_selection_stop_loading ()

    void                gnome_icon_selection_stop_loading   (GnomeIconSelection *gis);

Stop the loading of images when we are in the loop in show_icons, otherwise it does nothing and is harmless, it should be used say if the dialog was hidden or when we want to quickly stop loading the images to do something else without destroying the icon selection object. The remaining icons can be shown by gnome_icon_selection_show_icons.

`gis` : | GnomeIconSelection to work with

### gnome_icon_selection_get_gil ()

    GtkWidget *         gnome_icon_selection_get_gil        (GnomeIconSelection *gis);

Gets the GnomeIconList widget that is used for the display of icons

`gis` : | GnomeIconSelection to work with
Returns : | a GtkWidget pointer to the interal widget

### gnome_icon_selection_get_box ()

    GtkWidget *         gnome_icon_selection_get_box        (GnomeIconSelection *gis);

Gets the GtkVBox widget that is used to pack the different elements of the selection into.

`gis` : | GnomeIconSelection to work with
Returns : | a GtkWidget pointer to the interal widget