]> Pileus Git - ~andy/gtk/blob - gtk/gtkcellview.h
Bandaid fix for icon view subclassing
[~andy/gtk] / gtk / gtkcellview.h
1 /* gtkcellview.h
2  * Copyright (C) 2002, 2003  Kristian Rietveld <kris@gtk.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 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21 #error "Only <gtk/gtk.h> can be included directly."
22 #endif
23
24 #ifndef __GTK_CELL_VIEW_H__
25 #define __GTK_CELL_VIEW_H__
26
27 #include <gtk/gtkwidget.h>
28 #include <gtk/gtkcellrenderer.h>
29 #include <gtk/gtkcellarea.h>
30 #include <gtk/gtkcellareacontext.h>
31 #include <gtk/gtktreemodel.h>
32
33 G_BEGIN_DECLS
34
35 #define GTK_TYPE_CELL_VIEW                (gtk_cell_view_get_type ())
36 #define GTK_CELL_VIEW(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_VIEW, GtkCellView))
37 #define GTK_CELL_VIEW_CLASS(vtable)       (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_TYPE_CELL_VIEW, GtkCellViewClass))
38 #define GTK_IS_CELL_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_VIEW))
39 #define GTK_IS_CELL_VIEW_CLASS(vtable)    (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_TYPE_CELL_VIEW))
40 #define GTK_CELL_VIEW_GET_CLASS(inst)     (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_TYPE_CELL_VIEW, GtkCellViewClass))
41
42 typedef struct _GtkCellView             GtkCellView;
43 typedef struct _GtkCellViewClass        GtkCellViewClass;
44 typedef struct _GtkCellViewPrivate      GtkCellViewPrivate;
45
46 struct _GtkCellView
47 {
48   GtkWidget parent_instance;
49
50   /*< private >*/
51   GtkCellViewPrivate *priv;
52 };
53
54 struct _GtkCellViewClass
55 {
56   GtkWidgetClass parent_class;
57
58   /* Padding for future expansion */
59   void (*_gtk_reserved1) (void);
60   void (*_gtk_reserved2) (void);
61   void (*_gtk_reserved3) (void);
62   void (*_gtk_reserved4) (void);
63 };
64
65 GType             gtk_cell_view_get_type                (void) G_GNUC_CONST;
66 GtkWidget        *gtk_cell_view_new                     (void);
67 GtkWidget        *gtk_cell_view_new_with_context        (GtkCellArea        *area,
68                                                          GtkCellAreaContext *context);
69 GtkWidget        *gtk_cell_view_new_with_text           (const gchar     *text);
70 GtkWidget        *gtk_cell_view_new_with_markup         (const gchar     *markup);
71 GtkWidget        *gtk_cell_view_new_with_pixbuf         (GdkPixbuf       *pixbuf);
72 void              gtk_cell_view_set_model               (GtkCellView     *cell_view,
73                                                          GtkTreeModel    *model);
74 GtkTreeModel     *gtk_cell_view_get_model               (GtkCellView     *cell_view);
75 void              gtk_cell_view_set_displayed_row       (GtkCellView     *cell_view,
76                                                          GtkTreePath     *path);
77 GtkTreePath      *gtk_cell_view_get_displayed_row       (GtkCellView     *cell_view);
78 void              gtk_cell_view_set_background_color    (GtkCellView     *cell_view,
79                                                          const GdkColor  *color);
80 void              gtk_cell_view_set_background_rgba     (GtkCellView     *cell_view,
81                                                          const GdkRGBA   *rgba);
82 gboolean          gtk_cell_view_get_draw_sensitive      (GtkCellView     *cell_view);
83 void              gtk_cell_view_set_draw_sensitive      (GtkCellView     *cell_view,
84                                                          gboolean         draw_sensitive);
85 gboolean          gtk_cell_view_get_fit_model           (GtkCellView     *cell_view);
86 void              gtk_cell_view_set_fit_model           (GtkCellView     *cell_view,
87                                                          gboolean         fit_model);
88
89 #ifndef GTK_DISABLE_DEPRECATED
90 gboolean          gtk_cell_view_get_size_of_row         (GtkCellView     *cell_view,
91                                                          GtkTreePath     *path,
92                                                          GtkRequisition  *requisition);
93 #endif
94
95 G_END_DECLS
96
97 #endif /* __GTK_CELL_VIEW_H__ */