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