1*51ffecc1SBen Gras.\" $NetBSD: curses_line.3,v 1.6 2010/02/20 10:23:04 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 February 19, 2010 34*51ffecc1SBen Gras.Dt CURSES_LINE 3 35*51ffecc1SBen Gras.Os 36*51ffecc1SBen Gras.Sh NAME 37*51ffecc1SBen Gras.Nm curses_line , 38*51ffecc1SBen Gras.Nm hline , 39*51ffecc1SBen Gras.Nm whline , 40*51ffecc1SBen Gras.Nm vline , 41*51ffecc1SBen Gras.Nm wvline , 42*51ffecc1SBen Gras.Nm mvhline , 43*51ffecc1SBen Gras.Nm mvwhline , 44*51ffecc1SBen Gras.Nm mvvline , 45*51ffecc1SBen Gras.Nm mvwvline 46*51ffecc1SBen Gras.Nd curses draw lines on windows routines 47*51ffecc1SBen Gras.Sh LIBRARY 48*51ffecc1SBen Gras.Lb libcurses 49*51ffecc1SBen Gras.Sh SYNOPSIS 50*51ffecc1SBen Gras.In curses.h 51*51ffecc1SBen Gras.Ft int 52*51ffecc1SBen Gras.Fn hline "chtype ch" "int n" 53*51ffecc1SBen Gras.Ft int 54*51ffecc1SBen Gras.Fn whline "WINDOW *win" "chtype ch" "int n" 55*51ffecc1SBen Gras.Ft int 56*51ffecc1SBen Gras.Fn mvhline "int y" "int x" "chtype ch" "int n" 57*51ffecc1SBen Gras.Ft int 58*51ffecc1SBen Gras.Fn mvwvline "WINDOW *win" "int y" "int x" "chtype c" "int n" 59*51ffecc1SBen Gras.Ft int 60*51ffecc1SBen Gras.Fn vline "chtype c" "int n" 61*51ffecc1SBen Gras.Ft int 62*51ffecc1SBen Gras.Fn wvline "WINDOW *win" "chtype c" "int n" 63*51ffecc1SBen Gras.Ft int 64*51ffecc1SBen Gras.Fn mvvline "int y" "int x" "chtype ch" "int n" 65*51ffecc1SBen Gras.Ft int 66*51ffecc1SBen Gras.Fn mvwhline "WINDOW *win" "int y" "int x" "chtype c" "int n" 67*51ffecc1SBen Gras.Sh DESCRIPTION 68*51ffecc1SBen GrasThese functions draw lines on 69*51ffecc1SBen Gras.Dv stdscr 70*51ffecc1SBen Grasor on the specified window. 71*51ffecc1SBen Gras.Pp 72*51ffecc1SBen GrasThe 73*51ffecc1SBen Gras.Fn hline 74*51ffecc1SBen Grasfunction draws a horizontal line of the character 75*51ffecc1SBen Gras.Fa ch 76*51ffecc1SBen Grason 77*51ffecc1SBen Gras.Dv stdscr 78*51ffecc1SBen Grasstarting at the current cursor position and extending for 79*51ffecc1SBen Gras.Fa n 80*51ffecc1SBen Grascharacters, or until the right hand side of 81*51ffecc1SBen Gras.Dv stdscr 82*51ffecc1SBen Grasis reached. 83*51ffecc1SBen GrasIf the text portion of 84*51ffecc1SBen Gras.Fa ch 85*51ffecc1SBen Grasis 0 then the line will be drawn with the 86*51ffecc1SBen Gras.Dv ACS_HLINE 87*51ffecc1SBen Grascharacter. 88*51ffecc1SBen Gras.Pp 89*51ffecc1SBen GrasThe 90*51ffecc1SBen Gras.Fn whline 91*51ffecc1SBen Grasfunction is the same as the 92*51ffecc1SBen Gras.Fn hline 93*51ffecc1SBen Grasfunction, excepting that the line is drawn in the window specified by 94*51ffecc1SBen Gras.Fa win . 95*51ffecc1SBen Gras.Pp 96*51ffecc1SBen GrasThe 97*51ffecc1SBen Gras.Fn vline 98*51ffecc1SBen Grasfunction draws a vertical line of character 99*51ffecc1SBen Gras.Fa ch 100*51ffecc1SBen Grason 101*51ffecc1SBen Gras.Dv stdscr 102*51ffecc1SBen Grasstarting at the current cursor position and moving down until either 103*51ffecc1SBen Gras.Fa n 104*51ffecc1SBen Grascharacters have been drawn or the bottom of 105*51ffecc1SBen Gras.Dv stdscr 106*51ffecc1SBen Grasis reached. 107*51ffecc1SBen GrasIf the text portion of 108*51ffecc1SBen Gras.Fa ch 109*51ffecc1SBen Grasis 0 then the line will be drawn with the 110*51ffecc1SBen Gras.Dv ACS_VLINE 111*51ffecc1SBen Grascharacter. 112*51ffecc1SBen Gras.Pp 113*51ffecc1SBen GrasThe 114*51ffecc1SBen Gras.Fn wvline 115*51ffecc1SBen Grasfunction is the same as the 116*51ffecc1SBen Gras.Fn vline 117*51ffecc1SBen Grasfunction, excepting that the line is drawn on the given window. 118*51ffecc1SBen Gras.Pp 119*51ffecc1SBen GrasThe 120*51ffecc1SBen Gras.Fn mvhline , 121*51ffecc1SBen Gras.Fn mvwhline , 122*51ffecc1SBen Gras.Fn mvvline 123*51ffecc1SBen Grasand 124*51ffecc1SBen Gras.Fn mvwvline 125*51ffecc1SBen Grasfunctions are the same as the 126*51ffecc1SBen Gras.Fn hline , 127*51ffecc1SBen Gras.Fn whline , 128*51ffecc1SBen Gras.Fn vline 129*51ffecc1SBen Grasand 130*51ffecc1SBen Gras.Fn wvline 131*51ffecc1SBen Grasfunctions, respectively, excepting that 132*51ffecc1SBen Gras.Fn wmove 133*51ffecc1SBen Grasis called to move the cursor to the position specified by 134*51ffecc1SBen Gras.Fa y , 135*51ffecc1SBen Gras.Fa x 136*51ffecc1SBen Grasbefore the line is drawn on the window. 137*51ffecc1SBen Gras.Sh RETURN VALUES 138*51ffecc1SBen GrasFunctions returning pointers will return 139*51ffecc1SBen Gras.Dv NULL 140*51ffecc1SBen Grasif an error is detected. 141*51ffecc1SBen GrasThe functions that return an int will return one of the following 142*51ffecc1SBen Grasvalues: 143*51ffecc1SBen Gras.Pp 144*51ffecc1SBen Gras.Bl -tag -width ERR -compact 145*51ffecc1SBen Gras.It Er OK 146*51ffecc1SBen GrasThe function completed successfully. 147*51ffecc1SBen Gras.It Er ERR 148*51ffecc1SBen GrasAn error occurred in the function. 149*51ffecc1SBen Gras.El 150*51ffecc1SBen Gras.Sh SEE ALSO 151*51ffecc1SBen Gras.Xr curses_border 3 152*51ffecc1SBen Gras.Sh STANDARDS 153*51ffecc1SBen GrasThe 154*51ffecc1SBen Gras.Nx 155*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of 156*51ffecc1SBen Grasthe Single Unix Specification. 157*51ffecc1SBen Gras.Pp 158*51ffecc1SBen GrasThe use of 159*51ffecc1SBen Gras.Dv ACS_HLINE 160*51ffecc1SBen Grasand 161*51ffecc1SBen Gras.Dv ACS_VLINE 162*51ffecc1SBen Grasas default drawing character in 163*51ffecc1SBen Gras.Fn hline 164*51ffecc1SBen Grasand 165*51ffecc1SBen Gras.Fn vline 166*51ffecc1SBen Grasis a 167*51ffecc1SBen Gras.Nx 168*51ffecc1SBen Grasextension which should not be relied on in portable code. 169*51ffecc1SBen Gras.Sh HISTORY 170*51ffecc1SBen GrasThe Curses package appeared in 171*51ffecc1SBen Gras.Bx 4.0 . 172