diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-04-24 09:30:48 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-04-24 09:30:48 +0800 |
commit | 44c7d231440ad4f4ef59bfbf175be6cf35271e86 (patch) | |
tree | 9929929ac2369484283e05cac27bbcfacdfb4f57 /widgets/table/e-table-group-container.c | |
parent | fb53364c9c0114daa0f961965b38652016c900e5 (diff) | |
download | gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.tar gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.tar.gz gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.tar.bz2 gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.tar.lz gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.tar.xz gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.tar.zst gsoc2013-evolution-44c7d231440ad4f4ef59bfbf175be6cf35271e86.zip |
Added get_cell_geometry method.
2001-04-23 Christopher James Lahey <clahey@ximian.com>
* e-table-group-container.c, e-table-group-leaf.c,
e-table-group.c, e-table-group-.h: Added get_cell_geometry method.
* e-table-item.c, e-table-item.h: Added
e_table_item_get_cell_geometry.
* e-table.c, e-table.h: Added e_table_get_cell_geometry.
svn path=/trunk/; revision=9532
Diffstat (limited to 'widgets/table/e-table-group-container.c')
-rw-r--r-- | widgets/table/e-table-group-container.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index abb2690b61..5812910643 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -665,6 +665,34 @@ etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col) } } +static void +etgc_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height) +{ + ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); + + int ypos; + + ypos = 0; + + if (etgc->children) { + GList *list; + for (list = etgc->children; list; list = list->next) { + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroup *child = child_node->child; + int thisy; + + e_table_group_get_cell_geometry (child, row, col, x, &thisy, width, height); + ypos += thisy; + if ((*row == -1) || (*col == -1)) { + ypos += TITLE_HEIGHT; + *x += GROUP_INDENT; + *y = ypos; + return; + } + } + } +} + static void etgc_thaw (ETableGroup *etg) { e_canvas_item_request_reflow (GNOME_CANVAS_ITEM(etg)); @@ -817,6 +845,7 @@ etgc_class_init (GtkObjectClass *object_class) e_group_class->get_focus_column = etgc_get_focus_column; e_group_class->get_printable = etgc_get_printable; e_group_class->compute_location = etgc_compute_location; + e_group_class->get_cell_geometry = etgc_get_cell_geometry; gtk_object_add_arg_type ("ETableGroupContainer::horizontal_draw_grid", GTK_TYPE_BOOL, GTK_ARG_WRITABLE, ARG_TABLE_HORIZONTAL_DRAW_GRID); |