aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-cell-text.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-11 05:16:45 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-11 05:16:45 +0800
commitc57de49bb5d65df1fa0d63285b296397be3af6f8 (patch)
treeb3812be586e590ebe6de41ac2739bde89c1d29b2 /widgets/e-table/e-cell-text.c
parent5dc1015e9666ef59682c46e306ed3a4add0a9356 (diff)
downloadgsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.tar
gsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.tar.gz
gsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.tar.bz2
gsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.tar.lz
gsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.tar.xz
gsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.tar.zst
gsoc2013-evolution-c57de49bb5d65df1fa0d63285b296397be3af6f8.zip
Added $(GNOME_PRINT_LIBS) to all of the LDADDs.
2000-06-10 Christopher James Lahey <clahey@helixcode.com> * Makefile.am: Added $(GNOME_PRINT_LIBS) to all of the LDADDs. * e-cell-text.c: Added printing of text cells. * e-cell.c, e-cell.h: Added print and print_height methods. * e-table-field-chooser.glade: Added a minimum size. * e-table-group-container.c: Fixed a rectangle sizing bug. * e-table-group-leaf.c: Implemented get_printable. * e-table-group.c, e-table-group.h: Added a get_printable method to return an EPrintable. * e-table-item.c, e-table-item.h: Added a get_printable function to return an EPrintable. * e-table.c, e-table.h: Added a get_printable function to return an EPrintable. svn path=/trunk/; revision=3511
Diffstat (limited to 'widgets/e-table/e-cell-text.c')
-rw-r--r--widgets/e-table/e-cell-text.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c
index a3a7acf35b..9495ce86a9 100644
--- a/widgets/e-table/e-cell-text.c
+++ b/widgets/e-table/e-cell-text.c
@@ -1154,6 +1154,35 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi
}
}
+static void
+ect_print (ECellView *ecell_view, GnomePrintContext *context,
+ int model_col, int view_col, int row,
+ double width, double height)
+{
+ GnomeFont *font = gnome_font_new("Helvetica", 12);
+ char *string;
+ ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
+ if (ect->filter) {
+ string = (*ect->filter)(e_table_model_value_at (ecell_view->e_table_model, model_col, row));
+ } else {
+ string = e_table_model_value_at (ecell_view->e_table_model, model_col, row);
+ }
+ gnome_print_moveto(context, 0, (height - gnome_font_get_ascender(font) + gnome_font_get_descender(font)) / 2);
+ gnome_print_setfont(context, font);
+ gnome_print_show(context, string);
+ if (ect->filter) {
+ g_free(string);
+ }
+}
+
+static gdouble
+ect_print_height (ECellView *ecell_view, GnomePrintContext *context,
+ int model_col, int view_col, int row,
+ double width)
+{
+ return 12;
+}
+
/*
* GtkObject::destroy method
*/
@@ -1233,6 +1262,8 @@ e_cell_text_class_init (GtkObjectClass *object_class)
ecc->height = ect_height;
ecc->enter_edit = ect_enter_edit;
ecc->leave_edit = ect_leave_edit;
+ ecc->print = ect_print;
+ ecc->print_height = ect_print_height;
object_class->get_arg = ect_get_arg;
object_class->set_arg = ect_set_arg;