summaryrefslogtreecommitdiffstats
path: root/test/egg-property-cell-renderer.h
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-07-04 10:49:26 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-07-04 10:49:26 +0200
commit39c6bb082696283e74ee72a2097749a4de1a418b (patch)
treec3b7e2cf8e9710d6eac6b330ff58adf4b28d1ee8 /test/egg-property-cell-renderer.h
parentb67947751a24366137844cd1a3b41bed7095bf76 (diff)
downloaduca-39c6bb082696283e74ee72a2097749a4de1a418b.tar.gz
uca-39c6bb082696283e74ee72a2097749a4de1a418b.tar.bz2
uca-39c6bb082696283e74ee72a2097749a4de1a418b.tar.xz
uca-39c6bb082696283e74ee72a2097749a4de1a418b.zip
Add property tree view
The standard tree view widget is not capable of setting individual cell renderers per row. Thus I made one with a custom cell renderer that uses an appropriate cell renderer depending of the property type. I developed this independently and put it up on Github at https://github.com/matze/EggPropertyTreeView.
Diffstat (limited to 'test/egg-property-cell-renderer.h')
-rw-r--r--test/egg-property-cell-renderer.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/egg-property-cell-renderer.h b/test/egg-property-cell-renderer.h
new file mode 100644
index 0000000..d4dbe02
--- /dev/null
+++ b/test/egg-property-cell-renderer.h
@@ -0,0 +1,55 @@
+/* Copyright (C) 2011, 2012 Matthias Vogelgesang <matthias.vogelgesang@kit.edu>
+ (Karlsruhe Institute of Technology)
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2.1 of the License, or (at your
+ option) any later version.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ details.
+
+ You should have received a copy of the GNU Lesser General Public License along
+ with this library; if not, write to the Free Software Foundation, Inc., 51
+ Franklin St, Fifth Floor, Boston, MA 02110, USA */
+
+#ifndef EGG_PROPERTY_CELL_RENDERER_H
+#define EGG_PROPERTY_CELL_RENDERER_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_PROPERTY_CELL_RENDERER (egg_property_cell_renderer_get_type())
+#define EGG_PROPERTY_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), EGG_TYPE_PROPERTY_CELL_RENDERER, EggPropertyCellRenderer))
+#define EGG_IS_PROPERTY_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), EGG_TYPE_PROPERTY_CELL_RENDERER))
+#define EGG_PROPERTY_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EGG_TYPE_PROPERTY_CELL_RENDERER, EggPropertyCellRendererClass))
+#define EGG_IS_PROPERTY_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EGG_TYPE_PROPERTY_CELL_RENDERER))
+#define EGG_PROPERTY_CELL_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EGG_TYPE_PROPERTY_CELL_RENDERER, EggPropertyCellRendererClass))
+
+typedef struct _EggPropertyCellRenderer EggPropertyCellRenderer;
+typedef struct _EggPropertyCellRendererClass EggPropertyCellRendererClass;
+typedef struct _EggPropertyCellRendererPrivate EggPropertyCellRendererPrivate;
+
+struct _EggPropertyCellRenderer
+{
+ GtkCellRenderer parent_instance;
+
+ /*< private >*/
+ EggPropertyCellRendererPrivate *priv;
+};
+
+struct _EggPropertyCellRendererClass
+{
+ GtkCellRendererClass parent_class;
+};
+
+GType egg_property_cell_renderer_get_type (void);
+GtkCellRenderer* egg_property_cell_renderer_new (GObject *object,
+ GtkListStore *list_store);
+
+G_END_DECLS
+
+#endif