1
/*===========================================================================
2
Copyright (C) 1995-2009 European Southern Observatory (ESO)
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public
15
License along with this program; if not, write to the Free
16
Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
19
Correspondence concerning ESO-MIDAS should be addressed as follows:
20
Internet e-mail: midas@eso.org
21
Postal address: European Southern Observatory
22
Data Management Division
23
Karl-Schwarzschild-Strasse 2
24
D 85748 Garching bei Muenchen
26
===========================================================================*/
29
/*******************************************************************************
35
*******************************************************************************/
47
#include "proto_xech.h"
49
/*******************************************************************************
50
Includes, Defines, and Global variables from the Declarations Editor:
51
*******************************************************************************/
53
#include <ExternResources.h>
55
/*******************************************************************************
56
The definition of the context structure:
57
If you create multiple instances of your interface, the context
58
structure ensures that your callbacks use the variables for the
61
For each swidget in the interface, each argument to the Interface
62
function, and each variable in the Instance Specific section of the
63
Declarations Editor, there is an entry in the context structure.
64
and a #define. The #define makes the variable name refer to the
65
corresponding entry in the context structure.
66
*******************************************************************************/
79
swidget Uxpb_rebin_rbr;
80
swidget UxpushButton13;
81
swidget Uxpb_rebin_plot;
82
swidget Uxpb_search_plot17;
83
swidget Uxshelp_rebin;
86
swidget Uxpb_main_search21;
87
swidget Uxpb_main_search22;
90
#define RebinShell UxRebinShellContext->UxRebinShell
91
#define form7 UxRebinShellContext->Uxform7
92
#define label21 UxRebinShellContext->Uxlabel21
93
#define tf_rebstrt UxRebinShellContext->Uxtf_rebstrt
94
#define label22 UxRebinShellContext->Uxlabel22
95
#define label23 UxRebinShellContext->Uxlabel23
96
#define tf_rebend UxRebinShellContext->Uxtf_rebend
97
#define tf_rebstp UxRebinShellContext->Uxtf_rebstp
98
#define form8 UxRebinShellContext->Uxform8
99
#define pb_rebin_rbr UxRebinShellContext->Uxpb_rebin_rbr
100
#define pushButton13 UxRebinShellContext->UxpushButton13
101
#define pb_rebin_plot UxRebinShellContext->Uxpb_rebin_plot
102
#define pb_search_plot17 UxRebinShellContext->Uxpb_search_plot17
103
#define shelp_rebin UxRebinShellContext->Uxshelp_rebin
104
#define separator6 UxRebinShellContext->Uxseparator6
105
#define separator7 UxRebinShellContext->Uxseparator7
106
#define pb_main_search21 UxRebinShellContext->Uxpb_main_search21
107
#define pb_main_search22 UxRebinShellContext->Uxpb_main_search22
109
static _UxCRebinShell *UxRebinShellContext;
111
extern void DisplayShortHelp(), DisplayExtendedHelp(), SetFileList();
112
extern void MidasCommand(), PopupLong(), InitAllFields();
113
extern void WidgetLeave(), WidgetEnter();
114
extern void WriteKeyword(), GetExtendedHelp(), SelectList();
117
/*******************************************************************************
118
The following are translation tables.
119
*******************************************************************************/
121
/*******************************************************************************
122
Forward declarations of functions that are defined later in this file.
123
*******************************************************************************/
125
swidget create_RebinShell();
127
/*******************************************************************************
128
The following are Action functions.
129
*******************************************************************************/
131
static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
135
Cardinal *p_UxNumParams;
137
_UxCRebinShell *UxSaveCtx, *UxContext;
138
swidget UxThisWidget;
140
UxThisWidget = UxWidgetToSwidget( UxWidget );
141
UxSaveCtx = UxRebinShellContext;
142
UxRebinShellContext = UxContext =
143
(_UxCRebinShell *) UxGetContext( UxThisWidget );
145
DisplayShortHelp(UxWidget);
147
UxRebinShellContext = UxSaveCtx;
150
static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
154
Cardinal *p_UxNumParams;
156
_UxCRebinShell *UxSaveCtx, *UxContext;
157
swidget UxThisWidget;
159
UxThisWidget = UxWidgetToSwidget( UxWidget );
160
UxSaveCtx = UxRebinShellContext;
161
UxRebinShellContext = UxContext =
162
(_UxCRebinShell *) UxGetContext( UxThisWidget );
165
UxPutText(UxFindSwidget("shelp_main"), "");
166
UxPutText(UxFindSwidget("shelp_search"), "");
167
UxPutText(UxFindSwidget("shelp_calib"), "");
168
UxPutText(UxFindSwidget("shelp_rebin"), "");
169
UxPutText(UxFindSwidget("shelp_extract"), "");
170
UxPutText(UxFindSwidget("shelp_flux"), "");
173
UxRebinShellContext = UxSaveCtx;
176
static void action_UpdateDirectory( UxWidget, UxEvent, UxParams, p_UxNumParams )
180
Cardinal *p_UxNumParams;
182
_UxCRebinShell *UxSaveCtx, *UxContext;
183
swidget UxThisWidget;
185
UxThisWidget = UxWidgetToSwidget( UxWidget );
186
UxSaveCtx = UxRebinShellContext;
187
UxRebinShellContext = UxContext =
188
(_UxCRebinShell *) UxGetContext( UxThisWidget );
193
/* if (XmTextGetSelection(UxWidget) == NULL) return; */
195
XmTextGetSelection(UxWidget));
196
XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));
198
node[strlen(node)-1] = '\0';
204
UxRebinShellContext = UxSaveCtx;
207
static void action_ClearShort( UxWidget, UxEvent, UxParams, p_UxNumParams )
211
Cardinal *p_UxNumParams;
213
_UxCRebinShell *UxSaveCtx, *UxContext;
214
swidget UxThisWidget;
216
UxThisWidget = UxWidgetToSwidget( UxWidget );
217
UxSaveCtx = UxRebinShellContext;
218
UxRebinShellContext = UxContext =
219
(_UxCRebinShell *) UxGetContext( UxThisWidget );
220
{WidgetLeave(UxWidget);}
221
UxRebinShellContext = UxSaveCtx;
224
static void action_HelpShort( UxWidget, UxEvent, UxParams, p_UxNumParams )
228
Cardinal *p_UxNumParams;
230
_UxCRebinShell *UxSaveCtx, *UxContext;
231
swidget UxThisWidget;
233
UxThisWidget = UxWidgetToSwidget( UxWidget );
234
UxSaveCtx = UxRebinShellContext;
235
UxRebinShellContext = UxContext =
236
(_UxCRebinShell *) UxGetContext( UxThisWidget );
237
{WidgetEnter(UxWidget);}
238
UxRebinShellContext = UxSaveCtx;
241
static void action_FileSelectACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
245
Cardinal *p_UxNumParams;
247
_UxCRebinShell *UxSaveCtx, *UxContext;
248
swidget UxThisWidget;
250
UxThisWidget = UxWidgetToSwidget( UxWidget );
251
UxSaveCtx = UxRebinShellContext;
252
UxRebinShellContext = UxContext =
253
(_UxCRebinShell *) UxGetContext( UxThisWidget );
256
#include <spec_comm.h>
258
extern swidget FileListInterface, TextFieldSwidget;
259
extern Widget FileListWidget;
260
extern char DirSpecs[];
263
int strip = 1; /* strip off */
265
TextFieldSwidget = UxThisWidget;
267
if ( UxWidget == UxGetWidget(UxFindSwidget("tf_lincat")) ) {
268
SET_LIST_TITLE("Enter line catalog");
269
ListType = LIST_LINCAT;
271
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_guess")) ) {
272
SET_LIST_TITLE("Enter guess table");
273
ListType = LIST_GUESS;
275
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_flux_tbl")) ) {
276
SET_LIST_TITLE("Enter flux table");
277
ListType = LIST_FLUX_TBL;
279
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_extin_tbl")) ) {
280
SET_LIST_TITLE("Enter extinction table");
281
ListType = LIST_EXTIN_TBL;
284
strcpy(DirSpecs, "*.tbl");
285
SetFileList(FileListWidget, strip, DirSpecs);
286
UxPopupInterface(FileListInterface, exclusive_grab);
289
UxRebinShellContext = UxSaveCtx;
292
/*******************************************************************************
293
The following are callback functions.
294
*******************************************************************************/
296
static void losingFocusCB_tf_rebstrt( UxWidget, UxClientData, UxCallbackArg )
298
XtPointer UxClientData, UxCallbackArg;
300
_UxCRebinShell *UxSaveCtx, *UxContext;
301
swidget UxThisWidget;
303
UxThisWidget = UxWidgetToSwidget( UxWidget );
304
UxSaveCtx = UxRebinShellContext;
305
UxRebinShellContext = UxContext =
306
(_UxCRebinShell *) UxGetContext( UxThisWidget );
310
UxRebinShellContext = UxSaveCtx;
313
static void losingFocusCB_tf_rebend( UxWidget, UxClientData, UxCallbackArg )
315
XtPointer UxClientData, UxCallbackArg;
317
_UxCRebinShell *UxSaveCtx, *UxContext;
318
swidget UxThisWidget;
320
UxThisWidget = UxWidgetToSwidget( UxWidget );
321
UxSaveCtx = UxRebinShellContext;
322
UxRebinShellContext = UxContext =
323
(_UxCRebinShell *) UxGetContext( UxThisWidget );
327
UxRebinShellContext = UxSaveCtx;
330
static void losingFocusCB_tf_rebstp( UxWidget, UxClientData, UxCallbackArg )
332
XtPointer UxClientData, UxCallbackArg;
334
_UxCRebinShell *UxSaveCtx, *UxContext;
335
swidget UxThisWidget;
337
UxThisWidget = UxWidgetToSwidget( UxWidget );
338
UxSaveCtx = UxRebinShellContext;
339
UxRebinShellContext = UxContext =
340
(_UxCRebinShell *) UxGetContext( UxThisWidget );
344
UxRebinShellContext = UxSaveCtx;
347
static void activateCB_pb_rebin_rbr( UxWidget, UxClientData, UxCallbackArg )
349
XtPointer UxClientData, UxCallbackArg;
351
_UxCRebinShell *UxSaveCtx, *UxContext;
352
swidget UxThisWidget;
354
UxThisWidget = UxWidgetToSwidget( UxWidget );
355
UxSaveCtx = UxRebinShellContext;
356
UxRebinShellContext = UxContext =
357
(_UxCRebinShell *) UxGetContext( UxThisWidget );
359
MidasCommand(UxWidget);
362
UxRebinShellContext = UxSaveCtx;
365
static void activateCB_pushButton13( UxWidget, UxClientData, UxCallbackArg )
367
XtPointer UxClientData, UxCallbackArg;
369
_UxCRebinShell *UxSaveCtx, *UxContext;
370
swidget UxThisWidget;
372
UxThisWidget = UxWidgetToSwidget( UxWidget );
373
UxSaveCtx = UxRebinShellContext;
374
UxRebinShellContext = UxContext =
375
(_UxCRebinShell *) UxGetContext( UxThisWidget );
377
UxPopdownInterface(UxFindSwidget("RebinShell"));
379
UxRebinShellContext = UxSaveCtx;
382
static void activateCB_pb_rebin_plot( UxWidget, UxClientData, UxCallbackArg )
384
XtPointer UxClientData, UxCallbackArg;
386
_UxCRebinShell *UxSaveCtx, *UxContext;
387
swidget UxThisWidget;
389
UxThisWidget = UxWidgetToSwidget( UxWidget );
390
UxSaveCtx = UxRebinShellContext;
391
UxRebinShellContext = UxContext =
392
(_UxCRebinShell *) UxGetContext( UxThisWidget );
394
MidasCommand(UxWidget);
397
UxRebinShellContext = UxSaveCtx;
400
static void activateCB_pb_search_plot17( UxWidget, UxClientData, UxCallbackArg )
402
XtPointer UxClientData, UxCallbackArg;
404
_UxCRebinShell *UxSaveCtx, *UxContext;
405
swidget UxThisWidget;
407
UxThisWidget = UxWidgetToSwidget( UxWidget );
408
UxSaveCtx = UxRebinShellContext;
409
UxRebinShellContext = UxContext =
410
(_UxCRebinShell *) UxGetContext( UxThisWidget );
412
GetExtendedHelp(UxWidget);
414
UxRebinShellContext = UxSaveCtx;
417
static void activateCB_pb_main_search21( UxWidget, UxClientData, UxCallbackArg )
419
XtPointer UxClientData, UxCallbackArg;
421
_UxCRebinShell *UxSaveCtx, *UxContext;
422
swidget UxThisWidget;
424
UxThisWidget = UxWidgetToSwidget( UxWidget );
425
UxSaveCtx = UxRebinShellContext;
426
UxRebinShellContext = UxContext =
427
(_UxCRebinShell *) UxGetContext( UxThisWidget );
429
SelectList(UxWidget);
432
UxRebinShellContext = UxSaveCtx;
435
static void activateCB_pb_main_search22( UxWidget, UxClientData, UxCallbackArg )
437
XtPointer UxClientData, UxCallbackArg;
439
_UxCRebinShell *UxSaveCtx, *UxContext;
440
swidget UxThisWidget;
442
UxThisWidget = UxWidgetToSwidget( UxWidget );
443
UxSaveCtx = UxRebinShellContext;
444
UxRebinShellContext = UxContext =
445
(_UxCRebinShell *) UxGetContext( UxThisWidget );
447
SelectList(UxWidget);
450
UxRebinShellContext = UxSaveCtx;
453
/*******************************************************************************
454
The 'init_' function sets the private properties for all the
455
swidgets to the values specified in the Property Table.
456
Some properties need to be set after the X widgets have been
457
created and the setting of these properties is done in the
458
'build_' function after the UxCreateWidget call.
459
*******************************************************************************/
461
static void _Uxinit_RebinShell()
463
UxPutBackground( RebinShell, WindowBackground );
464
UxPutGeometry( RebinShell, "+10+60" );
465
UxPutKeyboardFocusPolicy( RebinShell, "pointer" );
466
UxPutTitle( RebinShell, "XEchelle: Rebinning" );
467
UxPutHeight( RebinShell, 263 );
468
UxPutWidth( RebinShell, 490 );
469
UxPutY( RebinShell, 105 );
470
UxPutX( RebinShell, 383 );
472
UxPutBackground( form7, WindowBackground );
473
UxPutHeight( form7, 348 );
474
UxPutWidth( form7, 408 );
477
UxPutUnitType( form7, "pixels" );
478
UxPutResizePolicy( form7, "resize_none" );
480
UxPutForeground( label21, TextForeground );
481
UxPutAlignment( label21, "alignment_beginning" );
482
UxPutLabelString( label21, "Input Frame:" );
483
UxPutFontList( label21, TextFont );
484
UxPutBackground( label21, LabelBackground );
485
UxPutHeight( label21, 30 );
486
UxPutWidth( label21, 168 );
487
UxPutY( label21, 30 );
488
UxPutX( label21, 24 );
490
UxPutForeground( tf_rebstrt, TextForeground );
491
UxPutHighlightOnEnter( tf_rebstrt, "true" );
492
UxPutFontList( tf_rebstrt, TextFont );
493
UxPutBackground( tf_rebstrt, TextBackground );
494
UxPutHeight( tf_rebstrt, 34 );
495
UxPutWidth( tf_rebstrt, 200 );
496
UxPutY( tf_rebstrt, 24 );
497
UxPutX( tf_rebstrt, 201 );
499
UxPutForeground( label22, TextForeground );
500
UxPutAlignment( label22, "alignment_beginning" );
501
UxPutLabelString( label22, "Output Frame:" );
502
UxPutFontList( label22, TextFont );
503
UxPutBackground( label22, LabelBackground );
504
UxPutHeight( label22, 30 );
505
UxPutWidth( label22, 156 );
506
UxPutY( label22, 66 );
507
UxPutX( label22, 24 );
509
UxPutForeground( label23, TextForeground );
510
UxPutAlignment( label23, "alignment_beginning" );
511
UxPutLabelString( label23, "Wavelength step (A) :" );
512
UxPutFontList( label23, TextFont );
513
UxPutBackground( label23, LabelBackground );
514
UxPutHeight( label23, 30 );
515
UxPutWidth( label23, 158 );
516
UxPutY( label23, 102 );
517
UxPutX( label23, 24 );
519
UxPutForeground( tf_rebend, TextForeground );
520
UxPutHighlightOnEnter( tf_rebend, "true" );
521
UxPutFontList( tf_rebend, TextFont );
522
UxPutBackground( tf_rebend, TextBackground );
523
UxPutHeight( tf_rebend, 34 );
524
UxPutWidth( tf_rebend, 200 );
525
UxPutY( tf_rebend, 62 );
526
UxPutX( tf_rebend, 201 );
528
UxPutForeground( tf_rebstp, TextForeground );
529
UxPutHighlightOnEnter( tf_rebstp, "true" );
530
UxPutFontList( tf_rebstp, TextFont );
531
UxPutBackground( tf_rebstp, TextBackground );
532
UxPutHeight( tf_rebstp, 34 );
533
UxPutWidth( tf_rebstp, 200 );
534
UxPutY( tf_rebstp, 100 );
535
UxPutX( tf_rebstp, 201 );
537
UxPutBackground( form8, ButtonBackground );
538
UxPutHeight( form8, 40 );
539
UxPutWidth( form8, 490 );
540
UxPutY( form8, 222 );
542
UxPutResizePolicy( form8, "resize_none" );
544
UxPutLabelString( pb_rebin_rbr, "Rebin" );
545
UxPutForeground( pb_rebin_rbr, ApplyForeground );
546
UxPutFontList( pb_rebin_rbr, BoldTextFont );
547
UxPutBackground( pb_rebin_rbr, ButtonBackground );
548
UxPutHeight( pb_rebin_rbr, 30 );
549
UxPutWidth( pb_rebin_rbr, 86 );
550
UxPutY( pb_rebin_rbr, 4 );
551
UxPutX( pb_rebin_rbr, 8 );
553
UxPutLabelString( pushButton13, "Cancel" );
554
UxPutForeground( pushButton13, CancelForeground );
555
UxPutFontList( pushButton13, BoldTextFont );
556
UxPutBackground( pushButton13, ButtonBackground );
557
UxPutHeight( pushButton13, 30 );
558
UxPutWidth( pushButton13, 86 );
559
UxPutY( pushButton13, 2 );
560
UxPutX( pushButton13, 394 );
562
UxPutLabelString( pb_rebin_plot, "Plot " );
563
UxPutForeground( pb_rebin_plot, ButtonForeground );
564
UxPutFontList( pb_rebin_plot, BoldTextFont );
565
UxPutBackground( pb_rebin_plot, ButtonBackground );
566
UxPutHeight( pb_rebin_plot, 30 );
567
UxPutWidth( pb_rebin_plot, 86 );
568
UxPutY( pb_rebin_plot, 2 );
569
UxPutX( pb_rebin_plot, 114 );
571
UxPutLabelString( pb_search_plot17, "Help..." );
572
UxPutForeground( pb_search_plot17, ButtonForeground );
573
UxPutFontList( pb_search_plot17, BoldTextFont );
574
UxPutBackground( pb_search_plot17, ButtonBackground );
575
UxPutHeight( pb_search_plot17, 30 );
576
UxPutWidth( pb_search_plot17, 86 );
577
UxPutY( pb_search_plot17, 4 );
578
UxPutX( pb_search_plot17, 296 );
580
UxPutFontList( shelp_rebin, TextFont );
581
UxPutEditable( shelp_rebin, "false" );
582
UxPutCursorPositionVisible( shelp_rebin, "false" );
583
UxPutBackground( shelp_rebin, SHelpBackground );
584
UxPutHeight( shelp_rebin, 50 );
585
UxPutWidth( shelp_rebin, 484 );
586
UxPutY( shelp_rebin, 162 );
587
UxPutX( shelp_rebin, 0 );
589
UxPutBackground( separator6, WindowBackground );
590
UxPutHeight( separator6, 10 );
591
UxPutWidth( separator6, 492 );
592
UxPutY( separator6, 152 );
593
UxPutX( separator6, -2 );
595
UxPutBackground( separator7, WindowBackground );
596
UxPutHeight( separator7, 10 );
597
UxPutWidth( separator7, 492 );
598
UxPutY( separator7, 210 );
599
UxPutX( separator7, -4 );
601
UxPutWidth( pb_main_search21, 46 );
602
UxPutRecomputeSize( pb_main_search21, "true" );
603
UxPutLabelString( pb_main_search21, "..." );
604
UxPutForeground( pb_main_search21, ButtonForeground );
605
UxPutFontList( pb_main_search21, BoldTextFont );
606
UxPutBackground( pb_main_search21, ButtonBackground );
607
UxPutHeight( pb_main_search21, 28 );
608
UxPutY( pb_main_search21, 26 );
609
UxPutX( pb_main_search21, 412 );
611
UxPutWidth( pb_main_search22, 46 );
612
UxPutRecomputeSize( pb_main_search22, "true" );
613
UxPutLabelString( pb_main_search22, "..." );
614
UxPutForeground( pb_main_search22, ButtonForeground );
615
UxPutFontList( pb_main_search22, BoldTextFont );
616
UxPutBackground( pb_main_search22, ButtonBackground );
617
UxPutHeight( pb_main_search22, 28 );
618
UxPutY( pb_main_search22, 64 );
619
UxPutX( pb_main_search22, 414 );
623
/*******************************************************************************
624
The 'build_' function creates all the swidgets and X widgets,
625
and sets their properties to the values specified in the
627
*******************************************************************************/
629
static swidget _Uxbuild_RebinShell()
631
/* Create the swidgets */
633
RebinShell = UxCreateApplicationShell( "RebinShell", NO_PARENT );
634
UxPutContext( RebinShell, UxRebinShellContext );
636
form7 = UxCreateForm( "form7", RebinShell );
637
label21 = UxCreateLabel( "label21", form7 );
638
tf_rebstrt = UxCreateTextField( "tf_rebstrt", form7 );
639
label22 = UxCreateLabel( "label22", form7 );
640
label23 = UxCreateLabel( "label23", form7 );
641
tf_rebend = UxCreateTextField( "tf_rebend", form7 );
642
tf_rebstp = UxCreateTextField( "tf_rebstp", form7 );
643
form8 = UxCreateForm( "form8", form7 );
644
pb_rebin_rbr = UxCreatePushButton( "pb_rebin_rbr", form8 );
645
pushButton13 = UxCreatePushButton( "pushButton13", form8 );
646
pb_rebin_plot = UxCreatePushButton( "pb_rebin_plot", form8 );
647
pb_search_plot17 = UxCreatePushButton( "pb_search_plot17", form8 );
648
shelp_rebin = UxCreateText( "shelp_rebin", form7 );
649
separator6 = UxCreateSeparator( "separator6", form7 );
650
separator7 = UxCreateSeparator( "separator7", form7 );
651
pb_main_search21 = UxCreatePushButton( "pb_main_search21", form7 );
652
pb_main_search22 = UxCreatePushButton( "pb_main_search22", form7 );
654
_Uxinit_RebinShell();
656
/* Create the X widgets */
658
UxCreateWidget( RebinShell );
659
UxCreateWidget( form7 );
660
UxCreateWidget( label21 );
661
UxCreateWidget( tf_rebstrt );
662
UxCreateWidget( label22 );
663
UxCreateWidget( label23 );
664
UxCreateWidget( tf_rebend );
665
UxCreateWidget( tf_rebstp );
666
UxCreateWidget( form8 );
667
UxCreateWidget( pb_rebin_rbr );
668
UxCreateWidget( pushButton13 );
669
UxCreateWidget( pb_rebin_plot );
670
UxCreateWidget( pb_search_plot17 );
671
UxCreateWidget( shelp_rebin );
672
UxCreateWidget( separator6 );
673
UxCreateWidget( separator7 );
674
UxCreateWidget( pb_main_search21 );
675
UxCreateWidget( pb_main_search22 );
677
UxAddCallback( tf_rebstrt, XmNlosingFocusCallback,
678
losingFocusCB_tf_rebstrt,
679
(XtPointer) UxRebinShellContext );
681
UxAddCallback( tf_rebend, XmNlosingFocusCallback,
682
losingFocusCB_tf_rebend,
683
(XtPointer) UxRebinShellContext );
685
UxAddCallback( tf_rebstp, XmNlosingFocusCallback,
686
losingFocusCB_tf_rebstp,
687
(XtPointer) UxRebinShellContext );
689
UxAddCallback( pb_rebin_rbr, XmNactivateCallback,
690
activateCB_pb_rebin_rbr,
691
(XtPointer) UxRebinShellContext );
693
UxAddCallback( pushButton13, XmNactivateCallback,
694
activateCB_pushButton13,
695
(XtPointer) UxRebinShellContext );
697
UxAddCallback( pb_rebin_plot, XmNactivateCallback,
698
activateCB_pb_rebin_plot,
699
(XtPointer) UxRebinShellContext );
701
UxAddCallback( pb_search_plot17, XmNactivateCallback,
702
activateCB_pb_search_plot17,
703
(XtPointer) UxRebinShellContext );
705
UxAddCallback( pb_main_search21, XmNactivateCallback,
706
activateCB_pb_main_search21,
707
(XtPointer) UxRebinShellContext );
709
UxAddCallback( pb_main_search22, XmNactivateCallback,
710
activateCB_pb_main_search22,
711
(XtPointer) UxRebinShellContext );
714
/* Finally, call UxRealizeInterface to create the X windows
715
for the widgets created above. */
717
UxRealizeInterface( RebinShell );
719
return ( RebinShell );
722
/*******************************************************************************
723
The following function includes the code that was entered
724
in the 'Initial Code' and 'Final Code' sections of the
725
Declarations Editor. This function is called from the
726
'Interface function' below.
727
*******************************************************************************/
729
static swidget _Ux_create_RebinShell()
732
_UxCRebinShell *UxContext;
734
UxRebinShellContext = UxContext =
735
(_UxCRebinShell *) UxMalloc( sizeof(_UxCRebinShell) );
737
rtrn = _Uxbuild_RebinShell();
742
/*******************************************************************************
743
The following is the 'Interface function' which is the
744
external entry point for creating this interface.
745
This function should be called from your application or from
747
*******************************************************************************/
749
swidget create_RebinShell()
752
static int _Uxinit = 0;
756
static XtActionsRec _Uxactions[] = {
757
{ "WriteHelp", action_WriteHelp },
758
{ "ClearHelp", action_ClearHelp },
759
{ "UpdateDirectory", action_UpdateDirectory },
760
{ "ClearShort", action_ClearShort },
761
{ "HelpShort", action_HelpShort },
762
{ "FileSelectACT", action_FileSelectACT }
765
XtAppAddActions( UxAppContext,
767
XtNumber(_Uxactions) );
772
_Uxrtrn = _Ux_create_RebinShell();
777
/*******************************************************************************
779
*******************************************************************************/