1 /*************************************************
3 *************************************************/
5 /* Copyright (c) University of Cambridge 1995 - 2012 */
6 /* See the file NOTICE for conditions of use and distribution. */
12 /* This module contains functions for displaying text in a
13 text widget. It is not used for the log widget, because that
14 is dynamically updated and has special scrolling requirements. */
17 /* Count of characters displayed */
19 static int text_count = 0;
22 /*************************************************
24 *************************************************/
26 void text_empty(Widget w)
33 XawTextReplace(w, 0, text_count, &b);
35 XawTextSetInsertionPoint(w, text_count);
40 /*************************************************
42 *************************************************/
44 void text_show(Widget w, uschar *s)
50 b.length = Ustrlen(s);
51 XawTextReplace(w, text_count, text_count, &b);
52 text_count += b.length;
53 XawTextSetInsertionPoint(w, text_count);
57 /*************************************************
58 * Display text from format *
59 *************************************************/
61 void text_showf(Widget w, char *s, ...) PRINTF_FUNCTION(2,3);
63 void text_showf(Widget w, char *s, ...)
68 vsprintf(CS buffer, s, ap);
73 /* End of em_text.c */