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 Massachusetss Ave, Cambridge,
19
Corresponding 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
*******************************************************************************/
53
/*******************************************************************************
54
Includes, Defines, and Global variables from the Declarations Editor:
55
*******************************************************************************/
57
#include <ExternResources.h>
59
/*******************************************************************************
60
The definition of the context structure:
61
If you create multiple instances of your interface, the context
62
structure ensures that your callbacks use the variables for the
65
For each swidget in the interface, each argument to the Interface
66
function, and each variable in the Instance Specific section of the
67
Declarations Editor, there is an entry in the context structure.
68
and a #define. The #define makes the variable name refer to the
69
corresponding entry in the context structure.
70
*******************************************************************************/
74
swidget UxApplicWindow;
78
swidget Uxmenu1_p7_b1;
79
swidget Uxmenu1_p7_b2;
80
swidget Uxmenu1_p7_b3;
81
swidget Uxmenu1_top_b1;
83
swidget Uxmenu1_p4_b1;
84
swidget Uxmenu1_p4_b2;
85
swidget Uxmenu1_p4_b8;
86
swidget Uxmenu1_p4_b10;
87
swidget Uxmenu1_p4_b13;
88
swidget Uxmenu1_p4_b12;
89
swidget Uxmenu1_p4_b3;
90
swidget Uxmenu1_p4_b4;
91
swidget Uxmenu1_p4_b9;
92
swidget Uxmenu1_p4_b5;
93
swidget Uxmenu1_p4_b11;
94
swidget Uxmenu1_p4_b14;
95
swidget Uxmenu1_top_b4;
97
swidget Uxtg_options_exit;
98
swidget Uxmenu1_top_b2;
100
swidget Uxmenu_help_context;
101
swidget Uxmenu_help_help;
102
swidget Uxmenu1_p5_b5;
103
swidget Uxmenu_help_tutorial;
104
swidget Uxmenu_help_version;
105
swidget Uxmenu1_top_b5;
107
swidget Uxmenu1_p6_b1;
108
swidget Uxmenu1_top_b6;
111
swidget Uxpb_main_badpix;
112
swidget Uxpb_main_flat;
113
swidget Uxpb_main_object;
114
swidget Uxpb_main_standard;
115
swidget Uxpb_main_extract;
116
swidget Uxpb_main_merge;
117
swidget Uxpb_main_flux_table;
118
swidget Uxshelp_main;
119
swidget Uxseparator1;
120
swidget Uxtf_main_dark;
123
swidget Uxtf_main_ststar;
126
swidget Uxtf_main_sky;
127
swidget Uxtf_main_object;
130
swidget Uxtf_main_stsky;
132
swidget Uxtf_main_flat;
133
swidget Uxseparator12;
136
#define ApplicWindow UxApplicWindowContext->UxApplicWindow
137
#define MainWindow UxApplicWindowContext->UxMainWindow
138
#define menu1 UxApplicWindowContext->Uxmenu1
139
#define menu1_p7 UxApplicWindowContext->Uxmenu1_p7
140
#define menu1_p7_b1 UxApplicWindowContext->Uxmenu1_p7_b1
141
#define menu1_p7_b2 UxApplicWindowContext->Uxmenu1_p7_b2
142
#define menu1_p7_b3 UxApplicWindowContext->Uxmenu1_p7_b3
143
#define menu1_top_b1 UxApplicWindowContext->Uxmenu1_top_b1
144
#define menu1_p4 UxApplicWindowContext->Uxmenu1_p4
145
#define menu1_p4_b1 UxApplicWindowContext->Uxmenu1_p4_b1
146
#define menu1_p4_b2 UxApplicWindowContext->Uxmenu1_p4_b2
147
#define menu1_p4_b8 UxApplicWindowContext->Uxmenu1_p4_b8
148
#define menu1_p4_b10 UxApplicWindowContext->Uxmenu1_p4_b10
149
#define menu1_p4_b13 UxApplicWindowContext->Uxmenu1_p4_b13
150
#define menu1_p4_b12 UxApplicWindowContext->Uxmenu1_p4_b12
151
#define menu1_p4_b3 UxApplicWindowContext->Uxmenu1_p4_b3
152
#define menu1_p4_b4 UxApplicWindowContext->Uxmenu1_p4_b4
153
#define menu1_p4_b9 UxApplicWindowContext->Uxmenu1_p4_b9
154
#define menu1_p4_b5 UxApplicWindowContext->Uxmenu1_p4_b5
155
#define menu1_p4_b11 UxApplicWindowContext->Uxmenu1_p4_b11
156
#define menu1_p4_b14 UxApplicWindowContext->Uxmenu1_p4_b14
157
#define menu1_top_b4 UxApplicWindowContext->Uxmenu1_top_b4
158
#define menu1_p8 UxApplicWindowContext->Uxmenu1_p8
159
#define tg_options_exit UxApplicWindowContext->Uxtg_options_exit
160
#define menu1_top_b2 UxApplicWindowContext->Uxmenu1_top_b2
161
#define menu1_p5 UxApplicWindowContext->Uxmenu1_p5
162
#define menu_help_context UxApplicWindowContext->Uxmenu_help_context
163
#define menu_help_help UxApplicWindowContext->Uxmenu_help_help
164
#define menu1_p5_b5 UxApplicWindowContext->Uxmenu1_p5_b5
165
#define menu_help_tutorial UxApplicWindowContext->Uxmenu_help_tutorial
166
#define menu_help_version UxApplicWindowContext->Uxmenu_help_version
167
#define menu1_top_b5 UxApplicWindowContext->Uxmenu1_top_b5
168
#define menu1_p6 UxApplicWindowContext->Uxmenu1_p6
169
#define menu1_p6_b1 UxApplicWindowContext->Uxmenu1_p6_b1
170
#define menu1_top_b6 UxApplicWindowContext->Uxmenu1_top_b6
171
#define form1 UxApplicWindowContext->Uxform1
172
#define form5 UxApplicWindowContext->Uxform5
173
#define pb_main_badpix UxApplicWindowContext->Uxpb_main_badpix
174
#define pb_main_flat UxApplicWindowContext->Uxpb_main_flat
175
#define pb_main_object UxApplicWindowContext->Uxpb_main_object
176
#define pb_main_standard UxApplicWindowContext->Uxpb_main_standard
177
#define pb_main_extract UxApplicWindowContext->Uxpb_main_extract
178
#define pb_main_merge UxApplicWindowContext->Uxpb_main_merge
179
#define pb_main_flux_table UxApplicWindowContext->Uxpb_main_flux_table
180
#define shelp_main UxApplicWindowContext->Uxshelp_main
181
#define separator1 UxApplicWindowContext->Uxseparator1
182
#define tf_main_dark UxApplicWindowContext->Uxtf_main_dark
183
#define label4 UxApplicWindowContext->Uxlabel4
184
#define label3 UxApplicWindowContext->Uxlabel3
185
#define tf_main_ststar UxApplicWindowContext->Uxtf_main_ststar
186
#define label8 UxApplicWindowContext->Uxlabel8
187
#define label1 UxApplicWindowContext->Uxlabel1
188
#define tf_main_sky UxApplicWindowContext->Uxtf_main_sky
189
#define tf_main_object UxApplicWindowContext->Uxtf_main_object
190
#define label2 UxApplicWindowContext->Uxlabel2
191
#define label7 UxApplicWindowContext->Uxlabel7
192
#define tf_main_stsky UxApplicWindowContext->Uxtf_main_stsky
193
#define label5 UxApplicWindowContext->Uxlabel5
194
#define tf_main_flat UxApplicWindowContext->Uxtf_main_flat
195
#define separator12 UxApplicWindowContext->Uxseparator12
197
static _UxCApplicWindow *UxApplicWindowContext;
199
extern void DisplayExtendedHelp(), DisplayShortHelp();
200
extern void SetFileList(), FileSaveCallback(), FileSaveAsCallback();
201
extern void QuitCallback(), MainBadpixCallback(), MainFlatCallback();
202
extern void MainObjectCallback(), MainStandardCallback();
203
extern void WriteKeyword(), PopupIrspec();
206
extern int PopupList(), AppendDialogText();
210
/*******************************************************************************
211
The following are translation tables.
212
*******************************************************************************/
214
static char *SelectFileMain = "#override\n\
215
<Btn3Down>:FileSelectACT()\n";
217
/*******************************************************************************
218
Forward declarations of functions that are defined later in this file.
219
*******************************************************************************/
221
swidget create_ApplicWindow();
223
/*******************************************************************************
224
The following are Action functions.
225
*******************************************************************************/
227
static void action_ExtendedHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
231
Cardinal *p_UxNumParams;
233
_UxCApplicWindow *UxSaveCtx, *UxContext;
234
swidget UxThisWidget;
236
UxThisWidget = UxWidgetToSwidget( UxWidget );
237
UxSaveCtx = UxApplicWindowContext;
238
UxApplicWindowContext = UxContext =
239
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
241
DisplayExtendedHelp(UxWidget);
243
UxApplicWindowContext = UxSaveCtx;
246
static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
250
Cardinal *p_UxNumParams;
252
_UxCApplicWindow *UxSaveCtx, *UxContext;
253
swidget UxThisWidget;
255
UxThisWidget = UxWidgetToSwidget( UxWidget );
256
UxSaveCtx = UxApplicWindowContext;
257
UxApplicWindowContext = UxContext =
258
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
260
DisplayShortHelp(UxWidget);
262
UxApplicWindowContext = UxSaveCtx;
265
static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
269
Cardinal *p_UxNumParams;
271
_UxCApplicWindow *UxSaveCtx, *UxContext;
272
swidget UxThisWidget;
274
UxThisWidget = UxWidgetToSwidget( UxWidget );
275
UxSaveCtx = UxApplicWindowContext;
276
UxApplicWindowContext = UxContext =
277
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
279
UxPutText(UxFindSwidget("shelp_main"), "");
280
UxPutText(UxFindSwidget("shelp_badpix"), "");
281
UxPutText(UxFindSwidget("shelp_standard"), "");
282
UxPutText(UxFindSwidget("shelp_flux_table"), "");
283
UxPutText(UxFindSwidget("shelp_extract"), "");
284
UxPutText(UxFindSwidget("shelp_object"), "");
285
UxPutText(UxFindSwidget("shelp_merge"), "");
287
UxApplicWindowContext = UxSaveCtx;
290
static void action_FileSelectACT1( UxWidget, UxEvent, UxParams, p_UxNumParams )
294
Cardinal *p_UxNumParams;
296
_UxCApplicWindow *UxSaveCtx, *UxContext;
297
swidget UxThisWidget;
299
UxThisWidget = UxWidgetToSwidget( UxWidget );
300
UxSaveCtx = UxApplicWindowContext;
301
UxApplicWindowContext = UxContext =
302
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
305
#include <irspec_comm.h>
307
extern swidget FileListInterface, TextFieldSwidget;
308
extern Widget FileListWidget;
309
extern char DirSpecs[];
312
int strip = 1; /* strip off */
314
TextFieldSwidget = UxThisWidget;
315
strcpy(DirSpecs, "*.bdf");
317
if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_object1")) ) {
318
SET_LIST_TITLE("Enter object frame");
319
ListType = LIST_OBJECT;
321
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_sky")) ) {
322
SET_LIST_TITLE("Enter sky frame");
325
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_ststar")) ) {
326
SET_LIST_TITLE("Enter standard star");
327
ListType = LIST_STSTAR;
329
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_stsky")) ) {
330
SET_LIST_TITLE("Enter standard sky");
331
ListType = LIST_STSKY;
333
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_dark")) ) {
334
SET_LIST_TITLE("Enter dark frame");
335
ListType = LIST_DARK;
337
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_flat")) ) {
338
SET_LIST_TITLE("Enter flat-field frame");
339
ListType = LIST_FLAT;
341
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_flux_in")) ) {
342
SET_LIST_TITLE("Enter flux table");
343
ListType = LIST_FLUX;
344
strcpy(DirSpecs, "*.tbl");
346
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_resp")) ) {
347
SET_LIST_TITLE("Enter response frame");
348
ListType = LIST_RESP;
353
FileListWidget = UxGetWidget(UxFindSwidget("sl_file_list"));
354
SetFileList(FileListWidget, strip, DirSpecs);
355
UxPopupInterface(FileListInterface, exclusive_grab);
358
UxApplicWindowContext = UxSaveCtx;
361
static void action_FileSelectACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
365
Cardinal *p_UxNumParams;
367
_UxCApplicWindow *UxSaveCtx, *UxContext;
368
swidget UxThisWidget;
370
UxThisWidget = UxWidgetToSwidget( UxWidget );
371
UxSaveCtx = UxApplicWindowContext;
372
UxApplicWindowContext = UxContext =
373
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
376
#include <irspec_comm.h>
378
extern swidget FileListInterface, TextFieldSwidget;
379
extern Widget FileListWidget;
380
extern char DirSpecs[];
383
int strip = 1; /* strip off */
385
TextFieldSwidget = UxThisWidget;
386
strcpy(DirSpecs, "*.bdf");
388
if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_object")) ) {
389
SET_LIST_TITLE("Enter object frame");
390
ListType = LIST_OBJECT;
392
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_sky")) ) {
393
SET_LIST_TITLE("Enter sky frame");
396
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_ststar")) ) {
397
SET_LIST_TITLE("Enter standard star");
398
ListType = LIST_STSTAR;
400
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_stsky")) ) {
401
SET_LIST_TITLE("Enter standard sky");
402
ListType = LIST_STSKY;
404
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_dark")) ) {
405
SET_LIST_TITLE("Enter dark frame");
406
ListType = LIST_DARK;
408
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_flat")) ) {
409
SET_LIST_TITLE("Enter flat-field frame");
410
ListType = LIST_FLAT;
412
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_std_flux")) ) {
413
SET_LIST_TITLE("Enter flux table");
414
ListType = LIST_FLUX;
415
strcpy(DirSpecs, "*.tbl");
417
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_std_ref")) ) {
418
SET_LIST_TITLE("Enter reference frame");
419
ListType = LIST_STD_REF;
421
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_ref")) ) {
422
SET_LIST_TITLE("Enter reference frame");
423
ListType = LIST_OBJ_REF;
425
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_finput")) ) {
426
SET_LIST_TITLE("Enter flux input frame");
427
ListType = LIST_OBJ_FINPUT;
429
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_resp")) ) {
430
SET_LIST_TITLE("Enter response frame");
431
ListType = LIST_RESP;
434
FileListWidget = UxGetWidget(UxFindSwidget("sl_file_list"));
435
SetFileList(FileListWidget, strip, DirSpecs);
436
UxPopupInterface(FileListInterface, exclusive_grab);
439
UxApplicWindowContext = UxSaveCtx;
442
/*******************************************************************************
443
The following are callback functions.
444
*******************************************************************************/
446
static void activateCB_menu1_p7_b1( UxWidget, UxClientData, UxCallbackArg )
448
XtPointer UxClientData, UxCallbackArg;
450
_UxCApplicWindow *UxSaveCtx, *UxContext;
451
swidget UxThisWidget;
453
UxThisWidget = UxWidgetToSwidget( UxWidget );
454
UxSaveCtx = UxApplicWindowContext;
455
UxApplicWindowContext = UxContext =
456
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
458
#include <irspec_comm.h>
460
PopupList(LIST_OPEN);
462
UxApplicWindowContext = UxSaveCtx;
465
static void activateCB_menu1_p7_b2( UxWidget, UxClientData, UxCallbackArg )
467
XtPointer UxClientData, UxCallbackArg;
469
_UxCApplicWindow *UxSaveCtx, *UxContext;
470
swidget UxThisWidget;
472
UxThisWidget = UxWidgetToSwidget( UxWidget );
473
UxSaveCtx = UxApplicWindowContext;
474
UxApplicWindowContext = UxContext =
475
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
479
UxApplicWindowContext = UxSaveCtx;
482
static void activateCB_menu1_p7_b3( UxWidget, UxClientData, UxCallbackArg )
484
XtPointer UxClientData, UxCallbackArg;
486
_UxCApplicWindow *UxSaveCtx, *UxContext;
487
swidget UxThisWidget;
489
UxThisWidget = UxWidgetToSwidget( UxWidget );
490
UxSaveCtx = UxApplicWindowContext;
491
UxApplicWindowContext = UxContext =
492
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
494
FileSaveAsCallback();
496
UxApplicWindowContext = UxSaveCtx;
499
static void activateCB_menu1_p4_b1( UxWidget, UxClientData, UxCallbackArg )
501
XtPointer UxClientData, UxCallbackArg;
503
_UxCApplicWindow *UxSaveCtx, *UxContext;
504
swidget UxThisWidget;
506
UxThisWidget = UxWidgetToSwidget( UxWidget );
507
UxSaveCtx = UxApplicWindowContext;
508
UxApplicWindowContext = UxContext =
509
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
510
AppendDialogText("crea/display");
511
UxApplicWindowContext = UxSaveCtx;
514
static void activateCB_menu1_p4_b2( UxWidget, UxClientData, UxCallbackArg )
516
XtPointer UxClientData, UxCallbackArg;
518
_UxCApplicWindow *UxSaveCtx, *UxContext;
519
swidget UxThisWidget;
521
UxThisWidget = UxWidgetToSwidget( UxWidget );
522
UxSaveCtx = UxApplicWindowContext;
523
UxApplicWindowContext = UxContext =
524
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
525
AppendDialogText("crea/graph");
526
UxApplicWindowContext = UxSaveCtx;
529
static void activateCB_menu1_p4_b10( UxWidget, UxClientData, UxCallbackArg )
531
XtPointer UxClientData, UxCallbackArg;
533
_UxCApplicWindow *UxSaveCtx, *UxContext;
534
swidget UxThisWidget;
536
UxThisWidget = UxWidgetToSwidget( UxWidget );
537
UxSaveCtx = UxApplicWindowContext;
538
UxApplicWindowContext = UxContext =
539
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
541
#include <irspec_comm.h>
543
PopupList(LIST_LOAD_IMA);
545
UxApplicWindowContext = UxSaveCtx;
548
static void activateCB_menu1_p4_b13( UxWidget, UxClientData, UxCallbackArg )
550
XtPointer UxClientData, UxCallbackArg;
552
_UxCApplicWindow *UxSaveCtx, *UxContext;
553
swidget UxThisWidget;
555
UxThisWidget = UxWidgetToSwidget( UxWidget );
556
UxSaveCtx = UxApplicWindowContext;
557
UxApplicWindowContext = UxContext =
558
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
559
AppendDialogText("clear/channel over");
560
UxApplicWindowContext = UxSaveCtx;
563
static void activateCB_menu1_p4_b3( UxWidget, UxClientData, UxCallbackArg )
565
XtPointer UxClientData, UxCallbackArg;
567
_UxCApplicWindow *UxSaveCtx, *UxContext;
568
swidget UxThisWidget;
570
UxThisWidget = UxWidgetToSwidget( UxWidget );
571
UxSaveCtx = UxApplicWindowContext;
572
UxApplicWindowContext = UxContext =
573
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
574
AppendDialogText("copy/display laser");
575
UxApplicWindowContext = UxSaveCtx;
578
static void activateCB_menu1_p4_b4( UxWidget, UxClientData, UxCallbackArg )
580
XtPointer UxClientData, UxCallbackArg;
582
_UxCApplicWindow *UxSaveCtx, *UxContext;
583
swidget UxThisWidget;
585
UxThisWidget = UxWidgetToSwidget( UxWidget );
586
UxSaveCtx = UxApplicWindowContext;
587
UxApplicWindowContext = UxContext =
588
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
589
AppendDialogText("copy/graph laser");
590
UxApplicWindowContext = UxSaveCtx;
593
static void activateCB_menu1_p4_b5( UxWidget, UxClientData, UxCallbackArg )
595
XtPointer UxClientData, UxCallbackArg;
597
_UxCApplicWindow *UxSaveCtx, *UxContext;
598
swidget UxThisWidget;
600
UxThisWidget = UxWidgetToSwidget( UxWidget );
601
UxSaveCtx = UxApplicWindowContext;
602
UxApplicWindowContext = UxContext =
603
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
604
AppendDialogText("get/gcursor");
605
UxApplicWindowContext = UxSaveCtx;
608
static void activateCB_menu1_p4_b11( UxWidget, UxClientData, UxCallbackArg )
610
XtPointer UxClientData, UxCallbackArg;
612
_UxCApplicWindow *UxSaveCtx, *UxContext;
613
swidget UxThisWidget;
615
UxThisWidget = UxWidgetToSwidget( UxWidget );
616
UxSaveCtx = UxApplicWindowContext;
617
UxApplicWindowContext = UxContext =
618
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
619
AppendDialogText("get/cursor");
620
UxApplicWindowContext = UxSaveCtx;
623
static void valueChangedCB_tg_options_exit( UxWidget, UxClientData, UxCallbackArg )
625
XtPointer UxClientData, UxCallbackArg;
627
_UxCApplicWindow *UxSaveCtx, *UxContext;
628
swidget UxThisWidget;
630
UxThisWidget = UxWidgetToSwidget( UxWidget );
631
UxSaveCtx = UxApplicWindowContext;
632
UxApplicWindowContext = UxContext =
633
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
636
UxApplicWindowContext = UxSaveCtx;
639
static void activateCB_menu_help_context( UxWidget, UxClientData, UxCallbackArg )
641
XtPointer UxClientData, UxCallbackArg;
643
_UxCApplicWindow *UxSaveCtx, *UxContext;
644
swidget UxThisWidget;
646
UxThisWidget = UxWidgetToSwidget( UxWidget );
647
UxSaveCtx = UxApplicWindowContext;
648
UxApplicWindowContext = UxContext =
649
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
650
DisplayExtendedHelp(UxWidget);
651
UxApplicWindowContext = UxSaveCtx;
654
static void activateCB_menu_help_help( UxWidget, UxClientData, UxCallbackArg )
656
XtPointer UxClientData, UxCallbackArg;
658
_UxCApplicWindow *UxSaveCtx, *UxContext;
659
swidget UxThisWidget;
661
UxThisWidget = UxWidgetToSwidget( UxWidget );
662
UxSaveCtx = UxApplicWindowContext;
663
UxApplicWindowContext = UxContext =
664
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
665
DisplayExtendedHelp(UxWidget);
666
UxApplicWindowContext = UxSaveCtx;
669
static void activateCB_menu_help_tutorial( UxWidget, UxClientData, UxCallbackArg )
671
XtPointer UxClientData, UxCallbackArg;
673
_UxCApplicWindow *UxSaveCtx, *UxContext;
674
swidget UxThisWidget;
676
UxThisWidget = UxWidgetToSwidget( UxWidget );
677
UxSaveCtx = UxApplicWindowContext;
678
UxApplicWindowContext = UxContext =
679
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
680
DisplayExtendedHelp(UxWidget);
681
UxApplicWindowContext = UxSaveCtx;
684
static void activateCB_menu_help_version( UxWidget, UxClientData, UxCallbackArg )
686
XtPointer UxClientData, UxCallbackArg;
688
_UxCApplicWindow *UxSaveCtx, *UxContext;
689
swidget UxThisWidget;
691
UxThisWidget = UxWidgetToSwidget( UxWidget );
692
UxSaveCtx = UxApplicWindowContext;
693
UxApplicWindowContext = UxContext =
694
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
695
DisplayExtendedHelp(UxWidget);
696
UxApplicWindowContext = UxSaveCtx;
699
static void activateCB_menu1_p6_b1( UxWidget, UxClientData, UxCallbackArg )
701
XtPointer UxClientData, UxCallbackArg;
703
_UxCApplicWindow *UxSaveCtx, *UxContext;
704
swidget UxThisWidget;
706
UxThisWidget = UxWidgetToSwidget( UxWidget );
707
UxSaveCtx = UxApplicWindowContext;
708
UxApplicWindowContext = UxContext =
709
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
713
UxApplicWindowContext = UxSaveCtx;
716
static void activateCB_pb_main_badpix( UxWidget, UxClientData, UxCallbackArg )
718
XtPointer UxClientData, UxCallbackArg;
720
_UxCApplicWindow *UxSaveCtx, *UxContext;
721
swidget UxThisWidget;
723
UxThisWidget = UxWidgetToSwidget( UxWidget );
724
UxSaveCtx = UxApplicWindowContext;
725
UxApplicWindowContext = UxContext =
726
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
728
PopupIrspec("BadpixShell");
729
MainBadpixCallback();
731
UxApplicWindowContext = UxSaveCtx;
734
static void activateCB_pb_main_flat( UxWidget, UxClientData, UxCallbackArg )
736
XtPointer UxClientData, UxCallbackArg;
738
_UxCApplicWindow *UxSaveCtx, *UxContext;
739
swidget UxThisWidget;
741
UxThisWidget = UxWidgetToSwidget( UxWidget );
742
UxSaveCtx = UxApplicWindowContext;
743
UxApplicWindowContext = UxContext =
744
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
750
UxApplicWindowContext = UxSaveCtx;
753
static void activateCB_pb_main_object( UxWidget, UxClientData, UxCallbackArg )
755
XtPointer UxClientData, UxCallbackArg;
757
_UxCApplicWindow *UxSaveCtx, *UxContext;
758
swidget UxThisWidget;
760
UxThisWidget = UxWidgetToSwidget( UxWidget );
761
UxSaveCtx = UxApplicWindowContext;
762
UxApplicWindowContext = UxContext =
763
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
766
MainObjectCallback();
770
UxApplicWindowContext = UxSaveCtx;
773
static void activateCB_pb_main_standard( UxWidget, UxClientData, UxCallbackArg )
775
XtPointer UxClientData, UxCallbackArg;
777
_UxCApplicWindow *UxSaveCtx, *UxContext;
778
swidget UxThisWidget;
780
UxThisWidget = UxWidgetToSwidget( UxWidget );
781
UxSaveCtx = UxApplicWindowContext;
782
UxApplicWindowContext = UxContext =
783
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
785
MainStandardCallback();
788
UxApplicWindowContext = UxSaveCtx;
791
static void activateCB_pb_main_extract( UxWidget, UxClientData, UxCallbackArg )
793
XtPointer UxClientData, UxCallbackArg;
795
_UxCApplicWindow *UxSaveCtx, *UxContext;
796
swidget UxThisWidget;
798
UxThisWidget = UxWidgetToSwidget( UxWidget );
799
UxSaveCtx = UxApplicWindowContext;
800
UxApplicWindowContext = UxContext =
801
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
803
PopupIrspec("ExtractShell");
805
UxApplicWindowContext = UxSaveCtx;
808
static void activateCB_pb_main_merge( UxWidget, UxClientData, UxCallbackArg )
810
XtPointer UxClientData, UxCallbackArg;
812
_UxCApplicWindow *UxSaveCtx, *UxContext;
813
swidget UxThisWidget;
815
UxThisWidget = UxWidgetToSwidget( UxWidget );
816
UxSaveCtx = UxApplicWindowContext;
817
UxApplicWindowContext = UxContext =
818
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
821
PopupIrspec("MergeShell");
824
UxApplicWindowContext = UxSaveCtx;
827
static void activateCB_pb_main_flux_table( UxWidget, UxClientData, UxCallbackArg )
829
XtPointer UxClientData, UxCallbackArg;
831
_UxCApplicWindow *UxSaveCtx, *UxContext;
832
swidget UxThisWidget;
834
UxThisWidget = UxWidgetToSwidget( UxWidget );
835
UxSaveCtx = UxApplicWindowContext;
836
UxApplicWindowContext = UxContext =
837
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
839
PopupIrspec("FluxTableShell");
841
UxApplicWindowContext = UxSaveCtx;
844
static void losingFocusCB_tf_main_dark( UxWidget, UxClientData, UxCallbackArg )
846
XtPointer UxClientData, UxCallbackArg;
848
_UxCApplicWindow *UxSaveCtx, *UxContext;
849
swidget UxThisWidget;
851
UxThisWidget = UxWidgetToSwidget( UxWidget );
852
UxSaveCtx = UxApplicWindowContext;
853
UxApplicWindowContext = UxContext =
854
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
856
#include <irspec_comm.h>
861
text = XmTextGetString(UxWidget);
863
if ( strcmp(text, Dark) ) {
865
WriteKeyword(Dark, K_DARK);
869
UxApplicWindowContext = UxSaveCtx;
872
static void losingFocusCB_tf_main_ststar( UxWidget, UxClientData, UxCallbackArg )
874
XtPointer UxClientData, UxCallbackArg;
876
_UxCApplicWindow *UxSaveCtx, *UxContext;
877
swidget UxThisWidget;
879
UxThisWidget = UxWidgetToSwidget( UxWidget );
880
UxSaveCtx = UxApplicWindowContext;
881
UxApplicWindowContext = UxContext =
882
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
885
extern char InStstar[];
887
text = XmTextGetString(UxWidget);
888
strcpy(InStstar, text);
892
UxApplicWindowContext = UxSaveCtx;
895
static void losingFocusCB_tf_main_sky( UxWidget, UxClientData, UxCallbackArg )
897
XtPointer UxClientData, UxCallbackArg;
899
_UxCApplicWindow *UxSaveCtx, *UxContext;
900
swidget UxThisWidget;
902
UxThisWidget = UxWidgetToSwidget( UxWidget );
903
UxSaveCtx = UxApplicWindowContext;
904
UxApplicWindowContext = UxContext =
905
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
910
text = XmTextGetString(UxWidget);
915
UxApplicWindowContext = UxSaveCtx;
918
static void losingFocusCB_tf_main_object( UxWidget, UxClientData, UxCallbackArg )
920
XtPointer UxClientData, UxCallbackArg;
922
_UxCApplicWindow *UxSaveCtx, *UxContext;
923
swidget UxThisWidget;
925
UxThisWidget = UxWidgetToSwidget( UxWidget );
926
UxSaveCtx = UxApplicWindowContext;
927
UxApplicWindowContext = UxContext =
928
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
933
text = XmTextGetString(UxWidget);
938
UxApplicWindowContext = UxSaveCtx;
941
static void losingFocusCB_tf_main_stsky( UxWidget, UxClientData, UxCallbackArg )
943
XtPointer UxClientData, UxCallbackArg;
945
_UxCApplicWindow *UxSaveCtx, *UxContext;
946
swidget UxThisWidget;
948
UxThisWidget = UxWidgetToSwidget( UxWidget );
949
UxSaveCtx = UxApplicWindowContext;
950
UxApplicWindowContext = UxContext =
951
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
954
extern char InStsky[];
956
text = XmTextGetString(UxWidget);
957
strcpy(InStsky, text);
961
UxApplicWindowContext = UxSaveCtx;
964
static void losingFocusCB_tf_main_flat( UxWidget, UxClientData, UxCallbackArg )
966
XtPointer UxClientData, UxCallbackArg;
968
_UxCApplicWindow *UxSaveCtx, *UxContext;
969
swidget UxThisWidget;
971
UxThisWidget = UxWidgetToSwidget( UxWidget );
972
UxSaveCtx = UxApplicWindowContext;
973
UxApplicWindowContext = UxContext =
974
(_UxCApplicWindow *) UxGetContext( UxThisWidget );
976
#include <irspec_comm.h>
981
text = XmTextGetString(UxWidget);
983
if ( strcmp(text, Flat) ) {
985
WriteKeyword(text, K_FLAT);
989
UxApplicWindowContext = UxSaveCtx;
992
/*******************************************************************************
993
The 'init_' function sets the private properties for all the
994
swidgets to the values specified in the Property Table.
995
Some properties need to be set after the X widgets have been
996
created and the setting of these properties is done in the
997
'build_' function after the UxCreateWidget call.
998
*******************************************************************************/
1000
static void _Uxinit_ApplicWindow()
1002
UxPutGeometry( ApplicWindow, "+0+0" );
1003
UxPutTitle( ApplicWindow, "Irspec reduction" );
1004
UxPutKeyboardFocusPolicy( ApplicWindow, "pointer" );
1005
UxPutIconName( ApplicWindow, "Irspec" );
1006
UxPutHeight( ApplicWindow, 449 );
1007
UxPutWidth( ApplicWindow, 447 );
1008
UxPutY( ApplicWindow, 21 );
1009
UxPutX( ApplicWindow, 2 );
1011
UxPutBackground( MainWindow, WindowBackground );
1012
UxPutHeight( MainWindow, 460 );
1013
UxPutWidth( MainWindow, 440 );
1014
UxPutY( MainWindow, 0 );
1015
UxPutX( MainWindow, 10 );
1016
UxPutUnitType( MainWindow, "pixels" );
1018
UxPutBackground( menu1, MenuBackground );
1019
UxPutMenuAccelerator( menu1, "<KeyUp>F10" );
1020
UxPutRowColumnType( menu1, "menu_bar" );
1022
UxPutForeground( menu1_p7, MenuForeground );
1023
UxPutBackground( menu1_p7, MenuBackground );
1024
UxPutRowColumnType( menu1_p7, "menu_pulldown" );
1026
UxPutFontList( menu1_p7_b1, BoldTextFont );
1027
UxPutMnemonic( menu1_p7_b1, "O" );
1028
UxPutLabelString( menu1_p7_b1, "Open" );
1030
UxPutFontList( menu1_p7_b2, BoldTextFont );
1031
UxPutMnemonic( menu1_p7_b2, "S" );
1032
UxPutLabelString( menu1_p7_b2, "Save" );
1034
UxPutFontList( menu1_p7_b3, BoldTextFont );
1035
UxPutMnemonic( menu1_p7_b3, "A" );
1036
UxPutLabelString( menu1_p7_b3, "Save As ..." );
1038
UxPutMnemonic( menu1_top_b1, "F" );
1039
UxPutForeground( menu1_top_b1, MenuForeground );
1040
UxPutFontList( menu1_top_b1, BoldTextFont );
1041
UxPutBackground( menu1_top_b1, MenuBackground );
1042
UxPutLabelString( menu1_top_b1, "File" );
1044
UxPutForeground( menu1_p4, MenuForeground );
1045
UxPutBackground( menu1_p4, MenuBackground );
1046
UxPutRowColumnType( menu1_p4, "menu_pulldown" );
1048
UxPutFontList( menu1_p4_b1, BoldTextFont );
1049
UxPutMnemonic( menu1_p4_b1, "D" );
1050
UxPutLabelString( menu1_p4_b1, "Create Display" );
1052
UxPutFontList( menu1_p4_b2, BoldTextFont );
1053
UxPutMnemonic( menu1_p4_b2, "G" );
1054
UxPutLabelString( menu1_p4_b2, "Create Graphics" );
1056
UxPutMnemonic( menu1_p4_b10, "L" );
1057
UxPutFontList( menu1_p4_b10, BoldTextFont );
1058
UxPutLabelString( menu1_p4_b10, "Load image" );
1060
UxPutMnemonic( menu1_p4_b13, "o" );
1061
UxPutFontList( menu1_p4_b13, BoldTextFont );
1062
UxPutLabelString( menu1_p4_b13, "Clear overlay" );
1064
UxPutFontList( menu1_p4_b3, BoldTextFont );
1065
UxPutMnemonic( menu1_p4_b3, "P" );
1066
UxPutLabelString( menu1_p4_b3, "Print Display" );
1068
UxPutFontList( menu1_p4_b4, BoldTextFont );
1069
UxPutMnemonic( menu1_p4_b4, "r" );
1070
UxPutLabelString( menu1_p4_b4, "Print Graphics" );
1072
UxPutFontList( menu1_p4_b5, BoldTextFont );
1073
UxPutMnemonic( menu1_p4_b5, "C" );
1074
UxPutLabelString( menu1_p4_b5, "Graphics Cursor" );
1076
UxPutFontList( menu1_p4_b11, BoldTextFont );
1077
UxPutMnemonic( menu1_p4_b11, "u" );
1078
UxPutLabelString( menu1_p4_b11, "Display Cursor" );
1080
UxPutForeground( menu1_top_b4, MenuForeground );
1081
UxPutFontList( menu1_top_b4, BoldTextFont );
1082
UxPutBackground( menu1_top_b4, MenuBackground );
1083
UxPutMnemonic( menu1_top_b4, "U" );
1084
UxPutLabelString( menu1_top_b4, "Utils" );
1086
UxPutForeground( menu1_p8, MenuForeground );
1087
UxPutBackground( menu1_p8, MenuBackground );
1088
UxPutRowColumnType( menu1_p8, "menu_pulldown" );
1090
UxPutSet( tg_options_exit, "true" );
1091
UxPutSelectColor( tg_options_exit, SelectColor );
1092
UxPutFontList( tg_options_exit, BoldTextFont );
1093
UxPutLabelString( tg_options_exit, "Remove intermediate files on exit" );
1095
UxPutMnemonic( menu1_top_b2, "O" );
1096
UxPutForeground( menu1_top_b2, MenuForeground );
1097
UxPutFontList( menu1_top_b2, BoldTextFont );
1098
UxPutBackground( menu1_top_b2, MenuBackground );
1099
UxPutLabelString( menu1_top_b2, "Options" );
1101
UxPutForeground( menu1_p5, MenuForeground );
1102
UxPutBackground( menu1_p5, MenuBackground );
1103
UxPutRowColumnType( menu1_p5, "menu_pulldown" );
1105
UxPutFontList( menu_help_context, BoldTextFont );
1106
UxPutMnemonic( menu_help_context, "C" );
1107
UxPutLabelString( menu_help_context, "On Context ..." );
1109
UxPutFontList( menu_help_help, BoldTextFont );
1110
UxPutMnemonic( menu_help_help, "H" );
1111
UxPutLabelString( menu_help_help, "On Help ..." );
1113
UxPutFontList( menu_help_tutorial, BoldTextFont );
1114
UxPutMnemonic( menu_help_tutorial, "T" );
1115
UxPutLabelString( menu_help_tutorial, "Tutorial" );
1117
UxPutFontList( menu_help_version, BoldTextFont );
1118
UxPutMnemonic( menu_help_version, "V" );
1119
UxPutLabelString( menu_help_version, "On Version..." );
1121
UxPutForeground( menu1_top_b5, MenuForeground );
1122
UxPutFontList( menu1_top_b5, BoldTextFont );
1123
UxPutBackground( menu1_top_b5, MenuBackground );
1124
UxPutMnemonic( menu1_top_b5, "H" );
1125
UxPutLabelString( menu1_top_b5, "Help" );
1127
UxPutForeground( menu1_p6, MenuForeground );
1128
UxPutBackground( menu1_p6, MenuBackground );
1129
UxPutRowColumnType( menu1_p6, "menu_pulldown" );
1131
UxPutFontList( menu1_p6_b1, BoldTextFont );
1132
UxPutMnemonic( menu1_p6_b1, "B" );
1133
UxPutLabelString( menu1_p6_b1, "Bye" );
1135
UxPutForeground( menu1_top_b6, MenuForeground );
1136
UxPutFontList( menu1_top_b6, BoldTextFont );
1137
UxPutBackground( menu1_top_b6, MenuBackground );
1138
UxPutMnemonic( menu1_top_b6, "Q" );
1139
UxPutLabelString( menu1_top_b6, "Quit" );
1141
UxPutBackground( form1, WindowBackground );
1143
UxPutBackground( form5, ButtonBackground );
1144
UxPutHeight( form5, 72 );
1145
UxPutWidth( form5, 447 );
1146
UxPutY( form5, 343 );
1147
UxPutX( form5, -1 );
1148
UxPutResizePolicy( form5, "resize_none" );
1150
UxPutLabelString( pb_main_badpix, "Badpix ..." );
1151
UxPutForeground( pb_main_badpix, ButtonForeground );
1152
UxPutFontList( pb_main_badpix, BoldTextFont );
1153
UxPutBackground( pb_main_badpix, ButtonBackground );
1154
UxPutHeight( pb_main_badpix, 30 );
1155
UxPutWidth( pb_main_badpix, 86 );
1156
UxPutY( pb_main_badpix, 6 );
1157
UxPutX( pb_main_badpix, 4 );
1159
UxPutLabelString( pb_main_flat, "Flat ..." );
1160
UxPutForeground( pb_main_flat, ButtonForeground );
1161
UxPutFontList( pb_main_flat, BoldTextFont );
1162
UxPutBackground( pb_main_flat, ButtonBackground );
1163
UxPutHeight( pb_main_flat, 30 );
1164
UxPutWidth( pb_main_flat, 86 );
1165
UxPutY( pb_main_flat, 6 );
1166
UxPutX( pb_main_flat, 92 );
1168
UxPutLabelString( pb_main_object, "Object ..." );
1169
UxPutForeground( pb_main_object, ButtonForeground );
1170
UxPutFontList( pb_main_object, BoldTextFont );
1171
UxPutBackground( pb_main_object, ButtonBackground );
1172
UxPutHeight( pb_main_object, 30 );
1173
UxPutWidth( pb_main_object, 86 );
1174
UxPutY( pb_main_object, 6 );
1175
UxPutX( pb_main_object, 356 );
1177
UxPutLabelString( pb_main_standard, "Std star ..." );
1178
UxPutForeground( pb_main_standard, ButtonForeground );
1179
UxPutFontList( pb_main_standard, BoldTextFont );
1180
UxPutBackground( pb_main_standard, ButtonBackground );
1181
UxPutHeight( pb_main_standard, 30 );
1182
UxPutWidth( pb_main_standard, 86 );
1183
UxPutY( pb_main_standard, 6 );
1184
UxPutX( pb_main_standard, 268 );
1186
UxPutLabelString( pb_main_extract, "Extract ..." );
1187
UxPutForeground( pb_main_extract, ButtonForeground );
1188
UxPutFontList( pb_main_extract, BoldTextFont );
1189
UxPutBackground( pb_main_extract, ButtonBackground );
1190
UxPutHeight( pb_main_extract, 30 );
1191
UxPutWidth( pb_main_extract, 86 );
1192
UxPutY( pb_main_extract, 40 );
1193
UxPutX( pb_main_extract, 4 );
1195
UxPutLabelString( pb_main_merge, "Merge ..." );
1196
UxPutForeground( pb_main_merge, ButtonForeground );
1197
UxPutFontList( pb_main_merge, BoldTextFont );
1198
UxPutBackground( pb_main_merge, ButtonBackground );
1199
UxPutHeight( pb_main_merge, 30 );
1200
UxPutWidth( pb_main_merge, 86 );
1201
UxPutY( pb_main_merge, 40 );
1202
UxPutX( pb_main_merge, 92 );
1204
UxPutLabelString( pb_main_flux_table, "Flux tbl ..." );
1205
UxPutForeground( pb_main_flux_table, ButtonForeground );
1206
UxPutFontList( pb_main_flux_table, BoldTextFont );
1207
UxPutBackground( pb_main_flux_table, ButtonBackground );
1208
UxPutHeight( pb_main_flux_table, 30 );
1209
UxPutWidth( pb_main_flux_table, 86 );
1210
UxPutY( pb_main_flux_table, 6 );
1211
UxPutX( pb_main_flux_table, 180 );
1213
UxPutWordWrap( shelp_main, "false" );
1214
UxPutHighlightOnEnter( shelp_main, "false" );
1215
UxPutEditMode( shelp_main, "single_line_edit" );
1216
UxPutFontList( shelp_main, TextFont );
1217
UxPutEditable( shelp_main, "false" );
1218
UxPutCursorPositionVisible( shelp_main, "false" );
1219
UxPutBackground( shelp_main, SHelpBackground );
1220
UxPutHeight( shelp_main, 50 );
1221
UxPutWidth( shelp_main, 448 );
1222
UxPutY( shelp_main, 290 );
1223
UxPutX( shelp_main, 0 );
1225
UxPutBackground( separator1, LabelBackground );
1226
UxPutHeight( separator1, 6 );
1227
UxPutWidth( separator1, 450 );
1228
UxPutY( separator1, 284 );
1229
UxPutX( separator1, -2 );
1231
UxPutTranslations( tf_main_dark, SelectFileMain );
1232
UxPutForeground( tf_main_dark, TextForeground );
1233
UxPutHighlightOnEnter( tf_main_dark, "true" );
1234
UxPutFontList( tf_main_dark, TextFont );
1235
UxPutBackground( tf_main_dark, TextBackground );
1236
UxPutHeight( tf_main_dark, 34 );
1237
UxPutWidth( tf_main_dark, 236 );
1238
UxPutY( tf_main_dark, 194 );
1239
UxPutX( tf_main_dark, 172 );
1241
UxPutForeground( label4, TextForeground );
1242
UxPutAlignment( label4, "alignment_beginning" );
1243
UxPutLabelString( label4, "Dark frame :" );
1244
UxPutFontList( label4, TextFont );
1245
UxPutBackground( label4, LabelBackground );
1246
UxPutHeight( label4, 30 );
1247
UxPutWidth( label4, 128 );
1248
UxPutY( label4, 196 );
1249
UxPutX( label4, 30 );
1251
UxPutForeground( label3, TextForeground );
1252
UxPutAlignment( label3, "alignment_beginning" );
1253
UxPutLabelString( label3, "Standard sky :" );
1254
UxPutFontList( label3, TextFont );
1255
UxPutBackground( label3, LabelBackground );
1256
UxPutHeight( label3, 30 );
1257
UxPutWidth( label3, 128 );
1258
UxPutY( label3, 158 );
1259
UxPutX( label3, 30 );
1261
UxPutTranslations( tf_main_ststar, SelectFileMain );
1262
UxPutBorderWidth( tf_main_ststar, 0 );
1263
UxPutForeground( tf_main_ststar, TextForeground );
1264
UxPutHighlightOnEnter( tf_main_ststar, "true" );
1265
UxPutFontList( tf_main_ststar, TextFont );
1266
UxPutBackground( tf_main_ststar, TextBackground );
1267
UxPutHeight( tf_main_ststar, 34 );
1268
UxPutWidth( tf_main_ststar, 236 );
1269
UxPutY( tf_main_ststar, 120 );
1270
UxPutX( tf_main_ststar, 172 );
1272
UxPutForeground( label8, TextForeground );
1273
UxPutAlignment( label8, "alignment_beginning" );
1274
UxPutLabelString( label8, "Standard star :" );
1275
UxPutFontList( label8, TextFont );
1276
UxPutBackground( label8, LabelBackground );
1277
UxPutHeight( label8, 30 );
1278
UxPutWidth( label8, 128 );
1279
UxPutY( label8, 122 );
1280
UxPutX( label8, 30 );
1282
UxPutForeground( label1, TextForeground );
1283
UxPutAlignment( label1, "alignment_beginning" );
1284
UxPutLabelString( label1, "Sky :" );
1285
UxPutFontList( label1, TextFont );
1286
UxPutBackground( label1, LabelBackground );
1287
UxPutHeight( label1, 30 );
1288
UxPutWidth( label1, 128 );
1289
UxPutY( label1, 84 );
1290
UxPutX( label1, 30 );
1292
UxPutTranslations( tf_main_sky, SelectFileMain );
1293
UxPutForeground( tf_main_sky, TextForeground );
1294
UxPutFontList( tf_main_sky, TextFont );
1295
UxPutBackground( tf_main_sky, TextBackground );
1296
UxPutHeight( tf_main_sky, 34 );
1297
UxPutWidth( tf_main_sky, 235 );
1298
UxPutY( tf_main_sky, 82 );
1299
UxPutX( tf_main_sky, 172 );
1301
UxPutTranslations( tf_main_object, SelectFileMain );
1302
UxPutForeground( tf_main_object, TextForeground );
1303
UxPutFontList( tf_main_object, TextFont );
1304
UxPutBackground( tf_main_object, TextBackground );
1305
UxPutHeight( tf_main_object, 34 );
1306
UxPutWidth( tf_main_object, 235 );
1307
UxPutY( tf_main_object, 44 );
1308
UxPutX( tf_main_object, 172 );
1310
UxPutForeground( label2, TextForeground );
1311
UxPutAlignment( label2, "alignment_beginning" );
1312
UxPutLabelString( label2, "Object :" );
1313
UxPutFontList( label2, TextFont );
1314
UxPutBackground( label2, LabelBackground );
1315
UxPutHeight( label2, 30 );
1316
UxPutWidth( label2, 128 );
1317
UxPutY( label2, 44 );
1318
UxPutX( label2, 30 );
1320
UxPutForeground( label7, TextForeground );
1321
UxPutAlignment( label7, "alignment_beginning" );
1322
UxPutLabelString( label7, "GENERAL PARAMETERS" );
1323
UxPutFontList( label7, TextFont );
1324
UxPutBackground( label7, LabelBackground );
1325
UxPutHeight( label7, 30 );
1326
UxPutWidth( label7, 180 );
1327
UxPutY( label7, 8 );
1328
UxPutX( label7, 2 );
1330
UxPutTranslations( tf_main_stsky, SelectFileMain );
1331
UxPutBorderWidth( tf_main_stsky, 0 );
1332
UxPutForeground( tf_main_stsky, TextForeground );
1333
UxPutHighlightOnEnter( tf_main_stsky, "true" );
1334
UxPutFontList( tf_main_stsky, TextFont );
1335
UxPutBackground( tf_main_stsky, TextBackground );
1336
UxPutHeight( tf_main_stsky, 34 );
1337
UxPutWidth( tf_main_stsky, 236 );
1338
UxPutY( tf_main_stsky, 156 );
1339
UxPutX( tf_main_stsky, 172 );
1341
UxPutForeground( label5, TextForeground );
1342
UxPutAlignment( label5, "alignment_beginning" );
1343
UxPutLabelString( label5, "Flat frame :" );
1344
UxPutFontList( label5, TextFont );
1345
UxPutBackground( label5, LabelBackground );
1346
UxPutHeight( label5, 30 );
1347
UxPutWidth( label5, 128 );
1348
UxPutY( label5, 234 );
1349
UxPutX( label5, 30 );
1351
UxPutTranslations( tf_main_flat, SelectFileMain );
1352
UxPutForeground( tf_main_flat, TextForeground );
1353
UxPutHighlightOnEnter( tf_main_flat, "true" );
1354
UxPutFontList( tf_main_flat, TextFont );
1355
UxPutBackground( tf_main_flat, TextBackground );
1356
UxPutHeight( tf_main_flat, 34 );
1357
UxPutWidth( tf_main_flat, 236 );
1358
UxPutY( tf_main_flat, 232 );
1359
UxPutX( tf_main_flat, 172 );
1361
UxPutBackground( separator12, LabelBackground );
1362
UxPutHeight( separator12, 6 );
1363
UxPutWidth( separator12, 450 );
1364
UxPutY( separator12, 338 );
1365
UxPutX( separator12, -2 );
1369
/*******************************************************************************
1370
The 'build_' function creates all the swidgets and X widgets,
1371
and sets their properties to the values specified in the
1373
*******************************************************************************/
1375
static swidget _Uxbuild_ApplicWindow()
1377
/* Create the swidgets */
1379
ApplicWindow = UxCreateApplicationShell( "ApplicWindow", NO_PARENT );
1380
UxPutContext( ApplicWindow, UxApplicWindowContext );
1382
MainWindow = UxCreateMainWindow( "MainWindow", ApplicWindow );
1383
menu1 = UxCreateRowColumn( "menu1", MainWindow );
1384
menu1_p7 = UxCreateRowColumn( "menu1_p7", menu1 );
1385
menu1_p7_b1 = UxCreatePushButtonGadget( "menu1_p7_b1", menu1_p7 );
1386
menu1_p7_b2 = UxCreatePushButtonGadget( "menu1_p7_b2", menu1_p7 );
1387
menu1_p7_b3 = UxCreatePushButtonGadget( "menu1_p7_b3", menu1_p7 );
1388
menu1_top_b1 = UxCreateCascadeButton( "menu1_top_b1", menu1 );
1389
menu1_p4 = UxCreateRowColumn( "menu1_p4", menu1 );
1390
menu1_p4_b1 = UxCreatePushButtonGadget( "menu1_p4_b1", menu1_p4 );
1391
menu1_p4_b2 = UxCreatePushButtonGadget( "menu1_p4_b2", menu1_p4 );
1392
menu1_p4_b8 = UxCreateSeparatorGadget( "menu1_p4_b8", menu1_p4 );
1393
menu1_p4_b10 = UxCreatePushButtonGadget( "menu1_p4_b10", menu1_p4 );
1394
menu1_p4_b13 = UxCreatePushButtonGadget( "menu1_p4_b13", menu1_p4 );
1395
menu1_p4_b12 = UxCreateSeparatorGadget( "menu1_p4_b12", menu1_p4 );
1396
menu1_p4_b3 = UxCreatePushButtonGadget( "menu1_p4_b3", menu1_p4 );
1397
menu1_p4_b4 = UxCreatePushButtonGadget( "menu1_p4_b4", menu1_p4 );
1398
menu1_p4_b9 = UxCreateSeparatorGadget( "menu1_p4_b9", menu1_p4 );
1399
menu1_p4_b5 = UxCreatePushButtonGadget( "menu1_p4_b5", menu1_p4 );
1400
menu1_p4_b11 = UxCreatePushButtonGadget( "menu1_p4_b11", menu1_p4 );
1401
menu1_p4_b14 = UxCreateSeparatorGadget( "menu1_p4_b14", menu1_p4 );
1402
menu1_top_b4 = UxCreateCascadeButton( "menu1_top_b4", menu1 );
1403
menu1_p8 = UxCreateRowColumn( "menu1_p8", menu1 );
1404
tg_options_exit = UxCreateToggleButtonGadget( "tg_options_exit", menu1_p8 );
1405
menu1_top_b2 = UxCreateCascadeButton( "menu1_top_b2", menu1 );
1406
menu1_p5 = UxCreateRowColumn( "menu1_p5", menu1 );
1407
menu_help_context = UxCreatePushButtonGadget( "menu_help_context", menu1_p5 );
1408
menu_help_help = UxCreatePushButtonGadget( "menu_help_help", menu1_p5 );
1409
menu1_p5_b5 = UxCreateSeparatorGadget( "menu1_p5_b5", menu1_p5 );
1410
menu_help_tutorial = UxCreatePushButtonGadget( "menu_help_tutorial", menu1_p5 );
1411
menu_help_version = UxCreatePushButtonGadget( "menu_help_version", menu1_p5 );
1412
menu1_top_b5 = UxCreateCascadeButton( "menu1_top_b5", menu1 );
1413
menu1_p6 = UxCreateRowColumn( "menu1_p6", menu1 );
1414
menu1_p6_b1 = UxCreatePushButtonGadget( "menu1_p6_b1", menu1_p6 );
1415
menu1_top_b6 = UxCreateCascadeButton( "menu1_top_b6", menu1 );
1416
form1 = UxCreateForm( "form1", MainWindow );
1417
form5 = UxCreateForm( "form5", form1 );
1418
pb_main_badpix = UxCreatePushButton( "pb_main_badpix", form5 );
1419
pb_main_flat = UxCreatePushButton( "pb_main_flat", form5 );
1420
pb_main_object = UxCreatePushButton( "pb_main_object", form5 );
1421
pb_main_standard = UxCreatePushButton( "pb_main_standard", form5 );
1422
pb_main_extract = UxCreatePushButton( "pb_main_extract", form5 );
1423
pb_main_merge = UxCreatePushButton( "pb_main_merge", form5 );
1424
pb_main_flux_table = UxCreatePushButton( "pb_main_flux_table", form5 );
1425
shelp_main = UxCreateText( "shelp_main", form1 );
1426
separator1 = UxCreateSeparator( "separator1", form1 );
1427
tf_main_dark = UxCreateTextField( "tf_main_dark", form1 );
1428
label4 = UxCreateLabel( "label4", form1 );
1429
label3 = UxCreateLabel( "label3", form1 );
1430
tf_main_ststar = UxCreateTextField( "tf_main_ststar", form1 );
1431
label8 = UxCreateLabel( "label8", form1 );
1432
label1 = UxCreateLabel( "label1", form1 );
1433
tf_main_sky = UxCreateTextField( "tf_main_sky", form1 );
1434
tf_main_object = UxCreateTextField( "tf_main_object", form1 );
1435
label2 = UxCreateLabel( "label2", form1 );
1436
label7 = UxCreateLabel( "label7", form1 );
1437
tf_main_stsky = UxCreateTextField( "tf_main_stsky", form1 );
1438
label5 = UxCreateLabel( "label5", form1 );
1439
tf_main_flat = UxCreateTextField( "tf_main_flat", form1 );
1440
separator12 = UxCreateSeparator( "separator12", form1 );
1442
_Uxinit_ApplicWindow();
1444
/* Create the X widgets */
1446
UxCreateWidget( ApplicWindow );
1447
UxCreateWidget( MainWindow );
1448
UxCreateWidget( menu1 );
1449
UxCreateWidget( menu1_p7 );
1450
UxCreateWidget( menu1_p7_b1 );
1451
UxCreateWidget( menu1_p7_b2 );
1452
UxCreateWidget( menu1_p7_b3 );
1453
UxPutSubMenuId( menu1_top_b1, "menu1_p7" );
1454
UxCreateWidget( menu1_top_b1 );
1456
UxCreateWidget( menu1_p4 );
1457
UxCreateWidget( menu1_p4_b1 );
1458
UxCreateWidget( menu1_p4_b2 );
1459
UxCreateWidget( menu1_p4_b8 );
1460
UxCreateWidget( menu1_p4_b10 );
1461
UxCreateWidget( menu1_p4_b13 );
1462
UxCreateWidget( menu1_p4_b12 );
1463
UxCreateWidget( menu1_p4_b3 );
1464
UxCreateWidget( menu1_p4_b4 );
1465
UxCreateWidget( menu1_p4_b9 );
1466
UxCreateWidget( menu1_p4_b5 );
1467
UxCreateWidget( menu1_p4_b11 );
1468
UxCreateWidget( menu1_p4_b14 );
1469
UxPutSubMenuId( menu1_top_b4, "menu1_p4" );
1470
UxCreateWidget( menu1_top_b4 );
1472
UxCreateWidget( menu1_p8 );
1473
UxCreateWidget( tg_options_exit );
1474
UxPutSubMenuId( menu1_top_b2, "menu1_p8" );
1475
UxCreateWidget( menu1_top_b2 );
1477
UxCreateWidget( menu1_p5 );
1478
UxCreateWidget( menu_help_context );
1479
UxCreateWidget( menu_help_help );
1480
UxCreateWidget( menu1_p5_b5 );
1481
UxCreateWidget( menu_help_tutorial );
1482
UxCreateWidget( menu_help_version );
1483
UxPutSubMenuId( menu1_top_b5, "menu1_p5" );
1484
UxCreateWidget( menu1_top_b5 );
1486
UxCreateWidget( menu1_p6 );
1487
UxCreateWidget( menu1_p6_b1 );
1488
UxPutSubMenuId( menu1_top_b6, "menu1_p6" );
1489
UxCreateWidget( menu1_top_b6 );
1491
UxCreateWidget( form1 );
1492
UxCreateWidget( form5 );
1493
UxCreateWidget( pb_main_badpix );
1494
UxCreateWidget( pb_main_flat );
1495
UxCreateWidget( pb_main_object );
1496
UxCreateWidget( pb_main_standard );
1497
UxCreateWidget( pb_main_extract );
1498
UxCreateWidget( pb_main_merge );
1499
UxCreateWidget( pb_main_flux_table );
1500
UxCreateWidget( shelp_main );
1501
UxCreateWidget( separator1 );
1502
UxCreateWidget( tf_main_dark );
1503
UxCreateWidget( label4 );
1504
UxCreateWidget( label3 );
1505
UxCreateWidget( tf_main_ststar );
1506
UxCreateWidget( label8 );
1507
UxCreateWidget( label1 );
1508
UxCreateWidget( tf_main_sky );
1509
UxCreateWidget( tf_main_object );
1510
UxCreateWidget( label2 );
1511
UxCreateWidget( label7 );
1512
UxCreateWidget( tf_main_stsky );
1513
UxCreateWidget( label5 );
1514
UxCreateWidget( tf_main_flat );
1515
UxCreateWidget( separator12 );
1517
UxPutMenuHelpWidget( menu1, "menu1_top_b6" );
1519
UxAddCallback( menu1_p7_b1, XmNactivateCallback,
1520
activateCB_menu1_p7_b1,
1521
(XtPointer) UxApplicWindowContext );
1523
UxAddCallback( menu1_p7_b2, XmNactivateCallback,
1524
activateCB_menu1_p7_b2,
1525
(XtPointer) UxApplicWindowContext );
1527
UxAddCallback( menu1_p7_b3, XmNactivateCallback,
1528
activateCB_menu1_p7_b3,
1529
(XtPointer) UxApplicWindowContext );
1531
UxAddCallback( menu1_p4_b1, XmNactivateCallback,
1532
activateCB_menu1_p4_b1,
1533
(XtPointer) UxApplicWindowContext );
1535
UxAddCallback( menu1_p4_b2, XmNactivateCallback,
1536
activateCB_menu1_p4_b2,
1537
(XtPointer) UxApplicWindowContext );
1539
UxAddCallback( menu1_p4_b10, XmNactivateCallback,
1540
activateCB_menu1_p4_b10,
1541
(XtPointer) UxApplicWindowContext );
1543
UxAddCallback( menu1_p4_b13, XmNactivateCallback,
1544
activateCB_menu1_p4_b13,
1545
(XtPointer) UxApplicWindowContext );
1547
UxAddCallback( menu1_p4_b3, XmNactivateCallback,
1548
activateCB_menu1_p4_b3,
1549
(XtPointer) UxApplicWindowContext );
1551
UxAddCallback( menu1_p4_b4, XmNactivateCallback,
1552
activateCB_menu1_p4_b4,
1553
(XtPointer) UxApplicWindowContext );
1555
UxAddCallback( menu1_p4_b5, XmNactivateCallback,
1556
activateCB_menu1_p4_b5,
1557
(XtPointer) UxApplicWindowContext );
1559
UxAddCallback( menu1_p4_b11, XmNactivateCallback,
1560
activateCB_menu1_p4_b11,
1561
(XtPointer) UxApplicWindowContext );
1563
UxAddCallback( tg_options_exit, XmNvalueChangedCallback,
1564
valueChangedCB_tg_options_exit,
1565
(XtPointer) UxApplicWindowContext );
1567
UxAddCallback( menu_help_context, XmNactivateCallback,
1568
activateCB_menu_help_context,
1569
(XtPointer) UxApplicWindowContext );
1571
UxAddCallback( menu_help_help, XmNactivateCallback,
1572
activateCB_menu_help_help,
1573
(XtPointer) UxApplicWindowContext );
1575
UxAddCallback( menu_help_tutorial, XmNactivateCallback,
1576
activateCB_menu_help_tutorial,
1577
(XtPointer) UxApplicWindowContext );
1579
UxAddCallback( menu_help_version, XmNactivateCallback,
1580
activateCB_menu_help_version,
1581
(XtPointer) UxApplicWindowContext );
1583
UxAddCallback( menu1_p6_b1, XmNactivateCallback,
1584
activateCB_menu1_p6_b1,
1585
(XtPointer) UxApplicWindowContext );
1587
UxAddCallback( pb_main_badpix, XmNactivateCallback,
1588
activateCB_pb_main_badpix,
1589
(XtPointer) UxApplicWindowContext );
1591
UxAddCallback( pb_main_flat, XmNactivateCallback,
1592
activateCB_pb_main_flat,
1593
(XtPointer) UxApplicWindowContext );
1595
UxAddCallback( pb_main_object, XmNactivateCallback,
1596
activateCB_pb_main_object,
1597
(XtPointer) UxApplicWindowContext );
1599
UxAddCallback( pb_main_standard, XmNactivateCallback,
1600
activateCB_pb_main_standard,
1601
(XtPointer) UxApplicWindowContext );
1603
UxAddCallback( pb_main_extract, XmNactivateCallback,
1604
activateCB_pb_main_extract,
1605
(XtPointer) UxApplicWindowContext );
1607
UxAddCallback( pb_main_merge, XmNactivateCallback,
1608
activateCB_pb_main_merge,
1609
(XtPointer) UxApplicWindowContext );
1611
UxAddCallback( pb_main_flux_table, XmNactivateCallback,
1612
activateCB_pb_main_flux_table,
1613
(XtPointer) UxApplicWindowContext );
1615
UxAddCallback( tf_main_dark, XmNlosingFocusCallback,
1616
losingFocusCB_tf_main_dark,
1617
(XtPointer) UxApplicWindowContext );
1619
UxAddCallback( tf_main_ststar, XmNlosingFocusCallback,
1620
losingFocusCB_tf_main_ststar,
1621
(XtPointer) UxApplicWindowContext );
1623
UxAddCallback( tf_main_sky, XmNlosingFocusCallback,
1624
losingFocusCB_tf_main_sky,
1625
(XtPointer) UxApplicWindowContext );
1627
UxAddCallback( tf_main_object, XmNlosingFocusCallback,
1628
losingFocusCB_tf_main_object,
1629
(XtPointer) UxApplicWindowContext );
1631
UxAddCallback( tf_main_stsky, XmNlosingFocusCallback,
1632
losingFocusCB_tf_main_stsky,
1633
(XtPointer) UxApplicWindowContext );
1635
UxAddCallback( tf_main_flat, XmNlosingFocusCallback,
1636
losingFocusCB_tf_main_flat,
1637
(XtPointer) UxApplicWindowContext );
1640
/* Finally, call UxRealizeInterface to create the X windows
1641
for the widgets created above. */
1643
UxRealizeInterface( ApplicWindow );
1645
UxMainWindowSetAreas( MainWindow, menu1, NULL_SWIDGET,
1646
NULL_SWIDGET, NULL_SWIDGET, form1 );
1647
return ( ApplicWindow );
1650
/*******************************************************************************
1651
The following function includes the code that was entered
1652
in the 'Initial Code' and 'Final Code' sections of the
1653
Declarations Editor. This function is called from the
1654
'Interface function' below.
1655
*******************************************************************************/
1657
static swidget _Ux_create_ApplicWindow()
1660
_UxCApplicWindow *UxContext;
1662
UxApplicWindowContext = UxContext =
1663
(_UxCApplicWindow *) UxMalloc( sizeof(_UxCApplicWindow) );
1666
extern swidget create_StandardShell();
1667
extern swidget create_BadpixShell();
1668
extern swidget create_ObjectShell();
1669
extern swidget create_FluxTableShell();
1670
extern swidget create_MergeShell();
1671
extern swidget create_ExtractShell();
1672
extern swidget create_HelpShell();
1673
extern swidget create_file_dialog();
1674
rtrn = _Uxbuild_ApplicWindow();
1676
create_StandardShell();
1677
create_BadpixShell();
1678
create_ObjectShell();
1679
create_FluxTableShell();
1680
create_MergeShell();
1681
create_ExtractShell();
1683
create_file_dialog();
1689
/*******************************************************************************
1690
The following is the 'Interface function' which is the
1691
external entry point for creating this interface.
1692
This function should be called from your application or from
1693
a callback function.
1694
*******************************************************************************/
1696
swidget create_ApplicWindow()
1699
static int _Uxinit = 0;
1703
static XtActionsRec _Uxactions[] = {
1704
{ "ExtendedHelp", action_ExtendedHelp },
1705
{ "WriteHelp", action_WriteHelp },
1706
{ "ClearHelp", action_ClearHelp },
1707
{ "FileSelectACT1", action_FileSelectACT1 },
1708
{ "FileSelectACT", action_FileSelectACT }
1711
XtAppAddActions( UxAppContext,
1713
XtNumber(_Uxactions) );
1718
_Uxrtrn = _Ux_create_ApplicWindow();
1723
/*******************************************************************************
1725
*******************************************************************************/