diff options
author | Miguel de Icaza <miguel@gnu.org> | 1999-11-16 04:59:29 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-11-16 04:59:29 +0800 |
commit | 5ba51e992d6f702cccdcc42402bc3086776d00d1 (patch) | |
tree | 93d613ce074df46981a1df8dc419ce39b02f0b1c /widgets/e-table/table-test.c | |
parent | 7b1bd483b937fb6bf3d59dda200a0e6af6f2cc00 (diff) | |
download | gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.tar gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.tar.gz gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.tar.bz2 gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.tar.lz gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.tar.xz gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.tar.zst gsoc2013-evolution-5ba51e992d6f702cccdcc42402bc3086776d00d1.zip |
Add resizing capabilities.
1999-11-14 Miguel de Icaza <miguel@gnu.org>
* e-table-header-item.c (is_pointer_on_division): Add resizing
capabilities.
* e-table-sorted.c: Finish implementation.
1999-11-13 Miguel de Icaza <miguel@gnu.org>
* e-table-sorted.c: Implement e-table-sorted object.
1999-11-12 Miguel de Icaza <miguel@gnu.org>
* e-table-header-item.c: Make the thing configurable.
* e-table-header-item.h: Add font field, location, height.
svn path=/trunk/; revision=1388
Diffstat (limited to 'widgets/e-table/table-test.c')
-rw-r--r-- | widgets/e-table/table-test.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/widgets/e-table/table-test.c b/widgets/e-table/table-test.c index 27b1df7201..d67a211094 100644 --- a/widgets/e-table/table-test.c +++ b/widgets/e-table/table-test.c @@ -166,6 +166,12 @@ is_cell_editable (ETableModel *etc, int col, int row, void *data) return TRUE; } +static void +set_canvas_size (GnomeCanvas *canvas, GtkAllocation *alloc) +{ + gnome_canvas_set_scroll_region (canvas, 0, 0, alloc->width, alloc->height); +} + int main (int argc, char *argv []) { @@ -175,6 +181,7 @@ main (int argc, char *argv []) int i; gnome_init ("TableTest", "TableTest", argc, argv); + e_cursors_init (); load_data (); @@ -191,7 +198,7 @@ main (int argc, char *argv []) e_table_header = e_table_header_new (); for (i = 0; i < cols; i++){ ETableCol *ecol = e_table_col_new ( - column_labels [i], 20, 20, e_table_render_string, + column_labels [i], 80, 20, e_table_render_string, NULL, g_str_equal, TRUE); e_table_header_add_column (e_table_header, ecol, i); @@ -203,14 +210,27 @@ main (int argc, char *argv []) window = gtk_window_new (GTK_WINDOW_TOPLEVEL); canvas = gnome_canvas_new (); + gtk_signal_connect (GTK_OBJECT (canvas), "size_allocate", + GTK_SIGNAL_FUNC (set_canvas_size), NULL); + gtk_container_add (GTK_CONTAINER (window), canvas); gtk_widget_show_all (window); - gnome_canvas_item_new ( gnome_canvas_root (GNOME_CANVAS (canvas)), e_table_header_item_get_type (), "ETableHeader", e_table_header, NULL); + gnome_canvas_item_new ( + gnome_canvas_root (GNOME_CANVAS (canvas)), + gnome_canvas_rect_get_type (), + "x1", 0.0, + "y1", 0.0, + "x2", 10.0, + "y2", 10.0, + "fill_color", "red", + NULL); gtk_main (); + + e_cursors_shutdown (); return 0; } |