1
! UIMX ascii 2.0 key: 5562
2
*action.SelectContext: {\
3
extern char contxt[], nctx[];\
5
strcpy(nctx,UxGetText(scrolledText2)); \
7
if ((int)strlen(nctx) > 0) strcat(nctx,"\n");\
9
if (XmTextGetSelection(UxWidget) == NULL) return;\
12
XmTextGetSelection(UxWidget));\
14
XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));\
16
UxPutText(scrolledText2, nctx);\
21
WriteHelpAW(UxWidget);\
26
*translation.table: CtxTable
27
*translation.parent: transientShell2
28
*translation.policy: override
29
*translation.<Btn1Up>: SelectContext()
31
*translation.table: transTable7
32
*translation.parent: transientShell2
33
*translation.policy: override
34
*translation.<EnterWindow>: WriteHelp()
36
*transientShell2.class: transientShell
37
*transientShell2.parent: NO_PARENT
38
*transientShell2.static: true
39
*transientShell2.gbldecl: #include <stdio.h>\
40
#include <ExternResources.h>\
42
#include <monitdef.h> /* Define MAX_CONTXT */\
43
#include <midback.h> /* Define MAX_CONTXT */\
45
*transientShell2.ispecdecl:
46
*transientShell2.funcdecl: swidget create_transientShell2()\
48
*transientShell2.funcname: create_transientShell2
49
*transientShell2.funcdef: "swidget", "<create_transientShell2>(%)"
50
*transientShell2.icode:
51
*transientShell2.fcode: PutSelection(scrolledText2,1);\
52
PutSelection(scrolledText3,1);\
56
*transientShell2.auxdecl:
57
*transientShell2.name: transientShell2
58
*transientShell2.x: 570
59
*transientShell2.y: 250
60
*transientShell2.width: 250
61
*transientShell2.height: 500
62
*transientShell2.popupCallback: {\
65
UxPutText(scrolledText2,nctx);\
68
*transientShell2.title: "Context Selection"
70
*workArea2.class: form
71
*workArea2.parent: transientShell2
72
*workArea2.static: true
73
*workArea2.name: workArea2
77
*workArea2.height: 498
78
*workArea2.borderWidth: 0
79
*workArea2.createCallback: {\
82
*workArea2.mapCallback: {\
85
*workArea2.background: WindowBackground
86
*workArea2.unitType: "pixels"
87
*workArea2.noResize: "true"
88
*workArea2.resizePolicy: "resize_none"
90
*scrolledWindow2.class: scrolledWindow
91
*scrolledWindow2.parent: workArea2
92
*scrolledWindow2.static: true
93
*scrolledWindow2.name: scrolledWindow2
94
*scrolledWindow2.scrollingPolicy: "application_defined"
96
*scrolledWindow2.y: 20
97
*scrolledWindow2.visualPolicy: "variable"
98
*scrolledWindow2.scrollBarDisplayPolicy: "static"
99
*scrolledWindow2.shadowThickness: 0
100
*scrolledWindow2.height: 270
101
*scrolledWindow2.width: 490
102
*scrolledWindow2.background: ApplicBackground
103
*scrolledWindow2.bottomAttachment: "attach_form"
104
*scrolledWindow2.bottomOffset: 130
105
*scrolledWindow2.leftAttachment: "attach_form"
106
*scrolledWindow2.leftOffset: 5
107
*scrolledWindow2.rightAttachment: "attach_form"
108
*scrolledWindow2.rightOffset: 5
109
*scrolledWindow2.topAttachment: "attach_form"
110
*scrolledWindow2.topOffset: 250
111
*scrolledWindow2.translations: ""
113
*scrolledText2.class: scrolledText
114
*scrolledText2.parent: scrolledWindow2
115
*scrolledText2.static: true
116
*scrolledText2.name: scrolledText2
117
*scrolledText2.width: 670
118
*scrolledText2.height: 220
119
*scrolledText2.background: "WhiteSmoke"
122
*scrolledText2.editable: "false"
123
*scrolledText2.scrollHorizontal: "true"
124
*scrolledText2.scrollVertical: "true"
125
*scrolledText2.editMode: "multi_line_edit"
126
*scrolledText2.foreground: TextForeground
127
*scrolledText2.highlightColor: "grey"
128
*scrolledText2.fontList: SmallFont
129
*scrolledText2.translations: ""
130
*scrolledText2.createCallback: {\
135
*SHelp2.parent: workArea2
142
*SHelp2.background: SHelpBackground
143
*SHelp2.foreground: TextForeground
144
*SHelp2.highlightColor: ApplicBackground
145
*SHelp2.fontList: TextFont
146
*SHelp2.cursorPositionVisible: "true"
147
*SHelp2.translations: ""
148
*SHelp2.activateCallback: {\
151
*SHelp2.pendingDelete: "true"
152
*SHelp2.blinkRate: 500
153
*SHelp2.editMode: "single_line_edit"
154
*SHelp2.highlightOnEnter: "true"
155
*SHelp2.wordWrap: "false"
156
*SHelp2.accelerators: ""
157
*SHelp2.leftAttachment: "attach_form"
158
*SHelp2.leftOffset: 5
159
*SHelp2.rightAttachment: "attach_form"
160
*SHelp2.rightOffset: 5
161
*SHelp2.topAttachment: "attach_widget"
162
*SHelp2.topWidget: "scrolledWindow2"
163
*SHelp2.topOffset: 10
164
*SHelp2.topPosition: 0
165
*SHelp2.bottomAttachment: "attach_none"
166
*SHelp2.bottomOffset: 0
167
*SHelp2.text: "Select contexts by clicking"
169
*NewsButton2.class: pushButton
170
*NewsButton2.parent: workArea2
171
*NewsButton2.static: true
172
*NewsButton2.name: NewsButton2
175
*NewsButton2.width: 95
176
*NewsButton2.height: 30
177
*NewsButton2.background: ButtonBackground
178
*NewsButton2.labelString: "OK"
179
*NewsButton2.foreground: ButtonForeground
180
*NewsButton2.fontList: BoldTextFont
181
*NewsButton2.activateCallback: {\
182
extern char contxt[], nctx[];\
184
strcpy(nctx,UxGetText(scrolledText2)); \
186
convert(contxt,nctx);\
190
UxPopdownInterface(transientShell2);\
193
*NewsButton2.recomputeSize: "false"
194
*NewsButton2.topAttachment: "attach_widget"
195
*NewsButton2.topOffset: 5
196
*NewsButton2.topWidget: "SHelp2"
197
*NewsButton2.highlightColor: "Black"
198
*NewsButton2.leftAttachment: "attach_form"
199
*NewsButton2.leftOffset: 20
201
*PrintButton2.class: pushButton
202
*PrintButton2.parent: workArea2
203
*PrintButton2.static: true
204
*PrintButton2.name: PrintButton2
207
*PrintButton2.width: 95
208
*PrintButton2.height: 30
209
*PrintButton2.background: ButtonBackground
210
*PrintButton2.labelString: "Clear"
211
*PrintButton2.foreground: ButtonForeground
212
*PrintButton2.fontList: BoldTextFont
213
*PrintButton2.activateCallback: {\
214
UxPutText(scrolledText2,"");\
216
*PrintButton2.recomputeSize: "false"
217
*PrintButton2.topAttachment: "attach_widget"
218
*PrintButton2.topOffset: 5
219
*PrintButton2.topWidget: "SHelp2"
220
*PrintButton2.leftAttachment: "attach_widget"
221
*PrintButton2.leftOffset: 20
222
*PrintButton2.leftWidget: "NewsButton2"
223
*PrintButton2.highlightColor: "Black"
225
*ReportButton3.class: pushButton
226
*ReportButton3.parent: workArea2
227
*ReportButton3.static: true
228
*ReportButton3.name: ReportButton3
229
*ReportButton3.x: 430
230
*ReportButton3.y: 330
231
*ReportButton3.width: 95
232
*ReportButton3.height: 30
233
*ReportButton3.background: ButtonBackground
234
*ReportButton3.labelString: "Cancel"
235
*ReportButton3.foreground: ButtonForeground
236
*ReportButton3.fontList: BoldTextFont
237
*ReportButton3.activateCallback: {\
240
UxPopdownInterface(ctx);\
243
*ReportButton3.recomputeSize: "false"
244
*ReportButton3.highlightColor: "Black"
245
*ReportButton3.leftAttachment: "attach_form"
246
*ReportButton3.leftOffset: 20
247
*ReportButton3.leftWidget: ""
248
*ReportButton3.topAttachment: "attach_widget"
249
*ReportButton3.topWidget: "NewsButton2"
250
*ReportButton3.topOffset: 5
252
*scrolledWindow3.class: scrolledWindow
253
*scrolledWindow3.parent: workArea2
254
*scrolledWindow3.static: true
255
*scrolledWindow3.name: scrolledWindow3
256
*scrolledWindow3.scrollingPolicy: "application_defined"
257
*scrolledWindow3.x: 8
258
*scrolledWindow3.y: 20
259
*scrolledWindow3.visualPolicy: "variable"
260
*scrolledWindow3.scrollBarDisplayPolicy: "static"
261
*scrolledWindow3.shadowThickness: 0
262
*scrolledWindow3.height: 270
263
*scrolledWindow3.width: 490
264
*scrolledWindow3.background: ApplicBackground
265
*scrolledWindow3.translations: ""
266
*scrolledWindow3.leftAttachment: "attach_form"
267
*scrolledWindow3.leftOffset: 5
268
*scrolledWindow3.rightAttachment: "attach_form"
269
*scrolledWindow3.rightOffset: 5
270
*scrolledWindow3.topAttachment: "attach_form"
271
*scrolledWindow3.topOffset: 35
272
*scrolledWindow3.bottomAttachment: "attach_form"
273
*scrolledWindow3.bottomOffset: 280
275
*scrolledText3.class: scrolledText
276
*scrolledText3.parent: scrolledWindow3
277
*scrolledText3.static: true
278
*scrolledText3.name: scrolledText3
279
*scrolledText3.width: 670
280
*scrolledText3.height: 220
281
*scrolledText3.background: "WhiteSmoke"
284
*scrolledText3.editable: "false"
285
*scrolledText3.scrollHorizontal: "true"
286
*scrolledText3.scrollVertical: "true"
287
*scrolledText3.editMode: "multi_line_edit"
288
*scrolledText3.foreground: TextForeground
289
*scrolledText3.highlightColor: "grey"
290
*scrolledText3.fontList: SmallFont
291
*scrolledText3.translations: CtxTable
292
*scrolledText3.createCallback: {\
297
extern char mid_ctx[];\
298
char list[20000], name[20];\
303
sprintf(command,"ls %s | sort ",mid_ctx);\
305
if ((fpin = popen(command,"r")) == NULL)\
306
printf("Could not execute command: %s\n",command);\
309
while (fgets(name,19,fpin) != NULL) {\
310
pos = strindex(name,".ctx");\
311
if (pos < (int) strlen(name)) {\
318
if (pclose(fpin) == -1)\
319
printf("Could not close stream for command: %s\n",command);\
321
UxPutText(UxThisWidget,list);\
327
*label1.parent: workArea2
334
*label1.background: LabelBackground
335
*label1.fontList: BoldTextFont
336
*label1.foreground: TextForeground
337
*label1.labelString: "List of Contexts:"
338
*label1.leftAttachment: "attach_form"
339
*label1.leftOffset: 5
340
*label1.topAttachment: "attach_form"
341
*label1.topOffset: 10
342
*label1.alignment: "alignment_beginning"
345
*label2.parent: workArea2
352
*label2.background: LabelBackground
353
*label2.fontList: BoldTextFont
354
*label2.foreground: TextForeground
355
*label2.labelString: "Selection:"
356
*label2.leftAttachment: "attach_form"
357
*label2.topAttachment: "attach_widget"
358
*label2.topWidget: "scrolledWindow3"
360
*label2.leftOffset: 5
361
*label2.alignment: "alignment_beginning"