Debian Codegraph @

gui/XDo/src/Associate.c

raw
1
2 /*******************************************************************************
3 Associate.c
4
5 .VERSION
6 090825 last modif
7
8 *******************************************************************************/
9
10 #include <stdio.h>
11 #include "UxLib.h"
12 #include "UxText.h"
13 #include "UxLabel.h"
14 #include "UxScrW.h"
15 #include "UxForm.h"
16 #include "UxCascB.h"
17 #include "UxPushBG.h"
18 #include "UxRowCol.h"
19 #include "UxMainW.h"
20 #include "UxApplSh.h"
21
22 #include "midas_def.h"
23
24 /*******************************************************************************
25 Includes, Defines, and Global variables from the Declarations Editor:
26 *******************************************************************************/
27
28 #include <ExternResources.h>
29
30 /*******************************************************************************
31 The definition of the context structure:
32 If you create multiple instances of your interface, the context
33 structure ensures that your callbacks use the variables for the
34 correct instance.
35
36 For each swidget in the interface, each argument to the Interface
37 function, and each variable in the Instance Specific section of the
38 Declarations Editor, there is an entry in the context structure.
39 and a #define. The #define makes the variable name refer to the
40 corresponding entry in the context structure.
41 *******************************************************************************/
42
43 typedef struct
44 {
45 swidget UxAssociate;
46 swidget UxmainWindow3;
47 swidget UxpullDownMenu3;
48 swidget UxquitPane3;
49 swidget UxquitPane_b4;
50 swidget UxpullDownMenu_top_b4;
51 swidget UxUtilsPane3;
52 swidget UxUtilsPane_b11;
53 swidget UxUtilsPane_b12;
54 swidget UxcommandsCascade3;
55 swidget UxpullDownMenu1_p2;
56 swidget UxpullDownMenu1_p3_b4;
57 swidget UxpullDownMenu1_p1_b1;
58 swidget UxpullDownMenu1_top_b3;
59 swidget UxpullDownMenu3_p4;
60 swidget UxpullDownMenu3_p4_b1;
61 swidget UxpullDownMenu3_p4_b2;
62 swidget UxpullDownMenu3_top_b1;
63 swidget UxworkAreaForm3;
64 swidget Uxform4;
65 swidget UxscrolledWindow4;
66 swidget Uxrowasso;
67 swidget Uxlabel14;
68 swidget Uxlabel15;
69 swidget Uxlabel16;
70 swidget Uxlabel17;
71 swidget Uxlabel19;
72 swidget Uxarule_name;
73 } _UxCAssociate;
74
75 #define Associate UxAssociateContext->UxAssociate
76 #define mainWindow3 UxAssociateContext->UxmainWindow3
77 #define pullDownMenu3 UxAssociateContext->UxpullDownMenu3
78 #define quitPane3 UxAssociateContext->UxquitPane3
79 #define quitPane_b4 UxAssociateContext->UxquitPane_b4
80 #define pullDownMenu_top_b4 UxAssociateContext->UxpullDownMenu_top_b4
81 #define UtilsPane3 UxAssociateContext->UxUtilsPane3
82 #define UtilsPane_b11 UxAssociateContext->UxUtilsPane_b11
83 #define UtilsPane_b12 UxAssociateContext->UxUtilsPane_b12
84 #define commandsCascade3 UxAssociateContext->UxcommandsCascade3
85 #define pullDownMenu1_p2 UxAssociateContext->UxpullDownMenu1_p2
86 #define pullDownMenu1_p3_b4 UxAssociateContext->UxpullDownMenu1_p3_b4
87 #define pullDownMenu1_p1_b1 UxAssociateContext->UxpullDownMenu1_p1_b1
88 #define pullDownMenu1_top_b3 UxAssociateContext->UxpullDownMenu1_top_b3
89 #define pullDownMenu3_p4 UxAssociateContext->UxpullDownMenu3_p4
90 #define pullDownMenu3_p4_b1 UxAssociateContext->UxpullDownMenu3_p4_b1
91 #define pullDownMenu3_p4_b2 UxAssociateContext->UxpullDownMenu3_p4_b2
92 #define pullDownMenu3_top_b1 UxAssociateContext->UxpullDownMenu3_top_b1
93 #define workAreaForm3 UxAssociateContext->UxworkAreaForm3
94 #define form4 UxAssociateContext->Uxform4
95 #define scrolledWindow4 UxAssociateContext->UxscrolledWindow4
96 #define rowasso UxAssociateContext->Uxrowasso
97 #define label14 UxAssociateContext->Uxlabel14
98 #define label15 UxAssociateContext->Uxlabel15
99 #define label16 UxAssociateContext->Uxlabel16
100 #define label17 UxAssociateContext->Uxlabel17
101 #define label19 UxAssociateContext->Uxlabel19
102 #define arule_name UxAssociateContext->Uxarule_name
103
104 static _UxCAssociate *UxAssociateContext;
105
106 extern void SetFileList();
107
108 extern int save_asso_table();
109
110
111 /*******************************************************************************
112 The following are translation tables.
113 *******************************************************************************/
114
115
116 /*******************************************************************************
117 Forward declarations of functions that are defined later in this file.
118 *******************************************************************************/
119
120 swidget create_Associate();
121
122 /*******************************************************************************
123 The following are Action functions.
124 *******************************************************************************/
125
126 static void action_nothing( UxWidget, UxEvent, UxParams, p_UxNumParams )
127 Widget UxWidget;
128 XEvent *UxEvent;
129 String *UxParams;
130 Cardinal *p_UxNumParams;
131 {
132 _UxCAssociate *UxSaveCtx, *UxContext;
133 swidget UxThisWidget;
134
135 UxThisWidget = UxWidgetToSwidget( UxWidget );
136 UxSaveCtx = UxAssociateContext;
137 UxAssociateContext = UxContext =
138 (_UxCAssociate *) UxGetContext( UxThisWidget );
139 {
140 printf("toto:\n");
141 }
142 UxAssociateContext = UxSaveCtx;
143 }
144
145 static void action_SelectCommand( UxWidget, UxEvent, UxParams, p_UxNumParams )
146 Widget UxWidget;
147 XEvent *UxEvent;
148 String *UxParams;
149 Cardinal *p_UxNumParams;
150 {
151 _UxCAssociate *UxSaveCtx, *UxContext;
152 swidget UxThisWidget;
153
154 UxThisWidget = UxWidgetToSwidget( UxWidget );
155 UxSaveCtx = UxAssociateContext;
156 UxAssociateContext = UxContext =
157 (_UxCAssociate *) UxGetContext( UxThisWidget );
158 {
159
160
161
162 }
163 UxAssociateContext = UxSaveCtx;
164 }
165
166 static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
167 Widget UxWidget;
168 XEvent *UxEvent;
169 String *UxParams;
170 Cardinal *p_UxNumParams;
171 {
172 _UxCAssociate *UxSaveCtx, *UxContext;
173 swidget UxThisWidget;
174
175 UxThisWidget = UxWidgetToSwidget( UxWidget );
176 UxSaveCtx = UxAssociateContext;
177 UxAssociateContext = UxContext =
178 (_UxCAssociate *) UxGetContext( UxThisWidget );
179 {
180 UxPutText(UxFindSwidget("SHelp"),"");
181 }
182 UxAssociateContext = UxSaveCtx;
183 }
184
185 static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
186 Widget UxWidget;
187 XEvent *UxEvent;
188 String *UxParams;
189 Cardinal *p_UxNumParams;
190 {
191 _UxCAssociate *UxSaveCtx, *UxContext;
192 swidget UxThisWidget;
193
194 UxThisWidget = UxWidgetToSwidget( UxWidget );
195 UxSaveCtx = UxAssociateContext;
196 UxAssociateContext = UxContext =
197 (_UxCAssociate *) UxGetContext( UxThisWidget );
198 {
199 char s[100];
200
201 Widget sw = UxWidget;
202
203 strcpy(s,"");
204 /*sprintf(comm,"WRITE/OUT here");
205 AppendDialogText(comm);*/
206
207 if (sw == UxGetWidget(UxFindSwidget("ColButton"))) {
208 strcpy(s,"Select the OST columns to be displayed into the scrolled window");
209 UxPutText(UxFindSwidget("SHelp") ,s);
210 }
211 else if (sw == UxGetWidget(UxFindSwidget("ClassiButton"))) {
212 strcpy(s,"Activate interface for defining classification rules ");
213 UxPutText(UxFindSwidget("SHelp") ,s);
214 }
215 else if (sw == UxGetWidget(UxFindSwidget("AssoButton"))) {
216 strcpy(s,"Activate interface for classifying images");
217 UxPutText(UxFindSwidget("SHelp") ,s);
218 }
219 else if (sw == UxGetWidget(UxFindSwidget("AssoButton1"))) {
220 strcpy(s,"Activate interface for associating calibration exposures to scientific frames");
221 UxPutText(UxFindSwidget("SHelp") ,s);
222 }
223 else if (sw == UxGetWidget(UxFindSwidget("NewsButton3"))) {
224 strcpy(s,"Create the OST table");
225 UxPutText(UxFindSwidget("SHelp3") ,s);
226 }
227 else if (sw == UxGetWidget(UxFindSwidget("PrintButton3"))) {
228 strcpy(s,"Popdown this interface");
229 UxPutText(UxFindSwidget("SHelp3") ,s);
230 }
231 else if (sw == UxGetWidget(UxFindSwidget("ost_t1"))){
232 strcpy(s,"Name of the Observation Summary Table to be created ");
233 UxPutText(UxFindSwidget("SHelp3") ,s);
234 }
235 else if (sw == UxGetWidget(UxFindSwidget("ost_t2"))){
236 strcpy(s,"List of frames to be processed ");
237 UxPutText(UxFindSwidget("SHelp3") ,s);
238 }
239 else if (sw == UxGetWidget(UxFindSwidget("ost_t3"))){
240 strcpy(s,"Name of the table containing the list of relevant Midas descriptors");
241 UxPutText(UxFindSwidget("SHelp3") ,s);
242 }
243 else if (sw == UxGetWidget(UxFindSwidget("pushButton4"))){
244 strcpy(s,"Push button to popup the File Selection Box");
245 UxPutText(UxFindSwidget("SHelp3") ,s);
246 }
247 else if (sw == UxGetWidget(UxFindSwidget("pushButton5"))){
248 strcpy(s,"Push button to popup the File Selection Box");
249 UxPutText(UxFindSwidget("SHelp3") ,s);
250 }
251 }
252 UxAssociateContext = UxSaveCtx;
253 }
254
255 static void action_HelpACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
256 Widget UxWidget;
257 XEvent *UxEvent;
258 String *UxParams;
259 Cardinal *p_UxNumParams;
260 {
261 _UxCAssociate *UxSaveCtx, *UxContext;
262 swidget UxThisWidget;
263
264 UxThisWidget = UxWidgetToSwidget( UxWidget );
265 UxSaveCtx = UxAssociateContext;
266 UxAssociateContext = UxContext =
267 (_UxCAssociate *) UxGetContext( UxThisWidget );
268 {
269 /* char *s;
270 s = XmTextGetSelection(UxWidget);
271
272 XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));
273 */}
274 UxAssociateContext = UxSaveCtx;
275 }
276
277 /*******************************************************************************
278 The following are callback functions.
279 *******************************************************************************/
280
281 static void activateCB_quitPane_b4( UxWidget, UxClientData, UxCallbackArg )
282 Widget UxWidget;
283 XtPointer UxClientData, UxCallbackArg;
284 {
285 _UxCAssociate *UxSaveCtx, *UxContext;
286 swidget UxThisWidget;
287
288 UxThisWidget = UxWidgetToSwidget( UxWidget );
289 UxSaveCtx = UxAssociateContext;
290 UxAssociateContext = UxContext =
291 (_UxCAssociate *) UxGetContext( UxThisWidget );
292 {
293 extern swidget asso;
294 extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
295 extern int rowno;
296 int i;
297 for (i=0; i<5; i++) {
298 XmTextSetString(arow1[i],"");
299 XmTextSetString(arow2[i],"");
300 XmTextSetString(arow3[i],"");
301 XmTextSetString(arow4[i],"");
302 }
303 for (i=5; i<rowno; i++) {
304 XtDestroyWidget(arow1[i]);
305 arow1[i] = (Widget )0;
306 XtDestroyWidget(arow2[i]);
307 arow2[i] = (Widget )0;
308 XtDestroyWidget(arow3[i]);
309 arow3[i] = (Widget )0;
310 XtDestroyWidget(arow4[i]);
311 arow4[i] = (Widget )0;
312 }
313 rowno =5;
314 UxPopdownInterface(asso);
315 }
316 UxAssociateContext = UxSaveCtx;
317 }
318
319 static void activateCB_UtilsPane_b11( UxWidget, UxClientData, UxCallbackArg )
320 Widget UxWidget;
321 XtPointer UxClientData, UxCallbackArg;
322 {
323 _UxCAssociate *UxSaveCtx, *UxContext;
324 swidget UxThisWidget;
325
326 UxThisWidget = UxWidgetToSwidget( UxWidget );
327 UxSaveCtx = UxAssociateContext;
328 UxAssociateContext = UxContext =
329 (_UxCAssociate *) UxGetContext( UxThisWidget );
330 {
331 char s[1000];
332 extern swidget klist,tablelist;
333
334 extern int do8;
335 int strip =1;
336 strcpy(s,"*.tbl");
337 SetFileList(UxGetWidget(tablelist),strip,s);
338 UxPutTitle(UxFindSwidget("transientShell8"),"Select Classification Table");
339 do8 = 2;
340 UxPopupInterface(klist,no_grab);
341 }
342 UxAssociateContext = UxSaveCtx;
343 }
344
345 static void activateCB_UtilsPane_b12( UxWidget, UxClientData, UxCallbackArg )
346 Widget UxWidget;
347 XtPointer UxClientData, UxCallbackArg;
348 {
349 _UxCAssociate *UxSaveCtx, *UxContext;
350 swidget UxThisWidget;
351
352 UxThisWidget = UxWidgetToSwidget( UxWidget );
353 UxSaveCtx = UxAssociateContext;
354 UxAssociateContext = UxContext =
355 (_UxCAssociate *) UxGetContext( UxThisWidget );
356 {
357 char mytext[60];
358 int tid;
359 strcpy(mytext,UxGetText(UxFindSwidget("arule_name")));
360
361 tid = TCTID(mytext);
362 if (tid != -1) TCTCLO(tid);
363 save_asso_table(mytext);
364
365 }
366 UxAssociateContext = UxSaveCtx;
367 }
368
369 static void activateCB_pullDownMenu1_p3_b4( UxWidget, UxClientData, UxCallbackArg )
370 Widget UxWidget;
371 XtPointer UxClientData, UxCallbackArg;
372 {
373 _UxCAssociate *UxSaveCtx, *UxContext;
374 swidget UxThisWidget;
375
376 UxThisWidget = UxWidgetToSwidget( UxWidget );
377 UxSaveCtx = UxAssociateContext;
378 UxAssociateContext = UxContext =
379 (_UxCAssociate *) UxGetContext( UxThisWidget );
380 {
381 extern int arowno;
382 extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
383 char mytext[8];
384 arowno++;
385 XtVaSetValues(UxGetWidget(UxFindSwidget("rowasso")),XmNnumColumns,arowno,NULL);
386 sprintf(mytext,"a1_%d",arowno-1);
387 arow1[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
388 sprintf(mytext,"a2_%d",arowno-1);
389 arow2[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
390 sprintf(mytext,"a3_%d",arowno-1);
391 arow3[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
392 sprintf(mytext,"a4_%d",arowno-1);
393 arow4[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
394 }
395 UxAssociateContext = UxSaveCtx;
396 }
397
398 static void activateCB_pullDownMenu1_p1_b1( UxWidget, UxClientData, UxCallbackArg )
399 Widget UxWidget;
400 XtPointer UxClientData, UxCallbackArg;
401 {
402 _UxCAssociate *UxSaveCtx, *UxContext;
403 swidget UxThisWidget;
404
405 UxThisWidget = UxWidgetToSwidget( UxWidget );
406 UxSaveCtx = UxAssociateContext;
407 UxAssociateContext = UxContext =
408 (_UxCAssociate *) UxGetContext( UxThisWidget );
409 {
410 extern int arowno;
411 extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
412 int i;
413 for (i=0; i<arowno; i++) {
414 XmTextSetString(arow1[i],"");
415 XmTextSetString(arow2[i],"");
416 XmTextSetString(arow3[i],"");
417 XmTextSetString(arow4[i],"");
418 }
419 }
420 UxAssociateContext = UxSaveCtx;
421 }
422
423 static void activateCB_pullDownMenu3_p4_b1( UxWidget, UxClientData, UxCallbackArg )
424 Widget UxWidget;
425 XtPointer UxClientData, UxCallbackArg;
426 {
427 _UxCAssociate *UxSaveCtx, *UxContext;
428 swidget UxThisWidget;
429
430 UxThisWidget = UxWidgetToSwidget( UxWidget );
431 UxSaveCtx = UxAssociateContext;
432 UxAssociateContext = UxContext =
433 (_UxCAssociate *) UxGetContext( UxThisWidget );
434 {
435 extern int arowno;
436 extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
437 char mytext[8];
438 arowno++;
439 XtVaSetValues(UxGetWidget(UxFindSwidget("rowasso")),XmNnumColumns,arowno,NULL);
440 sprintf(mytext,"a1_%d",arowno-1);
441 arow1[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
442 sprintf(mytext,"a2_%d",arowno-1);
443 arow2[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
444 sprintf(mytext,"a3_%d",arowno-1);
445 arow3[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
446 sprintf(mytext,"a4_%d",arowno-1);
447 arow4[arowno-1] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget( UxFindSwidget("rowasso")),NULL);
448 }
449 UxAssociateContext = UxSaveCtx;
450 }
451
452 static void activateCB_pullDownMenu3_p4_b2( UxWidget, UxClientData, UxCallbackArg )
453 Widget UxWidget;
454 XtPointer UxClientData, UxCallbackArg;
455 {
456 _UxCAssociate *UxSaveCtx, *UxContext;
457 swidget UxThisWidget;
458
459 UxThisWidget = UxWidgetToSwidget( UxWidget );
460 UxSaveCtx = UxAssociateContext;
461 UxAssociateContext = UxContext =
462 (_UxCAssociate *) UxGetContext( UxThisWidget );
463 {
464 extern int arowno;
465 extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
466 int i;
467 for (i=0; i<arowno; i++) {
468 XmTextSetString(arow1[i],"");
469 XmTextSetString(arow2[i],"");
470 XmTextSetString(arow3[i],"");
471 XmTextSetString(arow4[i],"");
472 }
473 }
474 UxAssociateContext = UxSaveCtx;
475 }
476
477 static void entryCB_rowasso( UxWidget, UxClientData, UxCallbackArg )
478 Widget UxWidget;
479 XtPointer UxClientData, UxCallbackArg;
480 {
481 _UxCAssociate *UxSaveCtx, *UxContext;
482 swidget UxThisWidget;
483
484 UxThisWidget = UxWidgetToSwidget( UxWidget );
485 UxSaveCtx = UxAssociateContext;
486 UxAssociateContext = UxContext =
487 (_UxCAssociate *) UxGetContext( UxThisWidget );
488 {
489 /*XmRowColumnCallbackStruct *cbs;
490 Widget pb = cbs->widget;
491 cbs = (XmRowColumnCallbackStruct *)UxCallbackArg;
492 printf("%s: %s\n",XtName(pb),cbs->data);*/
493 }
494 UxAssociateContext = UxSaveCtx;
495 }
496
497 static void createCB_rowasso( UxWidget, UxClientData, UxCallbackArg )
498 Widget UxWidget;
499 XtPointer UxClientData, UxCallbackArg;
500 {
501 _UxCAssociate *UxSaveCtx, *UxContext;
502 swidget UxThisWidget;
503
504 UxThisWidget = UxWidgetToSwidget( UxWidget );
505 UxSaveCtx = UxAssociateContext;
506 UxAssociateContext = UxContext =
507 (_UxCAssociate *) UxGetContext( UxThisWidget );
508 {
509
510 }
511 UxAssociateContext = UxSaveCtx;
512 }
513
514 /*******************************************************************************
515 The 'init_' function sets the private properties for all the
516 swidgets to the values specified in the Property Table.
517 Some properties need to be set after the X widgets have been
518 created and the setting of these properties is done in the
519 'build_' function after the UxCreateWidget call.
520 *******************************************************************************/
521
522 static void _Uxinit_Associate()
523 {
524 UxPutIconName( Associate, "Association Rules" );
525 UxPutHeight( Associate, 363 );
526 UxPutWidth( Associate, 920 );
527 UxPutY( Associate, 397 );
528 UxPutX( Associate, 666 );
529
530 UxPutUnitType( mainWindow3, "pixels" );
531 UxPutBackground( mainWindow3, WindowBackground );
532 UxPutHeight( mainWindow3, 470 );
533 UxPutWidth( mainWindow3, 700 );
534 UxPutY( mainWindow3, 180 );
535 UxPutX( mainWindow3, 200 );
536
537 UxPutForeground( pullDownMenu3, MenuForeground );
538 UxPutBackground( pullDownMenu3, MenuBackground );
539 UxPutMenuAccelerator( pullDownMenu3, "<KeyUp>F10" );
540 UxPutRowColumnType( pullDownMenu3, "menu_bar" );
541 UxPutBorderWidth( pullDownMenu3, 0 );
542
543 UxPutForeground( quitPane3, MenuForeground );
544 UxPutBackground( quitPane3, MenuBackground );
545 UxPutRowColumnType( quitPane3, "menu_pulldown" );
546
547 UxPutFontList( quitPane_b4, BoldTextFont );
548 UxPutLabelString( quitPane_b4, "Bye" );
549
550 UxPutForeground( pullDownMenu_top_b4, MenuForeground );
551 UxPutFontList( pullDownMenu_top_b4, BoldTextFont );
552 UxPutBackground( pullDownMenu_top_b4, MenuBackground );
553 UxPutMnemonic( pullDownMenu_top_b4, "Q" );
554 UxPutLabelString( pullDownMenu_top_b4, "Quit" );
555
556 UxPutForeground( UtilsPane3, MenuForeground );
557 UxPutBackground( UtilsPane3, MenuBackground );
558 UxPutRowColumnType( UtilsPane3, "menu_pulldown" );
559
560 UxPutFontList( UtilsPane_b11, BoldTextFont );
561 UxPutLabelString( UtilsPane_b11, "Open ..." );
562
563 UxPutFontList( UtilsPane_b12, BoldTextFont );
564 UxPutLabelString( UtilsPane_b12, "Save" );
565
566 UxPutX( commandsCascade3, 101 );
567 UxPutMnemonic( commandsCascade3, "F" );
568 UxPutForeground( commandsCascade3, MenuForeground );
569 UxPutFontList( commandsCascade3, BoldTextFont );
570 UxPutBackground( commandsCascade3, MenuBackground );
571 UxPutLabelString( commandsCascade3, "File" );
572
573 UxPutForeground( pullDownMenu1_p2, MenuForeground );
574 UxPutBackground( pullDownMenu1_p2, MenuBackground );
575 UxPutRowColumnType( pullDownMenu1_p2, "menu_pulldown" );
576
577 UxPutFontList( pullDownMenu1_p3_b4, BoldTextFont );
578 UxPutLabelString( pullDownMenu1_p3_b4, "Add" );
579
580 UxPutFontList( pullDownMenu1_p1_b1, BoldTextFont );
581 UxPutLabelString( pullDownMenu1_p1_b1, "Reset" );
582
583 UxPutForeground( pullDownMenu1_top_b3, MenuForeground );
584 UxPutFontList( pullDownMenu1_top_b3, BoldTextFont );
585 UxPutBackground( pullDownMenu1_top_b3, MenuBackground );
586 UxPutMnemonic( pullDownMenu1_top_b3, "E" );
587 UxPutLabelString( pullDownMenu1_top_b3, "Edit" );
588
589 UxPutForeground( pullDownMenu3_p4, MenuForeground );
590 UxPutBackground( pullDownMenu3_p4, MenuBackground );
591 UxPutRowColumnType( pullDownMenu3_p4, "menu_pulldown" );
592
593 UxPutFontList( pullDownMenu3_p4_b1, BoldTextFont );
594 UxPutLabelString( pullDownMenu3_p4_b1, "On this interface..." );
595
596 UxPutFontList( pullDownMenu3_p4_b2, BoldTextFont );
597 UxPutLabelString( pullDownMenu3_p4_b2, "On importing data..." );
598
599 UxPutForeground( pullDownMenu3_top_b1, MenuForeground );
600 UxPutFontList( pullDownMenu3_top_b1, BoldTextFont );
601 UxPutBackground( pullDownMenu3_top_b1, MenuBackground );
602 UxPutMnemonic( pullDownMenu3_top_b1, "H" );
603 UxPutLabelString( pullDownMenu3_top_b1, "Help" );
604
605 UxPutBackground( workAreaForm3, WindowBackground );
606 UxPutBorderWidth( workAreaForm3, 0 );
607 UxPutHeight( workAreaForm3, 400 );
608 UxPutWidth( workAreaForm3, 800 );
609
610 UxPutBackground( form4, WindowBackground );
611 UxPutHeight( form4, 300 );
612 UxPutWidth( form4, 900 );
613 UxPutY( form4, 10 );
614 UxPutX( form4, 10 );
615 UxPutUnitType( form4, "pixels" );
616 UxPutResizePolicy( form4, "resize_none" );
617
618 UxPutVisualPolicy( scrolledWindow4, "variable" );
619 UxPutScrollBarDisplayPolicy( scrolledWindow4, "static" );
620 UxPutScrollBarPlacement( scrolledWindow4, "bottom_left" );
621 UxPutBackground( scrolledWindow4, WindowBackground );
622 UxPutHeight( scrolledWindow4, 300 );
623 UxPutWidth( scrolledWindow4, 900 );
624 UxPutY( scrolledWindow4, 30 );
625 UxPutX( scrolledWindow4, 10 );
626 UxPutScrollingPolicy( scrolledWindow4, "automatic" );
627
628 UxPutIsAligned( rowasso, "true" );
629 UxPutResizeWidth( rowasso, "true" );
630 UxPutNumColumns( rowasso, 5 );
631 UxPutPacking( rowasso, "pack_column" );
632 UxPutOrientation( rowasso, "horizontal" );
633 UxPutEntryAlignment( rowasso, "alignment_center" );
634 UxPutBackground( rowasso, WindowBackground );
635 UxPutHeight( rowasso, 370 );
636 UxPutWidth( rowasso, 860 );
637 UxPutY( rowasso, 8 );
638 UxPutX( rowasso, 8 );
639
640 UxPutAlignment( label14, "alignment_beginning" );
641 UxPutLabelString( label14, "FUNCTION" );
642 UxPutFontList( label14, BoldTextFont );
643 UxPutBackground( label14, WindowBackground );
644 UxPutHeight( label14, 40 );
645 UxPutWidth( label14, 100 );
646 UxPutY( label14, 420 );
647 UxPutX( label14, 10 );
648
649 UxPutAlignment( label15, "alignment_beginning" );
650 UxPutLabelString( label15, "RANGE_1" );
651 UxPutFontList( label15, BoldTextFont );
652 UxPutBackground( label15, WindowBackground );
653 UxPutHeight( label15, 40 );
654 UxPutWidth( label15, 100 );
655 UxPutY( label15, 10 );
656 UxPutX( label15, 90 );
657
658 UxPutAlignment( label16, "alignment_beginning" );
659 UxPutLabelString( label16, "RANGE_2" );
660 UxPutFontList( label16, BoldTextFont );
661 UxPutBackground( label16, WindowBackground );
662 UxPutHeight( label16, 40 );
663 UxPutWidth( label16, 100 );
664 UxPutY( label16, 10 );
665 UxPutX( label16, 310 );
666
667 UxPutAlignment( label17, "alignment_beginning" );
668 UxPutLabelString( label17, "WEIGHT" );
669 UxPutFontList( label17, BoldTextFont );
670 UxPutBackground( label17, WindowBackground );
671 UxPutHeight( label17, 40 );
672 UxPutWidth( label17, 100 );
673 UxPutY( label17, 10 );
674 UxPutX( label17, 510 );
675
676 UxPutLabelString( label19, "Table Name" );
677 UxPutFontList( label19, BoldTextFont );
678 UxPutBackground( label19, WindowBackground );
679 UxPutHeight( label19, 50 );
680 UxPutWidth( label19, 260 );
681 UxPutY( label19, 10 );
682 UxPutX( label19, 210 );
683
684 UxPutFontList( arule_name, TextFont );
685 UxPutBackground( arule_name, TextBackground );
686 UxPutHeight( arule_name, 50 );
687 UxPutWidth( arule_name, 360 );
688 UxPutY( arule_name, 10 );
689 UxPutX( arule_name, 480 );
690
691 }
692
693 /*******************************************************************************
694 The 'build_' function creates all the swidgets and X widgets,
695 and sets their properties to the values specified in the
696 Property Editor.
697 *******************************************************************************/
698
699 static swidget _Uxbuild_Associate()
700 {
701 /* Create the swidgets */
702
703 Associate = UxCreateApplicationShell( "Associate", NO_PARENT );
704 UxPutContext( Associate, UxAssociateContext );
705
706 mainWindow3 = UxCreateMainWindow( "mainWindow3", Associate );
707 pullDownMenu3 = UxCreateRowColumn( "pullDownMenu3", mainWindow3 );
708 quitPane3 = UxCreateRowColumn( "quitPane3", pullDownMenu3 );
709 quitPane_b4 = UxCreatePushButtonGadget( "quitPane_b4", quitPane3 );
710 pullDownMenu_top_b4 = UxCreateCascadeButton( "pullDownMenu_top_b4", pullDownMenu3 );
711 UtilsPane3 = UxCreateRowColumn( "UtilsPane3", pullDownMenu3 );
712 UtilsPane_b11 = UxCreatePushButtonGadget( "UtilsPane_b11", UtilsPane3 );
713 UtilsPane_b12 = UxCreatePushButtonGadget( "UtilsPane_b12", UtilsPane3 );
714 commandsCascade3 = UxCreateCascadeButton( "commandsCascade3", pullDownMenu3 );
715 pullDownMenu1_p2 = UxCreateRowColumn( "pullDownMenu1_p2", pullDownMenu3 );
716 pullDownMenu1_p3_b4 = UxCreatePushButtonGadget( "pullDownMenu1_p3_b4", pullDownMenu1_p2 );
717 pullDownMenu1_p1_b1 = UxCreatePushButtonGadget( "pullDownMenu1_p1_b1", pullDownMenu1_p2 );
718 pullDownMenu1_top_b3 = UxCreateCascadeButton( "pullDownMenu1_top_b3", pullDownMenu3 );
719 pullDownMenu3_p4 = UxCreateRowColumn( "pullDownMenu3_p4", pullDownMenu3 );
720 pullDownMenu3_p4_b1 = UxCreatePushButtonGadget( "pullDownMenu3_p4_b1", pullDownMenu3_p4 );
721 pullDownMenu3_p4_b2 = UxCreatePushButtonGadget( "pullDownMenu3_p4_b2", pullDownMenu3_p4 );
722 pullDownMenu3_top_b1 = UxCreateCascadeButton( "pullDownMenu3_top_b1", pullDownMenu3 );
723 workAreaForm3 = UxCreateForm( "workAreaForm3", mainWindow3 );
724 form4 = UxCreateForm( "form4", workAreaForm3 );
725 scrolledWindow4 = UxCreateScrolledWindow( "scrolledWindow4", form4 );
726 rowasso = UxCreateRowColumn( "rowasso", scrolledWindow4 );
727 label14 = UxCreateLabel( "label14", form4 );
728 label15 = UxCreateLabel( "label15", form4 );
729 label16 = UxCreateLabel( "label16", form4 );
730 label17 = UxCreateLabel( "label17", form4 );
731 label19 = UxCreateLabel( "label19", form4 );
732 arule_name = UxCreateText( "arule_name", form4 );
733
734 _Uxinit_Associate();
735
736 /* Create the X widgets */
737
738 UxCreateWidget( Associate );
739 UxCreateWidget( mainWindow3 );
740 UxCreateWidget( pullDownMenu3 );
741 UxCreateWidget( quitPane3 );
742 UxCreateWidget( quitPane_b4 );
743 UxPutSubMenuId( pullDownMenu_top_b4, "quitPane3" );
744 UxCreateWidget( pullDownMenu_top_b4 );
745
746 UxCreateWidget( UtilsPane3 );
747 UxCreateWidget( UtilsPane_b11 );
748 UxCreateWidget( UtilsPane_b12 );
749 UxPutSubMenuId( commandsCascade3, "UtilsPane3" );
750 UxCreateWidget( commandsCascade3 );
751
752 UxCreateWidget( pullDownMenu1_p2 );
753 UxCreateWidget( pullDownMenu1_p3_b4 );
754 UxCreateWidget( pullDownMenu1_p1_b1 );
755 UxPutSubMenuId( pullDownMenu1_top_b3, "pullDownMenu1_p2" );
756 UxCreateWidget( pullDownMenu1_top_b3 );
757
758 UxCreateWidget( pullDownMenu3_p4 );
759 UxCreateWidget( pullDownMenu3_p4_b1 );
760 UxCreateWidget( pullDownMenu3_p4_b2 );
761 UxPutSubMenuId( pullDownMenu3_top_b1, "pullDownMenu3_p4" );
762 UxCreateWidget( pullDownMenu3_top_b1 );
763
764 UxCreateWidget( workAreaForm3 );
765 UxCreateWidget( form4 );
766 UxPutTopAttachment( scrolledWindow4, "attach_form" );
767 UxPutTopOffset( scrolledWindow4, 120 );
768 UxPutBottomOffset( scrolledWindow4, 10 );
769 UxPutBottomAttachment( scrolledWindow4, "attach_form" );
770 UxPutLeftOffset( scrolledWindow4, 10 );
771 UxPutRightOffset( scrolledWindow4, 10 );
772 UxPutRightAttachment( scrolledWindow4, "attach_form" );
773 UxPutLeftAttachment( scrolledWindow4, "attach_form" );
774 UxCreateWidget( scrolledWindow4 );
775
776 UxCreateWidget( rowasso );
777 createCB_rowasso( UxGetWidget( rowasso ),
778 (XtPointer) UxAssociateContext, (XtPointer) NULL );
779
780 UxPutLeftOffset( label14, 80 );
781 UxPutLeftAttachment( label14, "attach_form" );
782 UxPutTopAttachment( label14, "attach_form" );
783 UxPutTopOffset( label14, 70 );
784 UxCreateWidget( label14 );
785
786 UxPutTopOffset( label15, 70 );
787 UxPutLeftOffset( label15, 310 );
788 UxPutLeftAttachment( label15, "attach_form" );
789 UxPutTopAttachment( label15, "attach_form" );
790 UxCreateWidget( label15 );
791
792 UxPutTopOffset( label16, 70 );
793 UxPutTopAttachment( label16, "attach_form" );
794 UxPutLeftOffset( label16, 510 );
795 UxPutLeftAttachment( label16, "attach_form" );
796 UxCreateWidget( label16 );
797
798 UxPutTopOffset( label17, 70 );
799 UxPutTopAttachment( label17, "attach_form" );
800 UxPutLeftOffset( label17, 720 );
801 UxPutLeftAttachment( label17, "attach_form" );
802 UxCreateWidget( label17 );
803
804 UxPutTopAttachment( label19, "attach_form" );
805 UxPutLeftOffset( label19, 100 );
806 UxPutLeftAttachment( label19, "attach_form" );
807 UxCreateWidget( label19 );
808
809 UxPutLeftOffset( arule_name, 400 );
810 UxPutLeftAttachment( arule_name, "attach_form" );
811 UxPutTopAttachment( arule_name, "attach_form" );
812 UxCreateWidget( arule_name );
813
814
815 UxPutMenuHelpWidget( pullDownMenu3, "pullDownMenu_top_b4" );
816
817 UxAddCallback( quitPane_b4, XmNactivateCallback,
818 activateCB_quitPane_b4,
819 (XtPointer) UxAssociateContext );
820
821 UxAddCallback( UtilsPane_b11, XmNactivateCallback,
822 activateCB_UtilsPane_b11,
823 (XtPointer) UxAssociateContext );
824
825 UxAddCallback( UtilsPane_b12, XmNactivateCallback,
826 activateCB_UtilsPane_b12,
827 (XtPointer) UxAssociateContext );
828
829 UxAddCallback( pullDownMenu1_p3_b4, XmNactivateCallback,
830 activateCB_pullDownMenu1_p3_b4,
831 (XtPointer) UxAssociateContext );
832
833 UxAddCallback( pullDownMenu1_p1_b1, XmNactivateCallback,
834 activateCB_pullDownMenu1_p1_b1,
835 (XtPointer) UxAssociateContext );
836
837 UxAddCallback( pullDownMenu3_p4_b1, XmNactivateCallback,
838 activateCB_pullDownMenu3_p4_b1,
839 (XtPointer) UxAssociateContext );
840
841 UxAddCallback( pullDownMenu3_p4_b2, XmNactivateCallback,
842 activateCB_pullDownMenu3_p4_b2,
843 (XtPointer) UxAssociateContext );
844
845 UxAddCallback( rowasso, XmNentryCallback,
846 entryCB_rowasso,
847 (XtPointer) UxAssociateContext );
848
849
850 /* Finally, call UxRealizeInterface to create the X windows
851 for the widgets created above. */
852
853 UxRealizeInterface( Associate );
854
855 UxMainWindowSetAreas( mainWindow3, pullDownMenu3, NULL_SWIDGET,
856 NULL_SWIDGET, NULL_SWIDGET, workAreaForm3 );
857 return ( Associate );
858 }
859
860 /*******************************************************************************
861 The following function includes the code that was entered
862 in the 'Initial Code' and 'Final Code' sections of the
863 Declarations Editor. This function is called from the
864 'Interface function' below.
865 *******************************************************************************/
866
867 static swidget _Ux_create_Associate()
868 {
869 swidget rtrn;
870 _UxCAssociate *UxContext;
871
872 UxAssociateContext = UxContext =
873 (_UxCAssociate *) UxMalloc( sizeof(_UxCAssociate) );
874
875 rtrn = _Uxbuild_Associate();
876
877 return(rtrn);
878 }
879
880 /*******************************************************************************
881 The following is the 'Interface function' which is the
882 external entry point for creating this interface.
883 This function should be called from your application or from
884 a callback function.
885 *******************************************************************************/
886
887 swidget create_Associate()
888 {
889 swidget _Uxrtrn;
890 static int _Uxinit = 0;
891
892 if ( ! _Uxinit )
893 {
894 static XtActionsRec _Uxactions[] = {
895 { "nothing", action_nothing },
896 { "SelectCommand", action_SelectCommand },
897 { "ClearHelp", action_ClearHelp },
898 { "WriteHelp", action_WriteHelp },
899 { "HelpACT", action_HelpACT }
900 };
901
902 XtAppAddActions( UxAppContext,
903 _Uxactions,
904 XtNumber(_Uxactions) );
905
906 _Uxinit = 1;
907 }
908
909 _Uxrtrn = _Ux_create_Associate();
910
911 return ( _Uxrtrn );
912 }
913
914 /*******************************************************************************
915 END OF FILE
916 *******************************************************************************/
917