1 | /* gtktreeview.h |
2 | * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com> |
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, see <http://www.gnu.org/licenses/>. |
16 | */ |
17 | |
18 | #ifndef __GTK_TREE_VIEW_H__ |
19 | #define __GTK_TREE_VIEW_H__ |
20 | |
21 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
22 | #error "Only <gtk/gtk.h> can be included directly." |
23 | #endif |
24 | |
25 | #include <gtk/gtkcontainer.h> |
26 | #include <gtk/gtktreemodel.h> |
27 | #include <gtk/gtktreeviewcolumn.h> |
28 | #include <gtk/gtkdnd.h> |
29 | #include <gtk/gtkentry.h> |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | /** |
34 | * GtkTreeViewDropPosition: |
35 | * @GTK_TREE_VIEW_DROP_BEFORE: dropped row is inserted before |
36 | * @GTK_TREE_VIEW_DROP_AFTER: dropped row is inserted after |
37 | * @GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: dropped row becomes a child or is inserted before |
38 | * @GTK_TREE_VIEW_DROP_INTO_OR_AFTER: dropped row becomes a child or is inserted after |
39 | * |
40 | * An enum for determining where a dropped row goes. |
41 | */ |
42 | typedef enum |
43 | { |
44 | /* drop before/after this row */ |
45 | GTK_TREE_VIEW_DROP_BEFORE, |
46 | GTK_TREE_VIEW_DROP_AFTER, |
47 | /* drop as a child of this row (with fallback to before or after |
48 | * if into is not possible) |
49 | */ |
50 | GTK_TREE_VIEW_DROP_INTO_OR_BEFORE, |
51 | GTK_TREE_VIEW_DROP_INTO_OR_AFTER |
52 | } GtkTreeViewDropPosition; |
53 | |
54 | #define GTK_TYPE_TREE_VIEW (gtk_tree_view_get_type ()) |
55 | #define GTK_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_VIEW, GtkTreeView)) |
56 | #define GTK_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW, GtkTreeViewClass)) |
57 | #define GTK_IS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_VIEW)) |
58 | #define GTK_IS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW)) |
59 | #define GTK_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW, GtkTreeViewClass)) |
60 | |
61 | typedef struct _GtkTreeView GtkTreeView; |
62 | typedef struct _GtkTreeViewClass GtkTreeViewClass; |
63 | typedef struct _GtkTreeViewPrivate GtkTreeViewPrivate; |
64 | typedef struct _GtkTreeSelection GtkTreeSelection; |
65 | typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass; |
66 | |
67 | struct _GtkTreeView |
68 | { |
69 | GtkContainer parent; |
70 | |
71 | /*< private >*/ |
72 | GtkTreeViewPrivate *priv; |
73 | }; |
74 | |
75 | struct _GtkTreeViewClass |
76 | { |
77 | GtkContainerClass parent_class; |
78 | |
79 | void (* row_activated) (GtkTreeView *tree_view, |
80 | GtkTreePath *path, |
81 | GtkTreeViewColumn *column); |
82 | gboolean (* test_expand_row) (GtkTreeView *tree_view, |
83 | GtkTreeIter *iter, |
84 | GtkTreePath *path); |
85 | gboolean (* test_collapse_row) (GtkTreeView *tree_view, |
86 | GtkTreeIter *iter, |
87 | GtkTreePath *path); |
88 | void (* row_expanded) (GtkTreeView *tree_view, |
89 | GtkTreeIter *iter, |
90 | GtkTreePath *path); |
91 | void (* row_collapsed) (GtkTreeView *tree_view, |
92 | GtkTreeIter *iter, |
93 | GtkTreePath *path); |
94 | void (* columns_changed) (GtkTreeView *tree_view); |
95 | void (* cursor_changed) (GtkTreeView *tree_view); |
96 | |
97 | /* Key Binding signals */ |
98 | gboolean (* move_cursor) (GtkTreeView *tree_view, |
99 | GtkMovementStep step, |
100 | gint count); |
101 | gboolean (* select_all) (GtkTreeView *tree_view); |
102 | gboolean (* unselect_all) (GtkTreeView *tree_view); |
103 | gboolean (* select_cursor_row) (GtkTreeView *tree_view, |
104 | gboolean start_editing); |
105 | gboolean (* toggle_cursor_row) (GtkTreeView *tree_view); |
106 | gboolean (* expand_collapse_cursor_row) (GtkTreeView *tree_view, |
107 | gboolean logical, |
108 | gboolean expand, |
109 | gboolean open_all); |
110 | gboolean (* select_cursor_parent) (GtkTreeView *tree_view); |
111 | gboolean (* start_interactive_search) (GtkTreeView *tree_view); |
112 | |
113 | /* Padding for future expansion */ |
114 | void (*_gtk_reserved1) (void); |
115 | void (*_gtk_reserved2) (void); |
116 | void (*_gtk_reserved3) (void); |
117 | void (*_gtk_reserved4) (void); |
118 | void (*_gtk_reserved5) (void); |
119 | void (*_gtk_reserved6) (void); |
120 | void (*_gtk_reserved7) (void); |
121 | void (*_gtk_reserved8) (void); |
122 | }; |
123 | |
124 | /** |
125 | * GtkTreeViewColumnDropFunc: |
126 | * @tree_view: A #GtkTreeView |
127 | * @column: The #GtkTreeViewColumn being dragged |
128 | * @prev_column: A #GtkTreeViewColumn on one side of @column |
129 | * @next_column: A #GtkTreeViewColumn on the other side of @column |
130 | * @data: (closure): user data |
131 | * |
132 | * Function type for determining whether @column can be dropped in a |
133 | * particular spot (as determined by @prev_column and @next_column). In |
134 | * left to right locales, @prev_column is on the left of the potential drop |
135 | * spot, and @next_column is on the right. In right to left mode, this is |
136 | * reversed. This function should return %TRUE if the spot is a valid drop |
137 | * spot. Please note that returning %TRUE does not actually indicate that |
138 | * the column drop was made, but is meant only to indicate a possible drop |
139 | * spot to the user. |
140 | * |
141 | * Returns: %TRUE, if @column can be dropped in this spot |
142 | */ |
143 | typedef gboolean (* GtkTreeViewColumnDropFunc) (GtkTreeView *tree_view, |
144 | GtkTreeViewColumn *column, |
145 | GtkTreeViewColumn *prev_column, |
146 | GtkTreeViewColumn *next_column, |
147 | gpointer data); |
148 | |
149 | /** |
150 | * GtkTreeViewMappingFunc: |
151 | * @tree_view: A #GtkTreeView |
152 | * @path: The path that’s expanded |
153 | * @user_data: user data |
154 | * |
155 | * Function used for gtk_tree_view_map_expanded_rows(). |
156 | */ |
157 | typedef void (* GtkTreeViewMappingFunc) (GtkTreeView *tree_view, |
158 | GtkTreePath *path, |
159 | gpointer user_data); |
160 | |
161 | /** |
162 | * GtkTreeViewSearchEqualFunc: |
163 | * @model: the #GtkTreeModel being searched |
164 | * @column: the search column set by gtk_tree_view_set_search_column() |
165 | * @key: the key string to compare with |
166 | * @iter: a #GtkTreeIter pointing the row of @model that should be compared |
167 | * with @key. |
168 | * @search_data: (closure): user data from gtk_tree_view_set_search_equal_func() |
169 | * |
170 | * A function used for checking whether a row in @model matches |
171 | * a search key string entered by the user. Note the return value |
172 | * is reversed from what you would normally expect, though it |
173 | * has some similarity to strcmp() returning 0 for equal strings. |
174 | * |
175 | * Returns: %FALSE if the row matches, %TRUE otherwise. |
176 | */ |
177 | typedef gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel *model, |
178 | gint column, |
179 | const gchar *key, |
180 | GtkTreeIter *iter, |
181 | gpointer search_data); |
182 | |
183 | /** |
184 | * GtkTreeViewRowSeparatorFunc: |
185 | * @model: the #GtkTreeModel |
186 | * @iter: a #GtkTreeIter pointing at a row in @model |
187 | * @data: (closure): user data |
188 | * |
189 | * Function type for determining whether the row pointed to by @iter should |
190 | * be rendered as a separator. A common way to implement this is to have a |
191 | * boolean column in the model, whose values the #GtkTreeViewRowSeparatorFunc |
192 | * returns. |
193 | * |
194 | * Returns: %TRUE if the row is a separator |
195 | */ |
196 | typedef gboolean (*GtkTreeViewRowSeparatorFunc) (GtkTreeModel *model, |
197 | GtkTreeIter *iter, |
198 | gpointer data); |
199 | typedef void (*GtkTreeViewSearchPositionFunc) (GtkTreeView *tree_view, |
200 | GtkWidget *search_dialog, |
201 | gpointer user_data); |
202 | |
203 | |
204 | /* Creators */ |
205 | GDK_AVAILABLE_IN_ALL |
206 | GType gtk_tree_view_get_type (void) G_GNUC_CONST; |
207 | GDK_AVAILABLE_IN_ALL |
208 | GtkWidget *gtk_tree_view_new (void); |
209 | GDK_AVAILABLE_IN_ALL |
210 | GtkWidget *gtk_tree_view_new_with_model (GtkTreeModel *model); |
211 | |
212 | /* Accessors */ |
213 | GDK_AVAILABLE_IN_ALL |
214 | GtkTreeModel *gtk_tree_view_get_model (GtkTreeView *tree_view); |
215 | GDK_AVAILABLE_IN_ALL |
216 | void gtk_tree_view_set_model (GtkTreeView *tree_view, |
217 | GtkTreeModel *model); |
218 | GDK_AVAILABLE_IN_ALL |
219 | GtkTreeSelection *gtk_tree_view_get_selection (GtkTreeView *tree_view); |
220 | |
221 | GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_get_hadjustment) |
222 | GtkAdjustment *gtk_tree_view_get_hadjustment (GtkTreeView *tree_view); |
223 | GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_set_hadjustment) |
224 | void gtk_tree_view_set_hadjustment (GtkTreeView *tree_view, |
225 | GtkAdjustment *adjustment); |
226 | GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_get_vadjustment) |
227 | GtkAdjustment *gtk_tree_view_get_vadjustment (GtkTreeView *tree_view); |
228 | GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_set_vadjustment) |
229 | void gtk_tree_view_set_vadjustment (GtkTreeView *tree_view, |
230 | GtkAdjustment *adjustment); |
231 | |
232 | |
233 | GDK_AVAILABLE_IN_ALL |
234 | gboolean (GtkTreeView *tree_view); |
235 | GDK_AVAILABLE_IN_ALL |
236 | void (GtkTreeView *tree_view, |
237 | gboolean ); |
238 | GDK_AVAILABLE_IN_ALL |
239 | void gtk_tree_view_columns_autosize (GtkTreeView *tree_view); |
240 | GDK_AVAILABLE_IN_ALL |
241 | gboolean (GtkTreeView *tree_view); |
242 | GDK_AVAILABLE_IN_ALL |
243 | void (GtkTreeView *tree_view, |
244 | gboolean setting); |
245 | GDK_DEPRECATED_IN_3_14 |
246 | void gtk_tree_view_set_rules_hint (GtkTreeView *tree_view, |
247 | gboolean setting); |
248 | GDK_DEPRECATED_IN_3_14 |
249 | gboolean gtk_tree_view_get_rules_hint (GtkTreeView *tree_view); |
250 | GDK_AVAILABLE_IN_3_8 |
251 | gboolean gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view); |
252 | GDK_AVAILABLE_IN_3_8 |
253 | void gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view, |
254 | gboolean single); |
255 | |
256 | /* Column funtions */ |
257 | GDK_AVAILABLE_IN_ALL |
258 | gint gtk_tree_view_append_column (GtkTreeView *tree_view, |
259 | GtkTreeViewColumn *column); |
260 | GDK_AVAILABLE_IN_ALL |
261 | gint gtk_tree_view_remove_column (GtkTreeView *tree_view, |
262 | GtkTreeViewColumn *column); |
263 | GDK_AVAILABLE_IN_ALL |
264 | gint gtk_tree_view_insert_column (GtkTreeView *tree_view, |
265 | GtkTreeViewColumn *column, |
266 | gint position); |
267 | GDK_AVAILABLE_IN_ALL |
268 | gint gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, |
269 | gint position, |
270 | const gchar *title, |
271 | GtkCellRenderer *cell, |
272 | ...) G_GNUC_NULL_TERMINATED; |
273 | GDK_AVAILABLE_IN_ALL |
274 | gint gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, |
275 | gint position, |
276 | const gchar *title, |
277 | GtkCellRenderer *cell, |
278 | GtkTreeCellDataFunc func, |
279 | gpointer data, |
280 | GDestroyNotify dnotify); |
281 | |
282 | GDK_AVAILABLE_IN_3_4 |
283 | guint gtk_tree_view_get_n_columns (GtkTreeView *tree_view); |
284 | GDK_AVAILABLE_IN_ALL |
285 | GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view, |
286 | gint n); |
287 | GDK_AVAILABLE_IN_ALL |
288 | GList *gtk_tree_view_get_columns (GtkTreeView *tree_view); |
289 | GDK_AVAILABLE_IN_ALL |
290 | void gtk_tree_view_move_column_after (GtkTreeView *tree_view, |
291 | GtkTreeViewColumn *column, |
292 | GtkTreeViewColumn *base_column); |
293 | GDK_AVAILABLE_IN_ALL |
294 | void gtk_tree_view_set_expander_column (GtkTreeView *tree_view, |
295 | GtkTreeViewColumn *column); |
296 | GDK_AVAILABLE_IN_ALL |
297 | GtkTreeViewColumn *gtk_tree_view_get_expander_column (GtkTreeView *tree_view); |
298 | GDK_AVAILABLE_IN_ALL |
299 | void gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, |
300 | GtkTreeViewColumnDropFunc func, |
301 | gpointer user_data, |
302 | GDestroyNotify destroy); |
303 | |
304 | /* Actions */ |
305 | GDK_AVAILABLE_IN_ALL |
306 | void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, |
307 | gint tree_x, |
308 | gint tree_y); |
309 | GDK_AVAILABLE_IN_ALL |
310 | void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, |
311 | GtkTreePath *path, |
312 | GtkTreeViewColumn *column, |
313 | gboolean use_align, |
314 | gfloat row_align, |
315 | gfloat col_align); |
316 | GDK_AVAILABLE_IN_ALL |
317 | void gtk_tree_view_row_activated (GtkTreeView *tree_view, |
318 | GtkTreePath *path, |
319 | GtkTreeViewColumn *column); |
320 | GDK_AVAILABLE_IN_ALL |
321 | void gtk_tree_view_expand_all (GtkTreeView *tree_view); |
322 | GDK_AVAILABLE_IN_ALL |
323 | void gtk_tree_view_collapse_all (GtkTreeView *tree_view); |
324 | GDK_AVAILABLE_IN_ALL |
325 | void gtk_tree_view_expand_to_path (GtkTreeView *tree_view, |
326 | GtkTreePath *path); |
327 | GDK_AVAILABLE_IN_ALL |
328 | gboolean gtk_tree_view_expand_row (GtkTreeView *tree_view, |
329 | GtkTreePath *path, |
330 | gboolean open_all); |
331 | GDK_AVAILABLE_IN_ALL |
332 | gboolean gtk_tree_view_collapse_row (GtkTreeView *tree_view, |
333 | GtkTreePath *path); |
334 | GDK_AVAILABLE_IN_ALL |
335 | void gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view, |
336 | GtkTreeViewMappingFunc func, |
337 | gpointer data); |
338 | GDK_AVAILABLE_IN_ALL |
339 | gboolean gtk_tree_view_row_expanded (GtkTreeView *tree_view, |
340 | GtkTreePath *path); |
341 | GDK_AVAILABLE_IN_ALL |
342 | void gtk_tree_view_set_reorderable (GtkTreeView *tree_view, |
343 | gboolean reorderable); |
344 | GDK_AVAILABLE_IN_ALL |
345 | gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view); |
346 | GDK_AVAILABLE_IN_ALL |
347 | void gtk_tree_view_set_cursor (GtkTreeView *tree_view, |
348 | GtkTreePath *path, |
349 | GtkTreeViewColumn *focus_column, |
350 | gboolean start_editing); |
351 | GDK_AVAILABLE_IN_ALL |
352 | void gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view, |
353 | GtkTreePath *path, |
354 | GtkTreeViewColumn *focus_column, |
355 | GtkCellRenderer *focus_cell, |
356 | gboolean start_editing); |
357 | GDK_AVAILABLE_IN_ALL |
358 | void gtk_tree_view_get_cursor (GtkTreeView *tree_view, |
359 | GtkTreePath **path, |
360 | GtkTreeViewColumn **focus_column); |
361 | |
362 | |
363 | /* Layout information */ |
364 | GDK_AVAILABLE_IN_ALL |
365 | GdkWindow *gtk_tree_view_get_bin_window (GtkTreeView *tree_view); |
366 | GDK_AVAILABLE_IN_ALL |
367 | gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view, |
368 | gint x, |
369 | gint y, |
370 | GtkTreePath **path, |
371 | GtkTreeViewColumn **column, |
372 | gint *cell_x, |
373 | gint *cell_y); |
374 | GDK_AVAILABLE_IN_ALL |
375 | void gtk_tree_view_get_cell_area (GtkTreeView *tree_view, |
376 | GtkTreePath *path, |
377 | GtkTreeViewColumn *column, |
378 | GdkRectangle *rect); |
379 | GDK_AVAILABLE_IN_ALL |
380 | void gtk_tree_view_get_background_area (GtkTreeView *tree_view, |
381 | GtkTreePath *path, |
382 | GtkTreeViewColumn *column, |
383 | GdkRectangle *rect); |
384 | GDK_AVAILABLE_IN_ALL |
385 | void gtk_tree_view_get_visible_rect (GtkTreeView *tree_view, |
386 | GdkRectangle *visible_rect); |
387 | GDK_AVAILABLE_IN_ALL |
388 | gboolean gtk_tree_view_get_visible_range (GtkTreeView *tree_view, |
389 | GtkTreePath **start_path, |
390 | GtkTreePath **end_path); |
391 | GDK_AVAILABLE_IN_ALL |
392 | gboolean gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view, |
393 | gint x, |
394 | gint y, |
395 | GtkTreePath **path, |
396 | GtkTreeViewColumn **column, |
397 | gint *cell_x, |
398 | gint *cell_y); |
399 | |
400 | /* Drag-and-Drop support */ |
401 | GDK_AVAILABLE_IN_ALL |
402 | void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view, |
403 | GdkModifierType start_button_mask, |
404 | const GtkTargetEntry *targets, |
405 | gint n_targets, |
406 | GdkDragAction actions); |
407 | GDK_AVAILABLE_IN_ALL |
408 | void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view, |
409 | const GtkTargetEntry *targets, |
410 | gint n_targets, |
411 | GdkDragAction actions); |
412 | GDK_AVAILABLE_IN_ALL |
413 | void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view); |
414 | GDK_AVAILABLE_IN_ALL |
415 | void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view); |
416 | |
417 | |
418 | /* These are useful to implement your own custom stuff. */ |
419 | GDK_AVAILABLE_IN_ALL |
420 | void gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view, |
421 | GtkTreePath *path, |
422 | GtkTreeViewDropPosition pos); |
423 | GDK_AVAILABLE_IN_ALL |
424 | void gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view, |
425 | GtkTreePath **path, |
426 | GtkTreeViewDropPosition *pos); |
427 | GDK_AVAILABLE_IN_ALL |
428 | gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, |
429 | gint drag_x, |
430 | gint drag_y, |
431 | GtkTreePath **path, |
432 | GtkTreeViewDropPosition *pos); |
433 | GDK_AVAILABLE_IN_ALL |
434 | cairo_surface_t *gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view, |
435 | GtkTreePath *path); |
436 | |
437 | /* Interactive search */ |
438 | GDK_AVAILABLE_IN_ALL |
439 | void gtk_tree_view_set_enable_search (GtkTreeView *tree_view, |
440 | gboolean enable_search); |
441 | GDK_AVAILABLE_IN_ALL |
442 | gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view); |
443 | GDK_AVAILABLE_IN_ALL |
444 | gint gtk_tree_view_get_search_column (GtkTreeView *tree_view); |
445 | GDK_AVAILABLE_IN_ALL |
446 | void gtk_tree_view_set_search_column (GtkTreeView *tree_view, |
447 | gint column); |
448 | GDK_AVAILABLE_IN_ALL |
449 | GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view); |
450 | GDK_AVAILABLE_IN_ALL |
451 | void gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view, |
452 | GtkTreeViewSearchEqualFunc search_equal_func, |
453 | gpointer search_user_data, |
454 | GDestroyNotify search_destroy); |
455 | |
456 | GDK_AVAILABLE_IN_ALL |
457 | GtkEntry *gtk_tree_view_get_search_entry (GtkTreeView *tree_view); |
458 | GDK_AVAILABLE_IN_ALL |
459 | void gtk_tree_view_set_search_entry (GtkTreeView *tree_view, |
460 | GtkEntry *entry); |
461 | GDK_AVAILABLE_IN_ALL |
462 | GtkTreeViewSearchPositionFunc gtk_tree_view_get_search_position_func (GtkTreeView *tree_view); |
463 | GDK_AVAILABLE_IN_ALL |
464 | void gtk_tree_view_set_search_position_func (GtkTreeView *tree_view, |
465 | GtkTreeViewSearchPositionFunc func, |
466 | gpointer data, |
467 | GDestroyNotify destroy); |
468 | |
469 | /* Convert between the different coordinate systems */ |
470 | GDK_AVAILABLE_IN_ALL |
471 | void gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view, |
472 | gint wx, |
473 | gint wy, |
474 | gint *tx, |
475 | gint *ty); |
476 | GDK_AVAILABLE_IN_ALL |
477 | void gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view, |
478 | gint tx, |
479 | gint ty, |
480 | gint *wx, |
481 | gint *wy); |
482 | GDK_AVAILABLE_IN_ALL |
483 | void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view, |
484 | gint wx, |
485 | gint wy, |
486 | gint *bx, |
487 | gint *by); |
488 | GDK_AVAILABLE_IN_ALL |
489 | void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view, |
490 | gint bx, |
491 | gint by, |
492 | gint *wx, |
493 | gint *wy); |
494 | GDK_AVAILABLE_IN_ALL |
495 | void gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view, |
496 | gint tx, |
497 | gint ty, |
498 | gint *bx, |
499 | gint *by); |
500 | GDK_AVAILABLE_IN_ALL |
501 | void gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view, |
502 | gint bx, |
503 | gint by, |
504 | gint *tx, |
505 | gint *ty); |
506 | |
507 | /* This function should really never be used. It is just for use by ATK. |
508 | */ |
509 | typedef void (* GtkTreeDestroyCountFunc) (GtkTreeView *tree_view, |
510 | GtkTreePath *path, |
511 | gint children, |
512 | gpointer user_data); |
513 | GDK_DEPRECATED_IN_3_4 |
514 | void gtk_tree_view_set_destroy_count_func (GtkTreeView *tree_view, |
515 | GtkTreeDestroyCountFunc func, |
516 | gpointer data, |
517 | GDestroyNotify destroy); |
518 | |
519 | GDK_AVAILABLE_IN_ALL |
520 | void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view, |
521 | gboolean enable); |
522 | GDK_AVAILABLE_IN_ALL |
523 | gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view); |
524 | GDK_AVAILABLE_IN_ALL |
525 | void gtk_tree_view_set_hover_selection (GtkTreeView *tree_view, |
526 | gboolean hover); |
527 | GDK_AVAILABLE_IN_ALL |
528 | gboolean gtk_tree_view_get_hover_selection (GtkTreeView *tree_view); |
529 | GDK_AVAILABLE_IN_ALL |
530 | void gtk_tree_view_set_hover_expand (GtkTreeView *tree_view, |
531 | gboolean expand); |
532 | GDK_AVAILABLE_IN_ALL |
533 | gboolean gtk_tree_view_get_hover_expand (GtkTreeView *tree_view); |
534 | GDK_AVAILABLE_IN_ALL |
535 | void gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view, |
536 | gboolean enable); |
537 | GDK_AVAILABLE_IN_ALL |
538 | gboolean gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view); |
539 | |
540 | GDK_AVAILABLE_IN_ALL |
541 | gboolean gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view); |
542 | |
543 | GDK_AVAILABLE_IN_ALL |
544 | GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view); |
545 | GDK_AVAILABLE_IN_ALL |
546 | void gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view, |
547 | GtkTreeViewRowSeparatorFunc func, |
548 | gpointer data, |
549 | GDestroyNotify destroy); |
550 | |
551 | GDK_AVAILABLE_IN_ALL |
552 | GtkTreeViewGridLines gtk_tree_view_get_grid_lines (GtkTreeView *tree_view); |
553 | GDK_AVAILABLE_IN_ALL |
554 | void gtk_tree_view_set_grid_lines (GtkTreeView *tree_view, |
555 | GtkTreeViewGridLines grid_lines); |
556 | GDK_AVAILABLE_IN_ALL |
557 | gboolean gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view); |
558 | GDK_AVAILABLE_IN_ALL |
559 | void gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view, |
560 | gboolean enabled); |
561 | GDK_AVAILABLE_IN_ALL |
562 | void gtk_tree_view_set_show_expanders (GtkTreeView *tree_view, |
563 | gboolean enabled); |
564 | GDK_AVAILABLE_IN_ALL |
565 | gboolean gtk_tree_view_get_show_expanders (GtkTreeView *tree_view); |
566 | GDK_AVAILABLE_IN_ALL |
567 | void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view, |
568 | gint indentation); |
569 | GDK_AVAILABLE_IN_ALL |
570 | gint gtk_tree_view_get_level_indentation (GtkTreeView *tree_view); |
571 | |
572 | /* Convenience functions for setting tooltips */ |
573 | GDK_AVAILABLE_IN_ALL |
574 | void gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view, |
575 | GtkTooltip *tooltip, |
576 | GtkTreePath *path); |
577 | GDK_AVAILABLE_IN_ALL |
578 | void gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view, |
579 | GtkTooltip *tooltip, |
580 | GtkTreePath *path, |
581 | GtkTreeViewColumn *column, |
582 | GtkCellRenderer *cell); |
583 | GDK_AVAILABLE_IN_ALL |
584 | gboolean gtk_tree_view_get_tooltip_context(GtkTreeView *tree_view, |
585 | gint *x, |
586 | gint *y, |
587 | gboolean keyboard_tip, |
588 | GtkTreeModel **model, |
589 | GtkTreePath **path, |
590 | GtkTreeIter *iter); |
591 | GDK_AVAILABLE_IN_ALL |
592 | void gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view, |
593 | gint column); |
594 | GDK_AVAILABLE_IN_ALL |
595 | gint gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view); |
596 | |
597 | G_END_DECLS |
598 | |
599 | |
600 | #endif /* __GTK_TREE_VIEW_H__ */ |
601 | |