| 1 |
! UIMX ascii 2.0 key: 1778 |
| 2 |
|
| 3 |
*SelectFrame.class: fileSelectionBox |
| 4 |
*SelectFrame.parent: NO_PARENT |
| 5 |
*SelectFrame.defaultShell: topLevelShell |
| 6 |
*SelectFrame.static: true |
| 7 |
*SelectFrame.gbldecl: #include <stdio.h>\ |
| 8 |
#include <midas_def.h>\ |
| 9 |
#include <ExternResources.h>\ |
| 10 |
\ |
| 11 |
extern void my_select();\ |
| 12 |
\ |
| 13 |
char *filechoice;\ |
| 14 |
int fno; |
| 15 |
*SelectFrame.ispecdecl: |
| 16 |
*SelectFrame.funcdecl: swidget create_SelectFrame()\ |
| 17 |
|
| 18 |
*SelectFrame.funcname: create_SelectFrame |
| 19 |
*SelectFrame.funcdef: "swidget", "<create_SelectFrame>(%)" |
| 20 |
*SelectFrame.icode: filechoice = (char * )0; |
| 21 |
*SelectFrame.fcode: return(rtrn);\ |
| 22 |
|
| 23 |
*SelectFrame.auxdecl: |
| 24 |
*SelectFrame.name: SelectFrame |
| 25 |
*SelectFrame.resizePolicy: "resize_none" |
| 26 |
*SelectFrame.unitType: "pixels" |
| 27 |
*SelectFrame.x: 370 |
| 28 |
*SelectFrame.y: 330 |
| 29 |
*SelectFrame.width: 350 |
| 30 |
*SelectFrame.height: 400 |
| 31 |
*SelectFrame.createCallback: {\ |
| 32 |
Widget fl,tl;\ |
| 33 |
\ |
| 34 |
fl = XmFileSelectionBoxGetChild(UxGetWidget(UxFindSwidget("SelectFrame")),XmDIALOG_FILE_LIST);\ |
| 35 |
tl = XmFileSelectionBoxGetChild(UxGetWidget(UxFindSwidget("SelectFrame")),XmDIALOG_TEXT);\ |
| 36 |
XmTextSetString(tl,""); \ |
| 37 |
\ |
| 38 |
XtVaSetValues(fl,XmNselectionPolicy,XmEXTENDED_SELECT,NULL);\ |
| 39 |
XtAddCallback(fl,XmNextendedSelectionCallback,my_select,NULL);\ |
| 40 |
} |
| 41 |
*SelectFrame.background: WindowBackground |
| 42 |
*SelectFrame.labelFontList: BoldTextFont |
| 43 |
*SelectFrame.textFontList: BoldTextFont |
| 44 |
*SelectFrame.buttonFontList: BoldTextFont |
| 45 |
*SelectFrame.bottomShadowColor: ButtonBackground |
| 46 |
*SelectFrame.applyCallback: {\ |
| 47 |
/*XmFileSelectionBoxCallbackStruct *cbs;\ |
| 48 |
char *filename; \ |
| 49 |
XmStringGetLtoR(cbs->value,XmSTRING_DEFAULT_CHARSET,&filename);\ |
| 50 |
printf("Filename: %s \n",filename);\ |
| 51 |
XtFree(filename);*/\ |
| 52 |
} |
| 53 |
*SelectFrame.textString: "" |
| 54 |
*SelectFrame.directoryValid: "true" |
| 55 |
*SelectFrame.okCallback: {\ |
| 56 |
Widget text;\ |
| 57 |
extern swidget flist;\ |
| 58 |
extern char *filechoice;\ |
| 59 |
\ |
| 60 |
int tid,col,i,j,len,kun;\ |
| 61 |
char name[200],*nm;\ |
| 62 |
text = XmFileSelectionBoxGetChild(UxWidget,XmDIALOG_TEXT);\ |
| 63 |
/*XmTextSetString(text,"File List copied into table sel_temp.tbl ");*/\ |
| 64 |
\ |
| 65 |
if (filechoice) {\ |
| 66 |
TCTINI("sel_temp",F_IO_MODE,F_TRANS,1,fno,&tid);\ |
| 67 |
TCCINI(tid,D_C_FORMAT,200,"A15"," ","FILE",&col);\ |
| 68 |
len = 0 ;\ |
| 69 |
for (i=0; i<fno; i++) {\ |
| 70 |
j = strloc(filechoice +len,',');\ |
| 71 |
filechoice[len+j] = '\0';\ |
| 72 |
j++;\ |
| 73 |
strcpy(name,filechoice+len);\ |
| 74 |
\ |
| 75 |
len += j;\ |
| 76 |
TCEWRC(tid,i+1,col,name);\ |
| 77 |
}\ |
| 78 |
TCTCLO(tid);\ |
| 79 |
UxPutText(UxFindSwidget("ost_t2"),"sel_temp.tbl");\ |
| 80 |
}\ |
| 81 |
else {\ |
| 82 |
nm = XmTextGetString(text);\ |
| 83 |
UxPutText(UxFindSwidget("ost_t2"),nm);\ |
| 84 |
\ |
| 85 |
SCKWRC("INPUTC",1,"lola",1,4,&kun);\ |
| 86 |
}\ |
| 87 |
UxPopdownInterface(flist); \ |
| 88 |
} |
| 89 |
*SelectFrame.cancelCallback: {\ |
| 90 |
extern swidget flist;\ |
| 91 |
UxPopdownInterface(flist);\ |
| 92 |
} |
| 93 |
|