~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to gui/XIrspec/src/MainShell.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 Massachusetss Ave, Cambridge, 
 
17
  MA 02139, USA.
 
18
 
 
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 
 
25
                        GERMANY
 
26
===========================================================================*/
 
27
 
 
28
 
 
29
/*******************************************************************************
 
30
        MainShell.c
 
31
 
 
32
.VERSION
 
33
 090828         last modif
 
34
 
 
35
*******************************************************************************/
 
36
 
 
37
#include <stdio.h>
 
38
#include "UxLib.h"
 
39
#include "UxLabel.h"
 
40
#include "UxTextF.h"
 
41
#include "UxSep.h"
 
42
#include "UxText.h"
 
43
#include "UxPushB.h"
 
44
#include "UxForm.h"
 
45
#include "UxCascB.h"
 
46
#include "UxTogBG.h"
 
47
#include "UxSepG.h"
 
48
#include "UxPushBG.h"
 
49
#include "UxRowCol.h"
 
50
#include "UxMainW.h"
 
51
#include "UxApplSh.h"
 
52
 
 
53
/*******************************************************************************
 
54
        Includes, Defines, and Global variables from the Declarations Editor:
 
55
*******************************************************************************/
 
56
 
 
57
#include <ExternResources.h>
 
58
 
 
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
 
63
        correct instance.
 
64
 
 
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
*******************************************************************************/
 
71
 
 
72
typedef struct
 
73
{
 
74
        swidget UxApplicWindow;
 
75
        swidget UxMainWindow;
 
76
        swidget Uxmenu1;
 
77
        swidget Uxmenu1_p7;
 
78
        swidget Uxmenu1_p7_b1;
 
79
        swidget Uxmenu1_p7_b2;
 
80
        swidget Uxmenu1_p7_b3;
 
81
        swidget Uxmenu1_top_b1;
 
82
        swidget Uxmenu1_p4;
 
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;
 
96
        swidget Uxmenu1_p8;
 
97
        swidget Uxtg_options_exit;
 
98
        swidget Uxmenu1_top_b2;
 
99
        swidget Uxmenu1_p5;
 
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;
 
106
        swidget Uxmenu1_p6;
 
107
        swidget Uxmenu1_p6_b1;
 
108
        swidget Uxmenu1_top_b6;
 
109
        swidget Uxform1;
 
110
        swidget Uxform5;
 
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;
 
121
        swidget Uxlabel4;
 
122
        swidget Uxlabel3;
 
123
        swidget Uxtf_main_ststar;
 
124
        swidget Uxlabel8;
 
125
        swidget Uxlabel1;
 
126
        swidget Uxtf_main_sky;
 
127
        swidget Uxtf_main_object;
 
128
        swidget Uxlabel2;
 
129
        swidget Uxlabel7;
 
130
        swidget Uxtf_main_stsky;
 
131
        swidget Uxlabel5;
 
132
        swidget Uxtf_main_flat;
 
133
        swidget Uxseparator12;
 
134
} _UxCApplicWindow;
 
135
 
 
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
 
196
 
 
197
static _UxCApplicWindow *UxApplicWindowContext;
 
198
 
 
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();
 
204
 
 
205
 
 
206
extern int PopupList(), AppendDialogText();
 
207
 
 
208
 
 
209
 
 
210
/*******************************************************************************
 
211
        The following are translation tables.
 
212
*******************************************************************************/
 
213
 
 
214
static char     *SelectFileMain = "#override\n\
 
215
<Btn3Down>:FileSelectACT()\n";
 
216
 
 
217
/*******************************************************************************
 
218
        Forward declarations of functions that are defined later in this file.
 
219
*******************************************************************************/
 
220
 
 
221
swidget create_ApplicWindow();
 
222
 
 
223
/*******************************************************************************
 
224
        The following are Action functions.
 
225
*******************************************************************************/
 
226
 
 
227
static void     action_ExtendedHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
228
        Widget          UxWidget;
 
229
        XEvent          *UxEvent;
 
230
        String          *UxParams;
 
231
        Cardinal        *p_UxNumParams;
 
232
{
 
233
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
234
        swidget                 UxThisWidget;
 
235
 
 
236
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
237
        UxSaveCtx = UxApplicWindowContext;
 
238
        UxApplicWindowContext = UxContext =
 
239
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
240
        {
 
241
        DisplayExtendedHelp(UxWidget);
 
242
        }
 
243
        UxApplicWindowContext = UxSaveCtx;
 
244
}
 
245
 
 
246
static void     action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
247
        Widget          UxWidget;
 
248
        XEvent          *UxEvent;
 
249
        String          *UxParams;
 
250
        Cardinal        *p_UxNumParams;
 
251
{
 
252
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
253
        swidget                 UxThisWidget;
 
254
 
 
255
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
256
        UxSaveCtx = UxApplicWindowContext;
 
257
        UxApplicWindowContext = UxContext =
 
258
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
259
        {
 
260
        DisplayShortHelp(UxWidget);
 
261
        }
 
262
        UxApplicWindowContext = UxSaveCtx;
 
263
}
 
264
 
 
265
static void     action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
266
        Widget          UxWidget;
 
267
        XEvent          *UxEvent;
 
268
        String          *UxParams;
 
269
        Cardinal        *p_UxNumParams;
 
270
{
 
271
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
272
        swidget                 UxThisWidget;
 
273
 
 
274
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
275
        UxSaveCtx = UxApplicWindowContext;
 
276
        UxApplicWindowContext = UxContext =
 
277
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
278
        {
 
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"), "");
 
286
        }
 
287
        UxApplicWindowContext = UxSaveCtx;
 
288
}
 
289
 
 
290
static void     action_FileSelectACT1( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
291
        Widget          UxWidget;
 
292
        XEvent          *UxEvent;
 
293
        String          *UxParams;
 
294
        Cardinal        *p_UxNumParams;
 
295
{
 
296
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
297
        swidget                 UxThisWidget;
 
298
 
 
299
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
300
        UxSaveCtx = UxApplicWindowContext;
 
301
        UxApplicWindowContext = UxContext =
 
302
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
303
        {
 
304
#include <xm_defs.h>
 
305
#include <irspec_comm.h>
 
306
        
 
307
        extern swidget FileListInterface, TextFieldSwidget;
 
308
        extern Widget FileListWidget;
 
309
        extern char  DirSpecs[];
 
310
        extern int ListType;
 
311
        
 
312
        int  strip = 1; /* strip off */
 
313
        
 
314
        TextFieldSwidget = UxThisWidget;
 
315
        strcpy(DirSpecs, "*.bdf");
 
316
                 
 
317
        if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_object1")) ) {
 
318
            SET_LIST_TITLE("Enter object frame");
 
319
            ListType = LIST_OBJECT;
 
320
        }
 
321
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_sky")) ) {
 
322
            SET_LIST_TITLE("Enter sky frame");
 
323
            ListType = LIST_SKY;
 
324
        }
 
325
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_ststar")) ) {
 
326
            SET_LIST_TITLE("Enter standard star");
 
327
            ListType = LIST_STSTAR;
 
328
        }
 
329
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_stsky")) )  {
 
330
            SET_LIST_TITLE("Enter standard sky");
 
331
            ListType = LIST_STSKY;
 
332
        }
 
333
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_dark")) ) {
 
334
            SET_LIST_TITLE("Enter dark frame");
 
335
            ListType = LIST_DARK;
 
336
        }
 
337
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_flat")) )  {
 
338
            SET_LIST_TITLE("Enter flat-field frame");
 
339
            ListType = LIST_FLAT;
 
340
        }
 
341
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_flux_in")) )  {
 
342
            SET_LIST_TITLE("Enter flux table");
 
343
            ListType = LIST_FLUX;
 
344
            strcpy(DirSpecs, "*.tbl");
 
345
        }
 
346
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_resp")) )  {
 
347
            SET_LIST_TITLE("Enter response frame");
 
348
            ListType = LIST_RESP;
 
349
        }
 
350
         
 
351
        
 
352
          
 
353
        FileListWidget = UxGetWidget(UxFindSwidget("sl_file_list"));
 
354
        SetFileList(FileListWidget, strip, DirSpecs);
 
355
        UxPopupInterface(FileListInterface, exclusive_grab);
 
356
        
 
357
        }
 
358
        UxApplicWindowContext = UxSaveCtx;
 
359
}
 
360
 
 
361
static void     action_FileSelectACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
362
        Widget          UxWidget;
 
363
        XEvent          *UxEvent;
 
364
        String          *UxParams;
 
365
        Cardinal        *p_UxNumParams;
 
366
{
 
367
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
368
        swidget                 UxThisWidget;
 
369
 
 
370
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
371
        UxSaveCtx = UxApplicWindowContext;
 
372
        UxApplicWindowContext = UxContext =
 
373
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
374
        {
 
375
#include <xm_defs.h>
 
376
#include <irspec_comm.h>
 
377
        
 
378
        extern swidget FileListInterface, TextFieldSwidget;
 
379
        extern Widget FileListWidget;
 
380
        extern char  DirSpecs[];
 
381
        extern int ListType;
 
382
        
 
383
        int  strip = 1; /* strip off */
 
384
        
 
385
        TextFieldSwidget = UxThisWidget;
 
386
        strcpy(DirSpecs, "*.bdf");
 
387
                 
 
388
        if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_object")) ) {
 
389
            SET_LIST_TITLE("Enter object frame");
 
390
            ListType = LIST_OBJECT;
 
391
        }
 
392
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_sky")) ) {
 
393
            SET_LIST_TITLE("Enter sky frame");
 
394
            ListType = LIST_SKY;
 
395
        }
 
396
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_ststar")) ) {
 
397
            SET_LIST_TITLE("Enter standard star");
 
398
            ListType = LIST_STSTAR;
 
399
        }
 
400
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_stsky")) )  {
 
401
            SET_LIST_TITLE("Enter standard sky");
 
402
            ListType = LIST_STSKY;
 
403
        }
 
404
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_dark")) ) {
 
405
            SET_LIST_TITLE("Enter dark frame");
 
406
            ListType = LIST_DARK;
 
407
        }
 
408
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_main_flat")) )  {
 
409
            SET_LIST_TITLE("Enter flat-field frame");
 
410
            ListType = LIST_FLAT;
 
411
        }
 
412
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_std_flux")) )  {
 
413
            SET_LIST_TITLE("Enter flux table");
 
414
            ListType = LIST_FLUX;
 
415
            strcpy(DirSpecs, "*.tbl");
 
416
        }
 
417
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_std_ref")) )  {
 
418
            SET_LIST_TITLE("Enter reference frame");
 
419
            ListType = LIST_STD_REF;
 
420
        }
 
421
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_ref")) )  {
 
422
            SET_LIST_TITLE("Enter reference frame");
 
423
            ListType = LIST_OBJ_REF;
 
424
        } 
 
425
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_finput")) )  {
 
426
            SET_LIST_TITLE("Enter flux input frame");
 
427
            ListType = LIST_OBJ_FINPUT;
 
428
        } 
 
429
        else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_obj_resp")) )  {
 
430
            SET_LIST_TITLE("Enter response frame");
 
431
            ListType = LIST_RESP;
 
432
        }
 
433
          
 
434
        FileListWidget = UxGetWidget(UxFindSwidget("sl_file_list"));
 
435
        SetFileList(FileListWidget, strip, DirSpecs);
 
436
        UxPopupInterface(FileListInterface, exclusive_grab);
 
437
        
 
438
        }
 
439
        UxApplicWindowContext = UxSaveCtx;
 
440
}
 
441
 
 
442
/*******************************************************************************
 
443
        The following are callback functions.
 
444
*******************************************************************************/
 
445
 
 
446
static void     activateCB_menu1_p7_b1( UxWidget, UxClientData, UxCallbackArg )
 
447
        Widget          UxWidget;
 
448
        XtPointer       UxClientData, UxCallbackArg;
 
449
{
 
450
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
451
        swidget                 UxThisWidget;
 
452
 
 
453
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
454
        UxSaveCtx = UxApplicWindowContext;
 
455
        UxApplicWindowContext = UxContext =
 
456
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
457
        {
 
458
#include <irspec_comm.h>
 
459
        
 
460
        PopupList(LIST_OPEN);
 
461
        }
 
462
        UxApplicWindowContext = UxSaveCtx;
 
463
}
 
464
 
 
465
static void     activateCB_menu1_p7_b2( UxWidget, UxClientData, UxCallbackArg )
 
466
        Widget          UxWidget;
 
467
        XtPointer       UxClientData, UxCallbackArg;
 
468
{
 
469
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
470
        swidget                 UxThisWidget;
 
471
 
 
472
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
473
        UxSaveCtx = UxApplicWindowContext;
 
474
        UxApplicWindowContext = UxContext =
 
475
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
476
        {
 
477
        FileSaveCallback();
 
478
        }
 
479
        UxApplicWindowContext = UxSaveCtx;
 
480
}
 
481
 
 
482
static void     activateCB_menu1_p7_b3( UxWidget, UxClientData, UxCallbackArg )
 
483
        Widget          UxWidget;
 
484
        XtPointer       UxClientData, UxCallbackArg;
 
485
{
 
486
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
487
        swidget                 UxThisWidget;
 
488
 
 
489
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
490
        UxSaveCtx = UxApplicWindowContext;
 
491
        UxApplicWindowContext = UxContext =
 
492
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
493
        {
 
494
        FileSaveAsCallback();
 
495
        }
 
496
        UxApplicWindowContext = UxSaveCtx;
 
497
}
 
498
 
 
499
static void     activateCB_menu1_p4_b1( UxWidget, UxClientData, UxCallbackArg )
 
500
        Widget          UxWidget;
 
501
        XtPointer       UxClientData, UxCallbackArg;
 
502
{
 
503
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
504
        swidget                 UxThisWidget;
 
505
 
 
506
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
507
        UxSaveCtx = UxApplicWindowContext;
 
508
        UxApplicWindowContext = UxContext =
 
509
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
510
        AppendDialogText("crea/display");
 
511
        UxApplicWindowContext = UxSaveCtx;
 
512
}
 
513
 
 
514
static void     activateCB_menu1_p4_b2( UxWidget, UxClientData, UxCallbackArg )
 
515
        Widget          UxWidget;
 
516
        XtPointer       UxClientData, UxCallbackArg;
 
517
{
 
518
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
519
        swidget                 UxThisWidget;
 
520
 
 
521
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
522
        UxSaveCtx = UxApplicWindowContext;
 
523
        UxApplicWindowContext = UxContext =
 
524
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
525
        AppendDialogText("crea/graph");
 
526
        UxApplicWindowContext = UxSaveCtx;
 
527
}
 
528
 
 
529
static void     activateCB_menu1_p4_b10( UxWidget, UxClientData, UxCallbackArg )
 
530
        Widget          UxWidget;
 
531
        XtPointer       UxClientData, UxCallbackArg;
 
532
{
 
533
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
534
        swidget                 UxThisWidget;
 
535
 
 
536
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
537
        UxSaveCtx = UxApplicWindowContext;
 
538
        UxApplicWindowContext = UxContext =
 
539
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
540
        {        
 
541
#include <irspec_comm.h>
 
542
        
 
543
        PopupList(LIST_LOAD_IMA);
 
544
        }
 
545
        UxApplicWindowContext = UxSaveCtx;
 
546
}
 
547
 
 
548
static void     activateCB_menu1_p4_b13( UxWidget, UxClientData, UxCallbackArg )
 
549
        Widget          UxWidget;
 
550
        XtPointer       UxClientData, UxCallbackArg;
 
551
{
 
552
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
553
        swidget                 UxThisWidget;
 
554
 
 
555
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
556
        UxSaveCtx = UxApplicWindowContext;
 
557
        UxApplicWindowContext = UxContext =
 
558
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
559
        AppendDialogText("clear/channel over");
 
560
        UxApplicWindowContext = UxSaveCtx;
 
561
}
 
562
 
 
563
static void     activateCB_menu1_p4_b3( UxWidget, UxClientData, UxCallbackArg )
 
564
        Widget          UxWidget;
 
565
        XtPointer       UxClientData, UxCallbackArg;
 
566
{
 
567
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
568
        swidget                 UxThisWidget;
 
569
 
 
570
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
571
        UxSaveCtx = UxApplicWindowContext;
 
572
        UxApplicWindowContext = UxContext =
 
573
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
574
        AppendDialogText("copy/display laser");
 
575
        UxApplicWindowContext = UxSaveCtx;
 
576
}
 
577
 
 
578
static void     activateCB_menu1_p4_b4( UxWidget, UxClientData, UxCallbackArg )
 
579
        Widget          UxWidget;
 
580
        XtPointer       UxClientData, UxCallbackArg;
 
581
{
 
582
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
583
        swidget                 UxThisWidget;
 
584
 
 
585
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
586
        UxSaveCtx = UxApplicWindowContext;
 
587
        UxApplicWindowContext = UxContext =
 
588
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
589
        AppendDialogText("copy/graph laser");
 
590
        UxApplicWindowContext = UxSaveCtx;
 
591
}
 
592
 
 
593
static void     activateCB_menu1_p4_b5( UxWidget, UxClientData, UxCallbackArg )
 
594
        Widget          UxWidget;
 
595
        XtPointer       UxClientData, UxCallbackArg;
 
596
{
 
597
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
598
        swidget                 UxThisWidget;
 
599
 
 
600
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
601
        UxSaveCtx = UxApplicWindowContext;
 
602
        UxApplicWindowContext = UxContext =
 
603
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
604
        AppendDialogText("get/gcursor");
 
605
        UxApplicWindowContext = UxSaveCtx;
 
606
}
 
607
 
 
608
static void     activateCB_menu1_p4_b11( UxWidget, UxClientData, UxCallbackArg )
 
609
        Widget          UxWidget;
 
610
        XtPointer       UxClientData, UxCallbackArg;
 
611
{
 
612
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
613
        swidget                 UxThisWidget;
 
614
 
 
615
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
616
        UxSaveCtx = UxApplicWindowContext;
 
617
        UxApplicWindowContext = UxContext =
 
618
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
619
        AppendDialogText("get/cursor");
 
620
        UxApplicWindowContext = UxSaveCtx;
 
621
}
 
622
 
 
623
static void     valueChangedCB_tg_options_exit( UxWidget, UxClientData, UxCallbackArg )
 
624
        Widget          UxWidget;
 
625
        XtPointer       UxClientData, UxCallbackArg;
 
626
{
 
627
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
628
        swidget                 UxThisWidget;
 
629
 
 
630
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
631
        UxSaveCtx = UxApplicWindowContext;
 
632
        UxApplicWindowContext = UxContext =
 
633
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
634
        {
 
635
        }
 
636
        UxApplicWindowContext = UxSaveCtx;
 
637
}
 
638
 
 
639
static void     activateCB_menu_help_context( UxWidget, UxClientData, UxCallbackArg )
 
640
        Widget          UxWidget;
 
641
        XtPointer       UxClientData, UxCallbackArg;
 
642
{
 
643
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
644
        swidget                 UxThisWidget;
 
645
 
 
646
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
647
        UxSaveCtx = UxApplicWindowContext;
 
648
        UxApplicWindowContext = UxContext =
 
649
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
650
        DisplayExtendedHelp(UxWidget);
 
651
        UxApplicWindowContext = UxSaveCtx;
 
652
}
 
653
 
 
654
static void     activateCB_menu_help_help( UxWidget, UxClientData, UxCallbackArg )
 
655
        Widget          UxWidget;
 
656
        XtPointer       UxClientData, UxCallbackArg;
 
657
{
 
658
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
659
        swidget                 UxThisWidget;
 
660
 
 
661
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
662
        UxSaveCtx = UxApplicWindowContext;
 
663
        UxApplicWindowContext = UxContext =
 
664
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
665
        DisplayExtendedHelp(UxWidget);
 
666
        UxApplicWindowContext = UxSaveCtx;
 
667
}
 
668
 
 
669
static void     activateCB_menu_help_tutorial( UxWidget, UxClientData, UxCallbackArg )
 
670
        Widget          UxWidget;
 
671
        XtPointer       UxClientData, UxCallbackArg;
 
672
{
 
673
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
674
        swidget                 UxThisWidget;
 
675
 
 
676
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
677
        UxSaveCtx = UxApplicWindowContext;
 
678
        UxApplicWindowContext = UxContext =
 
679
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
680
        DisplayExtendedHelp(UxWidget);
 
681
        UxApplicWindowContext = UxSaveCtx;
 
682
}
 
683
 
 
684
static void     activateCB_menu_help_version( UxWidget, UxClientData, UxCallbackArg )
 
685
        Widget          UxWidget;
 
686
        XtPointer       UxClientData, UxCallbackArg;
 
687
{
 
688
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
689
        swidget                 UxThisWidget;
 
690
 
 
691
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
692
        UxSaveCtx = UxApplicWindowContext;
 
693
        UxApplicWindowContext = UxContext =
 
694
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
695
        DisplayExtendedHelp(UxWidget);
 
696
        UxApplicWindowContext = UxSaveCtx;
 
697
}
 
698
 
 
699
static void     activateCB_menu1_p6_b1( UxWidget, UxClientData, UxCallbackArg )
 
700
        Widget          UxWidget;
 
701
        XtPointer       UxClientData, UxCallbackArg;
 
702
{
 
703
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
704
        swidget                 UxThisWidget;
 
705
 
 
706
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
707
        UxSaveCtx = UxApplicWindowContext;
 
708
        UxApplicWindowContext = UxContext =
 
709
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
710
        {
 
711
        QuitCallback();
 
712
        }
 
713
        UxApplicWindowContext = UxSaveCtx;
 
714
}
 
715
 
 
716
static void     activateCB_pb_main_badpix( UxWidget, UxClientData, UxCallbackArg )
 
717
        Widget          UxWidget;
 
718
        XtPointer       UxClientData, UxCallbackArg;
 
719
{
 
720
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
721
        swidget                 UxThisWidget;
 
722
 
 
723
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
724
        UxSaveCtx = UxApplicWindowContext;
 
725
        UxApplicWindowContext = UxContext =
 
726
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
727
        {
 
728
        PopupIrspec("BadpixShell");
 
729
        MainBadpixCallback();
 
730
        }
 
731
        UxApplicWindowContext = UxSaveCtx;
 
732
}
 
733
 
 
734
static void     activateCB_pb_main_flat( UxWidget, UxClientData, UxCallbackArg )
 
735
        Widget          UxWidget;
 
736
        XtPointer       UxClientData, UxCallbackArg;
 
737
{
 
738
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
739
        swidget                 UxThisWidget;
 
740
 
 
741
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
742
        UxSaveCtx = UxApplicWindowContext;
 
743
        UxApplicWindowContext = UxContext =
 
744
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
745
        {
 
746
        {
 
747
        MainFlatCallback();
 
748
        }
 
749
        }
 
750
        UxApplicWindowContext = UxSaveCtx;
 
751
}
 
752
 
 
753
static void     activateCB_pb_main_object( UxWidget, UxClientData, UxCallbackArg )
 
754
        Widget          UxWidget;
 
755
        XtPointer       UxClientData, UxCallbackArg;
 
756
{
 
757
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
758
        swidget                 UxThisWidget;
 
759
 
 
760
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
761
        UxSaveCtx = UxApplicWindowContext;
 
762
        UxApplicWindowContext = UxContext =
 
763
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
764
        {
 
765
        {
 
766
        MainObjectCallback();
 
767
        }
 
768
        
 
769
        }
 
770
        UxApplicWindowContext = UxSaveCtx;
 
771
}
 
772
 
 
773
static void     activateCB_pb_main_standard( UxWidget, UxClientData, UxCallbackArg )
 
774
        Widget          UxWidget;
 
775
        XtPointer       UxClientData, UxCallbackArg;
 
776
{
 
777
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
778
        swidget                 UxThisWidget;
 
779
 
 
780
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
781
        UxSaveCtx = UxApplicWindowContext;
 
782
        UxApplicWindowContext = UxContext =
 
783
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
784
        {
 
785
        MainStandardCallback();
 
786
        
 
787
        }
 
788
        UxApplicWindowContext = UxSaveCtx;
 
789
}
 
790
 
 
791
static void     activateCB_pb_main_extract( UxWidget, UxClientData, UxCallbackArg )
 
792
        Widget          UxWidget;
 
793
        XtPointer       UxClientData, UxCallbackArg;
 
794
{
 
795
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
796
        swidget                 UxThisWidget;
 
797
 
 
798
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
799
        UxSaveCtx = UxApplicWindowContext;
 
800
        UxApplicWindowContext = UxContext =
 
801
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
802
        {
 
803
        PopupIrspec("ExtractShell");
 
804
        }
 
805
        UxApplicWindowContext = UxSaveCtx;
 
806
}
 
807
 
 
808
static void     activateCB_pb_main_merge( UxWidget, UxClientData, UxCallbackArg )
 
809
        Widget          UxWidget;
 
810
        XtPointer       UxClientData, UxCallbackArg;
 
811
{
 
812
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
813
        swidget                 UxThisWidget;
 
814
 
 
815
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
816
        UxSaveCtx = UxApplicWindowContext;
 
817
        UxApplicWindowContext = UxContext =
 
818
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
819
        {
 
820
        {
 
821
        PopupIrspec("MergeShell");
 
822
        }
 
823
        }
 
824
        UxApplicWindowContext = UxSaveCtx;
 
825
}
 
826
 
 
827
static void     activateCB_pb_main_flux_table( UxWidget, UxClientData, UxCallbackArg )
 
828
        Widget          UxWidget;
 
829
        XtPointer       UxClientData, UxCallbackArg;
 
830
{
 
831
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
832
        swidget                 UxThisWidget;
 
833
 
 
834
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
835
        UxSaveCtx = UxApplicWindowContext;
 
836
        UxApplicWindowContext = UxContext =
 
837
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
838
        {
 
839
        PopupIrspec("FluxTableShell");
 
840
        }
 
841
        UxApplicWindowContext = UxSaveCtx;
 
842
}
 
843
 
 
844
static void     losingFocusCB_tf_main_dark( UxWidget, UxClientData, UxCallbackArg )
 
845
        Widget          UxWidget;
 
846
        XtPointer       UxClientData, UxCallbackArg;
 
847
{
 
848
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
849
        swidget                 UxThisWidget;
 
850
 
 
851
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
852
        UxSaveCtx = UxApplicWindowContext;
 
853
        UxApplicWindowContext = UxContext =
 
854
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
855
        {
 
856
#include <irspec_comm.h>
 
857
        
 
858
        char *text;
 
859
        extern char Dark[];
 
860
        
 
861
        text = XmTextGetString(UxWidget);
 
862
        
 
863
        if ( strcmp(text, Dark) ) {
 
864
            strcpy(Dark, text); 
 
865
            WriteKeyword(Dark, K_DARK);
 
866
        }
 
867
        XtFree(text);
 
868
        }
 
869
        UxApplicWindowContext = UxSaveCtx;
 
870
}
 
871
 
 
872
static void     losingFocusCB_tf_main_ststar( UxWidget, UxClientData, UxCallbackArg )
 
873
        Widget          UxWidget;
 
874
        XtPointer       UxClientData, UxCallbackArg;
 
875
{
 
876
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
877
        swidget                 UxThisWidget;
 
878
 
 
879
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
880
        UxSaveCtx = UxApplicWindowContext;
 
881
        UxApplicWindowContext = UxContext =
 
882
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
883
        {
 
884
        char *text;
 
885
        extern char InStstar[];
 
886
        
 
887
        text = XmTextGetString(UxWidget);
 
888
        strcpy(InStstar, text);
 
889
        
 
890
        XtFree(text);
 
891
        }
 
892
        UxApplicWindowContext = UxSaveCtx;
 
893
}
 
894
 
 
895
static void     losingFocusCB_tf_main_sky( UxWidget, UxClientData, UxCallbackArg )
 
896
        Widget          UxWidget;
 
897
        XtPointer       UxClientData, UxCallbackArg;
 
898
{
 
899
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
900
        swidget                 UxThisWidget;
 
901
 
 
902
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
903
        UxSaveCtx = UxApplicWindowContext;
 
904
        UxApplicWindowContext = UxContext =
 
905
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
906
        {
 
907
        char *text;
 
908
        extern char InSky[];
 
909
        
 
910
        text = XmTextGetString(UxWidget);
 
911
        strcpy(InSky, text);
 
912
        
 
913
        XtFree(text);
 
914
        }
 
915
        UxApplicWindowContext = UxSaveCtx;
 
916
}
 
917
 
 
918
static void     losingFocusCB_tf_main_object( UxWidget, UxClientData, UxCallbackArg )
 
919
        Widget          UxWidget;
 
920
        XtPointer       UxClientData, UxCallbackArg;
 
921
{
 
922
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
923
        swidget                 UxThisWidget;
 
924
 
 
925
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
926
        UxSaveCtx = UxApplicWindowContext;
 
927
        UxApplicWindowContext = UxContext =
 
928
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
929
        {
 
930
        char *text;
 
931
        extern char InObj[];
 
932
        
 
933
        text = XmTextGetString(UxWidget);
 
934
        strcpy(InObj, text);
 
935
        
 
936
        XtFree(text);
 
937
        }
 
938
        UxApplicWindowContext = UxSaveCtx;
 
939
}
 
940
 
 
941
static void     losingFocusCB_tf_main_stsky( UxWidget, UxClientData, UxCallbackArg )
 
942
        Widget          UxWidget;
 
943
        XtPointer       UxClientData, UxCallbackArg;
 
944
{
 
945
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
946
        swidget                 UxThisWidget;
 
947
 
 
948
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
949
        UxSaveCtx = UxApplicWindowContext;
 
950
        UxApplicWindowContext = UxContext =
 
951
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
952
        {
 
953
        char *text;
 
954
        extern char InStsky[];
 
955
        
 
956
        text = XmTextGetString(UxWidget);
 
957
        strcpy(InStsky, text);
 
958
        
 
959
        XtFree(text);
 
960
        }
 
961
        UxApplicWindowContext = UxSaveCtx;
 
962
}
 
963
 
 
964
static void     losingFocusCB_tf_main_flat( UxWidget, UxClientData, UxCallbackArg )
 
965
        Widget          UxWidget;
 
966
        XtPointer       UxClientData, UxCallbackArg;
 
967
{
 
968
        _UxCApplicWindow        *UxSaveCtx, *UxContext;
 
969
        swidget                 UxThisWidget;
 
970
 
 
971
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
972
        UxSaveCtx = UxApplicWindowContext;
 
973
        UxApplicWindowContext = UxContext =
 
974
                        (_UxCApplicWindow *) UxGetContext( UxThisWidget );
 
975
        {
 
976
#include <irspec_comm.h>
 
977
        
 
978
        char *text;
 
979
        extern char Flat[];
 
980
        
 
981
        text = XmTextGetString(UxWidget);
 
982
        
 
983
        if ( strcmp(text, Flat) ) {
 
984
            strcpy(Flat, text); 
 
985
            WriteKeyword(text, K_FLAT);
 
986
        }
 
987
        XtFree(text);
 
988
        }
 
989
        UxApplicWindowContext = UxSaveCtx;
 
990
}
 
991
 
 
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
*******************************************************************************/
 
999
 
 
1000
static void     _Uxinit_ApplicWindow()
 
1001
{
 
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 );
 
1010
 
 
1011
        UxPutBackground( MainWindow, WindowBackground );
 
1012
        UxPutHeight( MainWindow, 460 );
 
1013
        UxPutWidth( MainWindow, 440 );
 
1014
        UxPutY( MainWindow, 0 );
 
1015
        UxPutX( MainWindow, 10 );
 
1016
        UxPutUnitType( MainWindow, "pixels" );
 
1017
 
 
1018
        UxPutBackground( menu1, MenuBackground );
 
1019
        UxPutMenuAccelerator( menu1, "<KeyUp>F10" );
 
1020
        UxPutRowColumnType( menu1, "menu_bar" );
 
1021
 
 
1022
        UxPutForeground( menu1_p7, MenuForeground );
 
1023
        UxPutBackground( menu1_p7, MenuBackground );
 
1024
        UxPutRowColumnType( menu1_p7, "menu_pulldown" );
 
1025
 
 
1026
        UxPutFontList( menu1_p7_b1, BoldTextFont );
 
1027
        UxPutMnemonic( menu1_p7_b1, "O" );
 
1028
        UxPutLabelString( menu1_p7_b1, "Open" );
 
1029
 
 
1030
        UxPutFontList( menu1_p7_b2, BoldTextFont );
 
1031
        UxPutMnemonic( menu1_p7_b2, "S" );
 
1032
        UxPutLabelString( menu1_p7_b2, "Save" );
 
1033
 
 
1034
        UxPutFontList( menu1_p7_b3, BoldTextFont );
 
1035
        UxPutMnemonic( menu1_p7_b3, "A" );
 
1036
        UxPutLabelString( menu1_p7_b3, "Save As ..." );
 
1037
 
 
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" );
 
1043
 
 
1044
        UxPutForeground( menu1_p4, MenuForeground );
 
1045
        UxPutBackground( menu1_p4, MenuBackground );
 
1046
        UxPutRowColumnType( menu1_p4, "menu_pulldown" );
 
1047
 
 
1048
        UxPutFontList( menu1_p4_b1, BoldTextFont );
 
1049
        UxPutMnemonic( menu1_p4_b1, "D" );
 
1050
        UxPutLabelString( menu1_p4_b1, "Create Display" );
 
1051
 
 
1052
        UxPutFontList( menu1_p4_b2, BoldTextFont );
 
1053
        UxPutMnemonic( menu1_p4_b2, "G" );
 
1054
        UxPutLabelString( menu1_p4_b2, "Create Graphics" );
 
1055
 
 
1056
        UxPutMnemonic( menu1_p4_b10, "L" );
 
1057
        UxPutFontList( menu1_p4_b10, BoldTextFont );
 
1058
        UxPutLabelString( menu1_p4_b10, "Load image" );
 
1059
 
 
1060
        UxPutMnemonic( menu1_p4_b13, "o" );
 
1061
        UxPutFontList( menu1_p4_b13, BoldTextFont );
 
1062
        UxPutLabelString( menu1_p4_b13, "Clear overlay" );
 
1063
 
 
1064
        UxPutFontList( menu1_p4_b3, BoldTextFont );
 
1065
        UxPutMnemonic( menu1_p4_b3, "P" );
 
1066
        UxPutLabelString( menu1_p4_b3, "Print Display" );
 
1067
 
 
1068
        UxPutFontList( menu1_p4_b4, BoldTextFont );
 
1069
        UxPutMnemonic( menu1_p4_b4, "r" );
 
1070
        UxPutLabelString( menu1_p4_b4, "Print Graphics" );
 
1071
 
 
1072
        UxPutFontList( menu1_p4_b5, BoldTextFont );
 
1073
        UxPutMnemonic( menu1_p4_b5, "C" );
 
1074
        UxPutLabelString( menu1_p4_b5, "Graphics Cursor" );
 
1075
 
 
1076
        UxPutFontList( menu1_p4_b11, BoldTextFont );
 
1077
        UxPutMnemonic( menu1_p4_b11, "u" );
 
1078
        UxPutLabelString( menu1_p4_b11, "Display Cursor" );
 
1079
 
 
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" );
 
1085
 
 
1086
        UxPutForeground( menu1_p8, MenuForeground );
 
1087
        UxPutBackground( menu1_p8, MenuBackground );
 
1088
        UxPutRowColumnType( menu1_p8, "menu_pulldown" );
 
1089
 
 
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" );
 
1094
 
 
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" );
 
1100
 
 
1101
        UxPutForeground( menu1_p5, MenuForeground );
 
1102
        UxPutBackground( menu1_p5, MenuBackground );
 
1103
        UxPutRowColumnType( menu1_p5, "menu_pulldown" );
 
1104
 
 
1105
        UxPutFontList( menu_help_context, BoldTextFont );
 
1106
        UxPutMnemonic( menu_help_context, "C" );
 
1107
        UxPutLabelString( menu_help_context, "On Context ..." );
 
1108
 
 
1109
        UxPutFontList( menu_help_help, BoldTextFont );
 
1110
        UxPutMnemonic( menu_help_help, "H" );
 
1111
        UxPutLabelString( menu_help_help, "On Help ..." );
 
1112
 
 
1113
        UxPutFontList( menu_help_tutorial, BoldTextFont );
 
1114
        UxPutMnemonic( menu_help_tutorial, "T" );
 
1115
        UxPutLabelString( menu_help_tutorial, "Tutorial" );
 
1116
 
 
1117
        UxPutFontList( menu_help_version, BoldTextFont );
 
1118
        UxPutMnemonic( menu_help_version, "V" );
 
1119
        UxPutLabelString( menu_help_version, "On Version..." );
 
1120
 
 
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" );
 
1126
 
 
1127
        UxPutForeground( menu1_p6, MenuForeground );
 
1128
        UxPutBackground( menu1_p6, MenuBackground );
 
1129
        UxPutRowColumnType( menu1_p6, "menu_pulldown" );
 
1130
 
 
1131
        UxPutFontList( menu1_p6_b1, BoldTextFont );
 
1132
        UxPutMnemonic( menu1_p6_b1, "B" );
 
1133
        UxPutLabelString( menu1_p6_b1, "Bye" );
 
1134
 
 
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" );
 
1140
 
 
1141
        UxPutBackground( form1, WindowBackground );
 
1142
 
 
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" );
 
1149
 
 
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 );
 
1158
 
 
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 );
 
1167
 
 
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 );
 
1176
 
 
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 );
 
1185
 
 
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 );
 
1194
 
 
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 );
 
1203
 
 
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 );
 
1212
 
 
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 );
 
1224
 
 
1225
        UxPutBackground( separator1, LabelBackground );
 
1226
        UxPutHeight( separator1, 6 );
 
1227
        UxPutWidth( separator1, 450 );
 
1228
        UxPutY( separator1, 284 );
 
1229
        UxPutX( separator1, -2 );
 
1230
 
 
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 );
 
1240
 
 
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 );
 
1250
 
 
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 );
 
1260
 
 
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 );
 
1271
 
 
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 );
 
1281
 
 
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 );
 
1291
 
 
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 );
 
1300
 
 
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 );
 
1309
 
 
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 );
 
1319
 
 
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 );
 
1329
 
 
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 );
 
1340
 
 
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 );
 
1350
 
 
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 );
 
1360
 
 
1361
        UxPutBackground( separator12, LabelBackground );
 
1362
        UxPutHeight( separator12, 6 );
 
1363
        UxPutWidth( separator12, 450 );
 
1364
        UxPutY( separator12, 338 );
 
1365
        UxPutX( separator12, -2 );
 
1366
 
 
1367
}
 
1368
 
 
1369
/*******************************************************************************
 
1370
        The 'build_' function creates all the swidgets and X widgets,
 
1371
        and sets their properties to the values specified in the
 
1372
        Property Editor.
 
1373
*******************************************************************************/
 
1374
 
 
1375
static swidget  _Uxbuild_ApplicWindow()
 
1376
{
 
1377
        /* Create the swidgets */
 
1378
 
 
1379
        ApplicWindow = UxCreateApplicationShell( "ApplicWindow", NO_PARENT );
 
1380
        UxPutContext( ApplicWindow, UxApplicWindowContext );
 
1381
 
 
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 );
 
1441
 
 
1442
        _Uxinit_ApplicWindow();
 
1443
 
 
1444
        /* Create the X widgets */
 
1445
 
 
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 );
 
1455
 
 
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 );
 
1471
 
 
1472
        UxCreateWidget( menu1_p8 );
 
1473
        UxCreateWidget( tg_options_exit );
 
1474
        UxPutSubMenuId( menu1_top_b2, "menu1_p8" );
 
1475
        UxCreateWidget( menu1_top_b2 );
 
1476
 
 
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 );
 
1485
 
 
1486
        UxCreateWidget( menu1_p6 );
 
1487
        UxCreateWidget( menu1_p6_b1 );
 
1488
        UxPutSubMenuId( menu1_top_b6, "menu1_p6" );
 
1489
        UxCreateWidget( menu1_top_b6 );
 
1490
 
 
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 );
 
1516
 
 
1517
        UxPutMenuHelpWidget( menu1, "menu1_top_b6" );
 
1518
 
 
1519
        UxAddCallback( menu1_p7_b1, XmNactivateCallback,
 
1520
                        activateCB_menu1_p7_b1,
 
1521
                        (XtPointer) UxApplicWindowContext );
 
1522
 
 
1523
        UxAddCallback( menu1_p7_b2, XmNactivateCallback,
 
1524
                        activateCB_menu1_p7_b2,
 
1525
                        (XtPointer) UxApplicWindowContext );
 
1526
 
 
1527
        UxAddCallback( menu1_p7_b3, XmNactivateCallback,
 
1528
                        activateCB_menu1_p7_b3,
 
1529
                        (XtPointer) UxApplicWindowContext );
 
1530
 
 
1531
        UxAddCallback( menu1_p4_b1, XmNactivateCallback,
 
1532
                        activateCB_menu1_p4_b1,
 
1533
                        (XtPointer) UxApplicWindowContext );
 
1534
 
 
1535
        UxAddCallback( menu1_p4_b2, XmNactivateCallback,
 
1536
                        activateCB_menu1_p4_b2,
 
1537
                        (XtPointer) UxApplicWindowContext );
 
1538
 
 
1539
        UxAddCallback( menu1_p4_b10, XmNactivateCallback,
 
1540
                        activateCB_menu1_p4_b10,
 
1541
                        (XtPointer) UxApplicWindowContext );
 
1542
 
 
1543
        UxAddCallback( menu1_p4_b13, XmNactivateCallback,
 
1544
                        activateCB_menu1_p4_b13,
 
1545
                        (XtPointer) UxApplicWindowContext );
 
1546
 
 
1547
        UxAddCallback( menu1_p4_b3, XmNactivateCallback,
 
1548
                        activateCB_menu1_p4_b3,
 
1549
                        (XtPointer) UxApplicWindowContext );
 
1550
 
 
1551
        UxAddCallback( menu1_p4_b4, XmNactivateCallback,
 
1552
                        activateCB_menu1_p4_b4,
 
1553
                        (XtPointer) UxApplicWindowContext );
 
1554
 
 
1555
        UxAddCallback( menu1_p4_b5, XmNactivateCallback,
 
1556
                        activateCB_menu1_p4_b5,
 
1557
                        (XtPointer) UxApplicWindowContext );
 
1558
 
 
1559
        UxAddCallback( menu1_p4_b11, XmNactivateCallback,
 
1560
                        activateCB_menu1_p4_b11,
 
1561
                        (XtPointer) UxApplicWindowContext );
 
1562
 
 
1563
        UxAddCallback( tg_options_exit, XmNvalueChangedCallback,
 
1564
                        valueChangedCB_tg_options_exit,
 
1565
                        (XtPointer) UxApplicWindowContext );
 
1566
 
 
1567
        UxAddCallback( menu_help_context, XmNactivateCallback,
 
1568
                        activateCB_menu_help_context,
 
1569
                        (XtPointer) UxApplicWindowContext );
 
1570
 
 
1571
        UxAddCallback( menu_help_help, XmNactivateCallback,
 
1572
                        activateCB_menu_help_help,
 
1573
                        (XtPointer) UxApplicWindowContext );
 
1574
 
 
1575
        UxAddCallback( menu_help_tutorial, XmNactivateCallback,
 
1576
                        activateCB_menu_help_tutorial,
 
1577
                        (XtPointer) UxApplicWindowContext );
 
1578
 
 
1579
        UxAddCallback( menu_help_version, XmNactivateCallback,
 
1580
                        activateCB_menu_help_version,
 
1581
                        (XtPointer) UxApplicWindowContext );
 
1582
 
 
1583
        UxAddCallback( menu1_p6_b1, XmNactivateCallback,
 
1584
                        activateCB_menu1_p6_b1,
 
1585
                        (XtPointer) UxApplicWindowContext );
 
1586
 
 
1587
        UxAddCallback( pb_main_badpix, XmNactivateCallback,
 
1588
                        activateCB_pb_main_badpix,
 
1589
                        (XtPointer) UxApplicWindowContext );
 
1590
 
 
1591
        UxAddCallback( pb_main_flat, XmNactivateCallback,
 
1592
                        activateCB_pb_main_flat,
 
1593
                        (XtPointer) UxApplicWindowContext );
 
1594
 
 
1595
        UxAddCallback( pb_main_object, XmNactivateCallback,
 
1596
                        activateCB_pb_main_object,
 
1597
                        (XtPointer) UxApplicWindowContext );
 
1598
 
 
1599
        UxAddCallback( pb_main_standard, XmNactivateCallback,
 
1600
                        activateCB_pb_main_standard,
 
1601
                        (XtPointer) UxApplicWindowContext );
 
1602
 
 
1603
        UxAddCallback( pb_main_extract, XmNactivateCallback,
 
1604
                        activateCB_pb_main_extract,
 
1605
                        (XtPointer) UxApplicWindowContext );
 
1606
 
 
1607
        UxAddCallback( pb_main_merge, XmNactivateCallback,
 
1608
                        activateCB_pb_main_merge,
 
1609
                        (XtPointer) UxApplicWindowContext );
 
1610
 
 
1611
        UxAddCallback( pb_main_flux_table, XmNactivateCallback,
 
1612
                        activateCB_pb_main_flux_table,
 
1613
                        (XtPointer) UxApplicWindowContext );
 
1614
 
 
1615
        UxAddCallback( tf_main_dark, XmNlosingFocusCallback,
 
1616
                        losingFocusCB_tf_main_dark,
 
1617
                        (XtPointer) UxApplicWindowContext );
 
1618
 
 
1619
        UxAddCallback( tf_main_ststar, XmNlosingFocusCallback,
 
1620
                        losingFocusCB_tf_main_ststar,
 
1621
                        (XtPointer) UxApplicWindowContext );
 
1622
 
 
1623
        UxAddCallback( tf_main_sky, XmNlosingFocusCallback,
 
1624
                        losingFocusCB_tf_main_sky,
 
1625
                        (XtPointer) UxApplicWindowContext );
 
1626
 
 
1627
        UxAddCallback( tf_main_object, XmNlosingFocusCallback,
 
1628
                        losingFocusCB_tf_main_object,
 
1629
                        (XtPointer) UxApplicWindowContext );
 
1630
 
 
1631
        UxAddCallback( tf_main_stsky, XmNlosingFocusCallback,
 
1632
                        losingFocusCB_tf_main_stsky,
 
1633
                        (XtPointer) UxApplicWindowContext );
 
1634
 
 
1635
        UxAddCallback( tf_main_flat, XmNlosingFocusCallback,
 
1636
                        losingFocusCB_tf_main_flat,
 
1637
                        (XtPointer) UxApplicWindowContext );
 
1638
 
 
1639
 
 
1640
        /* Finally, call UxRealizeInterface to create the X windows
 
1641
           for the widgets created above. */
 
1642
 
 
1643
        UxRealizeInterface( ApplicWindow );
 
1644
 
 
1645
        UxMainWindowSetAreas( MainWindow, menu1, NULL_SWIDGET,
 
1646
                        NULL_SWIDGET, NULL_SWIDGET, form1 );
 
1647
        return ( ApplicWindow );
 
1648
}
 
1649
 
 
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
*******************************************************************************/
 
1656
 
 
1657
static swidget  _Ux_create_ApplicWindow()
 
1658
{
 
1659
        swidget                 rtrn;
 
1660
        _UxCApplicWindow        *UxContext;
 
1661
 
 
1662
        UxApplicWindowContext = UxContext =
 
1663
                (_UxCApplicWindow *) UxMalloc( sizeof(_UxCApplicWindow) );
 
1664
 
 
1665
        {
 
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();
 
1675
 
 
1676
                create_StandardShell();
 
1677
                create_BadpixShell();
 
1678
                create_ObjectShell();
 
1679
                create_FluxTableShell();
 
1680
                create_MergeShell();
 
1681
                create_ExtractShell();
 
1682
                create_HelpShell();
 
1683
                create_file_dialog();
 
1684
                
 
1685
                return(rtrn);
 
1686
        }
 
1687
}
 
1688
 
 
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
*******************************************************************************/
 
1695
 
 
1696
swidget create_ApplicWindow()
 
1697
{
 
1698
        swidget                 _Uxrtrn;
 
1699
        static int              _Uxinit = 0;
 
1700
 
 
1701
        if ( ! _Uxinit )
 
1702
        {
 
1703
                static XtActionsRec     _Uxactions[] = {
 
1704
                                { "ExtendedHelp", action_ExtendedHelp },
 
1705
                                { "WriteHelp", action_WriteHelp },
 
1706
                                { "ClearHelp", action_ClearHelp },
 
1707
                                { "FileSelectACT1", action_FileSelectACT1 },
 
1708
                                { "FileSelectACT", action_FileSelectACT }
 
1709
                                };
 
1710
 
 
1711
                XtAppAddActions( UxAppContext,
 
1712
                                _Uxactions,
 
1713
                                XtNumber(_Uxactions) );
 
1714
 
 
1715
                _Uxinit = 1;
 
1716
        }
 
1717
 
 
1718
        _Uxrtrn = _Ux_create_ApplicWindow();
 
1719
 
 
1720
        return ( _Uxrtrn );
 
1721
}
 
1722
 
 
1723
/*******************************************************************************
 
1724
        END OF FILE
 
1725
*******************************************************************************/
 
1726