📄 clearok.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>clearok</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_002_001_619"> </a>NAME</h4><blockquote>clearok, idlok, leaveok, scrollok, setscrreg,wsetscrreg - terminal output control functions</blockquote><h4><a name = "tag_002_001_620"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>int clearok(WINDOW *<i>win</i>, bool <i>bf</i>);int idlok(WINDOW *<i>win</i>, bool <i>bf</i>);int leaveok(WINDOW *<i>win</i>, bool <i>bf</i>);int scrollok(WINDOW *<i>win</i>, bool <i>bf</i>);int setscrreg(int <i>top</i>, int <i>bot</i>);int wsetscrreg(WINDOW *<i>win</i>, int <i>top</i>, int <i>bot</i>);</code></pre></blockquote><h4><a name = "tag_002_001_621"> </a>DESCRIPTION</h4><blockquote>These functions set options that deal with output within Curses.<p>The<i>clearok()</i>function assigns the value of<i>bf</i>to an internal flag in the specified windowthat governs clearing of the screen during a refresh. If, during a refreshoperation on the specified window, the flag in<i>curscr</i>is TRUE or the flag in the specified window is TRUE, then the implementationclears the screen, redraws it in its entirety, and sets the flag to FALSE in<i>curscr</i>and in the specified window. The initial state is unspecified.<p>The<i><a href="idlok.html">idlok()</a></i>function specifies whether the implementation may use the hardwareinsert-line, delete-line, and scroll features of terminals so equipped.If <i>bf</i> is TRUE, use of these features is enabled.If <i>bf</i> is FALSE, use of these features is disabledand lines are instead redrawn as required. The initial state is FALSE.<p>The<i><a href="leaveok.html">leaveok()</a></i>function controls the cursor position after a refresh operation.If <i>bf</i> is TRUE, refresh operations on the specified windowmay leave the terminal's cursor at an arbitrary position.If <i>bf</i> is FALSE, then at the end of any refresh operation,the terminal's cursor is positioned at the cursor position contained in thespecified window. The initial state is FALSE.<p>The<i><a href="scrollok.html">scrollok()</a></i>function controls the use of scrolling.If <i>bf</i> is TRUE, then scrolling is enabled for the specified window,with the consequences discussed in<xref href=truncation><a href="intov.html#tag_001_004_002_002">Truncation, Wrapping and Scrolling</a></xref>.If <i>bf</i> is FALSE, scrolling is disabled for the specified window.The initial state is FALSE.<p>The<i><a href="setscrreg.html">setscrreg()</a></i>and<i>wsetscrreg()</i>functions define a software scrolling region in the current or specifiedwindow. The <i>top</i> and <i>bot</i> arguments are the line numbers ofthe first and last line defining the scrolling region. (Line 0 is the topline of the window.) If this option and<i><a href="scrollok.html">scrollok()</a></i>are enabled, an attempt to move off the last line of the margin causes alllines in the scrolling region to scroll one line in the direction of the firstline. Only characters in the window are scrolled.If a software scrolling region is set and<i><a href="scrollok.html">scrollok()</a></i>is not enabled, an attempt to move off the last line of the margin does notreposition any lines in the scrolling region.</blockquote><h4><a name = "tag_002_001_622"> </a>RETURN VALUE</h4><blockquote>Upon successful completion,<i><a href="setscrreg.html">setscrreg()</a></i>and<i>wsetscrreg()</i>return OK. Otherwise, they return ERR.<p>The other functions always return OK.</blockquote><h4><a name = "tag_002_001_623"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_002_001_624"> </a>APPLICATION USAGE</h4><blockquote>The only reason to enable the<i><a href="idlok.html">idlok()</a></i>feature is to use scrolling to achieve the visual effect of motion of apartial window, such as for a screen editor. In other cases, the feature canbe visually annoying.<p>The<i><a href="leaveok.html">leaveok()</a></i>option provides greater efficiency for applications that do not use thecursor.</blockquote><h4><a name = "tag_002_001_625"> </a>SEE ALSO</h4><blockquote><i><a href="clear.html">clear()</a></i>,<i><a href="delscreen.html">delscreen()</a></i>,<i><a href="doupdate.html">doupdate()</a></i>,<i><a href="scrl.html">scrl()</a></i>,<i><a href="curses.h.html"><curses.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -