## GtkIconList GtkIconList — A file icon list widget for GTK. |

## Functions

GtkWidget * | gtk_icon_list_new ()
void | gtk_icon_list_construct ()
void | gtk_icon_list_set_mode ()
GtkIconListMode | gtk_icon_list_get_mode ()
void | gtk_icon_list_set_editable ()
gboolean | gtk_icon_list_is_editable ()
void | gtk_icon_list_set_row_spacing ()
guint | gtk_icon_list_get_row_spacing ()
void | gtk_icon_list_set_col_spacing ()
guint | gtk_icon_list_get_col_spacing ()
void | gtk_icon_list_set_text_space ()
guint | gtk_icon_list_get_text_space ()
void | gtk_icon_list_set_icon_border ()
guint | gtk_icon_list_get_icon_border ()
void | gtk_icon_list_set_icon_width ()
guint | gtk_icon_list_get_icon_width ()
void | gtk_icon_list_freeze ()
void | gtk_icon_list_thaw ()
void | gtk_icon_list_set_background ()
GtkIconListItem * | gtk_icon_list_add_from_pixmap ()
GtkIconListItem * | gtk_icon_list_add_from_data ()
GtkIconListItem * | gtk_icon_list_add ()
GtkIconListItem * | gtk_icon_list_get_nth ()
gint | gtk_icon_list_get_index ()
void | gtk_icon_list_remove ()
void | gtk_icon_list_set_active_icon ()
void | gtk_icon_list_remove_nth ()
void | gtk_icon_list_update ()
void | gtk_icon_list_clear ()
void | gtk_icon_list_link ()
gpointer | gtk_icon_list_get_link ()
GtkIconListItem * | gtk_icon_list_get_icon_from_link ()
GtkIconListItem * | gtk_icon_list_get_icon_at ()
GtkIconListItem * | gtk_icon_list_get_active_icon ()
GtkWidget * | gtk_icon_list_get_entry ()
GtkWidget * | gtk_icon_list_get_pixmap ()
void | gtk_icon_list_set_pixmap ()
void | gtk_icon_list_set_label ()
void | gtk_icon_list_set_selection_mode ()
void | gtk_icon_list_select_icon ()
void | gtk_icon_list_unselect_icon ()
void | gtk_icon_list_unselect_all ()

## Signals

gboolean | activate-icon | Run Last
void | click-event | Run Last
gboolean | deactivate-icon | Run Last
gboolean | select-icon | Run Last
gboolean | text-changed | Run Last
void | unselect-icon | Run First

## Types and Values

struct | GtkIconList
enum | GtkIconListMode
struct | GtkIconListItem

## Object Hierarchy

        GBoxed
        ╰── GtkIconListItem
        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkFixed
                            ╰── GtkIconList
                                ╰── GtkFileList

## Implemented Interfaces

GtkIconList implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <gtkextra.h>

## Description

GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. It's completely designed from scratch with some ideas borrowed from gnome-icon-list. It contains almost all of its features and more. It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields.

## Functions

### gtk_icon_list_new ()

    GtkWidget *
    gtk_icon_list_new (guint icon_width,
                       GtkIconListMode mode);

Creates a new GtkIconList widget.

#### Parameters

icon_width | the width of the icon |
mode | GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |

#### Returns

the newly-created GtkIconList widget.

### gtk_icon_list_construct ()

    void
    gtk_icon_list_construct (GtkIconList *iconlist,
                             guint icon_width,
                             GtkIconListMode mode);

Initialize iconlist structure.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
icon_width | the width of the icon |
mode | GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |

### gtk_icon_list_set_mode ()

    void
    gtk_icon_list_set_mode (GtkIconList *iconlist,
                            GtkIconListMode mode);

Set the icons display mode .

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
mode | GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW |

### gtk_icon_list_get_mode ()

    GtkIconListMode
    gtk_icon_list_get_mode (GtkIconList *iconlist);

Get the icons display mode .

#### Parameters

iconlist | a GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW

### gtk_icon_list_set_editable ()

    void
    gtk_icon_list_set_editable (GtkIconList *iconlist,
                                gboolean editable);

Set if the user can edit the text in the editable widget or not.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
editable | TUE or FALSE |

### gtk_icon_list_is_editable ()

    gboolean
    gtk_icon_list_is_editable (GtkIconList *iconlist);

Get the editable status of icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

TRUE or FALSE

### gtk_icon_list_set_row_spacing ()

    void
    gtk_icon_list_set_row_spacing (GtkIconList *iconlist,
                                   guint spacing);

Set the icon spacing between rows.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
spacing | spacing between rows in pixels. |

### gtk_icon_list_get_row_spacing ()

    guint
    gtk_icon_list_get_row_spacing (GtkIconList *iconlist);

Get the spacing between rows.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

spacing between rows in pixels.

### gtk_icon_list_set_col_spacing ()

    void
    gtk_icon_list_set_col_spacing (GtkIconList *iconlist,
                                   guint spacing);

Set the icon spacing between columns.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
spacing | spacing between columns in pixels. |

### gtk_icon_list_get_col_spacing ()

    guint
    gtk_icon_list_get_col_spacing (GtkIconList *iconlist);

Get the spacing between columns.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

spacing between columns in pixels.

### gtk_icon_list_set_text_space ()

    void
    gtk_icon_list_set_text_space (GtkIconList *iconlist,
                                  guint text_space);

Set the text max size in pixels.

#### Parameters

iconlist | a GtkIconList widget created with `gtk_icon_list_new()`. |
text_space | distance in pixels. |

### gtk_icon_list_get_text_space ()

    guint
    gtk_icon_list_get_text_space (GtkIconList *iconlist);

Get the text maximum size in pixels.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

text maximum size distance in pixels.

### gtk_icon_list_set_icon_border ()

    void
    gtk_icon_list_set_icon_border (GtkIconList *iconlist,
                                   guint border);

Set the icon border.

#### Parameters

iconlist | a GtkIconList widget created with `gtk_icon_list_new()`. |
border | icon border in pixels. |

### gtk_icon_list_get_icon_border ()

    guint
    gtk_icon_list_get_icon_border (GtkIconList *iconlist);

Get the icon border width.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

icon border width in pixels.

### gtk_icon_list_set_icon_width ()

    void
    gtk_icon_list_set_icon_width (GtkIconList *iconlist,
                                  guint width);

Set the icon width.

#### Parameters

iconlist | a GtkIconList widget created with `gtk_icon_list_new()`. |
width | icon width in pixels. |

### gtk_icon_list_get_icon_width ()

    guint
    gtk_icon_list_get_icon_width (GtkIconList *iconlist);

Get the icon width.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

icon width in pixels.

### gtk_icon_list_freeze ()

    void
    gtk_icon_list_freeze (GtkIconList *iconlist);

Freeze icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

### gtk_icon_list_thaw ()

    void
    gtk_icon_list_thaw (GtkIconList *iconlist);

Thaw(unfreeze) icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

### gtk_icon_list_set_background ()

    void
    gtk_icon_list_set_background (GtkIconList *iconlist,
                                  GdkColor *color);

Set the iconlist background color.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
color | a GdkColor |

### gtk_icon_list_add_from_pixmap ()

    GtkIconListItem *
    gtk_icon_list_add_from_pixmap (GtkIconList *icon_list,
                                   GdkPixmap *pixmap,
                                   GdkBitmap *bitmap_mask,
                                   const gchar *label,
                                   gpointer link);

Add a icon to the icon list.

#### Parameters

icon_list | a GtkIconList widget created with `gtk_icon_list_new()`. |
pixmap | a GdkPixmap |
bitmap_mask | a GdkBitmap |
label | label of the icon |
link | a gpointer link to some data |

#### Returns

the icon pointer

### gtk_icon_list_add_from_data ()

    GtkIconListItem *
    gtk_icon_list_add_from_data (GtkIconList *iconlist,
                                 gchar **data,
                                 const gchar *label,
                                 gpointer link);

Add a icon to the icon list.

#### Parameters

iconlist | a GtkIconList widget created with `gtk_icon_list_new()`. |
data | pointer to the xpm data string |
label | label of the icon |
link | a data pointer |

#### Returns

the icon pointer

### gtk_icon_list_add ()

    GtkIconListItem *
    gtk_icon_list_add (GtkIconList *iconlist,
                       const gchar *pixmap_file,
                       const gchar *label,
                       gpointer link);

Add a icon to the icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
pixmap_file | from #include "file.xpm" |
label | label of the icon |
link | link |

#### Returns

the icon pointer

### gtk_icon_list_get_nth ()

    GtkIconListItem *
    gtk_icon_list_get_nth (GtkIconList *iconlist,
                           guint n);

Get nth icon from the icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
n | icon index number. |

#### Returns

a GtkIconListItem

### gtk_icon_list_get_index ()

    gint
    gtk_icon_list_get_index (GtkIconList *iconlist,
                             GtkIconListItem *item);

Get the index number of the icon specified by its GtkIconListItem pointer.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
item | a GtkIconListItem |

#### Returns

icon index number

### gtk_icon_list_remove ()

    void
    gtk_icon_list_remove (GtkIconList *iconlist,
                          GtkIconListItem *item);

Remove the icon from the iconlist.

#### Parameters

iconlist | a GtkIconList widget created with `gtk_icon_list_new()`. |
item | a GtkIconListItem |

### gtk_icon_list_set_active_icon ()

    void
    gtk_icon_list_set_active_icon (GtkIconList *iconlist,
                                   GtkIconListItem *icon);

Set an active icon in the icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
icon | a GtkIconListItem |

### gtk_icon_list_remove_nth ()

    void
    gtk_icon_list_remove_nth (GtkIconList *iconlist,
                              guint n);

Remove nth icon from the iconlist.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
n | icon index number |

### gtk_icon_list_update ()

    void
    gtk_icon_list_update (GtkIconList *iconlist);

Update the icon list widget..

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

### gtk_icon_list_clear ()

    void
    gtk_icon_list_clear (GtkIconList *iconlist);

Clear the icon list widget.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

### gtk_icon_list_link ()

    void
    gtk_icon_list_link (GtkIconListItem *item,
                        gpointer data);

Add a gpointer link to a icon from the iconlist.

#### Parameters

item | GtkIconListItem |
data | a gpointer to some data |

### gtk_icon_list_get_link ()

    gpointer
    gtk_icon_list_get_link (GtkIconListItem *item);

Add a gpointer link to a icon from the iconlist.

#### Parameters

item | a GtkIconListItem |

#### Returns

(transfer none) a gpointer to some data sed with `gtk_icon_list_link()`.

### gtk_icon_list_get_icon_from_link ()

    GtkIconListItem *
    gtk_icon_list_get_icon_from_link (GtkIconList *iconlist,
                                      gpointer data);

Gets the icon pointer from the link attached to it.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
data | a gpointer to some data |

#### Returns

a GtkIconListItem

### gtk_icon_list_get_icon_at ()

    GtkIconListItem *
    gtk_icon_list_get_icon_at (GtkIconList *iconlist,
                               gint x,
                               gint y);

Get the icon situated at x,y coordinates in icon list.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
x | x coordindate |
y | y coordinate |

#### Returns

the icon pointer

### gtk_icon_list_get_active_icon ()

    GtkIconListItem *
    gtk_icon_list_get_active_icon (GtkIconList *iconlist);

Set the iconlist background color.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

#### Returns

the icon pointer

### gtk_icon_list_get_entry ()

    GtkWidget *
    gtk_icon_list_get_entry (GtkIconListItem *item);

Get the item->entry.

#### Parameters

item | a GtkIconListItem |

#### Returns

(transfer none) a GtkWidget

### gtk_icon_list_get_pixmap ()

    GtkWidget *
    gtk_icon_list_get_pixmap (GtkIconListItem *item);

Get the icon pixmap.

#### Parameters

item | a GtkIconListItem |

#### Returns

(transfer none) a GtkWidget

### gtk_icon_list_set_pixmap ()

    void
    gtk_icon_list_set_pixmap (GtkIconListItem *item,
                              GdkPixmap *pixmap,
                              GdkBitmap *bitmap_mask);

Set the icon pixmap.

#### Parameters

item | a GtkIconListItem |
pixmap | a GdkPixmap |
bitmap_mask | a GdkBitmap |

### gtk_icon_list_set_label ()

    void
    gtk_icon_list_set_label (GtkIconList *iconlist,
                             GtkIconListItem *item,
                             const gchar *label);

Set the icon label.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
item | a GtkIconListItem |
label | icon label |

### gtk_icon_list_set_selection_mode ()

    void
    gtk_icon_list_set_selection_mode (GtkIconList *iconlist,
                                      gint mode);

Set the icon selection mode.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
mode | GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW |

### gtk_icon_list_select_icon ()

    void
    gtk_icon_list_select_icon (GtkIconList *iconlist,
                               GtkIconListItem *item);

Select the icon specified by pointer.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
item | a GtkIconListItem |

### gtk_icon_list_unselect_icon ()

    void
    gtk_icon_list_unselect_icon (GtkIconList *iconlist,
                                 GtkIconListItem *item);

Unselect the icon specified by pointer.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |
item | a GtkIconListItem |

### gtk_icon_list_unselect_all ()

    void
    gtk_icon_list_unselect_all (GtkIconList *iconlist);

Unselect all icons.

#### Parameters

iconlist | GtkIconList widget created with `gtk_icon_list_new()`. |

## Types and Values

### struct GtkIconList

    struct GtkIconList;

The GtkIconList structure contains only private data. It should only be accessed through the functions described below.

### enum GtkIconListMode

#### Members

GTK_ICON_LIST_ICON |  |
GTK_ICON_LIST_TEXT_RIGHT |  |
GTK_ICON_LIST_TEXT_BELOW |  |

### struct GtkIconListItem

    struct GtkIconListItem {
    };

The GtkIconListItem structure contains only private data. It should only be accessed through the functions described below.

## Signal Details

### The `“activate-icon”` signal

    gboolean
    user_function (GtkIconList     *iconlist,
                   GtkIconListItem *arg1,
                   gpointer         user_data)

#### Parameters

iconlist | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“click-event”` signal

    void
    user_function (GtkIconList *iconlist,
                   GdkEvent    *arg1,
                   gpointer     user_data)

#### Parameters

iconlist | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“deactivate-icon”` signal

    gboolean
    user_function (GtkIconList     *iconlist,
                   GtkIconListItem *arg1,
                   gpointer         user_data)

#### Parameters

iconlist | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“select-icon”` signal

    gboolean
    user_function (GtkIconList     *iconlist,
                   GtkIconListItem *arg1,
                   GdkEvent        *arg2,
                   gpointer         user_data)

#### Parameters

iconlist | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“text-changed”` signal

    gboolean
    user_function (GtkIconList     *iconlist,
                   GtkIconListItem *arg1,
                   gchar           *arg2,
                   gpointer         user_data)

#### Parameters

iconlist | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“unselect-icon”` signal

    void
    user_function (GtkIconList     *iconlist,
                   GtkIconListItem *arg1,
                   GdkEvent        *arg2,
                   gpointer         user_data)

#### Parameters

iconlist | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run First