from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209581

userrating:


May 25th. 2007:
Words

486

Views

258588

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149878

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





curs_border

Section: Library calls (3X)
Updated: 202-1-20
Index Return to Main Contents
 

NAME

border, wborder, box, hline, whline, vline, wvline, mvhline, mvwhline, mvvline, mvwvline - draw borders and lines in a curses window of characters  

SYNOPSIS

#include <curses.h>

int border(chtype ls, chtype rs, chtype ts, chtype bs,
      chtype tl, chtype tr, chtype bl, chtype br);
int wborder(WINDOW *win, chtype ls, chtype rs,
      chtype ts, chtype bs, chtype tl, chtype tr,
      chtype bl, chtype br);

int box(WINDOW *win, chtype verch, chtype horch);

int hline(chtype ch, int n);
int whline(WINDOW *win, chtype ch, int n);
int mvhline(int y, int x, chtype ch, int n);
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n);

int vline(chtype ch, int n);
int wvline(WINDOW *win, chtype ch, int n);
int mvvline(int y, int x, chtype ch, int n);
int mvwvline(WINDOW *win, int y, int x, chtype ch, int n);
 

DESCRIPTION

wborder and border draw a box at the edges of the specified window or stdscr, respectively. Each chtype argument corresponds to a geometric component of the border as follows:
ls - left side,
rs - right side,
ts - top side,
bs - bottom side,
tl - top lef-hand corner,
tr - top righ-hand corner,
bl - bottom lef-hand corner, and
br - bottom righ-hand corner.

If any chtype argument is 0, then curses uses form-drawing characters (see addch(3X)) in the following correspondence:

ACS_VLINE,
ACS_VLINE,
ACS_HLINE,
ACS_HLINE,
ACS_ULCORNER,
ACS_URCORNER,
ACS_LLCORNER, and
ACS_LRCORNER.

box(win, verch, horch) is shorthand for "wborder(win, verch, verch, horch, horch, 0, 0, 0, 0)".

whline draws a horizontal line of ch from left to right, and wvline a vertical one from top to bottom, stopping once n characters have been drawn or upon reaching the boundary of win. These functions do not update the cursor position (beyond any motion directed by their "mv" variants). ncurses(3X) describes the variants of these functions.  

RETURN VALUE

These functions return OK on success and ERR on failure.

In ncurses,
 .IP * 4 these functions fail if the screen is not initialized; and
 .IP * 4 functions taking a WINDOW pointer argument fail if win is a null pointer.

Functions prefixed with "mv" first perform cursor movement and fail if the position (y, x) is outside the window boundaries.  

NOTES

Unusually, there is no wbox function; box behaves as one would expect wbox to, accepting a WINDOW pointer argument.

border, box, hline, mvhline, mvwhline, vline, mvvline, and mvwvline may be implemented as macros.

Borders drawn by these functions are interior borders.  

PORTABILITY

These functions are described in X/Open Curses Issue 4. It specifies no error conditions for them.

SVr4 documentation says that these functions return OK "or a no-negative integer if immedok() is set", referring to the return value from wrefresh, which in SVr4 returns a count of characters written to the window if its immedok property is set; in ncurses, it does not.

BSD curses drew boxes with horch in every character cell of the top and bottom lines of the window, whereas SVr3.1 and later curses, because its box wrapped wborder, used the default corner characters.  

HISTORY

4BSD (1980) introduced box, defining it as a function.

SVr3.1 (1987) added whline and wvline and their variants, as well as border and wborder, redefining box as a macro wrapping the latter.  

SEE ALSO

curses(3X), curs_outopts(3X)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
NOTES
PORTABILITY
HISTORY
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 14.1 ms