Previous Next Up Title Contents Index Top Library

3.5. PHIGURE AND GPHIGS-GUI PROGRAM

No additional operation is required to be able to use the GPHIGS-GUI toolkit with the PHIGURE library. Simply call the open function from the PHIGURE workstation (topen_ws) in the callback function XmNcreateDAcallback.

# include <Xm/Xm.h>
# include <GPhigsW.h>

void openPhigure_CB(w, client, call)
	Widget w;
	XtPointer client, call;

{
	topen_ws(wsid, PDEF_ERR_FILE, type_ws);
}

/**********************/
/*	MAIN		*/
/**********************/
main()
{

	Widget toplevel, gphigs;
	int	n,ac= 0;
	Arg	args[2];

	toplevel = XtInitialize( "Essai", "XGphigsgui" NULL, &ac, NULL);
	topen_phigure(PDEF_ERR_FILE);

	n = 0;
	XtSetArg(args[n],XmNresizeWs,XmGPHIGS_RESIZE_WS); n++;
	gphigs = XtCreateManagedWidget("gphigs",xmGPhigsWidgetClass,toplevel,args,n);
	XtAddCallback(gphigs,XmNcreateDACallback, open_Phigure_CB, NULL);
	
	XtRealizeWidget(toplevel);
	XtMainLoop();
}

See demonstation program Phigure.c


Previous Next Up Title Contents Index Top Library