[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


box Subroutine

Purpose

Draws borders from single-byte characters and renditions.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


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

Description

The box subroutine draws a border around the edges of the specified window. This subroutine does not advance the cursor position. This subroutine does not perform special character processing or perform wrapping.

The box subroutine (*win, verch, horch) has an effect equivalent to:

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

Parameters


horch Specifies the character to draw the horizontal lines of the box. The character must be a 1-column character.
verch Specifies the character to draw the vertical lines of the box. The character must be a 1-column character.
*win Specifies the window to draw the box in or around.

Return Values

Upon successful completion, the box function returns OK. Otherwise, it returns ERR.

Examples

  1. To draw a box around the user-defined window, my_window, using | (pipe) as the vertical character and - (minus sign) as the horizontal character, enter:

    WINDOW *my_window;
    box(my_window, '|', '-');
    
  2. To draw a box around my_window using the default characters ACS_VLINE and ACS_HLINE, enter:

    WINDOW *my_window;
    box(my_window, 0, 0);
    

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

Curses Overview for Programming, List of Curses Subroutines, and Windows in the Curses Environment in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]