Ardour  9.0-pre0-384-ga76afae0e9
gtkiconview.h
Go to the documentation of this file.
1 /* gtkiconview.h
2  * Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnome.org>
3  *
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.
8  *
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.
13  *
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.
18  */
19 
20 #ifndef __GTK_ICON_VIEW_H__
21 #define __GTK_ICON_VIEW_H__
22 
23 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
25 #endif
26 
27 #include <gtk/gtkcontainer.h>
28 #include <gtk/gtktreemodel.h>
29 #include <gtk/gtkcellrenderer.h>
30 #include <gtk/gtkselection.h>
31 #include <gtk/gtktooltip.h>
32 
33 G_BEGIN_DECLS
34 
35 #define GTK_TYPE_ICON_VIEW (gtk_icon_view_get_type ())
36 #define GTK_ICON_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_VIEW, GtkIconView))
37 #define GTK_ICON_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_VIEW, GtkIconViewClass))
38 #define GTK_IS_ICON_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_VIEW))
39 #define GTK_IS_ICON_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_VIEW))
40 #define GTK_ICON_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_VIEW, GtkIconViewClass))
41 
42 typedef struct _GtkIconView GtkIconView;
43 typedef struct _GtkIconViewClass GtkIconViewClass;
44 typedef struct _GtkIconViewPrivate GtkIconViewPrivate;
45 
46 typedef void (* GtkIconViewForeachFunc) (GtkIconView *icon_view,
47  GtkTreePath *path,
48  gpointer data);
49 
50 typedef enum
51 {
59 
61 {
63 
65 };
66 
68 {
70 
71  void (* set_scroll_adjustments) (GtkIconView *icon_view,
72  GtkAdjustment *hadjustment,
73  GtkAdjustment *vadjustment);
74 
75  void (* item_activated) (GtkIconView *icon_view,
76  GtkTreePath *path);
77  void (* selection_changed) (GtkIconView *icon_view);
78 
79  /* Key binding signals */
80  void (* select_all) (GtkIconView *icon_view);
81  void (* unselect_all) (GtkIconView *icon_view);
82  void (* select_cursor_item) (GtkIconView *icon_view);
83  void (* toggle_cursor_item) (GtkIconView *icon_view);
84  gboolean (* move_cursor) (GtkIconView *icon_view,
85  GtkMovementStep step,
86  gint count);
87  gboolean (* activate_cursor_item) (GtkIconView *icon_view);
88 };
89 
90 GType gtk_icon_view_get_type (void) G_GNUC_CONST;
93 
95  GtkTreeModel *model);
98  gint column);
101  gint column);
104  gint column);
106 
108  GtkOrientation orientation);
111  GtkOrientation orientation);
114  gint columns);
117  gint item_width);
120  gint spacing);
123  gint row_spacing);
126  gint column_spacing);
129  gint margin);
132  gint item_padding);
134 
135 
137  gint x,
138  gint y);
140  gint x,
141  gint y,
142  GtkTreePath **path,
143  GtkCellRenderer **cell);
145  GtkTreePath **start_path,
146  GtkTreePath **end_path);
147 
150  gpointer data);
152  GtkSelectionMode mode);
155  GtkTreePath *path);
157  GtkTreePath *path);
159  GtkTreePath *path);
161  GtkTreePath *path);
163  GtkTreePath *path);
168  GtkTreePath *path);
170  GtkTreePath *path,
171  GtkCellRenderer *cell,
172  gboolean start_editing);
174  GtkTreePath **path,
175  GtkCellRenderer **cell);
177  GtkTreePath *path,
178  gboolean use_align,
179  gfloat row_align,
180  gfloat col_align);
181 
182 /* Drag-and-Drop support */
184  GdkModifierType start_button_mask,
185  const GtkTargetEntry *targets,
186  gint n_targets,
187  GdkDragAction actions);
189  const GtkTargetEntry *targets,
190  gint n_targets,
191  GdkDragAction actions);
195  gboolean reorderable);
197 
198 
199 /* These are useful to implement your own custom stuff. */
201  GtkTreePath *path,
204  GtkTreePath **path,
207  gint drag_x,
208  gint drag_y,
209  GtkTreePath **path,
212  GtkTreePath *path);
213 
215  gint wx,
216  gint wy,
217  gint *bx,
218  gint *by);
219 
220 
222  GtkTooltip *tooltip,
223  GtkTreePath *path);
225  GtkTooltip *tooltip,
226  GtkTreePath *path,
227  GtkCellRenderer *cell);
229  gint *x,
230  gint *y,
231  gboolean keyboard_tip,
232  GtkTreeModel **model,
233  GtkTreePath **path,
234  GtkTreeIter *iter);
236  gint column);
238 
239 
240 G_END_DECLS
241 
242 #endif /* __GTK_ICON_VIEW_H__ */
GdkDragAction
Definition: gdkdnd.h:41
GdkModifierType
Definition: gdktypes.h:127
GtkOrientation
Definition: gtkenums.h:263
GtkSelectionMode
Definition: gtkenums.h:380
GtkMovementStep
Definition: gtkenums.h:238
GList * gtk_icon_view_get_selected_items(GtkIconView *icon_view)
gint gtk_icon_view_get_pixbuf_column(GtkIconView *icon_view)
gboolean gtk_icon_view_get_cursor(GtkIconView *icon_view, GtkTreePath **path, GtkCellRenderer **cell)
void gtk_icon_view_set_column_spacing(GtkIconView *icon_view, gint column_spacing)
void gtk_icon_view_set_item_width(GtkIconView *icon_view, gint item_width)
void gtk_icon_view_set_drag_dest_item(GtkIconView *icon_view, GtkTreePath *path, GtkIconViewDropPosition pos)
gboolean gtk_icon_view_path_is_selected(GtkIconView *icon_view, GtkTreePath *path)
void gtk_icon_view_set_reorderable(GtkIconView *icon_view, gboolean reorderable)
void gtk_icon_view_set_tooltip_item(GtkIconView *icon_view, GtkTooltip *tooltip, GtkTreePath *path)
GtkTreeModel * gtk_icon_view_get_model(GtkIconView *icon_view)
gint gtk_icon_view_get_item_padding(GtkIconView *icon_view)
void gtk_icon_view_set_tooltip_cell(GtkIconView *icon_view, GtkTooltip *tooltip, GtkTreePath *path, GtkCellRenderer *cell)
void gtk_icon_view_set_text_column(GtkIconView *icon_view, gint column)
GtkTreePath * gtk_icon_view_get_path_at_pos(GtkIconView *icon_view, gint x, gint y)
void gtk_icon_view_set_tooltip_column(GtkIconView *icon_view, gint column)
void(* GtkIconViewForeachFunc)(GtkIconView *icon_view, GtkTreePath *path, gpointer data)
Definition: gtkiconview.h:46
void gtk_icon_view_unset_model_drag_dest(GtkIconView *icon_view)
GdkPixmap * gtk_icon_view_create_drag_icon(GtkIconView *icon_view, GtkTreePath *path)
void gtk_icon_view_item_activated(GtkIconView *icon_view, GtkTreePath *path)
void gtk_icon_view_unselect_all(GtkIconView *icon_view)
gint gtk_icon_view_get_text_column(GtkIconView *icon_view)
GtkOrientation gtk_icon_view_get_item_orientation(GtkIconView *icon_view)
void gtk_icon_view_unselect_path(GtkIconView *icon_view, GtkTreePath *path)
gboolean gtk_icon_view_get_item_at_pos(GtkIconView *icon_view, gint x, gint y, GtkTreePath **path, GtkCellRenderer **cell)
gint gtk_icon_view_get_margin(GtkIconView *icon_view)
void gtk_icon_view_set_columns(GtkIconView *icon_view, gint columns)
GtkIconViewDropPosition
Definition: gtkiconview.h:51
@ GTK_ICON_VIEW_NO_DROP
Definition: gtkiconview.h:52
@ GTK_ICON_VIEW_DROP_INTO
Definition: gtkiconview.h:53
@ GTK_ICON_VIEW_DROP_ABOVE
Definition: gtkiconview.h:56
@ GTK_ICON_VIEW_DROP_BELOW
Definition: gtkiconview.h:57
@ GTK_ICON_VIEW_DROP_LEFT
Definition: gtkiconview.h:54
@ GTK_ICON_VIEW_DROP_RIGHT
Definition: gtkiconview.h:55
void gtk_icon_view_select_path(GtkIconView *icon_view, GtkTreePath *path)
struct _GtkIconViewPrivate GtkIconViewPrivate
Definition: gtkiconview.h:44
void gtk_icon_view_set_model(GtkIconView *icon_view, GtkTreeModel *model)
void gtk_icon_view_get_drag_dest_item(GtkIconView *icon_view, GtkTreePath **path, GtkIconViewDropPosition *pos)
gint gtk_icon_view_get_item_width(GtkIconView *icon_view)
void gtk_icon_view_set_item_orientation(GtkIconView *icon_view, GtkOrientation orientation)
void gtk_icon_view_convert_widget_to_bin_window_coords(GtkIconView *icon_view, gint wx, gint wy, gint *bx, gint *by)
void gtk_icon_view_set_pixbuf_column(GtkIconView *icon_view, gint column)
gint gtk_icon_view_get_tooltip_column(GtkIconView *icon_view)
gint gtk_icon_view_get_spacing(GtkIconView *icon_view)
GtkOrientation gtk_icon_view_get_orientation(GtkIconView *icon_view)
void gtk_icon_view_set_row_spacing(GtkIconView *icon_view, gint row_spacing)
void gtk_icon_view_set_spacing(GtkIconView *icon_view, gint spacing)
void gtk_icon_view_set_item_padding(GtkIconView *icon_view, gint item_padding)
GtkWidget * gtk_icon_view_new_with_model(GtkTreeModel *model)
void gtk_icon_view_enable_model_drag_dest(GtkIconView *icon_view, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions)
gboolean gtk_icon_view_get_tooltip_context(GtkIconView *icon_view, gint *x, gint *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, GtkTreeIter *iter)
void gtk_icon_view_selected_foreach(GtkIconView *icon_view, GtkIconViewForeachFunc func, gpointer data)
gint gtk_icon_view_get_row_spacing(GtkIconView *icon_view)
GType gtk_icon_view_get_type(void) G_GNUC_CONST
void gtk_icon_view_unset_model_drag_source(GtkIconView *icon_view)
GtkSelectionMode gtk_icon_view_get_selection_mode(GtkIconView *icon_view)
GtkWidget * gtk_icon_view_new(void)
gint gtk_icon_view_get_item_column(GtkIconView *icon_view, GtkTreePath *path)
gint gtk_icon_view_get_markup_column(GtkIconView *icon_view)
gboolean gtk_icon_view_get_reorderable(GtkIconView *icon_view)
void gtk_icon_view_set_orientation(GtkIconView *icon_view, GtkOrientation orientation)
gint gtk_icon_view_get_item_row(GtkIconView *icon_view, GtkTreePath *path)
void gtk_icon_view_set_cursor(GtkIconView *icon_view, GtkTreePath *path, GtkCellRenderer *cell, gboolean start_editing)
void gtk_icon_view_scroll_to_path(GtkIconView *icon_view, GtkTreePath *path, gboolean use_align, gfloat row_align, gfloat col_align)
void gtk_icon_view_set_selection_mode(GtkIconView *icon_view, GtkSelectionMode mode)
gboolean gtk_icon_view_get_visible_range(GtkIconView *icon_view, GtkTreePath **start_path, GtkTreePath **end_path)
gboolean gtk_icon_view_get_dest_item_at_pos(GtkIconView *icon_view, gint drag_x, gint drag_y, GtkTreePath **path, GtkIconViewDropPosition *pos)
void gtk_icon_view_select_all(GtkIconView *icon_view)
void gtk_icon_view_set_markup_column(GtkIconView *icon_view, gint column)
gint gtk_icon_view_get_column_spacing(GtkIconView *icon_view)
void gtk_icon_view_enable_model_drag_source(GtkIconView *icon_view, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions)
void gtk_icon_view_set_margin(GtkIconView *icon_view, gint margin)
gint gtk_icon_view_get_columns(GtkIconView *icon_view)
struct _GtkTreePath GtkTreePath
Definition: gtktreemodel.h:44
struct _GtkTreeModel GtkTreeModel
Definition: gtktreemodel.h:46
struct _GtkTooltip GtkTooltip
Definition: gtkwidget.h:484
gboolean(* move_cursor)(GtkIconView *icon_view, GtkMovementStep step, gint count)
Definition: gtkiconview.h:84
void(* toggle_cursor_item)(GtkIconView *icon_view)
Definition: gtkiconview.h:83
GtkContainerClass parent_class
Definition: gtkiconview.h:69
void(* set_scroll_adjustments)(GtkIconView *icon_view, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment)
Definition: gtkiconview.h:71
void(* item_activated)(GtkIconView *icon_view, GtkTreePath *path)
Definition: gtkiconview.h:75
void(* selection_changed)(GtkIconView *icon_view)
Definition: gtkiconview.h:77
void(* select_all)(GtkIconView *icon_view)
Definition: gtkiconview.h:80
gboolean(* activate_cursor_item)(GtkIconView *icon_view)
Definition: gtkiconview.h:87
void(* select_cursor_item)(GtkIconView *icon_view)
Definition: gtkiconview.h:82
void(* unselect_all)(GtkIconView *icon_view)
Definition: gtkiconview.h:81
GtkContainer parent
Definition: gtkiconview.h:62
GtkIconViewPrivate * GSEAL(priv)