Debian Codegraph @

gui/XDo/src/applicationShell1.c

raw
1
2 /*******************************************************************************
3 applicationShell1.c
4
5 .VERSION
6 090825 last modif
7
8 *******************************************************************************/
9
10 #include <stdio.h>
11 #include "UxLib.h"
12 #include "UxScText.h"
13 #include "UxText.h"
14 #include "UxPushB.h"
15 #include "UxLabel.h"
16 #include "UxScrW.h"
17 #include "UxForm.h"
18 #include "UxCascB.h"
19 #include "UxPushBG.h"
20 #include "UxRowCol.h"
21 #include "UxMainW.h"
22 #include "UxApplSh.h"
23
24 /*******************************************************************************
25 Includes, Defines, and Global variables from the Declarations Editor:
26 *******************************************************************************/
27
28 #include <ExternResources.h>
29 #include <Xm/LabelG.h>
30 #include <midas_def.h>
31 #include <tbldef.h>
32 char *osmmget();
33 char *rowlab[256];
34
35 /*******************************************************************************
36 The definition of the context structure:
37 If you create multiple instances of your interface, the context
38 structure ensures that your callbacks use the variables for the
39 correct instance.
40
41 For each swidget in the interface, each argument to the Interface
42 function, and each variable in the Instance Specific section of the
43 Declarations Editor, there is an entry in the context structure.
44 and a #define. The #define makes the variable name refer to the
45 corresponding entry in the context structure.
46 *******************************************************************************/
47
48 typedef struct
49 {
50 swidget UxapplicationClas;
51 swidget UxmainWindow1;
52 swidget UxpullDownMenu1;
53 swidget UxquitPane1;
54 swidget UxquitPane_b1;
55 swidget UxpullDownMenu_top_b2;
56 swidget UxUtilsPane1;
57 swidget UxUtilsPane_b1;
58 swidget UxUtilsPane_b2;
59 swidget UxcommandsCascade1;
60 swidget UxpullDownMenu1_p3;
61 swidget UxpullDownMenu1_p3_b1;
62 swidget UxpullDownMenu1_p3_b2;
63 swidget UxpullDownMenu1_top_b1;
64 swidget UxpullDownMenu1_p4;
65 swidget UxpullDownMenu1_p4_b1;
66 swidget UxpullDownMenu1_p4_b2;
67 swidget UxpullDownMenu1_top_b4;
68 swidget UxworkAreaForm1;
69 swidget Uxform6;
70 swidget UxscrolledWindow6;
71 swidget Uxrowdescr;
72 swidget Uxlabel7;
73 swidget UxpushButton13;
74 swidget UxpushButton14;
75 swidget Uxlabel8;
76 swidget Uxclas_t1;
77 swidget UxscrolledWindow7;
78 swidget Uxcriteria;
79 } _UxCapplicationClas;
80
81 #define applicationClas UxApplicationClasContext->UxapplicationClas
82 #define mainWindow1 UxApplicationClasContext->UxmainWindow1
83 #define pullDownMenu1 UxApplicationClasContext->UxpullDownMenu1
84 #define quitPane1 UxApplicationClasContext->UxquitPane1
85 #define quitPane_b1 UxApplicationClasContext->UxquitPane_b1
86 #define pullDownMenu_top_b2 UxApplicationClasContext->UxpullDownMenu_top_b2
87 #define UtilsPane1 UxApplicationClasContext->UxUtilsPane1
88 #define UtilsPane_b1 UxApplicationClasContext->UxUtilsPane_b1
89 #define UtilsPane_b2 UxApplicationClasContext->UxUtilsPane_b2
90 #define commandsCascade1 UxApplicationClasContext->UxcommandsCascade1
91 #define pullDownMenu1_p3 UxApplicationClasContext->UxpullDownMenu1_p3
92 #define pullDownMenu1_p3_b1 UxApplicationClasContext->UxpullDownMenu1_p3_b1
93 #define pullDownMenu1_p3_b2 UxApplicationClasContext->UxpullDownMenu1_p3_b2
94 #define pullDownMenu1_top_b1 UxApplicationClasContext->UxpullDownMenu1_top_b1
95 #define pullDownMenu1_p4 UxApplicationClasContext->UxpullDownMenu1_p4
96 #define pullDownMenu1_p4_b1 UxApplicationClasContext->UxpullDownMenu1_p4_b1
97 #define pullDownMenu1_p4_b2 UxApplicationClasContext->UxpullDownMenu1_p4_b2
98 #define pullDownMenu1_top_b4 UxApplicationClasContext->UxpullDownMenu1_top_b4
99 #define workAreaForm1 UxApplicationClasContext->UxworkAreaForm1
100 #define form6 UxApplicationClasContext->Uxform6
101 #define scrolledWindow6 UxApplicationClasContext->UxscrolledWindow6
102 #define rowdescr UxApplicationClasContext->Uxrowdescr
103 #define label7 UxApplicationClasContext->Uxlabel7
104 #define pushButton13 UxApplicationClasContext->UxpushButton13
105 #define pushButton14 UxApplicationClasContext->UxpushButton14
106 #define label8 UxApplicationClasContext->Uxlabel8
107 #define clas_t1 UxApplicationClasContext->Uxclas_t1
108 #define scrolledWindow7 UxApplicationClasContext->UxscrolledWindow7
109 #define criteria UxApplicationClasContext->Uxcriteria
110
111 static _UxCapplicationClas *UxApplicationClasContext;
112
113 extern int decrypt1(), AppendDialogText(), read_descr();
114
115 extern void display_help();
116
117
118
119 /*******************************************************************************
120 The following are translation tables.
121 *******************************************************************************/
122
123
124 /*******************************************************************************
125 Forward declarations of functions that are defined later in this file.
126 *******************************************************************************/
127
128 swidget create_applicationClas();
129
130 /*******************************************************************************
131 The following are Action functions.
132 *******************************************************************************/
133
134 static void action_nothing( UxWidget, UxEvent, UxParams, p_UxNumParams )
135 Widget UxWidget;
136 XEvent *UxEvent;
137 String *UxParams;
138 Cardinal *p_UxNumParams;
139 {
140 _UxCapplicationClas *UxSaveCtx, *UxContext;
141 swidget UxThisWidget;
142
143 UxThisWidget = UxWidgetToSwidget( UxWidget );
144 UxSaveCtx = UxApplicationClasContext;
145 UxApplicationClasContext = UxContext =
146 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
147 {
148 printf("toto:\n");
149 }
150 UxApplicationClasContext = UxSaveCtx;
151 }
152
153 static void action_SelectCommand( UxWidget, UxEvent, UxParams, p_UxNumParams )
154 Widget UxWidget;
155 XEvent *UxEvent;
156 String *UxParams;
157 Cardinal *p_UxNumParams;
158 {
159 _UxCapplicationClas *UxSaveCtx, *UxContext;
160 swidget UxThisWidget;
161
162 UxThisWidget = UxWidgetToSwidget( UxWidget );
163 UxSaveCtx = UxApplicationClasContext;
164 UxApplicationClasContext = UxContext =
165 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
166 {
167
168
169
170 }
171 UxApplicationClasContext = UxSaveCtx;
172 }
173
174 static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
175 Widget UxWidget;
176 XEvent *UxEvent;
177 String *UxParams;
178 Cardinal *p_UxNumParams;
179 {
180 _UxCapplicationClas *UxSaveCtx, *UxContext;
181 swidget UxThisWidget;
182
183 UxThisWidget = UxWidgetToSwidget( UxWidget );
184 UxSaveCtx = UxApplicationClasContext;
185 UxApplicationClasContext = UxContext =
186 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
187 {
188 UxPutText(UxFindSwidget("SHelp"),"");
189 }
190 UxApplicationClasContext = UxSaveCtx;
191 }
192
193 static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
194 Widget UxWidget;
195 XEvent *UxEvent;
196 String *UxParams;
197 Cardinal *p_UxNumParams;
198 {
199 _UxCapplicationClas *UxSaveCtx, *UxContext;
200 swidget UxThisWidget;
201
202 UxThisWidget = UxWidgetToSwidget( UxWidget );
203 UxSaveCtx = UxApplicationClasContext;
204 UxApplicationClasContext = UxContext =
205 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
206 {
207 char s[100];
208
209
210 Widget sw = UxWidget;
211
212 strcpy(s,"");
213
214 if (sw == UxGetWidget(UxFindSwidget("ColButton"))) {
215 strcpy(s,"Select the OST columns to be displayed into the scrolled window");
216 UxPutText(UxFindSwidget("SHelp") ,s);
217 }
218 else if (sw == UxGetWidget(UxFindSwidget("ClassiButton"))) {
219 strcpy(s,"Activate interface for defining classification rules ");
220 UxPutText(UxFindSwidget("SHelp") ,s);
221 }
222 else if (sw == UxGetWidget(UxFindSwidget("AssoButton"))) {
223 strcpy(s,"Activate interface for classifying images");
224 UxPutText(UxFindSwidget("SHelp") ,s);
225 }
226 else if (sw == UxGetWidget(UxFindSwidget("AssoButton1"))) {
227 strcpy(s,"Activate interface for associating calibration exposures to scientific frames");
228 UxPutText(UxFindSwidget("SHelp") ,s);
229 }
230 else if (sw == UxGetWidget(UxFindSwidget("NewsButton3"))) {
231 strcpy(s,"Create the OST table");
232 UxPutText(UxFindSwidget("SHelp3") ,s);
233 }
234 else if (sw == UxGetWidget(UxFindSwidget("PrintButton3"))) {
235 strcpy(s,"Popdown this interface");
236 UxPutText(UxFindSwidget("SHelp3") ,s);
237 }
238 else if (sw == UxGetWidget(UxFindSwidget("ost_t1"))){
239 strcpy(s,"Name of the Observation Summary Table to be created ");
240 UxPutText(UxFindSwidget("SHelp3") ,s);
241 }
242 else if (sw == UxGetWidget(UxFindSwidget("ost_t2"))){
243 strcpy(s,"List of frames to be processed ");
244 UxPutText(UxFindSwidget("SHelp3") ,s);
245 }
246 else if (sw == UxGetWidget(UxFindSwidget("ost_t3"))){
247 strcpy(s,"Name of the table containing the list of relevant Midas descriptors");
248 UxPutText(UxFindSwidget("SHelp3") ,s);
249 }
250 else if (sw == UxGetWidget(UxFindSwidget("pushButton4"))){
251 strcpy(s,"Push button to popup the File Selection Box");
252 UxPutText(UxFindSwidget("SHelp3") ,s);
253 }
254 else if (sw == UxGetWidget(UxFindSwidget("pushButton5"))){
255 strcpy(s,"Push button to popup the File Selection Box");
256 UxPutText(UxFindSwidget("SHelp3") ,s);
257 }
258 }
259 UxApplicationClasContext = UxSaveCtx;
260 }
261
262 static void action_HelpACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
263 Widget UxWidget;
264 XEvent *UxEvent;
265 String *UxParams;
266 Cardinal *p_UxNumParams;
267 {
268 _UxCapplicationClas *UxSaveCtx, *UxContext;
269 swidget UxThisWidget;
270
271 UxThisWidget = UxWidgetToSwidget( UxWidget );
272 UxSaveCtx = UxApplicationClasContext;
273 UxApplicationClasContext = UxContext =
274 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
275 {
276 /* char *s;
277 s = XmTextGetSelection(UxWidget);
278
279 XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));
280 */}
281 UxApplicationClasContext = UxSaveCtx;
282 }
283
284 /*******************************************************************************
285 The following are callback functions.
286 *******************************************************************************/
287
288 static void activateCB_quitPane_b1( UxWidget, UxClientData, UxCallbackArg )
289 Widget UxWidget;
290 XtPointer UxClientData, UxCallbackArg;
291 {
292 _UxCapplicationClas *UxSaveCtx, *UxContext;
293 swidget UxThisWidget;
294
295 UxThisWidget = UxWidgetToSwidget( UxWidget );
296 UxSaveCtx = UxApplicationClasContext;
297 UxApplicationClasContext = UxContext =
298 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
299 {
300 extern swidget classi,ilist;
301 UxPopdownInterface(ilist);
302 UxPopdownInterface(classi);
303 }
304 UxApplicationClasContext = UxSaveCtx;
305 }
306
307 static void activateCB_UtilsPane_b1( UxWidget, UxClientData, UxCallbackArg )
308 Widget UxWidget;
309 XtPointer UxClientData, UxCallbackArg;
310 {
311 _UxCapplicationClas *UxSaveCtx, *UxContext;
312 swidget UxThisWidget;
313
314 UxThisWidget = UxWidgetToSwidget( UxWidget );
315 UxSaveCtx = UxApplicationClasContext;
316 UxApplicationClasContext = UxContext =
317 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
318 {
319 extern char ostchoice[60];
320 char command[160];
321 sprintf(command,"COPY/dd template.bdf *,3 %s",ostchoice);
322 AppendDialogText(command);
323 }
324 UxApplicationClasContext = UxSaveCtx;
325 }
326
327 static void activateCB_UtilsPane_b2( UxWidget, UxClientData, UxCallbackArg )
328 Widget UxWidget;
329 XtPointer UxClientData, UxCallbackArg;
330 {
331 _UxCapplicationClas *UxSaveCtx, *UxContext;
332 swidget UxThisWidget;
333
334 UxThisWidget = UxWidgetToSwidget( UxWidget );
335 UxSaveCtx = UxApplicationClasContext;
336 UxApplicationClasContext = UxContext =
337 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
338 {
339 extern int tidost,msgvalue;
340 extern Widget rowrule[256][2];
341 extern swidget mymsg,myerror;
342 extern char ostchoice[60],commerr[180];
343 char descr[16],command[180],type[2],selecrit[256];
344 char temp[256],mytext[256],mylabel[TBL_LABLEN+2];
345 int bytelem,noelem,ncol,dummy,i,tidtemp,coltemp;
346 strcpy(descr,UxGetText(UxFindSwidget("clas_t1")));
347 if (descr[0] == '\0') {
348 UxPutMessageString(UxFindSwidget("errorDialog1"),"No rule name specified");
349 UxPopupInterface(myerror,no_grab);
350 return;
351 }
352 SCDFND(tidost,descr,type,&noelem,&bytelem);
353 strcpy(selecrit,UxGetText(UxFindSwidget("criteria")));
354 if (selecrit[0] == '\0') {
355
356 TCIGET(tidost,&ncol,&dummy,&dummy,&dummy,&dummy);
357 oscfill(selecrit,256,'\0');
358 for (i=1; i<=ncol; i++) {
359 strcpy(mytext, XmTextGetString(rowrule[i-1][1]));
360 if (*mytext) {
361 mylabel[0] = ':';
362 TCLGET(tidost,i,mylabel+1);
363 if (selecrit[0] != '\0') strcat(selecrit,".AND.");
364 decrypt1(mylabel,mytext,selecrit,temp);
365 }
366 }
367 }
368 sprintf( command," @s saverule %s %s TMP_RULE ",ostchoice ,descr );
369
370 TCTINI("TMP_RULE" ,F_IO_MODE,F_TRANS,1,2,&tidtemp);
371 TCCINI(tidtemp,D_C_FORMAT,strlen(selecrit),"A20"," ","VAL",&coltemp);
372 TCEWRC(tidtemp, 1,coltemp,selecrit);
373 TCTCLO(tidtemp);
374 if (type[0] == ' ') AppendDialogText(command);
375
376 else
377 {
378 msgvalue = 1;
379 sprintf(commerr," @s saverule %s %s TMP_RULE ",ostchoice ,descr );
380 UxPutMessageString( UxFindSwidget("Warning"),"The rule already exists, do you want to overwrite it?");
381 UxPopupInterface(mymsg,exclusive_grab);
382 }
383 }
384 UxApplicationClasContext = UxSaveCtx;
385 }
386
387 static void activateCB_pullDownMenu1_p3_b1( UxWidget, UxClientData, UxCallbackArg )
388 Widget UxWidget;
389 XtPointer UxClientData, UxCallbackArg;
390 {
391 _UxCapplicationClas *UxSaveCtx, *UxContext;
392 swidget UxThisWidget;
393
394 UxThisWidget = UxWidgetToSwidget( UxWidget );
395 UxSaveCtx = UxApplicationClasContext;
396 UxApplicationClasContext = UxContext =
397 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
398 {
399 extern swidget ilist;
400 extern int doI;
401 UxPutListLabelString(UxFindSwidget("SelectInstrument"),"Rule");
402 UxPutDialogTitle(UxFindSwidget("SelectInstrument"),"Select Rule");
403 doI = 1;
404 read_descr(UxGetWidget(UxFindSwidget("SelectInstrument")));
405
406
407 UxPopupInterface(ilist,no_grab);}
408 UxApplicationClasContext = UxSaveCtx;
409 }
410
411 static void activateCB_pullDownMenu1_p4_b1( UxWidget, UxClientData, UxCallbackArg )
412 Widget UxWidget;
413 XtPointer UxClientData, UxCallbackArg;
414 {
415 _UxCapplicationClas *UxSaveCtx, *UxContext;
416 swidget UxThisWidget;
417
418 UxThisWidget = UxWidgetToSwidget( UxWidget );
419 UxSaveCtx = UxApplicationClasContext;
420 UxApplicationClasContext = UxContext =
421 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
422 {
423 extern swidget help;
424 display_help(help,"Rule.help");
425 }
426 UxApplicationClasContext = UxSaveCtx;
427 }
428
429 static void activateCB_pullDownMenu1_p4_b2( UxWidget, UxClientData, UxCallbackArg )
430 Widget UxWidget;
431 XtPointer UxClientData, UxCallbackArg;
432 {
433 _UxCapplicationClas *UxSaveCtx, *UxContext;
434 swidget UxThisWidget;
435
436 UxThisWidget = UxWidgetToSwidget( UxWidget );
437 UxSaveCtx = UxApplicationClasContext;
438 UxApplicationClasContext = UxContext =
439 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
440 {
441 extern swidget help;
442 display_help(help,"Rule_default.help");
443 }
444 UxApplicationClasContext = UxSaveCtx;
445 }
446
447 static void entryCB_rowdescr( UxWidget, UxClientData, UxCallbackArg )
448 Widget UxWidget;
449 XtPointer UxClientData, UxCallbackArg;
450 {
451 _UxCapplicationClas *UxSaveCtx, *UxContext;
452 swidget UxThisWidget;
453
454 UxThisWidget = UxWidgetToSwidget( UxWidget );
455 UxSaveCtx = UxApplicationClasContext;
456 UxApplicationClasContext = UxContext =
457 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
458 {
459 /*XmRowColumnCallbackStruct *cbs;
460 Widget pb = cbs->widget;
461 cbs = (XmRowColumnCallbackStruct *)UxCallbackArg;
462 printf("%s: %s\n",XtName(pb),cbs->data);*/
463 }
464 UxApplicationClasContext = UxSaveCtx;
465 }
466
467 static void createCB_rowdescr( UxWidget, UxClientData, UxCallbackArg )
468 Widget UxWidget;
469 XtPointer UxClientData, UxCallbackArg;
470 {
471 _UxCapplicationClas *UxSaveCtx, *UxContext;
472 swidget UxThisWidget;
473
474 UxThisWidget = UxWidgetToSwidget( UxWidget );
475 UxSaveCtx = UxApplicationClasContext;
476 UxApplicationClasContext = UxContext =
477 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
478 {
479
480 }
481 UxApplicationClasContext = UxSaveCtx;
482 }
483
484 static void activateCB_pushButton13( UxWidget, UxClientData, UxCallbackArg )
485 Widget UxWidget;
486 XtPointer UxClientData, UxCallbackArg;
487 {
488 _UxCapplicationClas *UxSaveCtx, *UxContext;
489 swidget UxThisWidget;
490
491 UxThisWidget = UxWidgetToSwidget( UxWidget );
492 UxSaveCtx = UxApplicationClasContext;
493 UxApplicationClasContext = UxContext =
494 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
495 {
496 extern int tidost;
497 extern Widget rowrule[256][2];
498 int ncol,dummy,i,lennew;
499 char mylabel[TBL_LABLEN+2],*temp,selecrit[256],mytext[256];
500 TCIGET(tidost,&ncol,&dummy,&dummy,&dummy,&dummy);
501 temp = osmmget(256);
502 oscfill(selecrit,256,'\0');
503 for (i=1; i<=ncol; i++) {
504 strcpy(mytext, XmTextGetString(rowrule[i-1][1]));
505 if (*mytext) {
506 mylabel[0] = ':';
507 TCLGET(tidost,i,mylabel+1);
508 if (selecrit[0] != '\0') strcat(selecrit,".AND.");
509 decrypt1(mylabel,mytext,selecrit,temp);
510 lennew = strlen(selecrit);
511 }
512 }
513 UxPutText(UxFindSwidget("criteria"),selecrit);
514 /*SCDWRC(tidost,"test",1,selecrit,1,lennew,&unit);*/
515
516 }
517 UxApplicationClasContext = UxSaveCtx;
518 }
519
520 static void activateCB_pushButton14( UxWidget, UxClientData, UxCallbackArg )
521 Widget UxWidget;
522 XtPointer UxClientData, UxCallbackArg;
523 {
524 _UxCapplicationClas *UxSaveCtx, *UxContext;
525 swidget UxThisWidget;
526
527 UxThisWidget = UxWidgetToSwidget( UxWidget );
528 UxSaveCtx = UxApplicationClasContext;
529 UxApplicationClasContext = UxContext =
530 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
531 {
532 extern Widget rowrule[256][2];
533 extern int tidost;
534 int dummy,i,ncol;
535 TCIGET(tidost,&ncol,&dummy,&dummy,&dummy,&dummy);
536 for (i=0; i<ncol; i++) {
537 XmTextSetString(rowrule[i][1],"");
538 }
539 UxPutText(UxFindSwidget("criteria"),"");
540 }
541 UxApplicationClasContext = UxSaveCtx;
542 }
543
544 static void modifyVerifyCB_criteria( UxWidget, UxClientData, UxCallbackArg )
545 Widget UxWidget;
546 XtPointer UxClientData, UxCallbackArg;
547 {
548 _UxCapplicationClas *UxSaveCtx, *UxContext;
549 swidget UxThisWidget;
550
551 UxThisWidget = UxWidgetToSwidget( UxWidget );
552 UxSaveCtx = UxApplicationClasContext;
553 UxApplicationClasContext = UxContext =
554 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
555 UxApplicationClasContext = UxSaveCtx;
556 }
557
558 static void valueChangedCB_criteria( UxWidget, UxClientData, UxCallbackArg )
559 Widget UxWidget;
560 XtPointer UxClientData, UxCallbackArg;
561 {
562 _UxCapplicationClas *UxSaveCtx, *UxContext;
563 swidget UxThisWidget;
564
565 UxThisWidget = UxWidgetToSwidget( UxWidget );
566 UxSaveCtx = UxApplicationClasContext;
567 UxApplicationClasContext = UxContext =
568 (_UxCapplicationClas *) UxGetContext( UxThisWidget );
569 {
570
571 }
572 UxApplicationClasContext = UxSaveCtx;
573 }
574
575 /*******************************************************************************
576 The 'init_' function sets the private properties for all the
577 swidgets to the values specified in the Property Table.
578 Some properties need to be set after the X widgets have been
579 created and the setting of these properties is done in the
580 'build_' function after the UxCreateWidget call.
581 *******************************************************************************/
582
583 static void _Uxinit_applicationClas()
584 {
585 UxPutTitle( applicationClas, "Classification Rules" );
586 UxPutHeight( applicationClas, 670 );
587 UxPutWidth( applicationClas, 370 );
588 UxPutY( applicationClas, 260 );
589 UxPutX( applicationClas, 690 );
590
591 UxPutUnitType( mainWindow1, "pixels" );
592 UxPutBackground( mainWindow1, WindowBackground );
593 UxPutHeight( mainWindow1, 470 );
594 UxPutWidth( mainWindow1, 700 );
595 UxPutY( mainWindow1, 180 );
596 UxPutX( mainWindow1, 200 );
597
598 UxPutForeground( pullDownMenu1, MenuForeground );
599 UxPutBackground( pullDownMenu1, MenuBackground );
600 UxPutMenuAccelerator( pullDownMenu1, "<KeyUp>F10" );
601 UxPutRowColumnType( pullDownMenu1, "menu_bar" );
602 UxPutBorderWidth( pullDownMenu1, 0 );
603
604 UxPutForeground( quitPane1, MenuForeground );
605 UxPutBackground( quitPane1, MenuBackground );
606 UxPutRowColumnType( quitPane1, "menu_pulldown" );
607
608 UxPutFontList( quitPane_b1, BoldTextFont );
609 UxPutLabelString( quitPane_b1, "Bye" );
610
611 UxPutForeground( pullDownMenu_top_b2, MenuForeground );
612 UxPutFontList( pullDownMenu_top_b2, BoldTextFont );
613 UxPutBackground( pullDownMenu_top_b2, MenuBackground );
614 UxPutMnemonic( pullDownMenu_top_b2, "Q" );
615 UxPutLabelString( pullDownMenu_top_b2, "Quit" );
616
617 UxPutForeground( UtilsPane1, MenuForeground );
618 UxPutBackground( UtilsPane1, MenuBackground );
619 UxPutRowColumnType( UtilsPane1, "menu_pulldown" );
620
621 UxPutFontList( UtilsPane_b1, BoldTextFont );
622 UxPutLabelString( UtilsPane_b1, "Import " );
623
624 UxPutFontList( UtilsPane_b2, BoldTextFont );
625 UxPutLabelString( UtilsPane_b2, "Save" );
626
627 UxPutX( commandsCascade1, 101 );
628 UxPutMnemonic( commandsCascade1, "R" );
629 UxPutForeground( commandsCascade1, MenuForeground );
630 UxPutFontList( commandsCascade1, BoldTextFont );
631 UxPutBackground( commandsCascade1, MenuBackground );
632 UxPutLabelString( commandsCascade1, "Rule" );
633
634 UxPutForeground( pullDownMenu1_p3, MenuForeground );
635 UxPutBackground( pullDownMenu1_p3, MenuBackground );
636 UxPutRowColumnType( pullDownMenu1_p3, "menu_pulldown" );
637
638 UxPutFontList( pullDownMenu1_p3_b1, BoldTextFont );
639 UxPutLabelString( pullDownMenu1_p3_b1, "Editor..." );
640
641 UxPutSensitive( pullDownMenu1_p3_b2, "false" );
642 UxPutFontList( pullDownMenu1_p3_b2, BoldTextFont );
643 UxPutLabelString( pullDownMenu1_p3_b2, "Delete" );
644
645 UxPutForeground( pullDownMenu1_top_b1, MenuForeground );
646 UxPutFontList( pullDownMenu1_top_b1, BoldTextFont );
647 UxPutBackground( pullDownMenu1_top_b1, MenuBackground );
648 UxPutMnemonic( pullDownMenu1_top_b1, "E" );
649 UxPutLabelString( pullDownMenu1_top_b1, "Edit" );
650
651 UxPutForeground( pullDownMenu1_p4, MenuForeground );
652 UxPutBackground( pullDownMenu1_p4, MenuBackground );
653 UxPutRowColumnType( pullDownMenu1_p4, "menu_pulldown" );
654
655 UxPutFontList( pullDownMenu1_p4_b1, BoldTextFont );
656 UxPutLabelString( pullDownMenu1_p4_b1, "On this interface..." );
657
658 UxPutFontList( pullDownMenu1_p4_b2, BoldTextFont );
659 UxPutLabelString( pullDownMenu1_p4_b2, "On NTT defaults..." );
660
661 UxPutForeground( pullDownMenu1_top_b4, MenuForeground );
662 UxPutFontList( pullDownMenu1_top_b4, BoldTextFont );
663 UxPutBackground( pullDownMenu1_top_b4, MenuBackground );
664 UxPutMnemonic( pullDownMenu1_top_b4, "H" );
665 UxPutLabelString( pullDownMenu1_top_b4, "Help" );
666
667 UxPutBackground( workAreaForm1, WindowBackground );
668 UxPutBorderWidth( workAreaForm1, 0 );
669 UxPutHeight( workAreaForm1, 440 );
670 UxPutWidth( workAreaForm1, 490 );
671
672 UxPutBackground( form6, WindowBackground );
673 UxPutHeight( form6, 610 );
674 UxPutWidth( form6, 350 );
675 UxPutY( form6, 10 );
676 UxPutX( form6, 10 );
677 UxPutUnitType( form6, "pixels" );
678 UxPutResizePolicy( form6, "resize_none" );
679
680 UxPutScrollBarDisplayPolicy( scrolledWindow6, "static" );
681 UxPutScrollBarPlacement( scrolledWindow6, "bottom_left" );
682 UxPutBackground( scrolledWindow6, WindowBackground );
683 UxPutHeight( scrolledWindow6, 380 );
684 UxPutWidth( scrolledWindow6, 350 );
685 UxPutY( scrolledWindow6, 30 );
686 UxPutX( scrolledWindow6, 10 );
687 UxPutScrollingPolicy( scrolledWindow6, "automatic" );
688
689 UxPutResizeWidth( rowdescr, "true" );
690 UxPutNumColumns( rowdescr, 2 );
691 UxPutPacking( rowdescr, "pack_column" );
692 UxPutOrientation( rowdescr, "horizontal" );
693 UxPutEntryAlignment( rowdescr, "alignment_center" );
694 UxPutBackground( rowdescr, WindowBackground );
695 UxPutHeight( rowdescr, 370 );
696 UxPutWidth( rowdescr, 350 );
697 UxPutY( rowdescr, 8 );
698 UxPutX( rowdescr, 8 );
699
700 UxPutAlignment( label7, "alignment_beginning" );
701 UxPutLabelString( label7, "Selection Criteria" );
702 UxPutFontList( label7, BoldTextFont );
703 UxPutBackground( label7, WindowBackground );
704 UxPutHeight( label7, 40 );
705 UxPutWidth( label7, 240 );
706 UxPutY( label7, 420 );
707 UxPutX( label7, 10 );
708
709 UxPutLabelString( pushButton13, "Apply" );
710 UxPutForeground( pushButton13, ButtonForeground );
711 UxPutFontList( pushButton13, BoldTextFont );
712 UxPutBackground( pushButton13, ButtonBackground );
713 UxPutHeight( pushButton13, 40 );
714 UxPutWidth( pushButton13, 80 );
715 UxPutY( pushButton13, 530 );
716 UxPutX( pushButton13, 140 );
717
718 UxPutLabelString( pushButton14, "Clear" );
719 UxPutForeground( pushButton14, ButtonForeground );
720 UxPutFontList( pushButton14, BoldTextFont );
721 UxPutBackground( pushButton14, ButtonBackground );
722 UxPutHeight( pushButton14, 40 );
723 UxPutWidth( pushButton14, 80 );
724 UxPutY( pushButton14, 530 );
725 UxPutX( pushButton14, 250 );
726
727 UxPutAlignment( label8, "alignment_beginning" );
728 UxPutLabelString( label8, "Rule Name" );
729 UxPutFontList( label8, BoldTextFont );
730 UxPutBackground( label8, WindowBackground );
731 UxPutHeight( label8, 40 );
732 UxPutWidth( label8, 100 );
733 UxPutY( label8, 410 );
734 UxPutX( label8, 20 );
735
736 UxPutForeground( clas_t1, TextForeground );
737 UxPutFontList( clas_t1, BoldSmallFont );
738 UxPutBackground( clas_t1, TextBackground );
739 UxPutHeight( clas_t1, 40 );
740 UxPutWidth( clas_t1, 200 );
741 UxPutY( clas_t1, 450 );
742 UxPutX( clas_t1, 20 );
743
744 UxPutScrollBarPlacement( scrolledWindow7, "bottom_left" );
745 UxPutHeight( scrolledWindow7, 60 );
746 UxPutBackground( scrolledWindow7, WindowBackground );
747 UxPutShadowThickness( scrolledWindow7, 0 );
748 UxPutScrollBarDisplayPolicy( scrolledWindow7, "static" );
749 UxPutVisualPolicy( scrolledWindow7, "variable" );
750 UxPutY( scrolledWindow7, 490 );
751 UxPutX( scrolledWindow7, 0 );
752 UxPutScrollingPolicy( scrolledWindow7, "application_defined" );
753
754 UxPutForeground( criteria, TextForeground );
755 UxPutEditable( criteria, "true" );
756 UxPutFontList( criteria, BoldTextFont );
757 UxPutBackground( criteria, TextBackground );
758 UxPutHeight( criteria, 60 );
759 UxPutWidth( criteria, 350 );
760
761 }
762
763 /*******************************************************************************
764 The 'build_' function creates all the swidgets and X widgets,
765 and sets their properties to the values specified in the
766 Property Editor.
767 *******************************************************************************/
768
769 static swidget _Uxbuild_applicationClas()
770 {
771 /* Create the swidgets */
772
773 applicationClas = UxCreateApplicationShell( "applicationClas", NO_PARENT );
774 UxPutContext( applicationClas, UxApplicationClasContext );
775
776 mainWindow1 = UxCreateMainWindow( "mainWindow1", applicationClas );
777 pullDownMenu1 = UxCreateRowColumn( "pullDownMenu1", mainWindow1 );
778 quitPane1 = UxCreateRowColumn( "quitPane1", pullDownMenu1 );
779 quitPane_b1 = UxCreatePushButtonGadget( "quitPane_b1", quitPane1 );
780 pullDownMenu_top_b2 = UxCreateCascadeButton( "pullDownMenu_top_b2", pullDownMenu1 );
781 UtilsPane1 = UxCreateRowColumn( "UtilsPane1", pullDownMenu1 );
782 UtilsPane_b1 = UxCreatePushButtonGadget( "UtilsPane_b1", UtilsPane1 );
783 UtilsPane_b2 = UxCreatePushButtonGadget( "UtilsPane_b2", UtilsPane1 );
784 commandsCascade1 = UxCreateCascadeButton( "commandsCascade1", pullDownMenu1 );
785 pullDownMenu1_p3 = UxCreateRowColumn( "pullDownMenu1_p3", pullDownMenu1 );
786 pullDownMenu1_p3_b1 = UxCreatePushButtonGadget( "pullDownMenu1_p3_b1", pullDownMenu1_p3 );
787 pullDownMenu1_p3_b2 = UxCreatePushButtonGadget( "pullDownMenu1_p3_b2", pullDownMenu1_p3 );
788 pullDownMenu1_top_b1 = UxCreateCascadeButton( "pullDownMenu1_top_b1", pullDownMenu1 );
789 pullDownMenu1_p4 = UxCreateRowColumn( "pullDownMenu1_p4", pullDownMenu1 );
790 pullDownMenu1_p4_b1 = UxCreatePushButtonGadget( "pullDownMenu1_p4_b1", pullDownMenu1_p4 );
791 pullDownMenu1_p4_b2 = UxCreatePushButtonGadget( "pullDownMenu1_p4_b2", pullDownMenu1_p4 );
792 pullDownMenu1_top_b4 = UxCreateCascadeButton( "pullDownMenu1_top_b4", pullDownMenu1 );
793 workAreaForm1 = UxCreateForm( "workAreaForm1", mainWindow1 );
794 form6 = UxCreateForm( "form6", workAreaForm1 );
795 scrolledWindow6 = UxCreateScrolledWindow( "scrolledWindow6", form6 );
796 rowdescr = UxCreateRowColumn( "rowdescr", scrolledWindow6 );
797 label7 = UxCreateLabel( "label7", form6 );
798 pushButton13 = UxCreatePushButton( "pushButton13", form6 );
799 pushButton14 = UxCreatePushButton( "pushButton14", form6 );
800 label8 = UxCreateLabel( "label8", form6 );
801 clas_t1 = UxCreateText( "clas_t1", form6 );
802 scrolledWindow7 = UxCreateScrolledWindow( "scrolledWindow7", form6 );
803 criteria = UxCreateScrolledText( "criteria", scrolledWindow7 );
804
805 _Uxinit_applicationClas();
806
807 /* Create the X widgets */
808
809 UxCreateWidget( applicationClas );
810 UxCreateWidget( mainWindow1 );
811 UxCreateWidget( pullDownMenu1 );
812 UxCreateWidget( quitPane1 );
813 UxCreateWidget( quitPane_b1 );
814 UxPutSubMenuId( pullDownMenu_top_b2, "quitPane1" );
815 UxCreateWidget( pullDownMenu_top_b2 );
816
817 UxCreateWidget( UtilsPane1 );
818 UxCreateWidget( UtilsPane_b1 );
819 UxCreateWidget( UtilsPane_b2 );
820 UxPutSubMenuId( commandsCascade1, "UtilsPane1" );
821 UxCreateWidget( commandsCascade1 );
822
823 UxCreateWidget( pullDownMenu1_p3 );
824 UxCreateWidget( pullDownMenu1_p3_b1 );
825 UxCreateWidget( pullDownMenu1_p3_b2 );
826 UxPutSubMenuId( pullDownMenu1_top_b1, "pullDownMenu1_p3" );
827 UxCreateWidget( pullDownMenu1_top_b1 );
828
829 UxCreateWidget( pullDownMenu1_p4 );
830 UxCreateWidget( pullDownMenu1_p4_b1 );
831 UxCreateWidget( pullDownMenu1_p4_b2 );
832 UxPutSubMenuId( pullDownMenu1_top_b4, "pullDownMenu1_p4" );
833 UxCreateWidget( pullDownMenu1_top_b4 );
834
835 UxCreateWidget( workAreaForm1 );
836 UxCreateWidget( form6 );
837 UxPutTopAttachment( scrolledWindow6, "attach_form" );
838 UxPutTopOffset( scrolledWindow6, 50 );
839 UxPutBottomOffset( scrolledWindow6, 70 );
840 UxPutBottomAttachment( scrolledWindow6, "attach_none" );
841 UxPutLeftOffset( scrolledWindow6, 10 );
842 UxPutRightOffset( scrolledWindow6, 10 );
843 UxPutRightAttachment( scrolledWindow6, "attach_form" );
844 UxPutLeftAttachment( scrolledWindow6, "attach_form" );
845 UxCreateWidget( scrolledWindow6 );
846
847 UxCreateWidget( rowdescr );
848 createCB_rowdescr( UxGetWidget( rowdescr ),
849 (XtPointer) UxApplicationClasContext, (XtPointer) NULL );
850
851 UxPutTopAttachment( label7, "attach_form" );
852 UxPutTopOffset( label7, 440 );
853 UxCreateWidget( label7 );
854
855 UxPutLeftOffset( pushButton13, 40 );
856 UxPutLeftAttachment( pushButton13, "attach_form" );
857 UxPutBottomOffset( pushButton13, 10 );
858 UxPutBottomAttachment( pushButton13, "attach_form" );
859 UxCreateWidget( pushButton13 );
860
861 UxPutBottomOffset( pushButton14, 10 );
862 UxPutBottomAttachment( pushButton14, "attach_form" );
863 UxPutRightOffset( pushButton14, 40 );
864 UxPutRightAttachment( pushButton14, "attach_form" );
865 UxPutLeftWidget( pushButton14, "pushButton13" );
866 UxPutLeftOffset( pushButton14, 40 );
867 UxPutLeftAttachment( pushButton14, "attach_none" );
868 UxCreateWidget( pushButton14 );
869
870 UxPutLeftAttachment( label8, "attach_form" );
871 UxPutLeftOffset( label8, 10 );
872 UxPutTopOffset( label8, 0 );
873 UxPutTopAttachment( label8, "attach_form" );
874 UxCreateWidget( label8 );
875
876 UxPutLeftOffset( clas_t1, 130 );
877 UxPutLeftAttachment( clas_t1, "attach_form" );
878 UxPutTopOffset( clas_t1, 0 );
879 UxPutTopAttachment( clas_t1, "attach_form" );
880 UxCreateWidget( clas_t1 );
881
882 UxPutTopOffset( scrolledWindow7, 480 );
883 UxPutTopAttachment( scrolledWindow7, "attach_form" );
884 UxPutRightOffset( scrolledWindow7, 10 );
885 UxPutRightAttachment( scrolledWindow7, "attach_form" );
886 UxPutLeftOffset( scrolledWindow7, 10 );
887 UxPutLeftAttachment( scrolledWindow7, "attach_form" );
888 UxCreateWidget( scrolledWindow7 );
889
890 UxCreateWidget( criteria );
891
892 UxPutMenuHelpWidget( pullDownMenu1, "pullDownMenu_top_b2" );
893
894 UxAddCallback( quitPane_b1, XmNactivateCallback,
895 activateCB_quitPane_b1,
896 (XtPointer) UxApplicationClasContext );
897
898 UxAddCallback( UtilsPane_b1, XmNactivateCallback,
899 activateCB_UtilsPane_b1,
900 (XtPointer) UxApplicationClasContext );
901
902 UxAddCallback( UtilsPane_b2, XmNactivateCallback,
903 activateCB_UtilsPane_b2,
904 (XtPointer) UxApplicationClasContext );
905
906 UxAddCallback( pullDownMenu1_p3_b1, XmNactivateCallback,
907 activateCB_pullDownMenu1_p3_b1,
908 (XtPointer) UxApplicationClasContext );
909
910 UxAddCallback( pullDownMenu1_p4_b1, XmNactivateCallback,
911 activateCB_pullDownMenu1_p4_b1,
912 (XtPointer) UxApplicationClasContext );
913
914 UxAddCallback( pullDownMenu1_p4_b2, XmNactivateCallback,
915 activateCB_pullDownMenu1_p4_b2,
916 (XtPointer) UxApplicationClasContext );
917
918 UxAddCallback( rowdescr, XmNentryCallback,
919 entryCB_rowdescr,
920 (XtPointer) UxApplicationClasContext );
921
922 UxAddCallback( pushButton13, XmNactivateCallback,
923 activateCB_pushButton13,
924 (XtPointer) UxApplicationClasContext );
925
926 UxAddCallback( pushButton14, XmNactivateCallback,
927 activateCB_pushButton14,
928 (XtPointer) UxApplicationClasContext );
929
930 UxAddCallback( criteria, XmNmodifyVerifyCallback,
931 modifyVerifyCB_criteria,
932 (XtPointer) UxApplicationClasContext );
933 UxAddCallback( criteria, XmNvalueChangedCallback,
934 valueChangedCB_criteria,
935 (XtPointer) UxApplicationClasContext );
936
937
938 /* Finally, call UxRealizeInterface to create the X windows
939 for the widgets created above. */
940
941 UxRealizeInterface( applicationClas );
942
943 UxMainWindowSetAreas( mainWindow1, pullDownMenu1, NULL_SWIDGET,
944 NULL_SWIDGET, NULL_SWIDGET, workAreaForm1 );
945 return ( applicationClas );
946 }
947
948 /*******************************************************************************
949 The following function includes the code that was entered
950 in the 'Initial Code' and 'Final Code' sections of the
951 Declarations Editor. This function is called from the
952 'Interface function' below.
953 *******************************************************************************/
954
955 static swidget _Ux_create_applicationClas()
956 {
957 swidget rtrn;
958 _UxCapplicationClas *UxContext;
959
960 UxApplicationClasContext = UxContext =
961 (_UxCapplicationClas *) UxMalloc( sizeof(_UxCapplicationClas) );
962
963 rtrn = _Uxbuild_applicationClas();
964
965 return(rtrn);
966 }
967
968 /*******************************************************************************
969 The following is the 'Interface function' which is the
970 external entry point for creating this interface.
971 This function should be called from your application or from
972 a callback function.
973 *******************************************************************************/
974
975 swidget create_applicationClas()
976 {
977 swidget _Uxrtrn;
978 static int _Uxinit = 0;
979
980 if ( ! _Uxinit )
981 {
982 static XtActionsRec _Uxactions[] = {
983 { "nothing", action_nothing },
984 { "SelectCommand", action_SelectCommand },
985 { "ClearHelp", action_ClearHelp },
986 { "WriteHelp", action_WriteHelp },
987 { "HelpACT", action_HelpACT }
988 };
989
990 XtAppAddActions( UxAppContext,
991 _Uxactions,
992 XtNumber(_Uxactions) );
993
994 _Uxinit = 1;
995 }
996
997 _Uxrtrn = _Ux_create_applicationClas();
998
999 return ( _Uxrtrn );
1000 }
1001
1002 /*******************************************************************************
1003 END OF FILE
1004 *******************************************************************************/
1005