~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to gui/XHelp/prj/transientShell2.i

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
! UIMX ascii 2.0 key: 5562                                                      
 
2
*action.SelectContext: {\
 
3
 extern char contxt[], nctx[];\
 
4
\
 
5
 strcpy(nctx,UxGetText(scrolledText2)); \
 
6
\
 
7
 if ((int)strlen(nctx) > 0) strcat(nctx,"\n");\
 
8
\
 
9
 if (XmTextGetSelection(UxWidget) == NULL) return;\
 
10
\
 
11
 strcat(nctx,\
 
12
     XmTextGetSelection(UxWidget));\
 
13
\
 
14
 XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));\
 
15
\
 
16
 UxPutText(scrolledText2, nctx);\
 
17
\
 
18
 \
 
19
}
 
20
*action.WriteHelp: {\
 
21
WriteHelpAW(UxWidget);\
 
22
helpPR(UxWidget);\
 
23
\
 
24
}
 
25
 
 
26
*translation.table: CtxTable
 
27
*translation.parent: transientShell2
 
28
*translation.policy: override
 
29
*translation.<Btn1Up>: SelectContext()
 
30
 
 
31
*translation.table: transTable7
 
32
*translation.parent: transientShell2
 
33
*translation.policy: override
 
34
*translation.<EnterWindow>: WriteHelp()
 
35
 
 
36
*transientShell2.class: transientShell
 
37
*transientShell2.parent: NO_PARENT
 
38
*transientShell2.static: true
 
39
*transientShell2.gbldecl: #include <stdio.h>\
 
40
#include <ExternResources.h>\
 
41
#include <dirent.h>\
 
42
#include <monitdef.h>         /* Define MAX_CONTXT */\
 
43
#include <midback.h>          /* Define MAX_CONTXT */\
 
44
 
 
45
*transientShell2.ispecdecl:
 
46
*transientShell2.funcdecl: swidget create_transientShell2()\
 
47
 
 
48
*transientShell2.funcname: create_transientShell2
 
49
*transientShell2.funcdef: "swidget", "<create_transientShell2>(%)"
 
50
*transientShell2.icode:
 
51
*transientShell2.fcode: PutSelection(scrolledText2,1);\
 
52
PutSelection(scrolledText3,1);\
 
53
\
 
54
return(rtrn);\
 
55
 
 
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: {\
 
63
extern char nctx[];\
 
64
\
 
65
UxPutText(scrolledText2,nctx);\
 
66
\
 
67
}
 
68
*transientShell2.title: "Context Selection"
 
69
 
 
70
*workArea2.class: form
 
71
*workArea2.parent: transientShell2
 
72
*workArea2.static: true
 
73
*workArea2.name: workArea2
 
74
*workArea2.x: 20
 
75
*workArea2.y: 2
 
76
*workArea2.width: 600
 
77
*workArea2.height: 498
 
78
*workArea2.borderWidth: 0
 
79
*workArea2.createCallback: {\
 
80
\
 
81
}
 
82
*workArea2.mapCallback: {\
 
83
\
 
84
}
 
85
*workArea2.background: WindowBackground
 
86
*workArea2.unitType: "pixels"
 
87
*workArea2.noResize: "true"
 
88
*workArea2.resizePolicy: "resize_none"
 
89
 
 
90
*scrolledWindow2.class: scrolledWindow
 
91
*scrolledWindow2.parent: workArea2
 
92
*scrolledWindow2.static: true
 
93
*scrolledWindow2.name: scrolledWindow2
 
94
*scrolledWindow2.scrollingPolicy: "application_defined"
 
95
*scrolledWindow2.x: 8
 
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: ""
 
112
 
 
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"
 
120
*scrolledText2.x: 0
 
121
*scrolledText2.y: 0
 
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: {\
 
131
\
 
132
}
 
133
 
 
134
*SHelp2.class: text
 
135
*SHelp2.parent: workArea2
 
136
*SHelp2.static: true
 
137
*SHelp2.name: SHelp2
 
138
*SHelp2.x: 30
 
139
*SHelp2.y: 380
 
140
*SHelp2.width: 325
 
141
*SHelp2.height: 40
 
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: {\
 
149
\
 
150
}
 
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"
 
168
 
 
169
*NewsButton2.class: pushButton
 
170
*NewsButton2.parent: workArea2
 
171
*NewsButton2.static: true
 
172
*NewsButton2.name: NewsButton2
 
173
*NewsButton2.x: 20
 
174
*NewsButton2.y: 630
 
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[];\
 
183
 \
 
184
 strcpy(nctx,UxGetText(scrolledText2)); \
 
185
\
 
186
 convert(contxt,nctx);\
 
187
\
 
188
 InitHelp(); \
 
189
\
 
190
 UxPopdownInterface(transientShell2);\
 
191
\
 
192
}
 
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
 
200
 
 
201
*PrintButton2.class: pushButton
 
202
*PrintButton2.parent: workArea2
 
203
*PrintButton2.static: true
 
204
*PrintButton2.name: PrintButton2
 
205
*PrintButton2.x: 280
 
206
*PrintButton2.y: 330
 
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,"");\
 
215
}
 
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"
 
224
 
 
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: {\
 
238
extern swidget ctx;\
 
239
\
 
240
UxPopdownInterface(ctx);\
 
241
\
 
242
}
 
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
 
251
 
 
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
 
274
 
 
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"
 
282
*scrolledText3.x: 0
 
283
*scrolledText3.y: 0
 
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: {\
 
293
#ifdef  DESIGN_TIME\
 
294
#include <dirent.h>\
 
295
#endif\
 
296
\
 
297
extern char mid_ctx[];\
 
298
char list[20000], name[20];\
 
299
char   command[100];\
 
300
FILE *fpin;\
 
301
int    input, pos=0;\
 
302
\
 
303
sprintf(command,"ls %s | sort ",mid_ctx);\
 
304
\
 
305
if ((fpin = popen(command,"r")) == NULL)\
 
306
    printf("Could not execute command: %s\n",command);\
 
307
\
 
308
strcpy(list,"");\
 
309
while (fgets(name,19,fpin) != NULL) {\
 
310
   pos = strindex(name,".ctx");\
 
311
   if (pos < (int) strlen(name)) {\
 
312
      name[pos] = '\0';\
 
313
      strcat(list, name);\
 
314
      strcat(list,"\n");\
 
315
      strcpy(name,"");\
 
316
}}\
 
317
\
 
318
if (pclose(fpin) == -1)\
 
319
   printf("Could not close stream for command: %s\n",command);\
 
320
\
 
321
UxPutText(UxThisWidget,list);\
 
322
\
 
323
\
 
324
}
 
325
 
 
326
*label1.class: label
 
327
*label1.parent: workArea2
 
328
*label1.static: true
 
329
*label1.name: label1
 
330
*label1.x: 10
 
331
*label1.y: 10
 
332
*label1.width: 160
 
333
*label1.height: 20
 
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"
 
343
 
 
344
*label2.class: label
 
345
*label2.parent: workArea2
 
346
*label2.static: true
 
347
*label2.name: label2
 
348
*label2.x: 10
 
349
*label2.y: 10
 
350
*label2.width: 160
 
351
*label2.height: 20
 
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"
 
359
*label2.topOffset: 5
 
360
*label2.leftOffset: 5
 
361
*label2.alignment: "alignment_beginning"
 
362