gtkcellview.h

00001 /* gtkcellview.h
00002  * Copyright (C) 2002, 2003  Kristian Rietveld <kris@gtk.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02111-1301, USA.
00018  */
00019 
00020 #ifndef __GTK_CELL_VIEW_H__
00021 #define __GTK_CELL_VIEW_H__
00022 
00023 #include <gtk/gtkwidget.h>
00024 #include <gtk/gtkcellrenderer.h>
00025 #include <gtk/gtktreemodel.h>
00026 
00027 G_BEGIN_DECLS
00028 
00029 #define GTK_TYPE_CELL_VIEW                (gtk_cell_view_get_type ())
00030 #define GTK_CELL_VIEW(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_VIEW, GtkCellView))
00031 #define GTK_CELL_VIEW_CLASS(vtable)       (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_TYPE_CELL_VIEW, GtkCellViewClass))
00032 #define GTK_IS_CELL_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_VIEW))
00033 #define GTK_IS_CELL_VIEW_CLASS(vtable)    (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_TYPE_CELL_VIEW))
00034 #define GTK_CELL_VIEW_GET_CLASS(inst)     (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_TYPE_CELL_VIEW, GtkCellViewClass))
00035 
00036 typedef struct _GtkCellView             GtkCellView;
00037 typedef struct _GtkCellViewClass        GtkCellViewClass;
00038 typedef struct _GtkCellViewPrivate      GtkCellViewPrivate;
00039 
00040 struct _GtkCellView
00041 {
00042   GtkWidget parent_instance;
00043 
00044   /*< private >*/
00045   GtkCellViewPrivate *priv;
00046 };
00047 
00048 struct _GtkCellViewClass
00049 {
00050   GtkWidgetClass parent_class;
00051 };
00052 
00053 GType             gtk_cell_view_get_type               (void);
00054 GtkWidget        *gtk_cell_view_new                    (void);
00055 GtkWidget        *gtk_cell_view_new_with_text          (const gchar     *text);
00056 GtkWidget        *gtk_cell_view_new_with_markup        (const gchar     *markup);
00057 GtkWidget        *gtk_cell_view_new_with_pixbuf        (GdkPixbuf       *pixbuf);
00058 
00059 
00060 void              gtk_cell_view_set_value               (GtkCellView     *cell_view,
00061                                                          GtkCellRenderer *renderer,
00062                                                          gchar           *property,
00063                                                          GValue          *value);
00064 void              gtk_cell_view_set_values              (GtkCellView     *cell_view,
00065                                                          GtkCellRenderer *renderer,
00066                                                          ...);
00067 
00068 void              gtk_cell_view_set_model               (GtkCellView     *cell_view,
00069                                                          GtkTreeModel    *model);
00070 void              gtk_cell_view_set_displayed_row       (GtkCellView     *cell_view,
00071                                                          GtkTreePath     *path);
00072 GtkTreePath      *gtk_cell_view_get_displayed_row       (GtkCellView     *cell_view);
00073 gboolean          gtk_cell_view_get_size_of_row         (GtkCellView     *cell_view,
00074                                                          GtkTreePath     *path,
00075                                                          GtkRequisition  *requisition);
00076 
00077 void              gtk_cell_view_set_background_color    (GtkCellView     *cell_view,
00078                                                          const GdkColor  *color);
00079 
00080 G_END_DECLS
00081 
00082 #endif /* __GTK_CELL_VIEW_H__ */