From 6b9eb3dbe7fb37acb324d8fe6c03daf3382d8317 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 13 Jun 2000 14:39:13 +0000 Subject: Clip the contained text. 2000-06-13 Christopher James Lahey * e-cell-text.c: Clip the contained text. * e-table-group-container.c: Did a first pass at grouped printing. This works, but there's no fancy boxes or headers around the groups. * e-table-item.c: Added will_fit function and added quantize function to _height. svn path=/trunk/; revision=3552 --- widgets/e-table/e-cell-text.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'widgets/e-table/e-cell-text.c') diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c index 9495ce86a9..7fe9cc1815 100644 --- a/widgets/e-table/e-cell-text.c +++ b/widgets/e-table/e-cell-text.c @@ -1167,9 +1167,23 @@ ect_print (ECellView *ecell_view, GnomePrintContext *context, } 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_gsave(context); + if (gnome_print_moveto(context, 2, 2) == -1) + /* FIXME */; + if (gnome_print_lineto(context, width - 2, 2) == -1) + /* FIXME */; + if (gnome_print_lineto(context, width - 2, height - 2) == -1) + /* FIXME */; + if (gnome_print_lineto(context, 2, height - 2) == -1) + /* FIXME */; + if (gnome_print_lineto(context, 2, 2) == -1) + /* FIXME */; + if (gnome_print_clip(context) == -1) + /* FIXME */; + gnome_print_moveto(context, 2, (height - gnome_font_get_ascender(font) + gnome_font_get_descender(font)) / 2); gnome_print_setfont(context, font); gnome_print_show(context, string); + gnome_print_grestore(context); if (ect->filter) { g_free(string); } @@ -1180,7 +1194,7 @@ ect_print_height (ECellView *ecell_view, GnomePrintContext *context, int model_col, int view_col, int row, double width) { - return 12; + return 16; } /* -- cgit v1.2.3