1*51ffecc1SBen Gras.\" $NetBSD: curses_scroll.3,v 1.4 2003/04/16 13:35:01 wiz Exp $ 2*51ffecc1SBen Gras.\" 3*51ffecc1SBen Gras.\" Copyright (c) 2002 4*51ffecc1SBen Gras.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 5*51ffecc1SBen Gras.\" 6*51ffecc1SBen Gras.\" This code is donated to the NetBSD Foundation by the Author. 7*51ffecc1SBen Gras.\" 8*51ffecc1SBen Gras.\" Redistribution and use in source and binary forms, with or without 9*51ffecc1SBen Gras.\" modification, are permitted provided that the following conditions 10*51ffecc1SBen Gras.\" are met: 11*51ffecc1SBen Gras.\" 1. Redistributions of source code must retain the above copyright 12*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer. 13*51ffecc1SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 14*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer in the 15*51ffecc1SBen Gras.\" documentation and/or other materials provided with the distribution. 16*51ffecc1SBen Gras.\" 3. The name of the Author may not be used to endorse or promote 17*51ffecc1SBen Gras.\" products derived from this software without specific prior written 18*51ffecc1SBen Gras.\" permission. 19*51ffecc1SBen Gras.\" 20*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 21*51ffecc1SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*51ffecc1SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*51ffecc1SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 24*51ffecc1SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*51ffecc1SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26*51ffecc1SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*51ffecc1SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28*51ffecc1SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29*51ffecc1SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30*51ffecc1SBen Gras.\" SUCH DAMAGE. 31*51ffecc1SBen Gras.\" 32*51ffecc1SBen Gras.\" 33*51ffecc1SBen Gras.Dd August 12, 2002 34*51ffecc1SBen Gras.Dt CURSES_SCROLL 3 35*51ffecc1SBen Gras.Os 36*51ffecc1SBen Gras.Sh NAME 37*51ffecc1SBen Gras.Nm curses_scroll , 38*51ffecc1SBen Gras.Nm scrl , 39*51ffecc1SBen Gras.Nm wscrl 40*51ffecc1SBen Gras.Nm scroll , 41*51ffecc1SBen Gras.Nm scrollok , 42*51ffecc1SBen Gras.Nm setscrreg , 43*51ffecc1SBen Gras.Nm wsetscrreg 44*51ffecc1SBen Gras.Nd curses window scrolling routines 45*51ffecc1SBen Gras.Sh LIBRARY 46*51ffecc1SBen Gras.Lb libcurses 47*51ffecc1SBen Gras.Sh SYNOPSIS 48*51ffecc1SBen Gras.In curses.h 49*51ffecc1SBen Gras.Ft int 50*51ffecc1SBen Gras.Fn scrl "int n" 51*51ffecc1SBen Gras.Ft int 52*51ffecc1SBen Gras.Fn wscrl "WINDOW *win" "int n" 53*51ffecc1SBen Gras.Ft int 54*51ffecc1SBen Gras.Fn scroll "WINDOW *win" 55*51ffecc1SBen Gras.Ft int 56*51ffecc1SBen Gras.Fn scrollok "WINDOW *win" "boolf flag" 57*51ffecc1SBen Gras.Ft int 58*51ffecc1SBen Gras.Fn setscrreg "int top" "int bottom" 59*51ffecc1SBen Gras.Ft int 60*51ffecc1SBen Gras.Fn wsetscrreg "WINDOW *win" "int top" "int bottom" 61*51ffecc1SBen Gras.Sh DESCRIPTION 62*51ffecc1SBen GrasThese functions scroll areas on 63*51ffecc1SBen Gras.Dv stdscr 64*51ffecc1SBen Grasor on the specified window. 65*51ffecc1SBen Gras.Pp 66*51ffecc1SBen GrasThe 67*51ffecc1SBen Gras.Fn scrl 68*51ffecc1SBen Grasfunction scrolls 69*51ffecc1SBen Gras.Dv stdscr 70*51ffecc1SBen Grasby 71*51ffecc1SBen Gras.Fa n 72*51ffecc1SBen Graslines. 73*51ffecc1SBen GrasIf 74*51ffecc1SBen Gras.Fa n 75*51ffecc1SBen Grasis positive then then 76*51ffecc1SBen Gras.Dv stdscr 77*51ffecc1SBen Grasis scrolled up. 78*51ffecc1SBen Gras.Fa n 79*51ffecc1SBen Graslines are lost from the top of 80*51ffecc1SBen Gras.Dv stdscr 81*51ffecc1SBen Grasand 82*51ffecc1SBen Gras.Fa n 83*51ffecc1SBen Grasblank lines are inserted at the bottom. 84*51ffecc1SBen GrasIf 85*51ffecc1SBen Gras.Fa n 86*51ffecc1SBen Grasis negative then 87*51ffecc1SBen Gras.Dv stdscr 88*51ffecc1SBen Grasis scrolled down. 89*51ffecc1SBen Gras.Fa n 90*51ffecc1SBen Grasblank lines are inserted at the top of 91*51ffecc1SBen Gras.Dv stdscr 92*51ffecc1SBen Grasand 93*51ffecc1SBen Gras.Fa n 94*51ffecc1SBen Graslines are lost from the bottom. 95*51ffecc1SBen Gras.Pp 96*51ffecc1SBen GrasThe 97*51ffecc1SBen Gras.Fn wscrl 98*51ffecc1SBen Grasfunction is the same as the 99*51ffecc1SBen Gras.Fn scrl 100*51ffecc1SBen Grasfunction, excepting that it scrolls the window specified by 101*51ffecc1SBen Gras.Fa win . 102*51ffecc1SBen Gras.Pp 103*51ffecc1SBen GrasThe 104*51ffecc1SBen Gras.Fn scroll 105*51ffecc1SBen Grasfunction scrolls the window 106*51ffecc1SBen Gras.Fa win 107*51ffecc1SBen Grasup by one line. 108*51ffecc1SBen Gras.Pp 109*51ffecc1SBen GrasThe scrolling behaviour of a window can be controlled by using the 110*51ffecc1SBen Gras.Fn scrollok 111*51ffecc1SBen Grasfunction. 112*51ffecc1SBen GrasIf the 113*51ffecc1SBen Gras.Fa flag 114*51ffecc1SBen Grasargument is 115*51ffecc1SBen Gras.Dv TRUE 116*51ffecc1SBen Grasthen a line wrap at the bottom of the window will cause the window to 117*51ffecc1SBen Grasbe scrolled up one line, if 118*51ffecc1SBen Gras.Fa flag 119*51ffecc1SBen Grasis 120*51ffecc1SBen Gras.Dv FALSE 121*51ffecc1SBen Grasthen lines that would force a scroll will be truncated. 122*51ffecc1SBen Gras.Pp 123*51ffecc1SBen GrasThe 124*51ffecc1SBen Gras.Fn setscrreg 125*51ffecc1SBen Grasfunction sets up a software scrolling region on 126*51ffecc1SBen Gras.Dv stdscr 127*51ffecc1SBen Graswhich will define a region of the screen that will be scrolled. 128*51ffecc1SBen GrasThe scrolling of this region is also controlled by the 129*51ffecc1SBen Gras.Fn scrollok 130*51ffecc1SBen Grasfunction. 131*51ffecc1SBen Gras.Pp 132*51ffecc1SBen GrasThe 133*51ffecc1SBen Gras.Fn wsetscrreg 134*51ffecc1SBen Grasfunction does the same as the 135*51ffecc1SBen Gras.Fn setscrreg 136*51ffecc1SBen Grasfunction, except that the scrolling region is set on the window specified by 137*51ffecc1SBen Gras.Fa win . 138*51ffecc1SBen Gras.Pp 139*51ffecc1SBen GrasIf a scrolling region has been set with the 140*51ffecc1SBen Gras.Fn setscrreg 141*51ffecc1SBen Grasor 142*51ffecc1SBen Gras.Fn wsetscrreg 143*51ffecc1SBen Grasfunctions and the current cursor position is inside the scrolling region, 144*51ffecc1SBen Grasthen only the area inside the scrolling region is scrolled. 145*51ffecc1SBen Gras.Sh RETURN VALUES 146*51ffecc1SBen GrasFunctions returning pointers will return 147*51ffecc1SBen Gras.Dv NULL 148*51ffecc1SBen Grasif an error is detected. 149*51ffecc1SBen GrasThe functions that return an int will return one of the following 150*51ffecc1SBen Grasvalues: 151*51ffecc1SBen Gras.Pp 152*51ffecc1SBen Gras.Bl -tag -width ERR -compact 153*51ffecc1SBen Gras.It Er OK 154*51ffecc1SBen GrasThe function completed successfully. 155*51ffecc1SBen Gras.It Er ERR 156*51ffecc1SBen GrasAn error occurred in the function. 157*51ffecc1SBen Gras.El 158*51ffecc1SBen Gras.Sh SEE ALSO 159*51ffecc1SBen Gras.Xr curses_deleteln 3 , 160*51ffecc1SBen Gras.Xr curses_insdelln 3 , 161*51ffecc1SBen Gras.Xr curses_insertln 3 162*51ffecc1SBen Gras.Sh STANDARDS 163*51ffecc1SBen GrasThe 164*51ffecc1SBen Gras.Nx 165*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of the 166*51ffecc1SBen GrasSingle Unix Specification. 167*51ffecc1SBen Gras.Sh HISTORY 168*51ffecc1SBen GrasThe Curses package appeared in 169*51ffecc1SBen Gras.Bx 4.0 . 170