Functions

DispBox

Display a box on the screen

Syntax

Signature
void DispBox( int top, int left, int bottom, int right, const char *frame, const char *color );

Arguments

top, left, bottom, right Zero-based, inclusive rectangle coordinates.

frame A frame string such as B_DOUBLE from xdev-wtui-box.h, or NULL for a single-line frame.

color Color string for this call, or NULL to use the current color.

Return value

No return value.

Description

Draw a rectangle using inclusive screen coordinates. For a custom UTF-8 frame, give the eight border characters clockwise starting at the upper-left corner. A ninth character fills the interior. An eight-character frame preserves the interior cells.

A `NULL` frame uses single lines. Use `B_DOUBLE` or another constant from `xdev-wtui-box.h` for a different border. The color supplied to the call is temporary. Use `SetPos()` and `DispOut()` to place your own text inside the frame.

Example

dispbox.c
#include "xdev-wtui.h"
#include "xdev-wtui-box.h"

int main( void )
{
   DispBox( 1, 1, 10, 10, B_DOUBLE, "BG+/B" );

   Inkey( 0, NIL );

   return 0;
}