1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
6 // Copyright (C) 1993-1996 by id Software, Inc.
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
19 //-----------------------------------------------------------------------------
24 // We are referring to patches.
28 // background and foreground screen numbers
29 // different from other modules.
34 #define HU_CHARERASE KEY_BACKSPACE
37 #define HU_MAXLINELENGTH 80
40 // Typedefs of widgets
44 // (parent of Scrolling Text and Input Text widgets)
47 // left-justified position of scrolling text window
52 int sc; // start character
53 char l[HU_MAXLINELENGTH+1]; // line of text
54 int len; // current line length
56 // whether this line needs to be udpated
63 // Scrolling Text window widget
64 // (child of Text Line widget)
67 hu_textline_t l[HU_MAXLINES]; // text lines to draw
68 int h; // height in lines
69 int cl; // current line number
71 // pointer to boolean stating whether to update window
73 boolean laston; // last value of *->on.
79 // Input Text Line widget
80 // (child of Text Line widget)
83 hu_textline_t l; // text line to input on
85 // left margin past which I am not to delete characters
88 // pointer to boolean stating whether to update window
90 boolean laston; // last value of *->on;
96 // Widget creation, access, and update routines
99 // initializes heads-up widget library
100 void HUlib_init(void);
106 // clear a line of text
107 void HUlib_clearTextLine(hu_textline_t *t);
109 void HUlib_initTextLine(hu_textline_t *t, int x, int y, patch_t **f, int sc);
112 boolean HUlib_addCharToTextLine(hu_textline_t *t, char ch);
115 boolean HUlib_delCharFromTextLine(hu_textline_t *t);
118 void HUlib_drawTextLine(hu_textline_t *l, boolean drawcursor);
121 void HUlib_eraseTextLine(hu_textline_t *l);
125 // Scrolling Text window widget routines
140 void HUlib_addLineToSText(hu_stext_t* s);
144 HUlib_addMessageToSText
150 void HUlib_drawSText(hu_stext_t* s);
152 // erases all stext lines
153 void HUlib_eraseSText(hu_stext_t* s);
155 // Input Text Line widget routines
165 // enforces left margin
166 void HUlib_delCharFromIText(hu_itext_t* it);
168 // enforces left margin
169 void HUlib_eraseLineFromIText(hu_itext_t* it);
171 // resets line and left margin
172 void HUlib_resetIText(hu_itext_t* it);
174 // left of left-margin
176 HUlib_addPrefixToIText
186 void HUlib_drawIText(hu_itext_t* it);
188 // erases all itext lines
189 void HUlib_eraseIText(hu_itext_t* it);
192 //-----------------------------------------------------------------------------
196 //-----------------------------------------------------------------------------