📄 doc.i
字号:
.\" Copyright (c) 1980, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)doc.I 8.1 (Berkeley) 6/4/93.\".Ds.Fd addch ch \*mchar ch;.Fd waddch win\*,chWINDOW *win;char ch;.DeAdd the character.Vn chon the windowat the current \*y.If the character is a newline(\'\en\')the line will be cleared to the end,and the current \*y will be changed to thebeginning off the next lineif newline mapping is on,or to the next line at the same x co-ordinateif it is off.A return(\'\er\')will move to the beginning of the line on the window.Tabs(\'\et\')will be expanded into spacesin the normal tabstop positions ofevery eight characters.\*(Es.Ds.Fd addstr str \*mchar *str;.Fd waddstr win\*,strWINDOW *win;char *str;.DeAdd the string pointed to by.Vn stron the window at the current \*y.\*(EsIn this case, it will put on as much as it can..Ds.Fd box win\*,vert\*,horWINDOW *win;char vert\*,hor;.De.PpDraws a box around the window using.Vn vertas the character for drawing the vertical sides, and.Vn horfor drawing the horizontal lines.If scrolling is not allowed,and the window encompasses the lower right-hand corner of the terminal,the corners are left blank to avoid a scroll..Ds.Fd clear "" \*m.Fd wclear winWINDOW *win;.DeResets the entire window to blanks.If.Vn winis a screen,this sets the clear flag,which will cause a clear-screen sequence to be senton the next.Fn refreshcall.This also moves the current \*yto (0\*,0)..Ds.Fd clearok scr\*,boolf \*mWINDOW *scr;bool boolf;.DeSets the clear flag for the screen.Vn scr .If.Vn boolfis TRUE,this will force a clear-screen to be printed on the next.Fn refresh ,or stop it from doing so if.Vn boolfis FALSE.This only works on screens,and,unlike.Fn clear ,does not alter the contents of the screen.If.Vn scris.Vn curscr ,the next.Fn refreshcall will cause a clear-screen,even if the window passed to.Fn refreshis not a screen..Ds.Fd clrtobot "" \*m.Fd wclrtobot winWINDOW *win;.DeWipes the window clear from the current \*y to the bottom.This does not force a clear-screen sequence on the next refreshunder any circumstances.\*(Nm.Ds.Fd clrtoeol "" \*m.Fd wclrtoeol winWINDOW *win;.DeWipes the window clear from the current \*y to the end of the line.\*(Nm.Ds.Fd delch.Fd wdelch winWINDOW *win;.DeDelete the character at the current \*y.Each character after it on the line shifts to the left,and the last character becomes blank..Ds.Fd deleteln.Fd wdeleteln winWINDOW *win;.DeDelete the current line.Every line below the current one will move up,and the bottom line will become blank.The current \*y will remain unchanged..Ds.Fd erase "" \*m.Fd werase winWINDOW *win;.DeErases the window to blanks without setting the clear flag.This is analagous to.Fn clear ,except that it never causes a clear-screen sequence to be generatedon a.Fn refresh .\*(Nm.Ds.Fd flushok win\*,boolf \*mWINDOW *win;bool boolf;.DeNormally,.Fn refresh.Fn fflush 's.Vn stdoutwhen it is finished..Fn flushokallows you to control this.if.Vn boolfis TRUE(\c.i i.e. ,non-zero)it will do the.Fn fflush ;if it is FALSE.it will not..Ds.Fd idlok win\*,boolfWINDOW *win;bool boolf;.DeReserved for future use.This will eventually signal to.Fn refreshthat it is all right to use the insert and delete line sequenceswhen updating the window..Ds.Fd insch cchar c;.Fd winsch win\*,cWINDOW *win;char c;.DeInsert.Vn cat the current \*yEach character after it shifts to the right,and the last character disappears.\*(Es.Ds.Fd insertln.Fd winsertln winWINDOW *win;.DeInsert a line above the current one.Every line below the current linewill be shifted down,and the bottom line will disappear.The current line will become blank,and the current \*y will remain unchanged..Ds.Fd move y\*,x \*mint y\*,x;.Fd wmove win\*,y\*,xWINDOW *win;int y\*,x;.DeChange the current \*y of the window to.Vn y\*,x ). (\*(Es.Ds.Fd overlay win1\*,win2WINDOW *win1\*,*win2;.DeOverlay.Vn win1on.Vn win2 .The contents of.Vn win1 ,insofar as they fit,are placed on.Vn win2at their starting \*y.This is done non-destructively,i.e., blanks on.Vn win1leave the contents of the space on.Vn win2untouched..Ds.Fd overwrite win1\*,win2WINDOW *win1\*,*win2;.DeOverwrite.Vn win1on.Vn win2 .The contents of.Vn win1 ,insofar as they fit,are placed on.Vn win2at their starting \*y.This is done destructively,.i i.e. ,blanks on.Vn win1become blank on.Vn win2 ..Ds.Fd printw fmt\*,arg1\*,arg2\*,...char *fmt;.Fd wprintw win\*,fmt\*,arg1\*,arg2\*,...WINDOW *win;char *fmt;.DePerforms a.Fn printfon the window starting at the current \*y.It uses.Fn addstrto add the string on the window.It is often advisable to use the field width options of.Fn printfto avoid leaving things on the window from earlier calls.\*(Es.Ds.Fd refresh "" \*m.Fd wrefresh winWINDOW *win;.DeSynchronize the terminal screen with the desired window.If the window is not a screen,only that part covered by it is updated.\*(EsIn this case, it will update whatever it canwithout causing the scroll..spAs a special case,if.Fn wrefreshis called with the window.Vn curscrthe screen is clearedand repainted as it is currently.This is very useful for allowing the redrawing of the screenwhen the user has garbage dumped on his terminal..Ds.Fd standout "" \*m.Fd wstandout winWINDOW *win;.Fd standend "" \*m.Fd wstandend winWINDOW *win;.DeStart and stop putting characters onto.i winin standout mode..Fn standoutcauses any characters added to the windowto be put in standout mode on the terminal(if it has that capability)..Fn standendstops this.The sequences.Vn SOand.Vn SE(or.Vn USand.Vn UEif they are not defined)are used (see Appendix A).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -