static void activateCB_pushButton14( Widget wgt, XtPointer cd, XtPointer cb) { _UxCFISAccessForm *UxSaveCtx, *UxContext; Widget UxWidget = wgt; XtPointer UxClientData = cd; XtPointer UxCallbackArg = cb; UxSaveCtx = UxFISAccessFormContext; UxFISAccessFormContext = UxContext = (_UxCFISAccessForm *) UxGetContext(UxWidget); { DMAN_FISACCESS f; CONDITION cond; cond = readFISAccess(&f); if (cond != 1) { COND_DumpConditions(); return; } cond = DMAN_Delete(&dmanHandle, (DMAN_GENERICRECORD *) & f); if (cond != DMAN_NORMAL) COND_DumpConditions(); loadFISAccessList(); } UxFISAccessFormContext = UxSaveCtx; }
/*********************************************************************** * * * Get the context for scanner widget. * * * ***********************************************************************/ static int get_scan_context(Widget w) { int i; if (!w) return -1; /* * find and restore the context * (to get to the widgets belonging to this dialog) */ UxNtupleScanContext = (_UxCntupleScan *)UxGetContext(w); /* restore the context not handled by the Architect context */ for (i = 0; i < MAX_SCANNERS; i++) { if (scanner[i].widget == w) { matrix = scanner[i].matrix; nrows = scanner[i].nrows; ncols = scanner[i].ncols; last_event = scanner[i].last_event; ntuple_id = scanner[i].ntuple_id; ntuple_nrows = scanner[i].ntuple_nrows; no_vars = scanner[i].no_vars; strcpy(var_list, scanner[i].var_list); strcpy(ntuple_dir, scanner[i].ntuple_dir); return i; } } return -1; }
static void browseSelectionCB_wStudyList( Widget wgt, XtPointer cd, XtPointer cb) { _UxCstudyListForm *UxSaveCtx, *UxContext; Widget UxWidget = wgt; XtPointer UxClientData = cd; XtPointer UxCallbackArg = cb; UxSaveCtx = UxStudyListFormContext; UxStudyListFormContext = UxContext = (_UxCstudyListForm *) UxGetContext(UxWidget); { XmListCallbackStruct *l; LIST_ITEM *item; l = (XmListCallbackStruct *) UxCallbackArg; item = LST_Index(&lst_studylist, l->item_position); if (item == NULL) return; PreviewStudy(icon_index, icon_file, item->AccessionNumber); } UxStudyListFormContext = UxSaveCtx; }
static void browseSelectionCB_wGroupTitleList( Widget wgt, XtPointer cd, XtPointer cb) { _UxCgroupNamesForm *UxSaveCtx, *UxContext; Widget UxWidget = wgt; XtPointer UxClientData = cd; XtPointer UxCallbackArg = cb; UxSaveCtx = UxGroupNamesFormContext; UxGroupNamesFormContext = UxContext = (_UxCgroupNamesForm *) UxGetContext(UxWidget); { XmListCallbackStruct *l; DMAN_GROUPNAMES *g; l = (XmListCallbackStruct *) UxCallbackArg; g = LST_Index(&groupTitleList, l->item_position); displayGroup(g); } UxGroupNamesFormContext = UxSaveCtx; }
static void activateCB_pushButton11( Widget wgt, XtPointer cd, XtPointer cb) { _UxCgroupNamesForm *UxSaveCtx, *UxContext; Widget UxWidget = wgt; XtPointer UxClientData = cd; XtPointer UxCallbackArg = cb; UxSaveCtx = UxGroupNamesFormContext; UxGroupNamesFormContext = UxContext = (_UxCgroupNamesForm *) UxGetContext(UxWidget); { DMAN_GROUPNAMES g; CONDITION cond; cond = readGroup(&g); if (cond != 1) { COND_DumpConditions(); return; } cond = DMAN_Delete(&dmanHandle, (DMAN_GENERICRECORD *) & g); if (cond != DMAN_NORMAL) COND_DumpConditions(); loadGroupGroupList(); loadGroupTitleList(g.GroupName); } UxGroupNamesFormContext = UxSaveCtx; }
static void okCallback_OpenFile( Widget UxWidget, XtPointer UxClientData, XtPointer UxCallbackArg ) { _UxCOpenFile *UxSaveCtx, *UxContext; XmFileSelectionBoxCallbackStruct *cbs; /*char *text;*/ int rc; ActionData ADTmp; UxSaveCtx = UxOpenFileContext; UxOpenFileContext = UxContext = (_UxCOpenFile *) UxGetContext( UxWidget ); { /********************************************************************/ /* Call file parsing code here! */ /********************************************************************/ cbs = (XmFileSelectionBoxCallbackStruct *)UxCallbackArg; if (pszFileToEdit) { XtFree(pszFileToEdit); } pszFileToEdit = _XmStringUngenerate(cbs->value, NULL, XmCHARSET_TEXT, XmCHARSET_TEXT); if (pszFileToEdit != (char *)NULL) { memset(&ADTmp, 0, sizeof(ActionData)); rc = OpenDefinitionFile(pszFileToEdit, &ADTmp); /*XtFree(text);*/ /*****************************************************************/ /* If everything ok, then clear out data from action structure */ /* and store new data. */ /*****************************************************************/ if (!rc) { FreeAndClearAD(&AD); memcpy(&AD, &ADTmp, sizeof(ActionData)); } } UxPopdownInterface (UxWidget); /********************************************************************/ /* If successfully opened and parsed file, then init the fields of */ /* the main window. */ /********************************************************************/ if (!rc) { clear_CreateActionAppShell_fields(); writeCAToGUI(&AD); } } UxOpenFileContext = UxSaveCtx; }
static void helpCallback_OpenFile( Widget UxWidget, XtPointer UxClientData, XtPointer UxCallbackArg ) { _UxCOpenFile *UxSaveCtx, *UxContext; UxSaveCtx = UxOpenFileContext; UxOpenFileContext = UxContext = (_UxCOpenFile *) UxGetContext( UxWidget ); { DisplayHelpDialog(UxWidget, HELP_OPENFILE, UxCallbackArg); } UxOpenFileContext = UxSaveCtx; }
static void cancelCB_OpenFile( Widget UxWidget, XtPointer UxClientData, XtPointer UxCallbackArg ) { _UxCOpenFile *UxSaveCtx, *UxContext; UxSaveCtx = UxOpenFileContext; UxOpenFileContext = UxContext = (_UxCOpenFile *) UxGetContext( UxWidget ); { UxPopdownInterface(UxWidget); } UxOpenFileContext = UxSaveCtx; }