| 1 |
! UIMX ascii 2.0 key: 4767 |
| 2 |
|
| 3 |
*SelectInstrument.class: selectionBox |
| 4 |
*SelectInstrument.parent: NO_PARENT |
| 5 |
*SelectInstrument.defaultShell: topLevelShell |
| 6 |
*SelectInstrument.static: true |
| 7 |
*SelectInstrument.gbldecl: #include <stdio.h>\ |
| 8 |
#include <ExternResources.h>\ |
| 9 |
char *osmmget();\ |
| 10 |
|
| 11 |
*SelectInstrument.ispecdecl: |
| 12 |
*SelectInstrument.funcdecl: swidget create_SelectInstrument()\ |
| 13 |
|
| 14 |
*SelectInstrument.funcname: create_SelectInstrument |
| 15 |
*SelectInstrument.funcdef: "swidget", "<create_SelectInstrument>(%)" |
| 16 |
*SelectInstrument.icode: |
| 17 |
*SelectInstrument.fcode: return(rtrn);\ |
| 18 |
|
| 19 |
*SelectInstrument.auxdecl: |
| 20 |
*SelectInstrument.name: SelectInstrument |
| 21 |
*SelectInstrument.resizePolicy: "resize_none" |
| 22 |
*SelectInstrument.unitType: "pixels" |
| 23 |
*SelectInstrument.x: 400 |
| 24 |
*SelectInstrument.y: 80 |
| 25 |
*SelectInstrument.width: 260 |
| 26 |
*SelectInstrument.height: 320 |
| 27 |
*SelectInstrument.background: WindowBackground |
| 28 |
*SelectInstrument.buttonFontList: BoldTextFont |
| 29 |
*SelectInstrument.labelFontList: BoldTextFont |
| 30 |
*SelectInstrument.textFontList: BoldTextFont |
| 31 |
*SelectInstrument.cancelCallback: {\ |
| 32 |
extern swidget ilist;\ |
| 33 |
UxPopdownInterface(ilist);\ |
| 34 |
} |
| 35 |
*SelectInstrument.mustMatch: "true" |
| 36 |
*SelectInstrument.createCallback: {\ |
| 37 |
XmString *str;\ |
| 38 |
\ |
| 39 |
int item_no,i ;\ |
| 40 |
item_no = 2;\ |
| 41 |
\ |
| 42 |
/*str = (XmString *)XtMalloc(item_no * sizeof(XmString));\ |
| 43 |
for (i=0; i<item_no; i++)\ |
| 44 |
str[i] = XmStringCreateSimple(instr[i]);\ |
| 45 |
\ |
| 46 |
XtVaSetValues(UxGetWidget(UxFindSwidget("SelectInstrument")),\ |
| 47 |
XmNlistItems,str,\ |
| 48 |
XmNlistItemCount,item_no,\ |
| 49 |
NULL);*/\ |
| 50 |
} |
| 51 |
*SelectInstrument.listLabelString: "Instrument" |
| 52 |
*SelectInstrument.okCallback: {\ |
| 53 |
char *value;\ |
| 54 |
char title[30],descr[257];\ |
| 55 |
extern swidget ilist;\ |
| 56 |
extern int tidost,doI;\ |
| 57 |
int uni,null,actval,index;\ |
| 58 |
XmSelectionBoxCallbackStruct *cbs;\ |
| 59 |
cbs = (XmSelectionBoxCallbackStruct *)UxCallbackArg;\ |
| 60 |
XmStringGetLtoR(cbs->value,XmSTRING_DEFAULT_CHARSET,&value);\ |
| 61 |
\ |
| 62 |
if ( doI) {\ |
| 63 |
UxPutText(UxFindSwidget("clas_t1"),value);\ |
| 64 |
oscfill(descr,257,'\0');\ |
| 65 |
SCDRDC(tidost,value,1,1,256,&actval,descr,&uni,&null);\ |
| 66 |
index = strbskip(descr,' ');\ |
| 67 |
descr[index+1] = '\0';\ |
| 68 |
UxPutText(UxFindSwidget("clas_t1"),value);\ |
| 69 |
UxPutText(UxFindSwidget("criteria"),descr);\ |
| 70 |
redecomp(descr);\ |
| 71 |
}\ |
| 72 |
else {\ |
| 73 |
UxPutText(UxFindSwidget("text3"),value);\ |
| 74 |
UxPopdownInterface(ilist);\ |
| 75 |
}\ |
| 76 |
} |
| 77 |
|