2 * Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnome.org>
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.
19 #ifndef __GTK_ICON_VIEW_H__
20 #define __GTK_ICON_VIEW_H__
22 #include <gtk/gtkcontainer.h>
23 #include <gtk/gtktreemodel.h>
27 #define GTK_TYPE_ICON_VIEW (gtk_icon_view_get_type ())
28 #define GTK_ICON_VIEW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ICON_VIEW, GtkIconView))
29 #define GTK_ICON_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_VIEW, GtkIconViewClass))
30 #define GTK_IS_ICON_VIEW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ICON_VIEW))
31 #define GTK_IS_ICON_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_VIEW))
32 #define GTK_ICON_VIEW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ICON_VIEW, GtkIconViewClass))
34 typedef struct _GtkIconView GtkIconView;
35 typedef struct _GtkIconViewClass GtkIconViewClass;
36 typedef struct _GtkIconViewPrivate GtkIconViewPrivate;
38 typedef void (* GtkIconViewForeachFunc) (GtkIconView *icon_view,
46 GtkIconViewPrivate *priv;
49 struct _GtkIconViewClass
51 GtkContainerClass parent_class;
53 void (* set_scroll_adjustments) (GtkIconView *icon_view,
54 GtkAdjustment *hadjustment,
55 GtkAdjustment *vadjustment);
57 void (* item_activated) (GtkIconView *icon_view,
59 void (* selection_changed) (GtkIconView *icon_view);
61 /* Key binding signals */
62 void (* select_all) (GtkIconView *icon_view);
63 void (* unselect_all) (GtkIconView *icon_view);
64 void (* select_cursor_item) (GtkIconView *icon_view);
65 void (* toggle_cursor_item) (GtkIconView *icon_view);
66 gboolean (* move_cursor) (GtkIconView *icon_view,
69 gboolean (* activate_cursor_item) (GtkIconView *icon_view);
72 GType gtk_icon_view_get_type (void);
73 GtkWidget *gtk_icon_view_new (void);
74 GtkWidget *gtk_icon_view_new_with_model (GtkTreeModel *model);
76 void gtk_icon_view_set_model (GtkIconView *icon_view,
78 GtkTreeModel *gtk_icon_view_get_model (GtkIconView *icon_view);
79 void gtk_icon_view_set_text_column (GtkIconView *icon_view,
81 gint gtk_icon_view_get_text_column (GtkIconView *icon_view);
82 void gtk_icon_view_set_markup_column (GtkIconView *icon_view,
84 gint gtk_icon_view_get_markup_column (GtkIconView *icon_view);
85 void gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view,
87 gint gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view);
89 void gtk_icon_view_set_orientation (GtkIconView *icon_view,
90 GtkOrientation orientation);
91 GtkOrientation gtk_icon_view_get_orientation (GtkIconView *icon_view);
94 GtkTreePath * gtk_icon_view_get_path_at_pos (GtkIconView *icon_view,
97 void gtk_icon_view_selected_foreach (GtkIconView *icon_view,
98 GtkIconViewForeachFunc func,
100 void gtk_icon_view_set_selection_mode (GtkIconView *icon_view,
101 GtkSelectionMode mode);
102 GtkSelectionMode gtk_icon_view_get_selection_mode (GtkIconView *icon_view);
103 void gtk_icon_view_select_path (GtkIconView *icon_view,
105 void gtk_icon_view_unselect_path (GtkIconView *icon_view,
107 gboolean gtk_icon_view_path_is_selected (GtkIconView *icon_view,
109 GList *gtk_icon_view_get_selected_items (GtkIconView *icon_view);
110 void gtk_icon_view_select_all (GtkIconView *icon_view);
111 void gtk_icon_view_unselect_all (GtkIconView *icon_view);
112 void gtk_icon_view_item_activated (GtkIconView *icon_view,
116 #endif /* __GTK_ICON_VIEW_H__ */