1 /* $Cambridge: exim/src/exim_monitor/em_text.c,v 1.2 2005/01/04 10:00:42 ph10 Exp $ */
3 /*************************************************
5 *************************************************/
7 /* Copyright (c) University of Cambridge 1995 - 2005 */
8 /* See the file NOTICE for conditions of use and distribution. */
14 /* This module contains functions for displaying text in a
15 text widget. It is not used for the log widget, because that
16 is dynamically updated and has special scrolling requirements. */
19 /* Count of characters displayed */
21 static int text_count = 0;
24 /*************************************************
26 *************************************************/
28 void text_empty(Widget w)
35 XawTextReplace(w, 0, text_count, &b);
37 XawTextSetInsertionPoint(w, text_count);
42 /*************************************************
44 *************************************************/
46 void text_show(Widget w, uschar *s)
52 b.length = Ustrlen(s);
53 XawTextReplace(w, text_count, text_count, &b);
54 text_count += b.length;
55 XawTextSetInsertionPoint(w, text_count);
59 /*************************************************
60 * Display text from format *
61 *************************************************/
63 void text_showf(Widget w, char *s, ...)
68 vsprintf(CS buffer, s, ap);
73 /* End of em_text.c */