2
/*******************************************************************************
8
*******************************************************************************/
22
#include "midas_def.h"
24
/*******************************************************************************
25
Includes, Defines, and Global variables from the Declarations Editor:
26
*******************************************************************************/
28
#include <ExternResources.h>
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
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
*******************************************************************************/
46
swidget UxmainWindow3;
47
swidget UxpullDownMenu3;
49
swidget UxquitPane_b4;
50
swidget UxpullDownMenu_top_b4;
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;
65
swidget UxscrolledWindow4;
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
104
static _UxCAssociate *UxAssociateContext;
106
extern void SetFileList();
108
extern int save_asso_table();
111
/*******************************************************************************
112
The following are translation tables.
113
*******************************************************************************/
116
/*******************************************************************************
117
Forward declarations of functions that are defined later in this file.
118
*******************************************************************************/
120
swidget create_Associate();
122
/*******************************************************************************
123
The following are Action functions.
124
*******************************************************************************/
126
static void action_nothing( UxWidget, UxEvent, UxParams, p_UxNumParams )
130
Cardinal *p_UxNumParams;
132
_UxCAssociate *UxSaveCtx, *UxContext;
133
swidget UxThisWidget;
135
UxThisWidget = UxWidgetToSwidget( UxWidget );
136
UxSaveCtx = UxAssociateContext;
137
UxAssociateContext = UxContext =
138
(_UxCAssociate *) UxGetContext( UxThisWidget );
142
UxAssociateContext = UxSaveCtx;
145
static void action_SelectCommand( UxWidget, UxEvent, UxParams, p_UxNumParams )
149
Cardinal *p_UxNumParams;
151
_UxCAssociate *UxSaveCtx, *UxContext;
152
swidget UxThisWidget;
154
UxThisWidget = UxWidgetToSwidget( UxWidget );
155
UxSaveCtx = UxAssociateContext;
156
UxAssociateContext = UxContext =
157
(_UxCAssociate *) UxGetContext( UxThisWidget );
163
UxAssociateContext = UxSaveCtx;
166
static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
170
Cardinal *p_UxNumParams;
172
_UxCAssociate *UxSaveCtx, *UxContext;
173
swidget UxThisWidget;
175
UxThisWidget = UxWidgetToSwidget( UxWidget );
176
UxSaveCtx = UxAssociateContext;
177
UxAssociateContext = UxContext =
178
(_UxCAssociate *) UxGetContext( UxThisWidget );
180
UxPutText(UxFindSwidget("SHelp"),"");
182
UxAssociateContext = UxSaveCtx;
185
static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
189
Cardinal *p_UxNumParams;
191
_UxCAssociate *UxSaveCtx, *UxContext;
192
swidget UxThisWidget;
194
UxThisWidget = UxWidgetToSwidget( UxWidget );
195
UxSaveCtx = UxAssociateContext;
196
UxAssociateContext = UxContext =
197
(_UxCAssociate *) UxGetContext( UxThisWidget );
201
Widget sw = UxWidget;
204
/*sprintf(comm,"WRITE/OUT here");
205
AppendDialogText(comm);*/
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);
211
else if (sw == UxGetWidget(UxFindSwidget("ClassiButton"))) {
212
strcpy(s,"Activate interface for defining classification rules ");
213
UxPutText(UxFindSwidget("SHelp") ,s);
215
else if (sw == UxGetWidget(UxFindSwidget("AssoButton"))) {
216
strcpy(s,"Activate interface for classifying images");
217
UxPutText(UxFindSwidget("SHelp") ,s);
219
else if (sw == UxGetWidget(UxFindSwidget("AssoButton1"))) {
220
strcpy(s,"Activate interface for associating calibration exposures to scientific frames");
221
UxPutText(UxFindSwidget("SHelp") ,s);
223
else if (sw == UxGetWidget(UxFindSwidget("NewsButton3"))) {
224
strcpy(s,"Create the OST table");
225
UxPutText(UxFindSwidget("SHelp3") ,s);
227
else if (sw == UxGetWidget(UxFindSwidget("PrintButton3"))) {
228
strcpy(s,"Popdown this interface");
229
UxPutText(UxFindSwidget("SHelp3") ,s);
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);
235
else if (sw == UxGetWidget(UxFindSwidget("ost_t2"))){
236
strcpy(s,"List of frames to be processed ");
237
UxPutText(UxFindSwidget("SHelp3") ,s);
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);
243
else if (sw == UxGetWidget(UxFindSwidget("pushButton4"))){
244
strcpy(s,"Push button to popup the File Selection Box");
245
UxPutText(UxFindSwidget("SHelp3") ,s);
247
else if (sw == UxGetWidget(UxFindSwidget("pushButton5"))){
248
strcpy(s,"Push button to popup the File Selection Box");
249
UxPutText(UxFindSwidget("SHelp3") ,s);
252
UxAssociateContext = UxSaveCtx;
255
static void action_HelpACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
259
Cardinal *p_UxNumParams;
261
_UxCAssociate *UxSaveCtx, *UxContext;
262
swidget UxThisWidget;
264
UxThisWidget = UxWidgetToSwidget( UxWidget );
265
UxSaveCtx = UxAssociateContext;
266
UxAssociateContext = UxContext =
267
(_UxCAssociate *) UxGetContext( UxThisWidget );
270
s = XmTextGetSelection(UxWidget);
272
XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));
274
UxAssociateContext = UxSaveCtx;
277
/*******************************************************************************
278
The following are callback functions.
279
*******************************************************************************/
281
static void activateCB_quitPane_b4( UxWidget, UxClientData, UxCallbackArg )
283
XtPointer UxClientData, UxCallbackArg;
285
_UxCAssociate *UxSaveCtx, *UxContext;
286
swidget UxThisWidget;
288
UxThisWidget = UxWidgetToSwidget( UxWidget );
289
UxSaveCtx = UxAssociateContext;
290
UxAssociateContext = UxContext =
291
(_UxCAssociate *) UxGetContext( UxThisWidget );
294
extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
297
for (i=0; i<5; i++) {
298
XmTextSetString(arow1[i],"");
299
XmTextSetString(arow2[i],"");
300
XmTextSetString(arow3[i],"");
301
XmTextSetString(arow4[i],"");
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;
314
UxPopdownInterface(asso);
316
UxAssociateContext = UxSaveCtx;
319
static void activateCB_UtilsPane_b11( UxWidget, UxClientData, UxCallbackArg )
321
XtPointer UxClientData, UxCallbackArg;
323
_UxCAssociate *UxSaveCtx, *UxContext;
324
swidget UxThisWidget;
326
UxThisWidget = UxWidgetToSwidget( UxWidget );
327
UxSaveCtx = UxAssociateContext;
328
UxAssociateContext = UxContext =
329
(_UxCAssociate *) UxGetContext( UxThisWidget );
332
extern swidget klist,tablelist;
337
SetFileList(UxGetWidget(tablelist),strip,s);
338
UxPutTitle(UxFindSwidget("transientShell8"),"Select Classification Table");
340
UxPopupInterface(klist,no_grab);
342
UxAssociateContext = UxSaveCtx;
345
static void activateCB_UtilsPane_b12( UxWidget, UxClientData, UxCallbackArg )
347
XtPointer UxClientData, UxCallbackArg;
349
_UxCAssociate *UxSaveCtx, *UxContext;
350
swidget UxThisWidget;
352
UxThisWidget = UxWidgetToSwidget( UxWidget );
353
UxSaveCtx = UxAssociateContext;
354
UxAssociateContext = UxContext =
355
(_UxCAssociate *) UxGetContext( UxThisWidget );
359
strcpy(mytext,UxGetText(UxFindSwidget("arule_name")));
362
if (tid != -1) TCTCLO(tid);
363
save_asso_table(mytext);
366
UxAssociateContext = UxSaveCtx;
369
static void activateCB_pullDownMenu1_p3_b4( UxWidget, UxClientData, UxCallbackArg )
371
XtPointer UxClientData, UxCallbackArg;
373
_UxCAssociate *UxSaveCtx, *UxContext;
374
swidget UxThisWidget;
376
UxThisWidget = UxWidgetToSwidget( UxWidget );
377
UxSaveCtx = UxAssociateContext;
378
UxAssociateContext = UxContext =
379
(_UxCAssociate *) UxGetContext( UxThisWidget );
382
extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
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);
395
UxAssociateContext = UxSaveCtx;
398
static void activateCB_pullDownMenu1_p1_b1( UxWidget, UxClientData, UxCallbackArg )
400
XtPointer UxClientData, UxCallbackArg;
402
_UxCAssociate *UxSaveCtx, *UxContext;
403
swidget UxThisWidget;
405
UxThisWidget = UxWidgetToSwidget( UxWidget );
406
UxSaveCtx = UxAssociateContext;
407
UxAssociateContext = UxContext =
408
(_UxCAssociate *) UxGetContext( UxThisWidget );
411
extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
413
for (i=0; i<arowno; i++) {
414
XmTextSetString(arow1[i],"");
415
XmTextSetString(arow2[i],"");
416
XmTextSetString(arow3[i],"");
417
XmTextSetString(arow4[i],"");
420
UxAssociateContext = UxSaveCtx;
423
static void activateCB_pullDownMenu3_p4_b1( UxWidget, UxClientData, UxCallbackArg )
425
XtPointer UxClientData, UxCallbackArg;
427
_UxCAssociate *UxSaveCtx, *UxContext;
428
swidget UxThisWidget;
430
UxThisWidget = UxWidgetToSwidget( UxWidget );
431
UxSaveCtx = UxAssociateContext;
432
UxAssociateContext = UxContext =
433
(_UxCAssociate *) UxGetContext( UxThisWidget );
436
extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
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);
449
UxAssociateContext = UxSaveCtx;
452
static void activateCB_pullDownMenu3_p4_b2( UxWidget, UxClientData, UxCallbackArg )
454
XtPointer UxClientData, UxCallbackArg;
456
_UxCAssociate *UxSaveCtx, *UxContext;
457
swidget UxThisWidget;
459
UxThisWidget = UxWidgetToSwidget( UxWidget );
460
UxSaveCtx = UxAssociateContext;
461
UxAssociateContext = UxContext =
462
(_UxCAssociate *) UxGetContext( UxThisWidget );
465
extern Widget arow1[20],arow2[20],arow3[20],arow4[20];
467
for (i=0; i<arowno; i++) {
468
XmTextSetString(arow1[i],"");
469
XmTextSetString(arow2[i],"");
470
XmTextSetString(arow3[i],"");
471
XmTextSetString(arow4[i],"");
474
UxAssociateContext = UxSaveCtx;
477
static void entryCB_rowasso( UxWidget, UxClientData, UxCallbackArg )
479
XtPointer UxClientData, UxCallbackArg;
481
_UxCAssociate *UxSaveCtx, *UxContext;
482
swidget UxThisWidget;
484
UxThisWidget = UxWidgetToSwidget( UxWidget );
485
UxSaveCtx = UxAssociateContext;
486
UxAssociateContext = UxContext =
487
(_UxCAssociate *) UxGetContext( UxThisWidget );
489
/*XmRowColumnCallbackStruct *cbs;
490
Widget pb = cbs->widget;
491
cbs = (XmRowColumnCallbackStruct *)UxCallbackArg;
492
printf("%s: %s\n",XtName(pb),cbs->data);*/
494
UxAssociateContext = UxSaveCtx;
497
static void createCB_rowasso( UxWidget, UxClientData, UxCallbackArg )
499
XtPointer UxClientData, UxCallbackArg;
501
_UxCAssociate *UxSaveCtx, *UxContext;
502
swidget UxThisWidget;
504
UxThisWidget = UxWidgetToSwidget( UxWidget );
505
UxSaveCtx = UxAssociateContext;
506
UxAssociateContext = UxContext =
507
(_UxCAssociate *) UxGetContext( UxThisWidget );
511
UxAssociateContext = UxSaveCtx;
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
*******************************************************************************/
522
static void _Uxinit_Associate()
524
UxPutIconName( Associate, "Association Rules" );
525
UxPutHeight( Associate, 363 );
526
UxPutWidth( Associate, 920 );
527
UxPutY( Associate, 397 );
528
UxPutX( Associate, 666 );
530
UxPutUnitType( mainWindow3, "pixels" );
531
UxPutBackground( mainWindow3, WindowBackground );
532
UxPutHeight( mainWindow3, 470 );
533
UxPutWidth( mainWindow3, 700 );
534
UxPutY( mainWindow3, 180 );
535
UxPutX( mainWindow3, 200 );
537
UxPutForeground( pullDownMenu3, MenuForeground );
538
UxPutBackground( pullDownMenu3, MenuBackground );
539
UxPutMenuAccelerator( pullDownMenu3, "<KeyUp>F10" );
540
UxPutRowColumnType( pullDownMenu3, "menu_bar" );
541
UxPutBorderWidth( pullDownMenu3, 0 );
543
UxPutForeground( quitPane3, MenuForeground );
544
UxPutBackground( quitPane3, MenuBackground );
545
UxPutRowColumnType( quitPane3, "menu_pulldown" );
547
UxPutFontList( quitPane_b4, BoldTextFont );
548
UxPutLabelString( quitPane_b4, "Bye" );
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" );
556
UxPutForeground( UtilsPane3, MenuForeground );
557
UxPutBackground( UtilsPane3, MenuBackground );
558
UxPutRowColumnType( UtilsPane3, "menu_pulldown" );
560
UxPutFontList( UtilsPane_b11, BoldTextFont );
561
UxPutLabelString( UtilsPane_b11, "Open ..." );
563
UxPutFontList( UtilsPane_b12, BoldTextFont );
564
UxPutLabelString( UtilsPane_b12, "Save" );
566
UxPutX( commandsCascade3, 101 );
567
UxPutMnemonic( commandsCascade3, "F" );
568
UxPutForeground( commandsCascade3, MenuForeground );
569
UxPutFontList( commandsCascade3, BoldTextFont );
570
UxPutBackground( commandsCascade3, MenuBackground );
571
UxPutLabelString( commandsCascade3, "File" );
573
UxPutForeground( pullDownMenu1_p2, MenuForeground );
574
UxPutBackground( pullDownMenu1_p2, MenuBackground );
575
UxPutRowColumnType( pullDownMenu1_p2, "menu_pulldown" );
577
UxPutFontList( pullDownMenu1_p3_b4, BoldTextFont );
578
UxPutLabelString( pullDownMenu1_p3_b4, "Add" );
580
UxPutFontList( pullDownMenu1_p1_b1, BoldTextFont );
581
UxPutLabelString( pullDownMenu1_p1_b1, "Reset" );
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" );
589
UxPutForeground( pullDownMenu3_p4, MenuForeground );
590
UxPutBackground( pullDownMenu3_p4, MenuBackground );
591
UxPutRowColumnType( pullDownMenu3_p4, "menu_pulldown" );
593
UxPutFontList( pullDownMenu3_p4_b1, BoldTextFont );
594
UxPutLabelString( pullDownMenu3_p4_b1, "On this interface..." );
596
UxPutFontList( pullDownMenu3_p4_b2, BoldTextFont );
597
UxPutLabelString( pullDownMenu3_p4_b2, "On importing data..." );
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" );
605
UxPutBackground( workAreaForm3, WindowBackground );
606
UxPutBorderWidth( workAreaForm3, 0 );
607
UxPutHeight( workAreaForm3, 400 );
608
UxPutWidth( workAreaForm3, 800 );
610
UxPutBackground( form4, WindowBackground );
611
UxPutHeight( form4, 300 );
612
UxPutWidth( form4, 900 );
615
UxPutUnitType( form4, "pixels" );
616
UxPutResizePolicy( form4, "resize_none" );
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" );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
693
/*******************************************************************************
694
The 'build_' function creates all the swidgets and X widgets,
695
and sets their properties to the values specified in the
697
*******************************************************************************/
699
static swidget _Uxbuild_Associate()
701
/* Create the swidgets */
703
Associate = UxCreateApplicationShell( "Associate", NO_PARENT );
704
UxPutContext( Associate, UxAssociateContext );
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 );
736
/* Create the X widgets */
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 );
746
UxCreateWidget( UtilsPane3 );
747
UxCreateWidget( UtilsPane_b11 );
748
UxCreateWidget( UtilsPane_b12 );
749
UxPutSubMenuId( commandsCascade3, "UtilsPane3" );
750
UxCreateWidget( commandsCascade3 );
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 );
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 );
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 );
776
UxCreateWidget( rowasso );
777
createCB_rowasso( UxGetWidget( rowasso ),
778
(XtPointer) UxAssociateContext, (XtPointer) NULL );
780
UxPutLeftOffset( label14, 80 );
781
UxPutLeftAttachment( label14, "attach_form" );
782
UxPutTopAttachment( label14, "attach_form" );
783
UxPutTopOffset( label14, 70 );
784
UxCreateWidget( label14 );
786
UxPutTopOffset( label15, 70 );
787
UxPutLeftOffset( label15, 310 );
788
UxPutLeftAttachment( label15, "attach_form" );
789
UxPutTopAttachment( label15, "attach_form" );
790
UxCreateWidget( label15 );
792
UxPutTopOffset( label16, 70 );
793
UxPutTopAttachment( label16, "attach_form" );
794
UxPutLeftOffset( label16, 510 );
795
UxPutLeftAttachment( label16, "attach_form" );
796
UxCreateWidget( label16 );
798
UxPutTopOffset( label17, 70 );
799
UxPutTopAttachment( label17, "attach_form" );
800
UxPutLeftOffset( label17, 720 );
801
UxPutLeftAttachment( label17, "attach_form" );
802
UxCreateWidget( label17 );
804
UxPutTopAttachment( label19, "attach_form" );
805
UxPutLeftOffset( label19, 100 );
806
UxPutLeftAttachment( label19, "attach_form" );
807
UxCreateWidget( label19 );
809
UxPutLeftOffset( arule_name, 400 );
810
UxPutLeftAttachment( arule_name, "attach_form" );
811
UxPutTopAttachment( arule_name, "attach_form" );
812
UxCreateWidget( arule_name );
815
UxPutMenuHelpWidget( pullDownMenu3, "pullDownMenu_top_b4" );
817
UxAddCallback( quitPane_b4, XmNactivateCallback,
818
activateCB_quitPane_b4,
819
(XtPointer) UxAssociateContext );
821
UxAddCallback( UtilsPane_b11, XmNactivateCallback,
822
activateCB_UtilsPane_b11,
823
(XtPointer) UxAssociateContext );
825
UxAddCallback( UtilsPane_b12, XmNactivateCallback,
826
activateCB_UtilsPane_b12,
827
(XtPointer) UxAssociateContext );
829
UxAddCallback( pullDownMenu1_p3_b4, XmNactivateCallback,
830
activateCB_pullDownMenu1_p3_b4,
831
(XtPointer) UxAssociateContext );
833
UxAddCallback( pullDownMenu1_p1_b1, XmNactivateCallback,
834
activateCB_pullDownMenu1_p1_b1,
835
(XtPointer) UxAssociateContext );
837
UxAddCallback( pullDownMenu3_p4_b1, XmNactivateCallback,
838
activateCB_pullDownMenu3_p4_b1,
839
(XtPointer) UxAssociateContext );
841
UxAddCallback( pullDownMenu3_p4_b2, XmNactivateCallback,
842
activateCB_pullDownMenu3_p4_b2,
843
(XtPointer) UxAssociateContext );
845
UxAddCallback( rowasso, XmNentryCallback,
847
(XtPointer) UxAssociateContext );
850
/* Finally, call UxRealizeInterface to create the X windows
851
for the widgets created above. */
853
UxRealizeInterface( Associate );
855
UxMainWindowSetAreas( mainWindow3, pullDownMenu3, NULL_SWIDGET,
856
NULL_SWIDGET, NULL_SWIDGET, workAreaForm3 );
857
return ( Associate );
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
*******************************************************************************/
867
static swidget _Ux_create_Associate()
870
_UxCAssociate *UxContext;
872
UxAssociateContext = UxContext =
873
(_UxCAssociate *) UxMalloc( sizeof(_UxCAssociate) );
875
rtrn = _Uxbuild_Associate();
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
885
*******************************************************************************/
887
swidget create_Associate()
890
static int _Uxinit = 0;
894
static XtActionsRec _Uxactions[] = {
895
{ "nothing", action_nothing },
896
{ "SelectCommand", action_SelectCommand },
897
{ "ClearHelp", action_ClearHelp },
898
{ "WriteHelp", action_WriteHelp },
899
{ "HelpACT", action_HelpACT }
902
XtAppAddActions( UxAppContext,
904
XtNumber(_Uxactions) );
909
_Uxrtrn = _Ux_create_Associate();
914
/*******************************************************************************
916
*******************************************************************************/