1 /* gtkiconlist - gtkiconlist widget for gtk+
2 * Copyright 1999-2001 Adrian E. Feiguin <feiguin@ifir.edu.ar>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GTK_ICON_LIST_H__
21 #define __GTK_ICON_LIST_H__
28 #endif /* __cplusplus */
33 GTK_ICON_LIST_TEXT_RIGHT,
34 GTK_ICON_LIST_TEXT_BELOW,
37 #define GTK_ICON_LIST(obj) GTK_CHECK_CAST (obj, gtk_icon_list_get_type (), GtkIconList)
38 #define GTK_ICON_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_icon_list_get_type, GtkIconListClass)
39 #define GTK_IS_ICON_LIST(obj) GTK_CHECK_TYPE (obj, gtk_icon_list_get_type ())
40 #define GTK_TYPE_ICON_LIST (gtk_icon_list_get_type ())
41 #define GTK_TYPE_ICON_LIST_ITEM (gtk_icon_list_item_get_type ())
44 typedef struct _GtkIconList GtkIconList;
45 typedef struct _GtkIconListClass GtkIconListClass;
46 typedef struct _GtkIconListItem GtkIconListItem;
48 struct _GtkIconListItem
68 GtkSelectionMode selection_mode;
74 guint text_space; /* entry width */
75 guint row_spacing; /* space between rows */
76 guint col_spacing; /* space between columns */
77 guint icon_border; /* space between icon and entry */
81 GtkIconListItem *active_icon;
90 GCompareFunc compare_func;
93 struct _GtkIconListClass
95 GtkFixedClass parent_class;
97 gboolean (*select_icon) (GtkIconList *iconlist,
98 GtkIconListItem *icon,
100 void (*unselect_icon) (GtkIconList *iconlist,
101 GtkIconListItem *icon,
103 gboolean (*text_changed) (GtkIconList *iconlist,
104 GtkIconListItem *icon,
106 gboolean (*activate_icon) (GtkIconList *iconlist,
107 GtkIconListItem *icon);
108 gboolean (*deactivate_icon) (GtkIconList *iconlist,
109 GtkIconListItem *icon);
110 void (*click_event) (GtkIconList *iconlist,
115 GtkType gtk_icon_list_get_type (void);
116 GtkType gtk_icon_list_item_get_type (void);
117 GtkWidget* gtk_icon_list_new (guint icon_width,
118 GtkIconListMode mode);
119 void gtk_icon_list_construct (GtkIconList *icon_list,
121 GtkIconListMode mode);
122 void gtk_icon_list_set_mode (GtkIconList *iconlist,
123 GtkIconListMode mode);
124 GtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist);
125 void gtk_icon_list_set_editable (GtkIconList *iconlist,
127 gboolean gtk_icon_list_is_editable (GtkIconList *iconlist);
128 void gtk_icon_list_set_row_spacing (GtkIconList *iconlist,
130 guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist);
131 void gtk_icon_list_set_col_spacing (GtkIconList *iconlist,
133 guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist);
134 void gtk_icon_list_set_text_space (GtkIconList *iconlist,
136 guint gtk_icon_list_get_text_space (GtkIconList *iconlist);
137 void gtk_icon_list_set_icon_border (GtkIconList *iconlist,
139 guint gtk_icon_list_get_icon_border (GtkIconList *iconlist);
140 void gtk_icon_list_set_icon_width (GtkIconList *iconlist,
142 guint gtk_icon_list_get_icon_width (GtkIconList *iconlist);
143 void gtk_icon_list_freeze (GtkIconList *icon_list);
144 void gtk_icon_list_thaw (GtkIconList *icon_list);
145 void gtk_icon_list_set_background (GtkIconList *icon_list,
147 GtkIconListItem *gtk_icon_list_add_from_pixmap (GtkIconList *icon_list,
152 GtkIconListItem *gtk_icon_list_add_from_data (GtkIconList *icon_list,
156 GtkIconListItem *gtk_icon_list_add (GtkIconList *icon_list,
157 const gchar *pixmap_file,
160 GtkIconListItem *gtk_icon_list_get_nth (GtkIconList *iconlist,
162 gint gtk_icon_list_get_index (GtkIconList *iconlist,
163 GtkIconListItem *item);
164 void gtk_icon_list_remove (GtkIconList *iconlist,
165 GtkIconListItem *item);
166 void gtk_icon_list_set_active_icon (GtkIconList *iconlist,
167 GtkIconListItem *icon);
168 void gtk_icon_list_remove_nth (GtkIconList *iconlist,
170 void gtk_icon_list_update (GtkIconList *iconlist);
171 void gtk_icon_list_clear (GtkIconList *iconlist);
172 void gtk_icon_list_link (GtkIconListItem *item,
174 gpointer gtk_icon_list_get_link (GtkIconListItem *item);
175 GtkIconListItem *gtk_icon_list_get_icon_from_link(GtkIconList *iconlist,
177 GtkIconListItem *gtk_icon_list_get_icon_at (GtkIconList *iconlist,
179 GtkIconListItem *gtk_icon_list_get_active_icon (GtkIconList *iconlist);
180 GtkWidget *gtk_icon_list_get_entry (GtkIconListItem *item);
181 GtkWidget *gtk_icon_list_get_pixmap (GtkIconListItem *item);
182 void gtk_icon_list_set_pixmap (GtkIconListItem *item,
185 void gtk_icon_list_set_label (GtkIconList *iconlist,
186 GtkIconListItem *item,
188 void gtk_icon_list_set_selection_mode(GtkIconList *iconlist,
190 void gtk_icon_list_select_icon (GtkIconList *iconlist,
191 GtkIconListItem *item);
192 void gtk_icon_list_unselect_icon (GtkIconList *iconlist,
193 GtkIconListItem *item);
194 void gtk_icon_list_unselect_all (GtkIconList *iconlist);
198 #endif /* __cplusplus */
201 #endif /* __GTK_ICON_LIST_H__ */