aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-24 09:30:48 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-24 09:30:48 +0800
commit44c7d231440ad4f4ef59bfbf175be6cf35271e86 (patch)
tree9929929ac2369484283e05cac27bbcfacdfb4f57 /widgets/table/e-table.c
parentfb53364c9c0114daa0f961965b38652016c900e5 (diff)
downloadgsoc2013-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.c')
-rw-r--r--widgets/table/e-table.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 059d339444..cb725c9a1f 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1522,6 +1522,37 @@ e_table_get_cell_at (ETable *table,
e_table_group_compute_location(table->group, &x, &y, row_return, col_return);
}
+/**
+ * e_table_get_cell_at:
+ * @table: An ETable widget
+ * @x: X coordinate for the pixel
+ * @y: Y coordinate for the pixel
+ * @row_return: Pointer to return the row value
+ * @col_return: Pointer to return the column value
+ *
+ * Return the row and column for the cell in which the pixel at (@x, @y) is
+ * contained.
+ **/
+void
+e_table_get_cell_geometry (ETable *table,
+ int row, int col,
+ int *x_return, int *y_return,
+ int *width_return, int *height_return)
+{
+ g_return_if_fail (table != NULL);
+ g_return_if_fail (E_IS_TABLE (table));
+
+ /* FIXME it would be nice if it could handle a NULL row_return or
+ * col_return gracefully. */
+
+ e_table_group_get_cell_geometry(table->group, &row, &col, x_return, y_return, width_return, height_return);
+
+ if (x_return)
+ (*x_return) -= GTK_LAYOUT(table->table_canvas)->hadjustment->value;
+ if (y_return)
+ (*y_return) -= GTK_LAYOUT(table->table_canvas)->vadjustment->value;
+}
+
struct _ETableDragSourceSite
{
GdkModifierType start_button_mask;