Previous Next Up Title Contents Index Top Library

7.7. ADDITIONAL FUNCTIONS

XmIsGPhigsW (widget)

This function is available for inquiring if the current widget is a GPHIGS widget (XmIsGPhigsW). It returns true when the widget is a GPHIGS widget, otherwise false.

GPHIGS_ANIM_CB

This function is used as a callback in an XtAddCallback in order to activate a user animation function.

Example:

XtAddCallback(w,XmNactivateCallback,GPHIGS_ANIM_CB,FctAnimation);

where w may be a pushbutton for activating the animation and FctAnimation is the function that performs the animation.

Note: The function FctAnimation has a particular form. A display loop must not exist in this function since it is the function GPHIGS_ANIM_CB that performs the looping on the user animation function.

The simplest implementation of GPHIGS_ANIM_CB may be idealized as follows:

for (;;) {

	FctAnimation();

}
In the FctAnimation function it suffices to declare the static loop increment variable and to increment it. The function must perform one animation step and return:

FctAnimation()
{
	static int count = 0;

	...
	operations base on count
	CSS editing
	redisplay
	...
	increment count
}


Previous Next Up Title Contents Index Top Library