Ardour  9.0-pre0-582-g084a23a80d
gtktreeviewcolumn.h
Go to the documentation of this file.
1 /* gtktreeviewcolumn.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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 #ifndef __GTK_TREE_VIEW_COLUMN_H__
21 #define __GTK_TREE_VIEW_COLUMN_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/gtkcellrenderer.h>
28 #include <gtk/gtktreemodel.h>
29 #include <gtk/gtktreesortable.h>
30 
31 /* Not needed, retained for compatibility -Yosh */
32 #include <gtk/gtkobject.h>
33 
34 
35 G_BEGIN_DECLS
36 
37 
38 #define GTK_TYPE_TREE_VIEW_COLUMN (gtk_tree_view_column_get_type ())
39 #define GTK_TREE_VIEW_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumn))
40 #define GTK_TREE_VIEW_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumnClass))
41 #define GTK_IS_TREE_VIEW_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_VIEW_COLUMN))
42 #define GTK_IS_TREE_VIEW_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW_COLUMN))
43 #define GTK_TREE_VIEW_COLUMN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumnClass))
44 
45 typedef enum
46 {
51 
54 
55 typedef void (* GtkTreeCellDataFunc) (GtkTreeViewColumn *tree_column,
56  GtkCellRenderer *cell,
57  GtkTreeModel *tree_model,
58  GtkTreeIter *iter,
59  gpointer data);
60 
61 
63 {
65 
66  GtkWidget *GSEAL (tree_view);
67  GtkWidget *GSEAL (button);
68  GtkWidget *GSEAL (child);
69  GtkWidget *GSEAL (arrow);
70  GtkWidget *GSEAL (alignment);
71  GdkWindow *GSEAL (window);
72  GtkCellEditable *GSEAL (editable_widget);
73  gfloat GSEAL (xalign);
74  guint GSEAL (property_changed_signal);
75  gint GSEAL (spacing);
76 
77  /* Sizing fields */
78  /* see gtk+/doc/tree-column-sizing.txt for more information on them */
80  gint GSEAL (requested_width);
81  gint GSEAL (button_request);
82  gint GSEAL (resized_width);
83  gint GSEAL (width);
84  gint GSEAL (fixed_width);
85  gint GSEAL (min_width);
86  gint GSEAL (max_width);
87 
88  /* dragging columns */
89  gint GSEAL (drag_x);
90  gint GSEAL (drag_y);
91 
92  gchar *GSEAL (title);
93  GList *GSEAL (cell_list);
94 
95  /* Sorting */
96  guint GSEAL (sort_clicked_signal);
97  guint GSEAL (sort_column_changed_signal);
98  gint GSEAL (sort_column_id);
99  GtkSortType GSEAL (sort_order);
100 
101  /* Flags */
102  guint GSEAL (visible) : 1;
103  guint GSEAL (resizable) : 1;
104  guint GSEAL (clickable) : 1;
105  guint GSEAL (dirty) : 1;
106  guint GSEAL (show_sort_indicator) : 1;
107  guint GSEAL (maybe_reordered) : 1;
108  guint GSEAL (reorderable) : 1;
109  guint GSEAL (use_resized_width) : 1;
110  guint GSEAL (expand) : 1;
111 };
112 
114 {
116 
117  void (*clicked) (GtkTreeViewColumn *tree_column);
118 
119  /* Padding for future expansion */
120  void (*_gtk_reserved1) (void);
121  void (*_gtk_reserved2) (void);
122  void (*_gtk_reserved3) (void);
123  void (*_gtk_reserved4) (void);
124 };
125 
126 GType gtk_tree_view_column_get_type (void) G_GNUC_CONST;
129  GtkCellRenderer *cell,
130  ...) G_GNUC_NULL_TERMINATED;
132  GtkCellRenderer *cell,
133  gboolean expand);
135  GtkCellRenderer *cell,
136  gboolean expand);
138 #ifndef GTK_DISABLE_DEPRECATED
140 #endif
142  GtkCellRenderer *cell_renderer,
143  const gchar *attribute,
144  gint column);
146  GtkCellRenderer *cell_renderer,
147  ...) G_GNUC_NULL_TERMINATED;
149  GtkCellRenderer *cell_renderer,
150  GtkTreeCellDataFunc func,
151  gpointer func_data,
152  GDestroyNotify destroy);
154  GtkCellRenderer *cell_renderer);
156  gint spacing);
159  gboolean visible);
162  gboolean resizable);
170  gint fixed_width);
172  gint min_width);
175  gint max_width);
178 
179 
180 
181 /* Options for manipulating the column headers
182  */
184  const gchar *title);
187  gboolean expand);
190  gboolean clickable);
193  GtkWidget *widget);
196  gfloat xalign);
199  gboolean reorderable);
201 
202 
203 
204 /* You probably only want to use gtk_tree_view_column_set_sort_column_id. The
205  * other sorting functions exist primarily to let others do their own custom sorting.
206  */
208  gint sort_column_id);
211  gboolean setting);
216 
217 
218 /* These functions are meant primarily for interaction between the GtkTreeView and the column.
219  */
221  GtkTreeModel *tree_model,
222  GtkTreeIter *iter,
223  gboolean is_expander,
224  gboolean is_expanded);
226  const GdkRectangle *cell_area,
227  gint *x_offset,
228  gint *y_offset,
229  gint *width,
230  gint *height);
233  GtkCellRenderer *cell);
235  GtkCellRenderer *cell_renderer,
236  gint *start_pos,
237  gint *width);
240 
241 
242 G_END_DECLS
243 
244 
245 #endif /* __GTK_TREE_VIEW_COLUMN_H__ */
struct _GtkCellEditable GtkCellEditable
GtkSortType
Definition: gtkenums.h:477
struct _GtkTreeModel GtkTreeModel
Definition: gtktreemodel.h:46
gint gtk_tree_view_column_get_spacing(GtkTreeViewColumn *tree_column)
GtkWidget * gtk_tree_view_column_get_tree_view(GtkTreeViewColumn *tree_column)
gfloat gtk_tree_view_column_get_alignment(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_pack_end(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, gboolean expand)
void gtk_tree_view_column_set_expand(GtkTreeViewColumn *tree_column, gboolean expand)
GtkTreeViewColumn * gtk_tree_view_column_new(void)
void(* GtkTreeCellDataFunc)(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
void gtk_tree_view_column_set_visible(GtkTreeViewColumn *tree_column, gboolean visible)
void gtk_tree_view_column_queue_resize(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_cell_set_cell_data(GtkTreeViewColumn *tree_column, GtkTreeModel *tree_model, GtkTreeIter *iter, gboolean is_expander, gboolean is_expanded)
gboolean gtk_tree_view_column_get_clickable(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_pack_start(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, gboolean expand)
gboolean gtk_tree_view_column_get_sort_indicator(GtkTreeViewColumn *tree_column)
gint gtk_tree_view_column_get_min_width(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_widget(GtkTreeViewColumn *tree_column, GtkWidget *widget)
void gtk_tree_view_column_set_clickable(GtkTreeViewColumn *tree_column, gboolean clickable)
void gtk_tree_view_column_set_spacing(GtkTreeViewColumn *tree_column, gint spacing)
gint gtk_tree_view_column_get_width(GtkTreeViewColumn *tree_column)
const gchar * gtk_tree_view_column_get_title(GtkTreeViewColumn *tree_column)
GtkWidget * gtk_tree_view_column_get_widget(GtkTreeViewColumn *tree_column)
gint gtk_tree_view_column_get_sort_column_id(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_alignment(GtkTreeViewColumn *tree_column, gfloat xalign)
GType gtk_tree_view_column_get_type(void) G_GNUC_CONST
gboolean gtk_tree_view_column_get_expand(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_clear(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_clicked(GtkTreeViewColumn *tree_column)
GtkSortType gtk_tree_view_column_get_sort_order(GtkTreeViewColumn *tree_column)
GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_attributes(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer,...) G_GNUC_NULL_TERMINATED
gboolean gtk_tree_view_column_get_resizable(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_resizable(GtkTreeViewColumn *tree_column, gboolean resizable)
void gtk_tree_view_column_set_sizing(GtkTreeViewColumn *tree_column, GtkTreeViewColumnSizing type)
GtkTreeViewColumn * gtk_tree_view_column_new_with_attributes(const gchar *title, GtkCellRenderer *cell,...) G_GNUC_NULL_TERMINATED
void gtk_tree_view_column_set_min_width(GtkTreeViewColumn *tree_column, gint min_width)
gboolean gtk_tree_view_column_get_visible(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_max_width(GtkTreeViewColumn *tree_column, gint max_width)
void gtk_tree_view_column_set_reorderable(GtkTreeViewColumn *tree_column, gboolean reorderable)
GList * gtk_tree_view_column_get_cell_renderers(GtkTreeViewColumn *tree_column)
gboolean gtk_tree_view_column_cell_get_position(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, gint *start_pos, gint *width)
void gtk_tree_view_column_set_sort_order(GtkTreeViewColumn *tree_column, GtkSortType order)
void gtk_tree_view_column_set_sort_column_id(GtkTreeViewColumn *tree_column, gint sort_column_id)
gboolean gtk_tree_view_column_get_reorderable(GtkTreeViewColumn *tree_column)
gint gtk_tree_view_column_get_max_width(GtkTreeViewColumn *tree_column)
GtkTreeViewColumnSizing
@ GTK_TREE_VIEW_COLUMN_FIXED
@ GTK_TREE_VIEW_COLUMN_AUTOSIZE
@ GTK_TREE_VIEW_COLUMN_GROW_ONLY
void gtk_tree_view_column_set_fixed_width(GtkTreeViewColumn *tree_column, gint fixed_width)
gboolean gtk_tree_view_column_cell_is_visible(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_sort_indicator(GtkTreeViewColumn *tree_column, gboolean setting)
gint gtk_tree_view_column_get_fixed_width(GtkTreeViewColumn *tree_column)
void gtk_tree_view_column_set_title(GtkTreeViewColumn *tree_column, const gchar *title)
void gtk_tree_view_column_add_attribute(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, const gchar *attribute, gint column)
void gtk_tree_view_column_cell_get_size(GtkTreeViewColumn *tree_column, const GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height)
void gtk_tree_view_column_set_cell_data_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, GtkTreeCellDataFunc func, gpointer func_data, GDestroyNotify destroy)
void gtk_tree_view_column_focus_cell(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell)
void gtk_tree_view_column_clear_attributes(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer)
PBD::PropertyDescriptor< uint32_t > order
void(* clicked)(GtkTreeViewColumn *tree_column)
guint GSEAL(sort_column_changed_signal)
gint GSEAL(drag_y)
gint GSEAL(width)
gint GSEAL(min_width)
GtkWidget * GSEAL(alignment)
guint GSEAL(sort_clicked_signal)
gchar * GSEAL(title)
gint GSEAL(fixed_width)
guint GSEAL(property_changed_signal)
gint GSEAL(spacing)
gint GSEAL(max_width)
GtkWidget * GSEAL(arrow)
GList * GSEAL(cell_list)
gfloat GSEAL(xalign)
GtkWidget * GSEAL(tree_view)
gint GSEAL(sort_column_id)
GtkWidget * GSEAL(button)
GdkWindow * GSEAL(window)
GtkCellEditable * GSEAL(editable_widget)
gint GSEAL(button_request)
gint GSEAL(requested_width)
gint GSEAL(resized_width)
GtkSortType GSEAL(sort_order)
gint GSEAL(drag_x)
GtkTreeViewColumnSizing GSEAL(column_type)
GtkWidget * GSEAL(child)
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1