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