1 /*************************************************
3 *************************************************/
5 /* Copyright (c) University of Cambridge 1995 - 2012 */
6 /* See the file NOTICE for conditions of use and distribution. */
7 /* SPDX-License-Identifier: GPL-2.0-or-later */
13 /* This module contains functions for displaying text in a
14 text widget. It is not used for the log widget, because that
15 is dynamically updated and has special scrolling requirements. */
18 /* Count of characters displayed */
20 static int text_count = 0;
23 /*************************************************
25 *************************************************/
27 void text_empty(Widget w)
34 XawTextReplace(w, 0, text_count, &b);
36 XawTextSetInsertionPoint(w, text_count);
41 /*************************************************
43 *************************************************/
45 void text_show(Widget w, uschar *s)
51 b.length = Ustrlen(s);
52 XawTextReplace(w, text_count, text_count, &b);
53 text_count += b.length;
54 XawTextSetInsertionPoint(w, text_count);
58 /*************************************************
59 * Display text from format *
60 *************************************************/
62 void text_showf(Widget w, char *s, ...) PRINTF_FUNCTION(2,3);
64 void text_showf(Widget w, char *s, ...)
69 vsprintf(CS buffer, s, ap);
74 /* End of em_text.c */