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