Debian Codegraph @

gui/XEchelle/src/RebinShell.c

raw
1 /*===========================================================================
2 Copyright (C) 1995-2009 European Southern Observatory (ESO)
3
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.
8
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.
13
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,
17 MA 02139, USA.
18
19 Correspondence concerning ESO-MIDAS should be addressed as follows:
20 Internet e-mail: [email protected]
21 Postal address: European Southern Observatory
22 Data Management Division
23 Karl-Schwarzschild-Strasse 2
24 D 85748 Garching bei Muenchen
25 GERMANY
26 ===========================================================================*/
27
28
29 /*******************************************************************************
30 RebinShell.c
31
32 .VERSION
33 090825 last modif
34
35 *******************************************************************************/
36
37 #include <stdio.h>
38 #include "UxLib.h"
39 #include "UxSep.h"
40 #include "UxText.h"
41 #include "UxPushB.h"
42 #include "UxTextF.h"
43 #include "UxLabel.h"
44 #include "UxForm.h"
45 #include "UxApplSh.h"
46
47 #include "proto_xech.h"
48
49 /*******************************************************************************
50 Includes, Defines, and Global variables from the Declarations Editor:
51 *******************************************************************************/
52
53 #include <ExternResources.h>
54
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
59 correct instance.
60
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 *******************************************************************************/
67
68 typedef struct
69 {
70 swidget UxRebinShell;
71 swidget Uxform7;
72 swidget Uxlabel21;
73 swidget Uxtf_rebstrt;
74 swidget Uxlabel22;
75 swidget Uxlabel23;
76 swidget Uxtf_rebend;
77 swidget Uxtf_rebstp;
78 swidget Uxform8;
79 swidget Uxpb_rebin_rbr;
80 swidget UxpushButton13;
81 swidget Uxpb_rebin_plot;
82 swidget Uxpb_search_plot17;
83 swidget Uxshelp_rebin;
84 swidget Uxseparator6;
85 swidget Uxseparator7;
86 swidget Uxpb_main_search21;
87 swidget Uxpb_main_search22;
88 } _UxCRebinShell;
89
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
108
109 static _UxCRebinShell *UxRebinShellContext;
110
111 extern void DisplayShortHelp(), DisplayExtendedHelp(), SetFileList();
112 extern void MidasCommand(), PopupLong(), InitAllFields();
113 extern void WidgetLeave(), WidgetEnter();
114 extern void WriteKeyword(), GetExtendedHelp(), SelectList();
115
116
117 /*******************************************************************************
118 The following are translation tables.
119 *******************************************************************************/
120
121 /*******************************************************************************
122 Forward declarations of functions that are defined later in this file.
123 *******************************************************************************/
124
125 swidget create_RebinShell();
126
127 /*******************************************************************************
128 The following are Action functions.
129 *******************************************************************************/
130
131 static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
132 Widget UxWidget;
133 XEvent *UxEvent;
134 String *UxParams;
135 Cardinal *p_UxNumParams;
136 {
137 _UxCRebinShell *UxSaveCtx, *UxContext;
138 swidget UxThisWidget;
139
140 UxThisWidget = UxWidgetToSwidget( UxWidget );
141 UxSaveCtx = UxRebinShellContext;
142 UxRebinShellContext = UxContext =
143 (_UxCRebinShell *) UxGetContext( UxThisWidget );
144 {
145 DisplayShortHelp(UxWidget);
146 }
147 UxRebinShellContext = UxSaveCtx;
148 }
149
150 static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
151 Widget UxWidget;
152 XEvent *UxEvent;
153 String *UxParams;
154 Cardinal *p_UxNumParams;
155 {
156 _UxCRebinShell *UxSaveCtx, *UxContext;
157 swidget UxThisWidget;
158
159 UxThisWidget = UxWidgetToSwidget( UxWidget );
160 UxSaveCtx = UxRebinShellContext;
161 UxRebinShellContext = UxContext =
162 (_UxCRebinShell *) UxGetContext( UxThisWidget );
163 {
164 /*
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"), "");
171 */
172 }
173 UxRebinShellContext = UxSaveCtx;
174 }
175
176 static void action_UpdateDirectory( UxWidget, UxEvent, UxParams, p_UxNumParams )
177 Widget UxWidget;
178 XEvent *UxEvent;
179 String *UxParams;
180 Cardinal *p_UxNumParams;
181 {
182 _UxCRebinShell *UxSaveCtx, *UxContext;
183 swidget UxThisWidget;
184
185 UxThisWidget = UxWidgetToSwidget( UxWidget );
186 UxSaveCtx = UxRebinShellContext;
187 UxRebinShellContext = UxContext =
188 (_UxCRebinShell *) UxGetContext( UxThisWidget );
189 {
190
191 char node[80];
192
193 /* if (XmTextGetSelection(UxWidget) == NULL) return; */
194 strcpy(node,
195 XmTextGetSelection(UxWidget));
196 XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));
197
198 node[strlen(node)-1] = '\0';
199 WGet_all_dirs(node);
200 WChange_Midas_dir();
201 WGet_all_files();
202
203 }
204 UxRebinShellContext = UxSaveCtx;
205 }
206
207 static void action_ClearShort( UxWidget, UxEvent, UxParams, p_UxNumParams )
208 Widget UxWidget;
209 XEvent *UxEvent;
210 String *UxParams;
211 Cardinal *p_UxNumParams;
212 {
213 _UxCRebinShell *UxSaveCtx, *UxContext;
214 swidget UxThisWidget;
215
216 UxThisWidget = UxWidgetToSwidget( UxWidget );
217 UxSaveCtx = UxRebinShellContext;
218 UxRebinShellContext = UxContext =
219 (_UxCRebinShell *) UxGetContext( UxThisWidget );
220 {WidgetLeave(UxWidget);}
221 UxRebinShellContext = UxSaveCtx;
222 }
223
224 static void action_HelpShort( UxWidget, UxEvent, UxParams, p_UxNumParams )
225 Widget UxWidget;
226 XEvent *UxEvent;
227 String *UxParams;
228 Cardinal *p_UxNumParams;
229 {
230 _UxCRebinShell *UxSaveCtx, *UxContext;
231 swidget UxThisWidget;
232
233 UxThisWidget = UxWidgetToSwidget( UxWidget );
234 UxSaveCtx = UxRebinShellContext;
235 UxRebinShellContext = UxContext =
236 (_UxCRebinShell *) UxGetContext( UxThisWidget );
237 {WidgetEnter(UxWidget);}
238 UxRebinShellContext = UxSaveCtx;
239 }
240
241 static void action_FileSelectACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
242 Widget UxWidget;
243 XEvent *UxEvent;
244 String *UxParams;
245 Cardinal *p_UxNumParams;
246 {
247 _UxCRebinShell *UxSaveCtx, *UxContext;
248 swidget UxThisWidget;
249
250 UxThisWidget = UxWidgetToSwidget( UxWidget );
251 UxSaveCtx = UxRebinShellContext;
252 UxRebinShellContext = UxContext =
253 (_UxCRebinShell *) UxGetContext( UxThisWidget );
254 {
255 #include <xm_defs.h>
256 #include <spec_comm.h>
257
258 extern swidget FileListInterface, TextFieldSwidget;
259 extern Widget FileListWidget;
260 extern char DirSpecs[];
261 extern int ListType;
262
263 int strip = 1; /* strip off */
264
265 TextFieldSwidget = UxThisWidget;
266
267 if ( UxWidget == UxGetWidget(UxFindSwidget("tf_lincat")) ) {
268 SET_LIST_TITLE("Enter line catalog");
269 ListType = LIST_LINCAT;
270 }
271 else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_guess")) ) {
272 SET_LIST_TITLE("Enter guess table");
273 ListType = LIST_GUESS;
274 }
275 else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_flux_tbl")) ) {
276 SET_LIST_TITLE("Enter flux table");
277 ListType = LIST_FLUX_TBL;
278 }
279 else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_extin_tbl")) ) {
280 SET_LIST_TITLE("Enter extinction table");
281 ListType = LIST_EXTIN_TBL;
282 }
283
284 strcpy(DirSpecs, "*.tbl");
285 SetFileList(FileListWidget, strip, DirSpecs);
286 UxPopupInterface(FileListInterface, exclusive_grab);
287
288 }
289 UxRebinShellContext = UxSaveCtx;
290 }
291
292 /*******************************************************************************
293 The following are callback functions.
294 *******************************************************************************/
295
296 static void losingFocusCB_tf_rebstrt( UxWidget, UxClientData, UxCallbackArg )
297 Widget UxWidget;
298 XtPointer UxClientData, UxCallbackArg;
299 {
300 _UxCRebinShell *UxSaveCtx, *UxContext;
301 swidget UxThisWidget;
302
303 UxThisWidget = UxWidgetToSwidget( UxWidget );
304 UxSaveCtx = UxRebinShellContext;
305 UxRebinShellContext = UxContext =
306 (_UxCRebinShell *) UxGetContext( UxThisWidget );
307 {
308
309 }
310 UxRebinShellContext = UxSaveCtx;
311 }
312
313 static void losingFocusCB_tf_rebend( UxWidget, UxClientData, UxCallbackArg )
314 Widget UxWidget;
315 XtPointer UxClientData, UxCallbackArg;
316 {
317 _UxCRebinShell *UxSaveCtx, *UxContext;
318 swidget UxThisWidget;
319
320 UxThisWidget = UxWidgetToSwidget( UxWidget );
321 UxSaveCtx = UxRebinShellContext;
322 UxRebinShellContext = UxContext =
323 (_UxCRebinShell *) UxGetContext( UxThisWidget );
324 {
325
326 }
327 UxRebinShellContext = UxSaveCtx;
328 }
329
330 static void losingFocusCB_tf_rebstp( UxWidget, UxClientData, UxCallbackArg )
331 Widget UxWidget;
332 XtPointer UxClientData, UxCallbackArg;
333 {
334 _UxCRebinShell *UxSaveCtx, *UxContext;
335 swidget UxThisWidget;
336
337 UxThisWidget = UxWidgetToSwidget( UxWidget );
338 UxSaveCtx = UxRebinShellContext;
339 UxRebinShellContext = UxContext =
340 (_UxCRebinShell *) UxGetContext( UxThisWidget );
341 {
342
343 }
344 UxRebinShellContext = UxSaveCtx;
345 }
346
347 static void activateCB_pb_rebin_rbr( UxWidget, UxClientData, UxCallbackArg )
348 Widget UxWidget;
349 XtPointer UxClientData, UxCallbackArg;
350 {
351 _UxCRebinShell *UxSaveCtx, *UxContext;
352 swidget UxThisWidget;
353
354 UxThisWidget = UxWidgetToSwidget( UxWidget );
355 UxSaveCtx = UxRebinShellContext;
356 UxRebinShellContext = UxContext =
357 (_UxCRebinShell *) UxGetContext( UxThisWidget );
358 {
359 MidasCommand(UxWidget);
360
361 }
362 UxRebinShellContext = UxSaveCtx;
363 }
364
365 static void activateCB_pushButton13( UxWidget, UxClientData, UxCallbackArg )
366 Widget UxWidget;
367 XtPointer UxClientData, UxCallbackArg;
368 {
369 _UxCRebinShell *UxSaveCtx, *UxContext;
370 swidget UxThisWidget;
371
372 UxThisWidget = UxWidgetToSwidget( UxWidget );
373 UxSaveCtx = UxRebinShellContext;
374 UxRebinShellContext = UxContext =
375 (_UxCRebinShell *) UxGetContext( UxThisWidget );
376 {
377 UxPopdownInterface(UxFindSwidget("RebinShell"));
378 }
379 UxRebinShellContext = UxSaveCtx;
380 }
381
382 static void activateCB_pb_rebin_plot( UxWidget, UxClientData, UxCallbackArg )
383 Widget UxWidget;
384 XtPointer UxClientData, UxCallbackArg;
385 {
386 _UxCRebinShell *UxSaveCtx, *UxContext;
387 swidget UxThisWidget;
388
389 UxThisWidget = UxWidgetToSwidget( UxWidget );
390 UxSaveCtx = UxRebinShellContext;
391 UxRebinShellContext = UxContext =
392 (_UxCRebinShell *) UxGetContext( UxThisWidget );
393 {
394 MidasCommand(UxWidget);
395
396 }
397 UxRebinShellContext = UxSaveCtx;
398 }
399
400 static void activateCB_pb_search_plot17( UxWidget, UxClientData, UxCallbackArg )
401 Widget UxWidget;
402 XtPointer UxClientData, UxCallbackArg;
403 {
404 _UxCRebinShell *UxSaveCtx, *UxContext;
405 swidget UxThisWidget;
406
407 UxThisWidget = UxWidgetToSwidget( UxWidget );
408 UxSaveCtx = UxRebinShellContext;
409 UxRebinShellContext = UxContext =
410 (_UxCRebinShell *) UxGetContext( UxThisWidget );
411 {
412 GetExtendedHelp(UxWidget);
413 }
414 UxRebinShellContext = UxSaveCtx;
415 }
416
417 static void activateCB_pb_main_search21( UxWidget, UxClientData, UxCallbackArg )
418 Widget UxWidget;
419 XtPointer UxClientData, UxCallbackArg;
420 {
421 _UxCRebinShell *UxSaveCtx, *UxContext;
422 swidget UxThisWidget;
423
424 UxThisWidget = UxWidgetToSwidget( UxWidget );
425 UxSaveCtx = UxRebinShellContext;
426 UxRebinShellContext = UxContext =
427 (_UxCRebinShell *) UxGetContext( UxThisWidget );
428 {
429 SelectList(UxWidget);
430
431 }
432 UxRebinShellContext = UxSaveCtx;
433 }
434
435 static void activateCB_pb_main_search22( UxWidget, UxClientData, UxCallbackArg )
436 Widget UxWidget;
437 XtPointer UxClientData, UxCallbackArg;
438 {
439 _UxCRebinShell *UxSaveCtx, *UxContext;
440 swidget UxThisWidget;
441
442 UxThisWidget = UxWidgetToSwidget( UxWidget );
443 UxSaveCtx = UxRebinShellContext;
444 UxRebinShellContext = UxContext =
445 (_UxCRebinShell *) UxGetContext( UxThisWidget );
446 {
447 SelectList(UxWidget);
448
449 }
450 UxRebinShellContext = UxSaveCtx;
451 }
452
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 *******************************************************************************/
460
461 static void _Uxinit_RebinShell()
462 {
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 );
471
472 UxPutBackground( form7, WindowBackground );
473 UxPutHeight( form7, 348 );
474 UxPutWidth( form7, 408 );
475 UxPutY( form7, 0 );
476 UxPutX( form7, 0 );
477 UxPutUnitType( form7, "pixels" );
478 UxPutResizePolicy( form7, "resize_none" );
479
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 );
489
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 );
498
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 );
508
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 );
518
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 );
527
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 );
536
537 UxPutBackground( form8, ButtonBackground );
538 UxPutHeight( form8, 40 );
539 UxPutWidth( form8, 490 );
540 UxPutY( form8, 222 );
541 UxPutX( form8, -2 );
542 UxPutResizePolicy( form8, "resize_none" );
543
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 );
552
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 );
561
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 );
570
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 );
579
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 );
588
589 UxPutBackground( separator6, WindowBackground );
590 UxPutHeight( separator6, 10 );
591 UxPutWidth( separator6, 492 );
592 UxPutY( separator6, 152 );
593 UxPutX( separator6, -2 );
594
595 UxPutBackground( separator7, WindowBackground );
596 UxPutHeight( separator7, 10 );
597 UxPutWidth( separator7, 492 );
598 UxPutY( separator7, 210 );
599 UxPutX( separator7, -4 );
600
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 );
610
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 );
620
621 }
622
623 /*******************************************************************************
624 The 'build_' function creates all the swidgets and X widgets,
625 and sets their properties to the values specified in the
626 Property Editor.
627 *******************************************************************************/
628
629 static swidget _Uxbuild_RebinShell()
630 {
631 /* Create the swidgets */
632
633 RebinShell = UxCreateApplicationShell( "RebinShell", NO_PARENT );
634 UxPutContext( RebinShell, UxRebinShellContext );
635
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 );
653
654 _Uxinit_RebinShell();
655
656 /* Create the X widgets */
657
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 );
676
677 UxAddCallback( tf_rebstrt, XmNlosingFocusCallback,
678 losingFocusCB_tf_rebstrt,
679 (XtPointer) UxRebinShellContext );
680
681 UxAddCallback( tf_rebend, XmNlosingFocusCallback,
682 losingFocusCB_tf_rebend,
683 (XtPointer) UxRebinShellContext );
684
685 UxAddCallback( tf_rebstp, XmNlosingFocusCallback,
686 losingFocusCB_tf_rebstp,
687 (XtPointer) UxRebinShellContext );
688
689 UxAddCallback( pb_rebin_rbr, XmNactivateCallback,
690 activateCB_pb_rebin_rbr,
691 (XtPointer) UxRebinShellContext );
692
693 UxAddCallback( pushButton13, XmNactivateCallback,
694 activateCB_pushButton13,
695 (XtPointer) UxRebinShellContext );
696
697 UxAddCallback( pb_rebin_plot, XmNactivateCallback,
698 activateCB_pb_rebin_plot,
699 (XtPointer) UxRebinShellContext );
700
701 UxAddCallback( pb_search_plot17, XmNactivateCallback,
702 activateCB_pb_search_plot17,
703 (XtPointer) UxRebinShellContext );
704
705 UxAddCallback( pb_main_search21, XmNactivateCallback,
706 activateCB_pb_main_search21,
707 (XtPointer) UxRebinShellContext );
708
709 UxAddCallback( pb_main_search22, XmNactivateCallback,
710 activateCB_pb_main_search22,
711 (XtPointer) UxRebinShellContext );
712
713
714 /* Finally, call UxRealizeInterface to create the X windows
715 for the widgets created above. */
716
717 UxRealizeInterface( RebinShell );
718
719 return ( RebinShell );
720 }
721
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 *******************************************************************************/
728
729 static swidget _Ux_create_RebinShell()
730 {
731 swidget rtrn;
732 _UxCRebinShell *UxContext;
733
734 UxRebinShellContext = UxContext =
735 (_UxCRebinShell *) UxMalloc( sizeof(_UxCRebinShell) );
736
737 rtrn = _Uxbuild_RebinShell();
738
739 return(rtrn);
740 }
741
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
746 a callback function.
747 *******************************************************************************/
748
749 swidget create_RebinShell()
750 {
751 swidget _Uxrtrn;
752 static int _Uxinit = 0;
753
754 if ( ! _Uxinit )
755 {
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 }
763 };
764
765 XtAppAddActions( UxAppContext,
766 _Uxactions,
767 XtNumber(_Uxactions) );
768
769 _Uxinit = 1;
770 }
771
772 _Uxrtrn = _Ux_create_RebinShell();
773
774 return ( _Uxrtrn );
775 }
776
777 /*******************************************************************************
778 END OF FILE
779 *******************************************************************************/
780