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

derwin

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The derwin routine is used to create a subwindow relative to parent window.

Syntax

   #include <curses.h>



   WINDOW *derwin(WINDOW *orig, int nlines, int ncols, int begin_y,

   int begin_x);

Parameters

orio

A pointer to the parent window for the newly created subwindow.

nlines

The number of lines in the subwindow.

ncols

The number of columns in the subwindow.

begin_y

The y (row) coordinate of the upper-left corner of the subwindow, relative to the parent window.

begin_x

The x (column) coordinate of the upper-left corner of the subwindow, relative to the parent window.

Return Values

On success, a pointer to the new window structure is returned; otherwise, a null pointer is returned.

Description

The derwin() routine creates a subwindow within window orig, with the specified number of lines and columns, and upper left corner positioned at begin_x, begin_y relative to window orig. A pointer to the new window structure is returned.

The original window and subwindow share character storage of the overlapping area. (Each window maintains its own pointers, cursor location, and other items.) This means that characters and attributes are identical in overlapping areas regardless of which window characters are written to.

When using subwindows, it is often necessary to call touchwin() before wrefresh() to maintain proper screen contents.

NOTE: The subwin() routine creates a subwindow in exactly the same way, but allows you to specify coordinates relative to the physical screen.

Implementation Considerations

UNIX System V implementation

See Also

newwin(), subwin(), touchwin(), delwin()

Portability

UNIX System V

Feedback to webmaster