aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-24 10:23:47 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-24 10:23:47 +0800
commite37b58efec96ce102e8c354a979a2b37d28249c7 (patch)
tree470857cfbff745b78cfec681670359990b1a9581 /widgets/table/e-tree.c
parent44c7d231440ad4f4ef59bfbf175be6cf35271e86 (diff)
downloadgsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.tar
gsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.tar.gz
gsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.tar.bz2
gsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.tar.lz
gsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.tar.xz
gsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.tar.zst
gsoc2013-evolution-e37b58efec96ce102e8c354a979a2b37d28249c7.zip
Documented this function properly.
2001-04-23 Christopher James Lahey <clahey@ximian.com> * e-table.c (e_table_get_cell_geometry): Documented this function properly. * e-tree.c, e-tree.h (e_tree_get_cell_geometry): Added this function. svn path=/trunk/; revision=9533
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r--widgets/table/e-tree.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index dc76561848..cd6e90e4f6 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1781,6 +1781,38 @@ e_tree_get_cell_at (ETree *tree,
e_table_item_compute_location(E_TABLE_ITEM(tree->priv->item), &x, &y, row_return, col_return);
}
+/**
+ * e_tree_get_cell_geometry:
+ * @tree: The tree.
+ * @row: The row to get the geometry of.
+ * @col: The col to get the geometry of.
+ * @x_return: Returns the x coordinate of the upper right hand corner of the cell with respect to the widget.
+ * @y_return: Returns the y coordinate of the upper right hand corner of the cell with respect to the widget.
+ * @width_return: Returns the width of the cell.
+ * @height_return: Returns the height of the cell.
+ *
+ * Computes the data about this cell.
+ **/
+void
+e_tree_get_cell_geometry (ETree *tree,
+ int row, int col,
+ int *x_return, int *y_return,
+ int *width_return, int *height_return)
+{
+ g_return_if_fail (tree != NULL);
+ g_return_if_fail (E_IS_TREE (tree));
+
+ /* FIXME it would be nice if it could handle a NULL row_return or
+ * col_return gracefully. */
+
+ e_table_item_get_cell_geometry(E_TABLE_ITEM(tree->priv->item), &row, &col, x_return, y_return, width_return, height_return);
+
+ if (x_return)
+ (*x_return) -= GTK_LAYOUT(tree->priv->table_canvas)->hadjustment->value;
+ if (y_return)
+ (*y_return) -= GTK_LAYOUT(tree->priv->table_canvas)->vadjustment->value;
+}
+
static void
et_drag_begin (GtkWidget *widget,
GdkDragContext *context,