HPlogo MPE/iX Developer's Kit Reference Manual Volume 2: HP 3000 MPE/iX Computer Systems > Chapter 4 CURSES

border box wborder

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The border set of routines is used to add a border to a window.

Syntax

   #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);

Parameters

bl

The character and attributes used for the bottom-left corner of the border.

br

The character and attributes used for the bottom-right corner of the border.

bs

The character and attributes used for the bottom of the border.

horch

The character and attributes used for the top and bottom rows of the box.

ls

The character and attributes used for the left side of the border.

rs

The character and attributes used for the right side of the border.

tl

The character and attributes used for the top- left corner of the border.

tr

The character and attributes used for the top- right corner of the border.

ts

The character and attributes used for the top of the border.

verch

The character and attributes used for the left and right columns of the box.

win

The pointer to the window in which the border or box is to be drawn.

Return Values

OK

Successful completion.

ERR

An error occurred.

Description

The border(), wborder(), and box() routines draw a border around the specified window. A parameter with the value of zero is replaced by the default value as defined in curses.h. The constant values for a border are shown in Table 4-5 “Constant Values for Borders”.

Table 4-5 Constant Values for Borders

ParameterConstant UsedValue
verchACS_VLINE|
horchACS_HLINE-
lsACS_VLINE|
rsACS_VLINE|
tsACS_HLINE-
bsACS_HLINE-
blACS_BLCORNER+
brACS_BRCORNER+
tlACS_ULCORNER+
trACS_URCORNER+

 

The call

    box(win, verch, horch)

is a short form for

   wborder(win, verch, verch, horch, horch, 0, 0, 0, 0)

When the window is boxed, the bottom and top rows and right and left columns are unavailable for text.

NOTE: The border() and box() routines are macros.

Implementation Considerations

The box() routine is identical to XPG/3. The border() and wborder() routines are UNIX System V implementations.

See Also

waddch(), wattrset()

Portability

The box() routine conforms to HP-UX, UNIX System V, and XPG/3. The border() and wborder() routines conform to UNIX System V.

Feedback to webmaster