1 .\" Copyright (c) 1980 Regents of the University of California. 2 .\" All rights reserved. The Berkeley software License Agreement 3 .\" specifies the terms and conditions for redistribution. 4 .\" 5 .\" @(#)doc.I 6.1 (Berkeley) 04/23/86 6 .\" 7 .Ds 8 .Fd addch ch \*m 9 char ch; 10 .Fd waddch win\*,ch 11 WINDOW *win; 12 char ch; 13 .De 14 Add the character 15 .Vn ch 16 on the window 17 at the current \*y. 18 If the character is a newline 19 (\'\en\') 20 the line will be cleared to the end, 21 and the current \*y will be changed to the 22 beginning off the next line 23 if newline mapping is on, 24 or to the next line at the same x co-ordinate 25 if it is off. 26 A return 27 (\'\er\') 28 will move to the beginning of the line on the window. 29 Tabs 30 (\'\et\') 31 will be expanded into spaces 32 in the normal tabstop positions of 33 every eight characters. 34 \*(Es 35 .Ds 36 .Fd addstr str \*m 37 char *str; 38 .Fd waddstr win\*,str 39 WINDOW *win; 40 char *str; 41 .De 42 Add the string pointed to by 43 .Vn str 44 on the window at the current \*y. 45 \*(Es 46 In this case, it will put on as much as it can. 47 .Ds 48 .Fd box win\*,vert\*,hor 49 WINDOW *win; 50 char vert\*,hor; 51 .De 52 .Pp 53 Draws a box around the window using 54 .Vn vert 55 as the character for drawing the vertical sides, and 56 .Vn hor 57 for drawing the horizontal lines. 58 If scrolling is not allowed, 59 and the window encompasses the lower right-hand corner of the terminal, 60 the corners are left blank to avoid a scroll. 61 .Ds 62 .Fd clear "" \*m 63 .Fd wclear win 64 WINDOW *win; 65 .De 66 Resets the entire window to blanks. 67 If 68 .Vn win 69 is a screen, 70 this sets the clear flag, 71 which will cause a clear-screen sequence to be sent 72 on the next 73 .Fn refresh 74 call. 75 This also moves the current \*y 76 to (0\*,0). 77 .Ds 78 .Fd clearok scr\*,boolf \*m 79 WINDOW *scr; 80 bool boolf; 81 .De 82 Sets the clear flag for the screen 83 .Vn scr . 84 If 85 .Vn boolf 86 is TRUE, 87 this will force a clear-screen to be printed on the next 88 .Fn refresh , 89 or stop it from doing so if 90 .Vn boolf 91 is FALSE. 92 This only works on screens, 93 and, 94 unlike 95 .Fn clear , 96 does not alter the contents of the screen. 97 If 98 .Vn scr 99 is 100 .Vn curscr , 101 the next 102 .Fn refresh 103 call will cause a clear-screen, 104 even if the window passed to 105 .Fn refresh 106 is not a screen. 107 .Ds 108 .Fd clrtobot "" \*m 109 .Fd wclrtobot win 110 WINDOW *win; 111 .De 112 Wipes the window clear from the current \*y to the bottom. 113 This does not force a clear-screen sequence on the next refresh 114 under any circumstances. 115 \*(Nm 116 .Ds 117 .Fd clrtoeol "" \*m 118 .Fd wclrtoeol win 119 WINDOW *win; 120 .De 121 Wipes the window clear from the current \*y to the end of the line. 122 \*(Nm 123 .Ds 124 .Fd delch 125 .Fd wdelch win 126 WINDOW *win; 127 .De 128 Delete the character at the current \*y. 129 Each character after it on the line shifts to the left, 130 and the last character becomes blank. 131 .Ds 132 .Fd deleteln 133 .Fd wdeleteln win 134 WINDOW *win; 135 .De 136 Delete the current line. 137 Every line below the current one will move up, 138 and the bottom line will become blank. 139 The current \*y will remain unchanged. 140 .Ds 141 .Fd erase "" \*m 142 .Fd werase win 143 WINDOW *win; 144 .De 145 Erases the window to blanks without setting the clear flag. 146 This is analagous to 147 .Fn clear , 148 except that it never causes a clear-screen sequence to be generated 149 on a 150 .Fn refresh . 151 \*(Nm 152 .Ds 153 .Fd flushok win\*,boolf \*m 154 WINDOW *win; 155 bool boolf; 156 .De 157 Normally, 158 .Fn refresh 159 .Fn fflush 's 160 .Vn stdout 161 when it is finished. 162 .Fn flushok 163 allows you to control this. 164 if 165 .Vn boolf 166 is TRUE 167 (\c 168 .i i.e. , 169 non-zero) 170 it will do the 171 .Fn fflush ; 172 if it is FALSE. 173 it will not. 174 .Ds 175 .Fd idlok win\*,boolf 176 WINDOW *win; 177 bool boolf; 178 .De 179 Reserved for future use. 180 This will eventually signal to 181 .Fn refresh 182 that it is all right to use the insert and delete line sequences 183 when updating the window. 184 .Ds 185 .Fd insch c 186 char c; 187 .Fd winsch win\*,c 188 WINDOW *win; 189 char c; 190 .De 191 Insert 192 .Vn c 193 at the current \*y 194 Each character after it shifts to the right, 195 and the last character disappears. 196 \*(Es 197 .Ds 198 .Fd insertln 199 .Fd winsertln win 200 WINDOW *win; 201 .De 202 Insert a line above the current one. 203 Every line below the current line 204 will be shifted down, 205 and the bottom line will disappear. 206 The current line will become blank, 207 and the current \*y will remain unchanged. 208 .Ds 209 .Fd move y\*,x \*m 210 int y\*,x; 211 .Fd wmove win\*,y\*,x 212 WINDOW *win; 213 int y\*,x; 214 .De 215 Change the current \*y of the window to 216 .Vn y\*,x ). ( 217 \*(Es 218 .Ds 219 .Fd overlay win1\*,win2 220 WINDOW *win1\*,*win2; 221 .De 222 Overlay 223 .Vn win1 224 on 225 .Vn win2 . 226 The contents of 227 .Vn win1 , 228 insofar as they fit, 229 are placed on 230 .Vn win2 231 at their starting \*y. 232 This is done non-destructively, 233 i.e., blanks on 234 .Vn win1 235 leave the contents of the space on 236 .Vn win2 237 untouched. 238 .Ds 239 .Fd overwrite win1\*,win2 240 WINDOW *win1\*,*win2; 241 .De 242 Overwrite 243 .Vn win1 244 on 245 .Vn win2 . 246 The contents of 247 .Vn win1 , 248 insofar as they fit, 249 are placed on 250 .Vn win2 251 at their starting \*y. 252 This is done destructively, 253 .i i.e. , 254 blanks on 255 .Vn win1 256 become blank on 257 .Vn win2 . 258 .Ds 259 .Fd printw fmt\*,arg1\*,arg2\*,... 260 char *fmt; 261 .Fd wprintw win\*,fmt\*,arg1\*,arg2\*,... 262 WINDOW *win; 263 char *fmt; 264 .De 265 Performs a 266 .Fn printf 267 on the window starting at the current \*y. 268 It uses 269 .Fn addstr 270 to add the string on the window. 271 It is often advisable to use the field width options of 272 .Fn printf 273 to avoid leaving things on the window from earlier calls. 274 \*(Es 275 .Ds 276 .Fd refresh "" \*m 277 .Fd wrefresh win 278 WINDOW *win; 279 .De 280 Synchronize the terminal screen with the desired window. 281 If the window is not a screen, 282 only that part covered by it is updated. 283 \*(Es 284 In this case, it will update whatever it can 285 without causing the scroll. 286 .sp 287 As a special case, 288 if 289 .Fn wrefresh 290 is called with the window 291 .Vn curscr 292 the screen is cleared 293 and repainted as it is currently. 294 This is very useful for allowing the redrawing of the screen 295 when the user has garbage dumped on his terminal. 296 .Ds 297 .Fd standout "" \*m 298 .Fd wstandout win 299 WINDOW *win; 300 .Fd standend "" \*m 301 .Fd wstandend win 302 WINDOW *win; 303 .De 304 Start and stop putting characters onto 305 .i win 306 in standout mode. 307 .Fn standout 308 causes any characters added to the window 309 to be put in standout mode on the terminal 310 (if it has that capability). 311 .Fn standend 312 stops this. 313 The sequences 314 .Vn SO 315 and 316 .Vn SE 317 (or 318 .Vn US 319 and 320 .Vn UE 321 if they are not defined) 322 are used (see Appendix A). 323