[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. Creating and Destroying Windows

Function: tuiWindow tuiWinNew (tuiWindow win, int x, int y, int w, int h, int vx, int vy, int vw, int vh, void (*draw)(tuiWindow), void (*bdraw)(tuiWindow))
This function creates a tuiWindow and returns it. When tuiWindows are created, they are added to an internal list which will be used when a refresh of the screen is requested. See section 9. Core Functions.

x (column) and y (row) are the screen position for the window. If x or y is greater than 0, the value is used directly for the screen position. If x or y is less than 0, the absolute value is used as a percentage of screen width/height.

w (width) and h (height) specify the window's size. if w or h is greater than 0, the value is used directly for the size. If w or h is equal to 0, then the current maximum width or height of the screen is used, respectively. If w or h is less than 0, the absolute value is used as a percentage of the current screen width or height respectively.

vw (virtual width) and vh (virtual height) specify the window buffer size. vw and vh are treated the same as w and h.

draw is a callback that is called from tuiWindowRefresh.

If bdraw is non-NULL, an additional window will be created around the window being created. The bdraw callback is called from tuiWindowRefresh before the draw callback for it's associated window. If bdraw is NULL, no border will be created, and no callback will happen for the border.

Function: tuiWindow tuiWinDelete (tuiWindow win)
This function will release the memory used by the passed tuiWindow. It also removes the window from the internal draw list, so it is transparent to refresh requests.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by on May, 16 2001 using texi2html