Creating Exploding or Rolling Windows

Windows are displayed and removed from the screen by calling wn_up() and wn_dn() respectively. These functions call the up and down function associated with the window. By default, the up function is wn_set() and the down function is wn_unset(). These functions put up or take down the window in one step.

Alternate functions to display and remove the window are provided. These are as follows:

wn_expset() Explodes the window onto the screen
wn_expunset() Implodes the window off the screen
wn_rollset() Rolls a window and its contents onto the screen
wn_rollunset() Unrolls a window off of the screen

There are some portability issues to keep in mind when using the window explode and roll functions. See the descriptions of these functions in the Function Reference to make sure they will act the way you expect on all systems your program will be running under.

Designer: You can specify the up and down functions with the Designer. You can also change them in your code, at any point after you have read the window from the Designer library.

Code: To install one of these alternate up or down functions, use the set window up down functions function, sw_updnfp():

void sw_updnfp(up_fp, dn_fp, wnp)
 
int (*up_fp)();
/* Function to put window on screen
*/
int (*dn_fp)();
/* Function to remove window from screen
*/
WINDOWPTR wnp;
/* Window to assign functions to
*/

More:

Setting the Origin for Exploding or Rolling


Home Contents Previous Next