Beispiel #1
0
void wnxm_NxmGmpkRgstr( Widget wid, char *name, void( *rgstr_func )( void ) ) 
/************************************************************************
 * wnxm_NxmGmpkRgstr							*
 *									*
 * Wrapper for NxmGmpkRgstr, which registers a window (drawing widget)  *
 * as a GEMPAK window.							*
 *									*
 * void wnxm_NxmGmpkRgstr( wid, name, rgstr_func )                 	*
 *									*
 * Input parameters:							*
 *  	wid		Widget	widget id              			*
 *  	*name		char	window name       			*
 *  	*rgstr_func()	void	initialization function          	*
 *									*
 * Output parameters:							*
 *			None						*
 **									*
 * Log:									*
 * E. Safford/SAIC	12/07	initial coding                          *
 ***********************************************************************/
{
    printf("wnxm_NxmGmpkRgstr 1\n");
    printf("wnxm_NxmGmpkRgstr: %s\n", name );
    NxmGmpkRgstr( wid, name, rgstr_func );  
    printf("wnxm_NxmGmpkRgstr 2\n");
}
Beispiel #2
0
int main ( int argc , char **argv )
/************************************************************************
 * main			             				   	*
 *								   	*
 * Main program for ncolor.	             			   	*
 *								   	*
 * main ( argc, argv )							*
 * Input paramaters:							*
 *  argc	int	number of input arguments			*
 *  **argv	char	input arguments					*
 * 									*
 * Output paramaters:							*
 *  NONE								*
 **									*
 * Log:								   	*
 * E. Safford/GSC	12/98	initial coding				*
 * T. Piper/SAIC	05/03	removed proto_ncolor.h			*
 * T. Piper/SAIC	07/03	removed unnecessary xwcmn.h		*
 ***********************************************************************/
{
Widget		top_level;
XtAppContext 	app;
Screen		*screen;
/*---------------------------------------------------------------------*/

    top_level = XtAppInitialize( &app, RESOURCE_FILE, NULL, 0,
                        &argc, argv, NULL, NULL, 0);

    screen = XtScreen(top_level);

    XtVaSetValues (top_level, 
		XmNminWidth,		625,
  		XmNx,			90,	
  		XmNy,		 	HeightOfScreen(screen) - 25,	
		NULL); 

/*
 * check resource file
 */
    NxmRes_check(XtDisplay(top_level), RESOURCE_FILE, NULL);

/*
 * initialize GEMPAK variables
 */
    if ( NxmGmpkInit(top_level, 2, NULL ) != 0 ) {
	exit(1);
    }

    ncolor_create(top_level); 
    XtRealizeWidget(top_level);

    NxmGmpkRgstr(top_level, "ncolor", NULL);
    XtAppMainLoop(app);

    return(0);
}