aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/table-test.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-11-19 16:18:48 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-19 16:18:48 +0800
commit794f39a5d690344364ab5fb16872fb2950d6cedc (patch)
tree428ecb6329616a52bbd1862da4058ba057a218d4 /widgets/table/table-test.c
parentda4c37043ecbd7f1c74315f88db36dfa195d6c64 (diff)
downloadgsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.tar
gsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.tar.gz
gsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.tar.bz2
gsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.tar.lz
gsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.tar.xz
gsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.tar.zst
gsoc2013-evolution-794f39a5d690344364ab5fb16872fb2950d6cedc.zip
More work -mig
svn path=/trunk/; revision=1420
Diffstat (limited to 'widgets/table/table-test.c')
-rw-r--r--widgets/table/table-test.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/widgets/table/table-test.c b/widgets/table/table-test.c
index d67a211094..50fa8a7597 100644
--- a/widgets/table/table-test.c
+++ b/widgets/table/table-test.c
@@ -12,6 +12,7 @@
#include "e-table-header.h"
#include "e-table-header-item.h"
#include "e-table-render.h"
+#include "e-table-item.h"
char buffer [1024];
char **column_labels;
@@ -172,6 +173,12 @@ set_canvas_size (GnomeCanvas *canvas, GtkAllocation *alloc)
gnome_canvas_set_scroll_region (canvas, 0, 0, alloc->width, alloc->height);
}
+static int
+row_height (ETableModel *etm, int row, void *data)
+{
+ return row * 2 + 14;
+}
+
int
main (int argc, char *argv [])
{
@@ -190,7 +197,7 @@ main (int argc, char *argv [])
*/
e_table_model = e_table_simple_new (
col_count, col_name, row_count, value_at,
- set_value_at, is_cell_editable, NULL);
+ set_value_at, is_cell_editable, row_height, NULL);
/*
* Header
@@ -229,6 +236,15 @@ main (int argc, char *argv [])
"y2", 10.0,
"fill_color", "red",
NULL);
+
+ gnome_canvas_item_new (
+ gnome_canvas_root (GNOME_CANVAS (canvas)),
+ e_table_item_get_type (),
+ "ETableHeader", e_table_header,
+ "ETableModel", e_table_model,
+ "x", 0,
+ "y", 30,
+ NULL);
gtk_main ();
e_cursors_shutdown ();