1*61258Sbostic .\" Copyright (c) 1980, 1993 2*61258Sbostic .\" The Regents of the University of California. All rights reserved. 327289Smckusick .\" 448164Sbostic .\" %sccs.include.redist.roff% 527289Smckusick .\" 6*61258Sbostic .\" @(#)doc.I 8.1 (Berkeley) 06/04/93 737201Sbostic .\" 827289Smckusick .Ds 927289Smckusick .Fd addch ch \*m 1027289Smckusick char ch; 1127289Smckusick .Fd waddch win\*,ch 1227289Smckusick WINDOW *win; 1327289Smckusick char ch; 1427289Smckusick .De 1527289Smckusick Add the character 1627289Smckusick .Vn ch 1727289Smckusick on the window 1827289Smckusick at the current \*y. 1927289Smckusick If the character is a newline 2027289Smckusick (\'\en\') 2127289Smckusick the line will be cleared to the end, 2227289Smckusick and the current \*y will be changed to the 2327289Smckusick beginning off the next line 2427289Smckusick if newline mapping is on, 2527289Smckusick or to the next line at the same x co-ordinate 2627289Smckusick if it is off. 2727289Smckusick A return 2827289Smckusick (\'\er\') 2927289Smckusick will move to the beginning of the line on the window. 3027289Smckusick Tabs 3127289Smckusick (\'\et\') 3227289Smckusick will be expanded into spaces 3327289Smckusick in the normal tabstop positions of 3427289Smckusick every eight characters. 3527289Smckusick \*(Es 3627289Smckusick .Ds 3727289Smckusick .Fd addstr str \*m 3827289Smckusick char *str; 3927289Smckusick .Fd waddstr win\*,str 4027289Smckusick WINDOW *win; 4127289Smckusick char *str; 4227289Smckusick .De 4327289Smckusick Add the string pointed to by 4427289Smckusick .Vn str 4527289Smckusick on the window at the current \*y. 4627289Smckusick \*(Es 4727289Smckusick In this case, it will put on as much as it can. 4827289Smckusick .Ds 4927289Smckusick .Fd box win\*,vert\*,hor 5027289Smckusick WINDOW *win; 5127289Smckusick char vert\*,hor; 5227289Smckusick .De 5327289Smckusick .Pp 5427289Smckusick Draws a box around the window using 5527289Smckusick .Vn vert 5627289Smckusick as the character for drawing the vertical sides, and 5727289Smckusick .Vn hor 5827289Smckusick for drawing the horizontal lines. 5927289Smckusick If scrolling is not allowed, 6027289Smckusick and the window encompasses the lower right-hand corner of the terminal, 6127289Smckusick the corners are left blank to avoid a scroll. 6227289Smckusick .Ds 6327289Smckusick .Fd clear "" \*m 6427289Smckusick .Fd wclear win 6527289Smckusick WINDOW *win; 6627289Smckusick .De 6727289Smckusick Resets the entire window to blanks. 6827289Smckusick If 6927289Smckusick .Vn win 7027289Smckusick is a screen, 7127289Smckusick this sets the clear flag, 7227289Smckusick which will cause a clear-screen sequence to be sent 7327289Smckusick on the next 7427289Smckusick .Fn refresh 7527289Smckusick call. 7627289Smckusick This also moves the current \*y 7727289Smckusick to (0\*,0). 7827289Smckusick .Ds 7927289Smckusick .Fd clearok scr\*,boolf \*m 8027289Smckusick WINDOW *scr; 8127289Smckusick bool boolf; 8227289Smckusick .De 8327289Smckusick Sets the clear flag for the screen 8427289Smckusick .Vn scr . 8527289Smckusick If 8627289Smckusick .Vn boolf 8727289Smckusick is TRUE, 8827289Smckusick this will force a clear-screen to be printed on the next 8927289Smckusick .Fn refresh , 9027289Smckusick or stop it from doing so if 9127289Smckusick .Vn boolf 9227289Smckusick is FALSE. 9327289Smckusick This only works on screens, 9427289Smckusick and, 9527289Smckusick unlike 9627289Smckusick .Fn clear , 9727289Smckusick does not alter the contents of the screen. 9827289Smckusick If 9927289Smckusick .Vn scr 10027289Smckusick is 10127289Smckusick .Vn curscr , 10227289Smckusick the next 10327289Smckusick .Fn refresh 10427289Smckusick call will cause a clear-screen, 10527289Smckusick even if the window passed to 10627289Smckusick .Fn refresh 10727289Smckusick is not a screen. 10827289Smckusick .Ds 10927289Smckusick .Fd clrtobot "" \*m 11027289Smckusick .Fd wclrtobot win 11127289Smckusick WINDOW *win; 11227289Smckusick .De 11327289Smckusick Wipes the window clear from the current \*y to the bottom. 11427289Smckusick This does not force a clear-screen sequence on the next refresh 11527289Smckusick under any circumstances. 11627289Smckusick \*(Nm 11727289Smckusick .Ds 11827289Smckusick .Fd clrtoeol "" \*m 11927289Smckusick .Fd wclrtoeol win 12027289Smckusick WINDOW *win; 12127289Smckusick .De 12227289Smckusick Wipes the window clear from the current \*y to the end of the line. 12327289Smckusick \*(Nm 12427289Smckusick .Ds 12527289Smckusick .Fd delch 12627289Smckusick .Fd wdelch win 12727289Smckusick WINDOW *win; 12827289Smckusick .De 12927289Smckusick Delete the character at the current \*y. 13027289Smckusick Each character after it on the line shifts to the left, 13127289Smckusick and the last character becomes blank. 13227289Smckusick .Ds 13327289Smckusick .Fd deleteln 13427289Smckusick .Fd wdeleteln win 13527289Smckusick WINDOW *win; 13627289Smckusick .De 13727289Smckusick Delete the current line. 13827289Smckusick Every line below the current one will move up, 13927289Smckusick and the bottom line will become blank. 14027289Smckusick The current \*y will remain unchanged. 14127289Smckusick .Ds 14227289Smckusick .Fd erase "" \*m 14327289Smckusick .Fd werase win 14427289Smckusick WINDOW *win; 14527289Smckusick .De 14627289Smckusick Erases the window to blanks without setting the clear flag. 14727289Smckusick This is analagous to 14827289Smckusick .Fn clear , 14927289Smckusick except that it never causes a clear-screen sequence to be generated 15027289Smckusick on a 15127289Smckusick .Fn refresh . 15227289Smckusick \*(Nm 15327289Smckusick .Ds 15427291Smckusick .Fd flushok win\*,boolf \*m 15527291Smckusick WINDOW *win; 15627291Smckusick bool boolf; 15727291Smckusick .De 15827291Smckusick Normally, 15927291Smckusick .Fn refresh 16027291Smckusick .Fn fflush 's 16127291Smckusick .Vn stdout 16227291Smckusick when it is finished. 16327291Smckusick .Fn flushok 16427291Smckusick allows you to control this. 16527291Smckusick if 16627291Smckusick .Vn boolf 16727291Smckusick is TRUE 16827291Smckusick (\c 16927291Smckusick .i i.e. , 17027291Smckusick non-zero) 17127291Smckusick it will do the 17227291Smckusick .Fn fflush ; 17327291Smckusick if it is FALSE. 17427291Smckusick it will not. 17527291Smckusick .Ds 17627291Smckusick .Fd idlok win\*,boolf 17727291Smckusick WINDOW *win; 17827291Smckusick bool boolf; 17927291Smckusick .De 18027291Smckusick Reserved for future use. 18127291Smckusick This will eventually signal to 18227291Smckusick .Fn refresh 18327291Smckusick that it is all right to use the insert and delete line sequences 18427291Smckusick when updating the window. 18527291Smckusick .Ds 18627289Smckusick .Fd insch c 18727289Smckusick char c; 18827289Smckusick .Fd winsch win\*,c 18927289Smckusick WINDOW *win; 19027289Smckusick char c; 19127289Smckusick .De 19227289Smckusick Insert 19327289Smckusick .Vn c 19427289Smckusick at the current \*y 19527289Smckusick Each character after it shifts to the right, 19627289Smckusick and the last character disappears. 19727289Smckusick \*(Es 19827289Smckusick .Ds 19927289Smckusick .Fd insertln 20027289Smckusick .Fd winsertln win 20127289Smckusick WINDOW *win; 20227289Smckusick .De 20327289Smckusick Insert a line above the current one. 20427289Smckusick Every line below the current line 20527289Smckusick will be shifted down, 20627289Smckusick and the bottom line will disappear. 20727289Smckusick The current line will become blank, 20827289Smckusick and the current \*y will remain unchanged. 20927289Smckusick .Ds 21027289Smckusick .Fd move y\*,x \*m 21127289Smckusick int y\*,x; 21227289Smckusick .Fd wmove win\*,y\*,x 21327289Smckusick WINDOW *win; 21427289Smckusick int y\*,x; 21527289Smckusick .De 21627289Smckusick Change the current \*y of the window to 21727289Smckusick .Vn y\*,x ). ( 21827289Smckusick \*(Es 21927289Smckusick .Ds 22027289Smckusick .Fd overlay win1\*,win2 22127289Smckusick WINDOW *win1\*,*win2; 22227289Smckusick .De 22327289Smckusick Overlay 22427289Smckusick .Vn win1 22527289Smckusick on 22627289Smckusick .Vn win2 . 22727289Smckusick The contents of 22827289Smckusick .Vn win1 , 22927289Smckusick insofar as they fit, 23027289Smckusick are placed on 23127289Smckusick .Vn win2 23227289Smckusick at their starting \*y. 23327289Smckusick This is done non-destructively, 23427289Smckusick i.e., blanks on 23527289Smckusick .Vn win1 23627289Smckusick leave the contents of the space on 23727289Smckusick .Vn win2 23827289Smckusick untouched. 23927289Smckusick .Ds 24027289Smckusick .Fd overwrite win1\*,win2 24127289Smckusick WINDOW *win1\*,*win2; 24227289Smckusick .De 24327289Smckusick Overwrite 24427289Smckusick .Vn win1 24527289Smckusick on 24627289Smckusick .Vn win2 . 24727289Smckusick The contents of 24827289Smckusick .Vn win1 , 24927289Smckusick insofar as they fit, 25027289Smckusick are placed on 25127289Smckusick .Vn win2 25227289Smckusick at their starting \*y. 25327289Smckusick This is done destructively, 25427291Smckusick .i i.e. , 25527291Smckusick blanks on 25627289Smckusick .Vn win1 25727289Smckusick become blank on 25827289Smckusick .Vn win2 . 25927289Smckusick .Ds 26027289Smckusick .Fd printw fmt\*,arg1\*,arg2\*,... 26127289Smckusick char *fmt; 26227289Smckusick .Fd wprintw win\*,fmt\*,arg1\*,arg2\*,... 26327289Smckusick WINDOW *win; 26427289Smckusick char *fmt; 26527289Smckusick .De 26627289Smckusick Performs a 26727289Smckusick .Fn printf 26827289Smckusick on the window starting at the current \*y. 26927289Smckusick It uses 27027289Smckusick .Fn addstr 27127289Smckusick to add the string on the window. 27227289Smckusick It is often advisable to use the field width options of 27327289Smckusick .Fn printf 27427289Smckusick to avoid leaving things on the window from earlier calls. 27527289Smckusick \*(Es 27627289Smckusick .Ds 27727289Smckusick .Fd refresh "" \*m 27827289Smckusick .Fd wrefresh win 27927289Smckusick WINDOW *win; 28027289Smckusick .De 28127289Smckusick Synchronize the terminal screen with the desired window. 28227289Smckusick If the window is not a screen, 28327289Smckusick only that part covered by it is updated. 28427289Smckusick \*(Es 28527289Smckusick In this case, it will update whatever it can 28627289Smckusick without causing the scroll. 28727291Smckusick .sp 28827291Smckusick As a special case, 28927291Smckusick if 29027291Smckusick .Fn wrefresh 29127291Smckusick is called with the window 29227291Smckusick .Vn curscr 29327291Smckusick the screen is cleared 29427291Smckusick and repainted as it is currently. 29527291Smckusick This is very useful for allowing the redrawing of the screen 29627291Smckusick when the user has garbage dumped on his terminal. 29727289Smckusick .Ds 29827289Smckusick .Fd standout "" \*m 29927289Smckusick .Fd wstandout win 30027289Smckusick WINDOW *win; 30127289Smckusick .Fd standend "" \*m 30227289Smckusick .Fd wstandend win 30327289Smckusick WINDOW *win; 30427289Smckusick .De 30527289Smckusick Start and stop putting characters onto 30627289Smckusick .i win 30727289Smckusick in standout mode. 30827289Smckusick .Fn standout 30927289Smckusick causes any characters added to the window 31027289Smckusick to be put in standout mode on the terminal 31127289Smckusick (if it has that capability). 31227289Smckusick .Fn standend 31327289Smckusick stops this. 31427289Smckusick The sequences 31527289Smckusick .Vn SO 31627289Smckusick and 31727289Smckusick .Vn SE 31827289Smckusick (or 31927289Smckusick .Vn US 32027289Smckusick and 32127289Smckusick .Vn UE 32227289Smckusick if they are not defined) 32327289Smckusick are used (see Appendix A). 324