Widget WmPanelistAllocate (Widget w, XtPointer global_data, XtPointer screen_data) { Boolean create_fp; panel.app_name = wmGD.mwmName; create_fp = FrontPanelReadDatabases (); if (create_fp) { #ifdef DT_PERFORMANCE _DtPerfChkpntMsgSend("Begin creating front panel"); #endif FrontPanelCreate (w); #ifdef DT_PERFORMANCE _DtPerfChkpntMsgSend("End creating front panel"); #endif panel.global_data = global_data; panel.screen_data = screen_data; return (panel.form); } else return(NULL); }
void main (int argc, char **argv) { XtAppContext appContext; Widget widget; /* This call is required to have values to pass to DtAppInitialize */ widget = XtAppInitialize( &appContext, "Dtfplist", NULL, 0, &argc, argv, NULL, NULL, 0); /* This is required initialization so that FrontPanelReadDatabases() * procedure complete successfully. */ DtAppInitialize( appContext, XtDisplay(widget), widget, argv[0], (char *)szWM_TOOL_CLASS); /* Load the database for use in printing. If it is able to load print * contents of front panel. */ DtDbLoad(); panel.app_name = strdup(argv[0]); if (FrontPanelReadDatabases ()) { /* Print out the contents of the .fp database */ PrintFrontPanelContents (); } else { /* NEEDS TO BE LOCALIZED */ printf ("PANEL not found. Error in reading database.\n"); } }