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