1/*
2 * Copyright © 2019 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 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 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20#ifndef __GTK_COLUMN_VIEW_H__
21#define __GTK_COLUMN_VIEW_H__
22
23#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24#error "Only <gtk/gtk.h> can be included directly."
25#endif
26
27#include <gtk/gtktypes.h>
28#include <gtk/gtksortlistmodel.h>
29#include <gtk/gtkselectionmodel.h>
30#include <gtk/gtksorter.h>
31
32G_BEGIN_DECLS
33
34#define GTK_TYPE_COLUMN_VIEW (gtk_column_view_get_type ())
35#define GTK_COLUMN_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLUMN_VIEW, GtkColumnView))
36#define GTK_COLUMN_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_COLUMN_VIEW, GtkColumnViewClass))
37#define GTK_IS_COLUMN_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLUMN_VIEW))
38#define GTK_IS_COLUMN_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_COLUMN_VIEW))
39#define GTK_COLUMN_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_COLUMN_VIEW, GtkColumnViewClass))
40
41
42typedef struct _GtkColumnView GtkColumnView;
43typedef struct _GtkColumnViewClass GtkColumnViewClass;
44/* forward declaration */
45typedef struct _GtkColumnViewColumn GtkColumnViewColumn;
46
47GDK_AVAILABLE_IN_ALL
48GType gtk_column_view_get_type (void) G_GNUC_CONST;
49
50GDK_AVAILABLE_IN_ALL
51GtkWidget * gtk_column_view_new (GtkSelectionModel *model);
52
53GDK_AVAILABLE_IN_ALL
54GListModel * gtk_column_view_get_columns (GtkColumnView *self);
55GDK_AVAILABLE_IN_ALL
56void gtk_column_view_append_column (GtkColumnView *self,
57 GtkColumnViewColumn *column);
58GDK_AVAILABLE_IN_ALL
59void gtk_column_view_remove_column (GtkColumnView *self,
60 GtkColumnViewColumn *column);
61GDK_AVAILABLE_IN_ALL
62void gtk_column_view_insert_column (GtkColumnView *self,
63 guint position,
64 GtkColumnViewColumn *column);
65
66GDK_AVAILABLE_IN_ALL
67GtkSelectionModel *
68 gtk_column_view_get_model (GtkColumnView *self);
69GDK_AVAILABLE_IN_ALL
70void gtk_column_view_set_model (GtkColumnView *self,
71 GtkSelectionModel *model);
72
73GDK_AVAILABLE_IN_ALL
74gboolean gtk_column_view_get_show_row_separators (GtkColumnView *self);
75GDK_AVAILABLE_IN_ALL
76void gtk_column_view_set_show_row_separators (GtkColumnView *self,
77 gboolean show_row_separators);
78
79GDK_AVAILABLE_IN_ALL
80gboolean gtk_column_view_get_show_column_separators (GtkColumnView *self);
81GDK_AVAILABLE_IN_ALL
82void gtk_column_view_set_show_column_separators (GtkColumnView *self,
83 gboolean show_column_separators);
84
85GDK_AVAILABLE_IN_ALL
86GtkSorter * gtk_column_view_get_sorter (GtkColumnView *self);
87
88GDK_AVAILABLE_IN_ALL
89void gtk_column_view_sort_by_column (GtkColumnView *self,
90 GtkColumnViewColumn *column,
91 GtkSortType direction);
92
93GDK_AVAILABLE_IN_ALL
94void gtk_column_view_set_single_click_activate (GtkColumnView *self,
95 gboolean single_click_activate);
96GDK_AVAILABLE_IN_ALL
97gboolean gtk_column_view_get_single_click_activate (GtkColumnView *self);
98
99GDK_AVAILABLE_IN_ALL
100
101void gtk_column_view_set_reorderable (GtkColumnView *self,
102 gboolean reorderable);
103GDK_AVAILABLE_IN_ALL
104gboolean gtk_column_view_get_reorderable (GtkColumnView *self);
105
106GDK_AVAILABLE_IN_ALL
107void gtk_column_view_set_enable_rubberband (GtkColumnView *self,
108 gboolean enable_rubberband);
109GDK_AVAILABLE_IN_ALL
110gboolean gtk_column_view_get_enable_rubberband (GtkColumnView *self);
111
112G_END_DECLS
113
114#endif /* __GTK_COLUMN_VIEW_H__ */
115

source code of gtk/gtk/gtkcolumnview.h