aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-01-22 01:55:16 +0800
committerChris Lahey <clahey@src.gnome.org>2002-01-22 01:55:16 +0800
commita10b9d3aa15f17e0693345979a2d219220761eb3 (patch)
tree586679c4b2fa1ac1523f9f8f48e27d06c062a495 /widgets/table/e-cell.c
parent88646d5173fa9a3a3db43c328a76f10d3787b26c (diff)
downloadgsoc2013-evolution-a10b9d3aa15f17e0693345979a2d219220761eb3.tar.gz
gsoc2013-evolution-a10b9d3aa15f17e0693345979a2d219220761eb3.tar.zst
gsoc2013-evolution-a10b9d3aa15f17e0693345979a2d219220761eb3.zip
Implement max_width_by_row.
2002-01-21 Christopher James Lahey <clahey@ximian.com> * e-cell-text.c: Implement max_width_by_row. * e-cell-tree.c: Use max_width_by_row in max_width function. * e-cell.c, e-cell.h (e_cell_max_width_by_row): Added this new method to ECell. svn path=/trunk/; revision=15418
Diffstat (limited to 'widgets/table/e-cell.c')
-rw-r--r--widgets/table/e-cell.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index 3045081cc4..beb86489f0 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -150,6 +150,7 @@ e_cell_class_init (GtkObjectClass *object_class)
ecc->print = NULL;
ecc->print_height = NULL;
ecc->max_width = NULL;
+ ecc->max_width_by_row = NULL;
ecc->show_tooltip = ec_show_tooltip;
}
@@ -434,6 +435,42 @@ e_cell_max_width (ECellView *ecell_view, int model_col, int view_col)
return ECVIEW_EC_CLASS(ecell_view)->max_width
(ecell_view, model_col, view_col);
}
+
+/**
+ * e_cell_max_width_by_row:
+ * @ecell_view: the ECellView that we are curious about
+ * @model_col: the column in the model
+ * @view_col: the column in the view.
+ * @row: The row in the model.
+ *
+ * Returns: the maximum width for the ECellview at @model_col which
+ * is being rendered as @view_col for the data in @row.
+ */
+int
+e_cell_max_width_by_row (ECellView *ecell_view, int model_col, int view_col, int row)
+{
+ if (ECVIEW_EC_CLASS(ecell_view)->max_width_by_row)
+ return ECVIEW_EC_CLASS(ecell_view)->max_width_by_row
+ (ecell_view, model_col, view_col, row);
+ else
+ return e_cell_max_width (ecell_view, model_col, view_col);
+}
+
+/**
+ * e_cell_max_width_by_row_implemented:
+ * @ecell_view: the ECellView that we are curious about
+ * @model_col: the column in the model
+ * @view_col: the column in the view.
+ * @row: The row in the model.
+ *
+ * Returns: the maximum width for the ECellview at @model_col which
+ * is being rendered as @view_col for the data in @row.
+ */
+gboolean
+e_cell_max_width_by_row_implemented (ECellView *ecell_view)
+{
+ return (ECVIEW_EC_CLASS(ecell_view)->max_width_by_row != NULL);
+}
void
e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col,