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

« back to all changes in this revision

Viewing changes to gui/XFilter/src/ModelShell.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 Massachusetts Ave, Cambridge, 
 
17
  MA 02139, USA.
 
18
 
 
19
  Correspondence concerning ESO-MIDAS should be addressed as follows:
 
20
        Internet e-mail: midas@eso.org
 
21
        Postal address: European Southern Observatory
 
22
                        Data Management Division 
 
23
                        Karl-Schwarzschild-Strasse 2
 
24
                        D 85748 Garching bei Muenchen 
 
25
                        GERMANY
 
26
===========================================================================*/
 
27
 
 
28
 
 
29
/*******************************************************************************
 
30
        ModelShell.c
 
31
 
 
32
.VERSION
 
33
090826          last modif
 
34
 
 
35
*******************************************************************************/
 
36
 
 
37
#include <stdlib.h>
 
38
#include <stdio.h>
 
39
#include "UxLib.h"
 
40
#include "UxTogBG.h"
 
41
#include "UxCascB.h"
 
42
#include "UxSep.h"
 
43
#include "UxTogB.h"
 
44
#include "UxRowCol.h"
 
45
#include "UxPushB.h"
 
46
#include "UxText.h"
 
47
#include "UxLabel.h"
 
48
#include "UxForm.h"
 
49
#include "UxApplSh.h"
 
50
 
 
51
/*******************************************************************************
 
52
        Includes, Defines, and Global variables from the Declarations Editor:
 
53
*******************************************************************************/
 
54
 
 
55
#include <ExternResources.h>
 
56
#include <model.h>
 
57
#include <global.h>
 
58
 
 
59
extern  struct s_gui G;
 
60
extern  struct s_trans T;
 
61
extern  float   XWmin,XWmax;
 
62
 
 
63
/*******************************************************************************
 
64
        The definition of the context structure:
 
65
        If you create multiple instances of your interface, the context
 
66
        structure ensures that your callbacks use the variables for the
 
67
        correct instance.
 
68
 
 
69
        For each swidget in the interface, each argument to the Interface
 
70
        function, and each variable in the Instance Specific section of the
 
71
        Declarations Editor, there is an entry in the context structure.
 
72
        and a #define.  The #define makes the variable name refer to the
 
73
        corresponding entry in the context structure.
 
74
*******************************************************************************/
 
75
 
 
76
typedef struct
 
77
{
 
78
        swidget Uxform4;
 
79
        swidget Uxlbl_spec;
 
80
        swidget Uxtf_spectrum;
 
81
        swidget Uxlbl_atm;
 
82
        swidget Uxlbl_airmass;
 
83
        swidget Uxform6;
 
84
        swidget UxpB_MReset;
 
85
        swidget UxpB_Mtrans;
 
86
        swidget UxpB_Mres;
 
87
        swidget UxpB_MFCreate;
 
88
        swidget UxpB_MPrint;
 
89
        swidget Uxatm_mod;
 
90
        swidget Uxtg_atmyes;
 
91
        swidget Uxtg_atmno;
 
92
        swidget UxhelptextModel;
 
93
        swidget Uxseparator8;
 
94
        swidget Uxmenu_spec;
 
95
        swidget Uxmn_standard;
 
96
        swidget Uxmn_hststd;
 
97
        swidget Uxmn_ctiostd;
 
98
        swidget Uxmn_blackbody;
 
99
        swidget Uxmn_spec;
 
100
        swidget Uxtf_airmass;
 
101
        swidget Uxlbl_mirror;
 
102
        swidget Uxlbl_grism;
 
103
        swidget Uxlbl_filter;
 
104
        swidget Uxme_10grism;
 
105
        swidget Uxmn_nogrism;
 
106
        swidget Uxmn_grism0;
 
107
        swidget Uxmn_grism1;
 
108
        swidget Uxmn_grism2;
 
109
        swidget Uxmn_grism3;
 
110
        swidget Uxmn_grism4;
 
111
        swidget Uxmn_grism5;
 
112
        swidget Uxmn_grism6;
 
113
        swidget Uxmn_grism7;
 
114
        swidget Uxmn_grism8;
 
115
        swidget Uxmn_grism9;
 
116
        swidget Uxmn_wgrism;
 
117
        swidget Uxtf_filter;
 
118
        swidget Uxlbl_ccd;
 
119
        swidget Uxlist_filt;
 
120
        swidget Uxtg_basic;
 
121
        swidget Uxtg_all;
 
122
        swidget Uxtg_ccd;
 
123
        swidget Uxtg_ccdyes;
 
124
        swidget Uxtg_ccdno;
 
125
        swidget Uxtf_time;
 
126
        swidget Uxlbl_eadu;
 
127
        swidget Uxtf_eadu;
 
128
        swidget UxmeModel;
 
129
        swidget Uxme_m_file;
 
130
        swidget Uxme_m_load;
 
131
        swidget Uxme_m_save;
 
132
        swidget Uxme_m_saveas;
 
133
        swidget Uxme_m_sep;
 
134
        swidget Uxme_m_loadcurve;
 
135
        swidget Uxme_m_savecurve;
 
136
        swidget Uxme_m_saveascurve;
 
137
        swidget Uxmt_m_file;
 
138
        swidget Uxme_m_frame;
 
139
        swidget Uxme_m_trimx;
 
140
        swidget Uxme_m_trimy;
 
141
        swidget Uxme_m_unzoom;
 
142
        swidget Uxme_m_redraw;
 
143
        swidget Uxme_m_print;
 
144
        swidget Uxmt_m_frame;
 
145
        swidget Uxme_m_option;
 
146
        swidget Uxme_m_plotoption;
 
147
        swidget Uxme_m_plot;
 
148
        swidget Uxme_m_oplot;
 
149
        swidget Uxme_m_pmode;
 
150
        swidget Uxme_m_traceoption;
 
151
        swidget Uxme_m_line;
 
152
        swidget Uxme_m_histo;
 
153
        swidget Uxme_m_tmode;
 
154
        swidget Uxmet_m_options;
 
155
        swidget Uxme_m_help;
 
156
        swidget Uxme_m_hm;
 
157
        swidget Uxmt_m_help;
 
158
        swidget Uxme_m_quit;
 
159
        swidget Uxme_m_bye;
 
160
        swidget Uxmt_m_quit;
 
161
        swidget Uxseparator2;
 
162
        swidget Uxseparator3;
 
163
        swidget Uxseparator7;
 
164
        swidget Uxlbl_title;
 
165
        swidget Uxtf_SN;
 
166
        swidget Uxtg_time_sn;
 
167
        swidget Uxtg_etime;
 
168
        swidget Uxtg_sn;
 
169
        swidget Uxlbl_sky;
 
170
        swidget Uxtg_brightness;
 
171
        swidget Uxtg_bright;
 
172
        swidget Uxtg_dark;
 
173
        swidget Uxtg_lines;
 
174
        swidget Uxtg_emli;
 
175
        swidget Uxtg_noemli;
 
176
        swidget Uxseparator18;
 
177
        swidget Uxtg_sky;
 
178
        swidget Uxtg_skyon;
 
179
        swidget Uxtg_skyoff;
 
180
        swidget Uxtg_extsky;
 
181
        swidget Uxlbl_mirror1;
 
182
        swidget Uxtg_opt;
 
183
        swidget Uxtg_optyes;
 
184
        swidget Uxtg_optno;
 
185
        swidget Uxtg_mir;
 
186
        swidget Uxtg_mirnew;
 
187
        swidget Uxtg_mirold;
 
188
        swidget Uxtg_mirno;
 
189
        swidget Uxtf_disp_pix;
 
190
        swidget Uxlbl_disp;
 
191
        swidget Uxlabel7;
 
192
        swidget Uxtf_TWmax;
 
193
        swidget Uxtf_TWmin;
 
194
        swidget Uxseparator10;
 
195
        swidget Uxseparator4;
 
196
} _UxCModelShell;
 
197
 
 
198
#define form4                   UxModelShellContext->Uxform4
 
199
#define lbl_spec                UxModelShellContext->Uxlbl_spec
 
200
#define tf_spectrum             UxModelShellContext->Uxtf_spectrum
 
201
#define lbl_atm                 UxModelShellContext->Uxlbl_atm
 
202
#define lbl_airmass             UxModelShellContext->Uxlbl_airmass
 
203
#define form6                   UxModelShellContext->Uxform6
 
204
#define pB_MReset               UxModelShellContext->UxpB_MReset
 
205
#define pB_Mtrans               UxModelShellContext->UxpB_Mtrans
 
206
#define pB_Mres                 UxModelShellContext->UxpB_Mres
 
207
#define pB_MFCreate             UxModelShellContext->UxpB_MFCreate
 
208
#define pB_MPrint               UxModelShellContext->UxpB_MPrint
 
209
#define atm_mod                 UxModelShellContext->Uxatm_mod
 
210
#define tg_atmyes               UxModelShellContext->Uxtg_atmyes
 
211
#define tg_atmno                UxModelShellContext->Uxtg_atmno
 
212
#define helptextModel           UxModelShellContext->UxhelptextModel
 
213
#define separator8              UxModelShellContext->Uxseparator8
 
214
#define menu_spec               UxModelShellContext->Uxmenu_spec
 
215
#define mn_standard             UxModelShellContext->Uxmn_standard
 
216
#define mn_hststd               UxModelShellContext->Uxmn_hststd
 
217
#define mn_ctiostd              UxModelShellContext->Uxmn_ctiostd
 
218
#define mn_blackbody            UxModelShellContext->Uxmn_blackbody
 
219
#define mn_spec                 UxModelShellContext->Uxmn_spec
 
220
#define tf_airmass              UxModelShellContext->Uxtf_airmass
 
221
#define lbl_mirror              UxModelShellContext->Uxlbl_mirror
 
222
#define lbl_grism               UxModelShellContext->Uxlbl_grism
 
223
#define lbl_filter              UxModelShellContext->Uxlbl_filter
 
224
#define me_10grism              UxModelShellContext->Uxme_10grism
 
225
#define mn_nogrism              UxModelShellContext->Uxmn_nogrism
 
226
#define mn_grism0               UxModelShellContext->Uxmn_grism0
 
227
#define mn_grism1               UxModelShellContext->Uxmn_grism1
 
228
#define mn_grism2               UxModelShellContext->Uxmn_grism2
 
229
#define mn_grism3               UxModelShellContext->Uxmn_grism3
 
230
#define mn_grism4               UxModelShellContext->Uxmn_grism4
 
231
#define mn_grism5               UxModelShellContext->Uxmn_grism5
 
232
#define mn_grism6               UxModelShellContext->Uxmn_grism6
 
233
#define mn_grism7               UxModelShellContext->Uxmn_grism7
 
234
#define mn_grism8               UxModelShellContext->Uxmn_grism8
 
235
#define mn_grism9               UxModelShellContext->Uxmn_grism9
 
236
#define mn_wgrism               UxModelShellContext->Uxmn_wgrism
 
237
#define tf_filter               UxModelShellContext->Uxtf_filter
 
238
#define lbl_ccd                 UxModelShellContext->Uxlbl_ccd
 
239
#define list_filt               UxModelShellContext->Uxlist_filt
 
240
#define tg_basic                UxModelShellContext->Uxtg_basic
 
241
#define tg_all                  UxModelShellContext->Uxtg_all
 
242
#define tg_ccd                  UxModelShellContext->Uxtg_ccd
 
243
#define tg_ccdyes               UxModelShellContext->Uxtg_ccdyes
 
244
#define tg_ccdno                UxModelShellContext->Uxtg_ccdno
 
245
#define tf_time                 UxModelShellContext->Uxtf_time
 
246
#define lbl_eadu                UxModelShellContext->Uxlbl_eadu
 
247
#define tf_eadu                 UxModelShellContext->Uxtf_eadu
 
248
#define meModel                 UxModelShellContext->UxmeModel
 
249
#define me_m_file               UxModelShellContext->Uxme_m_file
 
250
#define me_m_load               UxModelShellContext->Uxme_m_load
 
251
#define me_m_save               UxModelShellContext->Uxme_m_save
 
252
#define me_m_saveas             UxModelShellContext->Uxme_m_saveas
 
253
#define me_m_sep                UxModelShellContext->Uxme_m_sep
 
254
#define me_m_loadcurve          UxModelShellContext->Uxme_m_loadcurve
 
255
#define me_m_savecurve          UxModelShellContext->Uxme_m_savecurve
 
256
#define me_m_saveascurve        UxModelShellContext->Uxme_m_saveascurve
 
257
#define mt_m_file               UxModelShellContext->Uxmt_m_file
 
258
#define me_m_frame              UxModelShellContext->Uxme_m_frame
 
259
#define me_m_trimx              UxModelShellContext->Uxme_m_trimx
 
260
#define me_m_trimy              UxModelShellContext->Uxme_m_trimy
 
261
#define me_m_unzoom             UxModelShellContext->Uxme_m_unzoom
 
262
#define me_m_redraw             UxModelShellContext->Uxme_m_redraw
 
263
#define me_m_print              UxModelShellContext->Uxme_m_print
 
264
#define mt_m_frame              UxModelShellContext->Uxmt_m_frame
 
265
#define me_m_option             UxModelShellContext->Uxme_m_option
 
266
#define me_m_plotoption         UxModelShellContext->Uxme_m_plotoption
 
267
#define me_m_plot               UxModelShellContext->Uxme_m_plot
 
268
#define me_m_oplot              UxModelShellContext->Uxme_m_oplot
 
269
#define me_m_pmode              UxModelShellContext->Uxme_m_pmode
 
270
#define me_m_traceoption        UxModelShellContext->Uxme_m_traceoption
 
271
#define me_m_line               UxModelShellContext->Uxme_m_line
 
272
#define me_m_histo              UxModelShellContext->Uxme_m_histo
 
273
#define me_m_tmode              UxModelShellContext->Uxme_m_tmode
 
274
#define met_m_options           UxModelShellContext->Uxmet_m_options
 
275
#define me_m_help               UxModelShellContext->Uxme_m_help
 
276
#define me_m_hm                 UxModelShellContext->Uxme_m_hm
 
277
#define mt_m_help               UxModelShellContext->Uxmt_m_help
 
278
#define me_m_quit               UxModelShellContext->Uxme_m_quit
 
279
#define me_m_bye                UxModelShellContext->Uxme_m_bye
 
280
#define mt_m_quit               UxModelShellContext->Uxmt_m_quit
 
281
#define separator2              UxModelShellContext->Uxseparator2
 
282
#define separator3              UxModelShellContext->Uxseparator3
 
283
#define separator7              UxModelShellContext->Uxseparator7
 
284
#define lbl_title               UxModelShellContext->Uxlbl_title
 
285
#define tf_SN                   UxModelShellContext->Uxtf_SN
 
286
#define tg_time_sn              UxModelShellContext->Uxtg_time_sn
 
287
#define tg_etime                UxModelShellContext->Uxtg_etime
 
288
#define tg_sn                   UxModelShellContext->Uxtg_sn
 
289
#define lbl_sky                 UxModelShellContext->Uxlbl_sky
 
290
#define tg_brightness           UxModelShellContext->Uxtg_brightness
 
291
#define tg_bright               UxModelShellContext->Uxtg_bright
 
292
#define tg_dark                 UxModelShellContext->Uxtg_dark
 
293
#define tg_lines                UxModelShellContext->Uxtg_lines
 
294
#define tg_emli                 UxModelShellContext->Uxtg_emli
 
295
#define tg_noemli               UxModelShellContext->Uxtg_noemli
 
296
#define separator18             UxModelShellContext->Uxseparator18
 
297
#define tg_sky                  UxModelShellContext->Uxtg_sky
 
298
#define tg_skyon                UxModelShellContext->Uxtg_skyon
 
299
#define tg_skyoff               UxModelShellContext->Uxtg_skyoff
 
300
#define tg_extsky               UxModelShellContext->Uxtg_extsky
 
301
#define lbl_mirror1             UxModelShellContext->Uxlbl_mirror1
 
302
#define tg_opt                  UxModelShellContext->Uxtg_opt
 
303
#define tg_optyes               UxModelShellContext->Uxtg_optyes
 
304
#define tg_optno                UxModelShellContext->Uxtg_optno
 
305
#define tg_mir                  UxModelShellContext->Uxtg_mir
 
306
#define tg_mirnew               UxModelShellContext->Uxtg_mirnew
 
307
#define tg_mirold               UxModelShellContext->Uxtg_mirold
 
308
#define tg_mirno                UxModelShellContext->Uxtg_mirno
 
309
#define tf_disp_pix             UxModelShellContext->Uxtf_disp_pix
 
310
#define lbl_disp                UxModelShellContext->Uxlbl_disp
 
311
#define label7                  UxModelShellContext->Uxlabel7
 
312
#define tf_TWmax                UxModelShellContext->Uxtf_TWmax
 
313
#define tf_TWmin                UxModelShellContext->Uxtf_TWmin
 
314
#define separator10             UxModelShellContext->Uxseparator10
 
315
#define separator4              UxModelShellContext->Uxseparator4
 
316
 
 
317
static _UxCModelShell   *UxModelShellContext;
 
318
 
 
319
extern void SetFileList(), DisplayShortTMHelp(), DisplayExtendedHelp();
 
320
extern void plot_spec(), plot_atmos();
 
321
extern void plot_filters(), plot_ccd();
 
322
extern void plot_sky(), plot_optics(), plot_mirror();
 
323
extern void read_ccdchar(), search_cwav(), end_graphic();
 
324
extern void end_viewp(), search_cwbw(), def_inst(), set_model();
 
325
extern void set_bbody(), set_grism(), save_mod(), save_curve();
 
326
extern void set_creafilter(), do_convo(), do_trans(), init_model();
 
327
extern void search_f_inst(), between();
 
328
extern void Trim(), Unzoom();
 
329
 
 
330
extern char *news_filters();
 
331
 
 
332
extern int AppendDialogText();
 
333
 
 
334
 
 
335
 
 
336
swidget ModelShell;
 
337
 
 
338
/*******************************************************************************
 
339
        The following are translation tables.
 
340
*******************************************************************************/
 
341
 
 
342
static char     *chooseTF = "#override\n\
 
343
<Btn3Down>:ChooseListUpF()\n\
 
344
<Key>Delete:delete-previous-character()\n\
 
345
<Key>BackSpace:delete-previous-character()\n\
 
346
<Key>osfDelete:delete-previous-character()\n\
 
347
<Key>osfBackSpace:delete-previous-character()\n";
 
348
 
 
349
static char     *chooseTS = "#override\n\
 
350
<Btn3Down>:ChooseListUpS()\n\
 
351
<Key>Delete:delete-previous-character()\n\
 
352
<Key>osfDelete:delete-previous-character()\n\
 
353
<Key>BackSpace:delete-previous-character()\n\
 
354
<Key>osfBackSpace:delete-previous-character()\n";
 
355
 
 
356
static char     *text_tab = "#override\n\
 
357
<Key>Delete:delete-previous-character()\n\
 
358
<Key>BackSpace:delete-previous-character()\n\
 
359
<Key>osfBackSpace:delete-previous-character()\n\
 
360
<Key>osfDelete:delete-previous-character()\n";
 
361
 
 
362
static char     *helpTM = "#override\n\
 
363
<Btn3Down>:HelpHelp()\n\
 
364
<EnterWindow>:HelpShortTM()\n\
 
365
<LeaveWindow>:ClearShortTM()\n";
 
366
 
 
367
/*******************************************************************************
 
368
        Forward declarations of functions that are defined later in this file.
 
369
*******************************************************************************/
 
370
 
 
371
swidget create_ModelShell();
 
372
 
 
373
/*******************************************************************************
 
374
        The following are Action functions.
 
375
*******************************************************************************/
 
376
 
 
377
static void     action_ClearShortTM( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
378
        Widget          UxWidget;
 
379
        XEvent          *UxEvent;
 
380
        String          *UxParams;
 
381
        Cardinal        *p_UxNumParams;
 
382
{
 
383
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
384
        swidget                 UxThisWidget;
 
385
 
 
386
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
387
        UxSaveCtx = UxModelShellContext;
 
388
        UxModelShellContext = UxContext =
 
389
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
390
        {
 
391
        UxPutText(UxFindSwidget("helptextModel"),"");
 
392
         UxPutText(UxFindSwidget("HelpFShell"),"");
 
393
        }
 
394
        UxModelShellContext = UxSaveCtx;
 
395
}
 
396
 
 
397
static void     action_HelpShortTM( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
398
        Widget          UxWidget;
 
399
        XEvent          *UxEvent;
 
400
        String          *UxParams;
 
401
        Cardinal        *p_UxNumParams;
 
402
{
 
403
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
404
        swidget                 UxThisWidget;
 
405
 
 
406
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
407
        UxSaveCtx = UxModelShellContext;
 
408
        UxModelShellContext = UxContext =
 
409
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
410
        DisplayShortTMHelp(UxWidget);
 
411
        UxModelShellContext = UxSaveCtx;
 
412
}
 
413
 
 
414
static void     action_HelpHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
415
        Widget          UxWidget;
 
416
        XEvent          *UxEvent;
 
417
        String          *UxParams;
 
418
        Cardinal        *p_UxNumParams;
 
419
{
 
420
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
421
        swidget                 UxThisWidget;
 
422
 
 
423
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
424
        UxSaveCtx = UxModelShellContext;
 
425
        UxModelShellContext = UxContext =
 
426
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
427
        DisplayExtendedHelp(UxWidget);
 
428
        UxModelShellContext = UxSaveCtx;
 
429
}
 
430
 
 
431
static void     action_ChooseListUpS( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
432
        Widget          UxWidget;
 
433
        XEvent          *UxEvent;
 
434
        String          *UxParams;
 
435
        Cardinal        *p_UxNumParams;
 
436
{
 
437
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
438
        swidget                 UxThisWidget;
 
439
 
 
440
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
441
        UxSaveCtx = UxModelShellContext;
 
442
        UxModelShellContext = UxContext =
 
443
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
444
        {
 
445
        extern swidget scrolledchoose;
 
446
        char *transdir,filepath[50];
 
447
        char    *hist;
 
448
        
 
449
        hist=(char *) UxGetMenuHistory(UxFindSwidget("mn_spec"));
 
450
        if (!strcmp(hist,"mn_hststd"))
 
451
                strcpy(G.sel_type,"hststd");
 
452
        else
 
453
                strcpy(G.sel_type,"spectrum");
 
454
        
 
455
        if (!strcmp(G.sel_type,"hststd"))
 
456
        {
 
457
        transdir=(char *) getenv("MID_FILTERS");
 
458
        sprintf(filepath,"%s/hststd/*.tbl",transdir);
 
459
        SetFileList( UxGetWidget(scrolledchoose),1, filepath );
 
460
        }
 
461
        else
 
462
        {
 
463
        transdir=(char *) getenv("MID_FILTERS");
 
464
        sprintf(filepath,"%s/esostd/*.tbl",transdir);
 
465
        SetFileList( UxGetWidget(scrolledchoose),1, filepath );
 
466
        }
 
467
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
468
        }
 
469
        UxModelShellContext = UxSaveCtx;
 
470
}
 
471
 
 
472
static void     action_ChooseListUpF( UxWidget, UxEvent, UxParams, p_UxNumParams )
 
473
        Widget          UxWidget;
 
474
        XEvent          *UxEvent;
 
475
        String          *UxParams;
 
476
        Cardinal        *p_UxNumParams;
 
477
{
 
478
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
479
        swidget                 UxThisWidget;
 
480
 
 
481
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
482
        UxSaveCtx = UxModelShellContext;
 
483
        UxModelShellContext = UxContext =
 
484
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
485
        {
 
486
        
 
487
        strcpy(G.sel_type,"filter");
 
488
        search_f_inst(G.sel_inst,G.basic_set);
 
489
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
490
        
 
491
        }
 
492
        UxModelShellContext = UxSaveCtx;
 
493
}
 
494
 
 
495
/*******************************************************************************
 
496
        The following are callback functions.
 
497
*******************************************************************************/
 
498
 
 
499
static void     motionVerifyCB_tf_spectrum( UxWidget, UxClientData, UxCallbackArg )
 
500
        Widget          UxWidget;
 
501
        XtPointer       UxClientData, UxCallbackArg;
 
502
{
 
503
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
504
        swidget                 UxThisWidget;
 
505
 
 
506
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
507
        UxSaveCtx = UxModelShellContext;
 
508
        UxModelShellContext = UxContext =
 
509
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
510
        {
 
511
        MOD_spectrum = 1;
 
512
        }
 
513
        UxModelShellContext = UxSaveCtx;
 
514
}
 
515
 
 
516
static void     focusCB_tf_spectrum( UxWidget, UxClientData, UxCallbackArg )
 
517
        Widget          UxWidget;
 
518
        XtPointer       UxClientData, UxCallbackArg;
 
519
{
 
520
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
521
        swidget                 UxThisWidget;
 
522
 
 
523
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
524
        UxSaveCtx = UxModelShellContext;
 
525
        UxModelShellContext = UxContext =
 
526
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
527
        {
 
528
        
 
529
        UxPutText(UxFindSwidget("helptextModel"),"spectrum");
 
530
        
 
531
        
 
532
        if (T.ispectra==0)
 
533
                UxPutText(UxFindSwidget("tf_spectrum"),"");
 
534
        }
 
535
        UxModelShellContext = UxSaveCtx;
 
536
}
 
537
 
 
538
static void     losingFocusCB_tf_spectrum( UxWidget, UxClientData, UxCallbackArg )
 
539
        Widget          UxWidget;
 
540
        XtPointer       UxClientData, UxCallbackArg;
 
541
{
 
542
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
543
        swidget                 UxThisWidget;
 
544
 
 
545
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
546
        UxSaveCtx = UxModelShellContext;
 
547
        UxModelShellContext = UxContext =
 
548
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
549
        {
 
550
        int nid;
 
551
        char spectrum[30];
 
552
        char *filepath;
 
553
        
 
554
        if (MOD_spectrum==1)
 
555
        {
 
556
        nid=sscanf(UxGetText(tf_spectrum),"%s",spectrum);
 
557
        
 
558
        if (nid<1)
 
559
                T.ispectra=0;
 
560
        
 
561
        else
 
562
                {
 
563
                T.ispectra=1;
 
564
                if (strcmp(spectrum,(char *)T.spectrafile))
 
565
                        {
 
566
                        strcpy((char *)T.spectrafile,spectrum);
 
567
                        if(!strcmp(G.sel_type,"hststd"))
 
568
                                {
 
569
                                filepath=(char *)getenv("MID_FILTERS");
 
570
                                sprintf((char *)T.spectrapath,"%s/hststd",filepath);
 
571
                                }
 
572
                        else
 
573
                                {
 
574
                                filepath=(char *)getenv("MID_FILTERS");
 
575
                                sprintf((char *)T.spectrapath,"%s/esostd",filepath);
 
576
                                }
 
577
        
 
578
                        plot_spec(T.spectrapath,T.spectrafile);
 
579
                        }
 
580
                };
 
581
        }
 
582
        
 
583
        MOD_spectrum=0;
 
584
        
 
585
        if (T.ispectra==0)
 
586
                UxPutText(tf_spectrum,"no spectrum");
 
587
        else
 
588
                UxPutText(tf_spectrum,T.spectrafile);
 
589
        
 
590
        
 
591
        UxPutText(UxFindSwidget("helptextModel"),"");
 
592
        }
 
593
        UxModelShellContext = UxSaveCtx;
 
594
}
 
595
 
 
596
static void     activateCB_pB_MReset( UxWidget, UxClientData, UxCallbackArg )
 
597
        Widget          UxWidget;
 
598
        XtPointer       UxClientData, UxCallbackArg;
 
599
{
 
600
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
601
        swidget                 UxThisWidget;
 
602
 
 
603
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
604
        UxSaveCtx = UxModelShellContext;
 
605
        UxModelShellContext = UxContext =
 
606
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
607
        {
 
608
        init_model();
 
609
        def_inst(G.sel_inst);
 
610
        set_model();
 
611
        }
 
612
        UxModelShellContext = UxSaveCtx;
 
613
}
 
614
 
 
615
static void     activateCB_pB_Mtrans( UxWidget, UxClientData, UxCallbackArg )
 
616
        Widget          UxWidget;
 
617
        XtPointer       UxClientData, UxCallbackArg;
 
618
{
 
619
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
620
        swidget                 UxThisWidget;
 
621
 
 
622
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
623
        UxSaveCtx = UxModelShellContext;
 
624
        UxModelShellContext = UxContext =
 
625
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
626
        {
 
627
        do_trans();
 
628
        
 
629
        }
 
630
        UxModelShellContext = UxSaveCtx;
 
631
}
 
632
 
 
633
static void     activateCB_pB_Mres( UxWidget, UxClientData, UxCallbackArg )
 
634
        Widget          UxWidget;
 
635
        XtPointer       UxClientData, UxCallbackArg;
 
636
{
 
637
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
638
        swidget                 UxThisWidget;
 
639
 
 
640
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
641
        UxSaveCtx = UxModelShellContext;
 
642
        UxModelShellContext = UxContext =
 
643
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
644
        {
 
645
        do_convo();
 
646
        
 
647
        }
 
648
        UxModelShellContext = UxSaveCtx;
 
649
}
 
650
 
 
651
static void     activateCB_pB_MFCreate( UxWidget, UxClientData, UxCallbackArg )
 
652
        Widget          UxWidget;
 
653
        XtPointer       UxClientData, UxCallbackArg;
 
654
{
 
655
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
656
        swidget                 UxThisWidget;
 
657
 
 
658
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
659
        UxSaveCtx = UxModelShellContext;
 
660
        UxModelShellContext = UxContext =
 
661
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
662
        {
 
663
        set_creafilter();
 
664
        UxPopupInterface(UxFindSwidget("FilterCreate"),no_grab);
 
665
        }
 
666
        UxModelShellContext = UxSaveCtx;
 
667
}
 
668
 
 
669
static void     activateCB_pB_MPrint( UxWidget, UxClientData, UxCallbackArg )
 
670
        Widget          UxWidget;
 
671
        XtPointer       UxClientData, UxCallbackArg;
 
672
{
 
673
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
674
        swidget                 UxThisWidget;
 
675
 
 
676
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
677
        UxSaveCtx = UxModelShellContext;
 
678
        UxModelShellContext = UxContext =
 
679
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
680
        {
 
681
        
 
682
         extern int pltgr,putplt,putplt9,ovpltgr;
 
683
        extern char Printer[];
 
684
        
 
685
        char str[40];
 
686
        
 
687
        if(pltgr)
 
688
            pltgr=FALSE;
 
689
        
 
690
        if(putplt)
 
691
            putplt=FALSE;
 
692
        
 
693
        if(putplt9)
 
694
            putplt9=FALSE;
 
695
        
 
696
        if(ovpltgr)
 
697
                 {
 
698
                  end_graphic();
 
699
                  ovpltgr=FALSE;
 
700
                 }
 
701
        sprintf( str, "copy/graph %s filter.plt", Printer );
 
702
        AppendDialogText(str);
 
703
        
 
704
        }
 
705
        UxModelShellContext = UxSaveCtx;
 
706
}
 
707
 
 
708
static void     armCB_tg_atmyes( UxWidget, UxClientData, UxCallbackArg )
 
709
        Widget          UxWidget;
 
710
        XtPointer       UxClientData, UxCallbackArg;
 
711
{
 
712
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
713
        swidget                 UxThisWidget;
 
714
 
 
715
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
716
        UxSaveCtx = UxModelShellContext;
 
717
        UxModelShellContext = UxContext =
 
718
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
719
        {
 
720
        char    *dir;
 
721
        
 
722
        dir=(char *)getenv("MID_FILTERS");
 
723
        if (dir!=NULL)
 
724
                {
 
725
                T.iatmos=1;
 
726
                sprintf(T.atmosfile,"%s/atmos/extatmos.dat",dir);
 
727
                plot_atmos(T.atmosfile);
 
728
                }
 
729
        else
 
730
                {
 
731
                fprintf(stderr,"WARNING: do not know where to find data\n");
 
732
                fprintf(stderr,"\t please set the FILTERDIR env. variable\n");
 
733
                };
 
734
        
 
735
        }
 
736
        UxModelShellContext = UxSaveCtx;
 
737
}
 
738
 
 
739
static void     armCB_tg_atmno( UxWidget, UxClientData, UxCallbackArg )
 
740
        Widget          UxWidget;
 
741
        XtPointer       UxClientData, UxCallbackArg;
 
742
{
 
743
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
744
        swidget                 UxThisWidget;
 
745
 
 
746
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
747
        UxSaveCtx = UxModelShellContext;
 
748
        UxModelShellContext = UxContext =
 
749
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
750
        {
 
751
        T.iatmos=0;
 
752
        
 
753
        
 
754
        }
 
755
        UxModelShellContext = UxSaveCtx;
 
756
}
 
757
 
 
758
static void     valueChangedCB_tg_atmno( UxWidget, UxClientData, UxCallbackArg )
 
759
        Widget          UxWidget;
 
760
        XtPointer       UxClientData, UxCallbackArg;
 
761
{
 
762
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
763
        swidget                 UxThisWidget;
 
764
 
 
765
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
766
        UxSaveCtx = UxModelShellContext;
 
767
        UxModelShellContext = UxContext =
 
768
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
769
        {
 
770
        
 
771
        }
 
772
        UxModelShellContext = UxSaveCtx;
 
773
}
 
774
 
 
775
static void     activateCB_mn_standard( UxWidget, UxClientData, UxCallbackArg )
 
776
        Widget          UxWidget;
 
777
        XtPointer       UxClientData, UxCallbackArg;
 
778
{
 
779
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
780
        swidget                 UxThisWidget;
 
781
 
 
782
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
783
        UxSaveCtx = UxModelShellContext;
 
784
        UxModelShellContext = UxContext =
 
785
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
786
        {
 
787
        char *transdir,filepath[50];
 
788
        extern swidget scrolledchoose;
 
789
        
 
790
        strcpy(G.sel_type,"spectrum");
 
791
        transdir=(char *) getenv("MID_FILTERS");
 
792
        sprintf(filepath,"%s/esostd/*.tbl",transdir);
 
793
        SetFileList( UxGetWidget(scrolledchoose),1, filepath );
 
794
        
 
795
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
796
        
 
797
        }
 
798
        UxModelShellContext = UxSaveCtx;
 
799
}
 
800
 
 
801
static void     activateCB_mn_hststd( UxWidget, UxClientData, UxCallbackArg )
 
802
        Widget          UxWidget;
 
803
        XtPointer       UxClientData, UxCallbackArg;
 
804
{
 
805
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
806
        swidget                 UxThisWidget;
 
807
 
 
808
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
809
        UxSaveCtx = UxModelShellContext;
 
810
        UxModelShellContext = UxContext =
 
811
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
812
        {
 
813
        char *transdir,filepath[50];
 
814
        extern swidget scrolledchoose;
 
815
        
 
816
        strcpy(G.sel_type,"hststd");
 
817
        transdir=(char *) getenv("MID_FILTERS");
 
818
        sprintf(filepath,"%s/hststd/*.tbl",transdir);
 
819
        SetFileList( UxGetWidget(scrolledchoose),1, filepath );
 
820
        
 
821
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
822
        }
 
823
        UxModelShellContext = UxSaveCtx;
 
824
}
 
825
 
 
826
static void     activateCB_mn_ctiostd( UxWidget, UxClientData, UxCallbackArg )
 
827
        Widget          UxWidget;
 
828
        XtPointer       UxClientData, UxCallbackArg;
 
829
{
 
830
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
831
        swidget                 UxThisWidget;
 
832
 
 
833
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
834
        UxSaveCtx = UxModelShellContext;
 
835
        UxModelShellContext = UxContext =
 
836
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
837
        {
 
838
        char *transdir,filepath[50];
 
839
        extern swidget scrolledchoose;
 
840
        
 
841
        strcpy(G.sel_type,"ctiostd");
 
842
        transdir=(char *) getenv("MID_FILTERS");
 
843
        sprintf(filepath,"%s/ctiostd/*.tbl",transdir);
 
844
        SetFileList( UxGetWidget(scrolledchoose),1, filepath );
 
845
        
 
846
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
847
        }
 
848
        UxModelShellContext = UxSaveCtx;
 
849
}
 
850
 
 
851
static void     activateCB_mn_blackbody( UxWidget, UxClientData, UxCallbackArg )
 
852
        Widget          UxWidget;
 
853
        XtPointer       UxClientData, UxCallbackArg;
 
854
{
 
855
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
856
        swidget                 UxThisWidget;
 
857
 
 
858
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
859
        UxSaveCtx = UxModelShellContext;
 
860
        UxModelShellContext = UxContext =
 
861
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
862
        set_bbody();
 
863
        UxModelShellContext = UxSaveCtx;
 
864
}
 
865
 
 
866
static void     focusCB_tf_airmass( UxWidget, UxClientData, UxCallbackArg )
 
867
        Widget          UxWidget;
 
868
        XtPointer       UxClientData, UxCallbackArg;
 
869
{
 
870
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
871
        swidget                 UxThisWidget;
 
872
 
 
873
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
874
        UxSaveCtx = UxModelShellContext;
 
875
        UxModelShellContext = UxContext =
 
876
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
877
        {
 
878
        UxPutText(UxFindSwidget("helptextModel"),"airmass value\n");
 
879
        }
 
880
        UxModelShellContext = UxSaveCtx;
 
881
}
 
882
 
 
883
static void     losingFocusCB_tf_airmass( UxWidget, UxClientData, UxCallbackArg )
 
884
        Widget          UxWidget;
 
885
        XtPointer       UxClientData, UxCallbackArg;
 
886
{
 
887
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
888
        swidget                 UxThisWidget;
 
889
 
 
890
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
891
        UxSaveCtx = UxModelShellContext;
 
892
        UxModelShellContext = UxContext =
 
893
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
894
        {
 
895
        int nid;
 
896
        char am[10];
 
897
        
 
898
        nid=sscanf(UxGetText(tf_airmass),"%f",&T.airmass);
 
899
        if ((nid<1)||(T.airmass<1.))
 
900
                T.airmass=1.;
 
901
        if (T.airmass>10.)
 
902
                T.airmass=10.;
 
903
        
 
904
        sprintf(am,"%1.3f",T.airmass);
 
905
        UxPutText(UxFindSwidget("tf_airmass"),am);
 
906
        
 
907
        
 
908
        UxPutText(UxFindSwidget("helptextModel"),"");
 
909
        }
 
910
        UxModelShellContext = UxSaveCtx;
 
911
}
 
912
 
 
913
static void     activateCB_mn_nogrism( UxWidget, UxClientData, UxCallbackArg )
 
914
        Widget          UxWidget;
 
915
        XtPointer       UxClientData, UxCallbackArg;
 
916
{
 
917
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
918
        swidget                 UxThisWidget;
 
919
 
 
920
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
921
        UxSaveCtx = UxModelShellContext;
 
922
        UxModelShellContext = UxContext =
 
923
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
924
        T.igrism=0;
 
925
        T.ngrism=0;
 
926
        T.resolution=0.;
 
927
        set_grism(T.ngrism);
 
928
        UxModelShellContext = UxSaveCtx;
 
929
}
 
930
 
 
931
static void     activateCB_mn_grism0( UxWidget, UxClientData, UxCallbackArg )
 
932
        Widget          UxWidget;
 
933
        XtPointer       UxClientData, UxCallbackArg;
 
934
{
 
935
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
936
        swidget                 UxThisWidget;
 
937
 
 
938
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
939
        UxSaveCtx = UxModelShellContext;
 
940
        UxModelShellContext = UxContext =
 
941
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
942
        T.igrism=1;
 
943
        T.ngrism=1;
 
944
        
 
945
        set_grism(T.ngrism);
 
946
        UxModelShellContext = UxSaveCtx;
 
947
}
 
948
 
 
949
static void     activateCB_mn_grism1( UxWidget, UxClientData, UxCallbackArg )
 
950
        Widget          UxWidget;
 
951
        XtPointer       UxClientData, UxCallbackArg;
 
952
{
 
953
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
954
        swidget                 UxThisWidget;
 
955
 
 
956
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
957
        UxSaveCtx = UxModelShellContext;
 
958
        UxModelShellContext = UxContext =
 
959
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
960
        T.igrism=1;
 
961
        T.ngrism=2;
 
962
        
 
963
        set_grism(T.ngrism);
 
964
        UxModelShellContext = UxSaveCtx;
 
965
}
 
966
 
 
967
static void     activateCB_mn_grism2( UxWidget, UxClientData, UxCallbackArg )
 
968
        Widget          UxWidget;
 
969
        XtPointer       UxClientData, UxCallbackArg;
 
970
{
 
971
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
972
        swidget                 UxThisWidget;
 
973
 
 
974
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
975
        UxSaveCtx = UxModelShellContext;
 
976
        UxModelShellContext = UxContext =
 
977
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
978
        T.igrism=1;
 
979
        T.ngrism=3;
 
980
        
 
981
        set_grism(T.ngrism);
 
982
        UxModelShellContext = UxSaveCtx;
 
983
}
 
984
 
 
985
static void     activateCB_mn_grism3( UxWidget, UxClientData, UxCallbackArg )
 
986
        Widget          UxWidget;
 
987
        XtPointer       UxClientData, UxCallbackArg;
 
988
{
 
989
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
990
        swidget                 UxThisWidget;
 
991
 
 
992
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
993
        UxSaveCtx = UxModelShellContext;
 
994
        UxModelShellContext = UxContext =
 
995
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
996
        T.igrism=1;
 
997
        T.ngrism=4;
 
998
        
 
999
        set_grism(T.ngrism);
 
1000
        UxModelShellContext = UxSaveCtx;
 
1001
}
 
1002
 
 
1003
static void     activateCB_mn_grism4( UxWidget, UxClientData, UxCallbackArg )
 
1004
        Widget          UxWidget;
 
1005
        XtPointer       UxClientData, UxCallbackArg;
 
1006
{
 
1007
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1008
        swidget                 UxThisWidget;
 
1009
 
 
1010
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1011
        UxSaveCtx = UxModelShellContext;
 
1012
        UxModelShellContext = UxContext =
 
1013
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1014
        T.igrism=1;
 
1015
        T.ngrism=5;
 
1016
        
 
1017
        set_grism(T.ngrism);
 
1018
        UxModelShellContext = UxSaveCtx;
 
1019
}
 
1020
 
 
1021
static void     activateCB_mn_grism5( UxWidget, UxClientData, UxCallbackArg )
 
1022
        Widget          UxWidget;
 
1023
        XtPointer       UxClientData, UxCallbackArg;
 
1024
{
 
1025
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1026
        swidget                 UxThisWidget;
 
1027
 
 
1028
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1029
        UxSaveCtx = UxModelShellContext;
 
1030
        UxModelShellContext = UxContext =
 
1031
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1032
        T.igrism=1;
 
1033
        T.ngrism=6;
 
1034
        
 
1035
        set_grism(T.ngrism);
 
1036
        UxModelShellContext = UxSaveCtx;
 
1037
}
 
1038
 
 
1039
static void     activateCB_mn_grism6( UxWidget, UxClientData, UxCallbackArg )
 
1040
        Widget          UxWidget;
 
1041
        XtPointer       UxClientData, UxCallbackArg;
 
1042
{
 
1043
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1044
        swidget                 UxThisWidget;
 
1045
 
 
1046
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1047
        UxSaveCtx = UxModelShellContext;
 
1048
        UxModelShellContext = UxContext =
 
1049
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1050
        T.igrism=1;
 
1051
        T.ngrism=7;
 
1052
        
 
1053
        set_grism(T.ngrism);
 
1054
        UxModelShellContext = UxSaveCtx;
 
1055
}
 
1056
 
 
1057
static void     activateCB_mn_grism7( UxWidget, UxClientData, UxCallbackArg )
 
1058
        Widget          UxWidget;
 
1059
        XtPointer       UxClientData, UxCallbackArg;
 
1060
{
 
1061
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1062
        swidget                 UxThisWidget;
 
1063
 
 
1064
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1065
        UxSaveCtx = UxModelShellContext;
 
1066
        UxModelShellContext = UxContext =
 
1067
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1068
        T.igrism=1;
 
1069
        T.ngrism=8;
 
1070
        
 
1071
        set_grism(T.ngrism);
 
1072
        UxModelShellContext = UxSaveCtx;
 
1073
}
 
1074
 
 
1075
static void     activateCB_mn_grism8( UxWidget, UxClientData, UxCallbackArg )
 
1076
        Widget          UxWidget;
 
1077
        XtPointer       UxClientData, UxCallbackArg;
 
1078
{
 
1079
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1080
        swidget                 UxThisWidget;
 
1081
 
 
1082
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1083
        UxSaveCtx = UxModelShellContext;
 
1084
        UxModelShellContext = UxContext =
 
1085
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1086
        T.igrism=1;
 
1087
        T.ngrism=9;
 
1088
        
 
1089
        set_grism(T.ngrism);
 
1090
        UxModelShellContext = UxSaveCtx;
 
1091
}
 
1092
 
 
1093
static void     activateCB_mn_grism9( UxWidget, UxClientData, UxCallbackArg )
 
1094
        Widget          UxWidget;
 
1095
        XtPointer       UxClientData, UxCallbackArg;
 
1096
{
 
1097
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1098
        swidget                 UxThisWidget;
 
1099
 
 
1100
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1101
        UxSaveCtx = UxModelShellContext;
 
1102
        UxModelShellContext = UxContext =
 
1103
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1104
        T.igrism=1;
 
1105
        T.ngrism=10;
 
1106
        
 
1107
        set_grism(T.ngrism);
 
1108
        UxModelShellContext = UxSaveCtx;
 
1109
}
 
1110
 
 
1111
static void     focusCB_tf_filter( UxWidget, UxClientData, UxCallbackArg )
 
1112
        Widget          UxWidget;
 
1113
        XtPointer       UxClientData, UxCallbackArg;
 
1114
{
 
1115
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1116
        swidget                 UxThisWidget;
 
1117
 
 
1118
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1119
        UxSaveCtx = UxModelShellContext;
 
1120
        UxModelShellContext = UxContext =
 
1121
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1122
        {
 
1123
        char    number[10];
 
1124
        
 
1125
        UxPutText(UxFindSwidget("helptextModel"),"ESO Filter Number\n");
 
1126
        
 
1127
        if (T.ifilter ==0)
 
1128
                UxPutText(UxFindSwidget("tf_filter"),"");
 
1129
        else if (T.ifilter ==1)
 
1130
                {
 
1131
                sprintf(number,"%d",T.nfilter);
 
1132
                UxPutText(UxFindSwidget("tf_filter"),number);
 
1133
                }
 
1134
        else if (T.ifilter ==2)
 
1135
                UxPutText(UxFindSwidget("tf_filter"),"crea_filter");
 
1136
        
 
1137
        
 
1138
        }
 
1139
        UxModelShellContext = UxSaveCtx;
 
1140
}
 
1141
 
 
1142
static void     modifyVerifyCB_tf_filter( UxWidget, UxClientData, UxCallbackArg )
 
1143
        Widget          UxWidget;
 
1144
        XtPointer       UxClientData, UxCallbackArg;
 
1145
{
 
1146
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1147
        swidget                 UxThisWidget;
 
1148
 
 
1149
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1150
        UxSaveCtx = UxModelShellContext;
 
1151
        UxModelShellContext = UxContext =
 
1152
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1153
        {
 
1154
        MOD_FilterNUMBER = 1;
 
1155
        }
 
1156
        UxModelShellContext = UxSaveCtx;
 
1157
}
 
1158
 
 
1159
static void     losingFocusCB_tf_filter( UxWidget, UxClientData, UxCallbackArg )
 
1160
        Widget          UxWidget;
 
1161
        XtPointer       UxClientData, UxCallbackArg;
 
1162
{
 
1163
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1164
        swidget                 UxThisWidget;
 
1165
 
 
1166
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1167
        UxSaveCtx = UxModelShellContext;
 
1168
        UxModelShellContext = UxContext =
 
1169
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1170
        {
 
1171
        int nid=0,nfilt=0,search_nfilt();
 
1172
        char    am[10];
 
1173
        
 
1174
        
 
1175
        if(MOD_FilterNUMBER)
 
1176
        {
 
1177
        nid=sscanf(UxGetText(UxFindSwidget("tf_filter")),"%d",&nfilt);
 
1178
          if (nid>0)
 
1179
             {
 
1180
             if (nfilt!=T.nfilter)
 
1181
                {
 
1182
                T.nfilter=nfilt;
 
1183
                if(search_nfilt(T.nfilter)!=-1)
 
1184
                        {
 
1185
                        plot_filters(T.nfilter);
 
1186
                        T.ifilter=1;
 
1187
                        }
 
1188
                else
 
1189
                        T.ifilter=0;
 
1190
                };
 
1191
             }
 
1192
          else if (!strcmp(UxGetText(UxFindSwidget("tf_filter")),"crea_filter"))
 
1193
                T.ifilter=2;
 
1194
          else
 
1195
                T.ifilter=0;
 
1196
        
 
1197
        }
 
1198
        
 
1199
        if (T.ifilter==0)
 
1200
                UxPutText(UxFindSwidget("tf_filter"),"free");
 
1201
        else if (T.ifilter==1)
 
1202
                {
 
1203
                sprintf(am,"%d",T.nfilter);
 
1204
                UxPutText(UxFindSwidget("tf_filter"),am);
 
1205
                }
 
1206
        if (T.ifilter==2)
 
1207
                UxPutText(UxFindSwidget("tf_filter"),"crea_filter");
 
1208
        
 
1209
        UxPutText(UxFindSwidget("helptextModel"),"");
 
1210
        
 
1211
        MOD_FilterNUMBER=0;
 
1212
        
 
1213
        
 
1214
        }
 
1215
        UxModelShellContext = UxSaveCtx;
 
1216
}
 
1217
 
 
1218
static void     armCB_tg_basic( UxWidget, UxClientData, UxCallbackArg )
 
1219
        Widget          UxWidget;
 
1220
        XtPointer       UxClientData, UxCallbackArg;
 
1221
{
 
1222
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1223
        swidget                 UxThisWidget;
 
1224
 
 
1225
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1226
        UxSaveCtx = UxModelShellContext;
 
1227
        UxModelShellContext = UxContext =
 
1228
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1229
        {
 
1230
        G.basic_set=1;
 
1231
        strcpy(G.sel_type,"filter");
 
1232
        
 
1233
        search_f_inst(G.sel_inst,G.basic_set);
 
1234
        
 
1235
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
1236
        
 
1237
        
 
1238
        }
 
1239
        UxModelShellContext = UxSaveCtx;
 
1240
}
 
1241
 
 
1242
static void     armCB_tg_all( UxWidget, UxClientData, UxCallbackArg )
 
1243
        Widget          UxWidget;
 
1244
        XtPointer       UxClientData, UxCallbackArg;
 
1245
{
 
1246
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1247
        swidget                 UxThisWidget;
 
1248
 
 
1249
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1250
        UxSaveCtx = UxModelShellContext;
 
1251
        UxModelShellContext = UxContext =
 
1252
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1253
        {
 
1254
        G.basic_set=0;
 
1255
        strcpy(G.sel_type,"filter");
 
1256
        search_f_inst(G.sel_inst,G.basic_set);
 
1257
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
1258
        
 
1259
        }
 
1260
        UxModelShellContext = UxSaveCtx;
 
1261
}
 
1262
 
 
1263
static void     armCB_tg_ccdyes( UxWidget, UxClientData, UxCallbackArg )
 
1264
        Widget          UxWidget;
 
1265
        XtPointer       UxClientData, UxCallbackArg;
 
1266
{
 
1267
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1268
        swidget                 UxThisWidget;
 
1269
 
 
1270
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1271
        UxSaveCtx = UxModelShellContext;
 
1272
        UxModelShellContext = UxContext =
 
1273
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1274
        {
 
1275
        T.iccd=1;
 
1276
        plot_ccd(T.nccd);
 
1277
        }
 
1278
        UxModelShellContext = UxSaveCtx;
 
1279
}
 
1280
 
 
1281
static void     armCB_tg_ccdno( UxWidget, UxClientData, UxCallbackArg )
 
1282
        Widget          UxWidget;
 
1283
        XtPointer       UxClientData, UxCallbackArg;
 
1284
{
 
1285
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1286
        swidget                 UxThisWidget;
 
1287
 
 
1288
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1289
        UxSaveCtx = UxModelShellContext;
 
1290
        UxModelShellContext = UxContext =
 
1291
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1292
        {
 
1293
        T.iccd=0;
 
1294
        }
 
1295
        UxModelShellContext = UxSaveCtx;
 
1296
}
 
1297
 
 
1298
static void     focusCB_tf_time( UxWidget, UxClientData, UxCallbackArg )
 
1299
        Widget          UxWidget;
 
1300
        XtPointer       UxClientData, UxCallbackArg;
 
1301
{
 
1302
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1303
        swidget                 UxThisWidget;
 
1304
 
 
1305
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1306
        UxSaveCtx = UxModelShellContext;
 
1307
        UxModelShellContext = UxContext =
 
1308
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1309
        {
 
1310
        UxPutText(UxFindSwidget("helptextModel"),"Exposure Time in seconds\n");
 
1311
         
 
1312
        }
 
1313
        UxModelShellContext = UxSaveCtx;
 
1314
}
 
1315
 
 
1316
static void     losingFocusCB_tf_time( UxWidget, UxClientData, UxCallbackArg )
 
1317
        Widget          UxWidget;
 
1318
        XtPointer       UxClientData, UxCallbackArg;
 
1319
{
 
1320
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1321
        swidget                 UxThisWidget;
 
1322
 
 
1323
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1324
        UxSaveCtx = UxModelShellContext;
 
1325
        UxModelShellContext = UxContext =
 
1326
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1327
        {
 
1328
        int nid;
 
1329
        char am[10];
 
1330
         
 
1331
        nid=sscanf(UxGetText(tf_time),"%f",&T.etime);
 
1332
        if ((nid==0)||(T.etime<.01))
 
1333
                T.etime=.01;
 
1334
        sprintf(am,"%1.2f",T.etime);
 
1335
        
 
1336
        UxPutText(tf_time,am);
 
1337
        
 
1338
        UxPutText(UxFindSwidget("helptextModel"),"");
 
1339
        }
 
1340
        UxModelShellContext = UxSaveCtx;
 
1341
}
 
1342
 
 
1343
static void     focusCB_tf_eadu( UxWidget, UxClientData, UxCallbackArg )
 
1344
        Widget          UxWidget;
 
1345
        XtPointer       UxClientData, UxCallbackArg;
 
1346
{
 
1347
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1348
        swidget                 UxThisWidget;
 
1349
 
 
1350
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1351
        UxSaveCtx = UxModelShellContext;
 
1352
        UxModelShellContext = UxContext =
 
1353
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1354
        {
 
1355
        UxPutText(UxFindSwidget("helptextModel"),"number of electrons in ADU");
 
1356
        }
 
1357
        UxModelShellContext = UxSaveCtx;
 
1358
}
 
1359
 
 
1360
static void     losingFocusCB_tf_eadu( UxWidget, UxClientData, UxCallbackArg )
 
1361
        Widget          UxWidget;
 
1362
        XtPointer       UxClientData, UxCallbackArg;
 
1363
{
 
1364
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1365
        swidget                 UxThisWidget;
 
1366
 
 
1367
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1368
        UxSaveCtx = UxModelShellContext;
 
1369
        UxModelShellContext = UxContext =
 
1370
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1371
        {
 
1372
        int nid;
 
1373
        char am[10];
 
1374
        float eadu;
 
1375
        
 
1376
        nid=sscanf(UxGetText(tf_eadu),"%f",&eadu);
 
1377
        if ((nid==1)||(eadu>=1.))
 
1378
                T.einadu=eadu;
 
1379
        
 
1380
        
 
1381
        sprintf(am,"%.2f",T.einadu);
 
1382
        UxPutText(tf_eadu,am);
 
1383
        
 
1384
        
 
1385
        UxPutText(UxFindSwidget("helptextModel"),"");
 
1386
        }
 
1387
        UxModelShellContext = UxSaveCtx;
 
1388
}
 
1389
 
 
1390
static void     activateCB_me_m_load( UxWidget, UxClientData, UxCallbackArg )
 
1391
        Widget          UxWidget;
 
1392
        XtPointer       UxClientData, UxCallbackArg;
 
1393
{
 
1394
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1395
        swidget                 UxThisWidget;
 
1396
 
 
1397
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1398
        UxSaveCtx = UxModelShellContext;
 
1399
        UxModelShellContext = UxContext =
 
1400
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1401
        {
 
1402
        extern swidget scrolledchoose;
 
1403
        extern struct s_gui    G;
 
1404
        
 
1405
        strcpy(G.sel_type,"trans_load");
 
1406
        
 
1407
        SetFileList( UxGetWidget(scrolledchoose),1, "*.trans" );
 
1408
        
 
1409
        
 
1410
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
1411
        
 
1412
        }
 
1413
        UxModelShellContext = UxSaveCtx;
 
1414
}
 
1415
 
 
1416
static void     activateCB_me_m_save( UxWidget, UxClientData, UxCallbackArg )
 
1417
        Widget          UxWidget;
 
1418
        XtPointer       UxClientData, UxCallbackArg;
 
1419
{
 
1420
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1421
        swidget                 UxThisWidget;
 
1422
 
 
1423
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1424
        UxSaveCtx = UxModelShellContext;
 
1425
        UxModelShellContext = UxContext =
 
1426
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1427
        save_mod(T.transfile);
 
1428
        UxModelShellContext = UxSaveCtx;
 
1429
}
 
1430
 
 
1431
static void     activateCB_me_m_saveas( UxWidget, UxClientData, UxCallbackArg )
 
1432
        Widget          UxWidget;
 
1433
        XtPointer       UxClientData, UxCallbackArg;
 
1434
{
 
1435
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1436
        swidget                 UxThisWidget;
 
1437
 
 
1438
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1439
        UxSaveCtx = UxModelShellContext;
 
1440
        UxModelShellContext = UxContext =
 
1441
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1442
        strcpy(G.sel_type,"trans_save");
 
1443
        UxPutTitle( UxFindSwidget("AskShell"),"Configuration Save Name");
 
1444
        UxPutLabelString( UxFindSwidget("labelAsk"), "Filename (no ext.):" );
 
1445
        
 
1446
        UxPopupInterface(UxFindSwidget("AskShell"),no_grab);
 
1447
        UxModelShellContext = UxSaveCtx;
 
1448
}
 
1449
 
 
1450
static void     activateCB_me_m_loadcurve( UxWidget, UxClientData, UxCallbackArg )
 
1451
        Widget          UxWidget;
 
1452
        XtPointer       UxClientData, UxCallbackArg;
 
1453
{
 
1454
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1455
        swidget                 UxThisWidget;
 
1456
 
 
1457
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1458
        UxSaveCtx = UxModelShellContext;
 
1459
        UxModelShellContext = UxContext =
 
1460
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1461
        {
 
1462
        extern swidget scrolledchoose;
 
1463
        extern struct s_gui    G;
 
1464
        
 
1465
        strcpy(G.sel_type,"curve_load");
 
1466
        
 
1467
        SetFileList( UxGetWidget(scrolledchoose),1, "*.dat" );
 
1468
        
 
1469
        
 
1470
        UxPopupInterface(UxFindSwidget("ChooseList"),no_grab);
 
1471
        
 
1472
        }
 
1473
        UxModelShellContext = UxSaveCtx;
 
1474
}
 
1475
 
 
1476
static void     activateCB_me_m_savecurve( UxWidget, UxClientData, UxCallbackArg )
 
1477
        Widget          UxWidget;
 
1478
        XtPointer       UxClientData, UxCallbackArg;
 
1479
{
 
1480
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1481
        swidget                 UxThisWidget;
 
1482
 
 
1483
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1484
        UxSaveCtx = UxModelShellContext;
 
1485
        UxModelShellContext = UxContext =
 
1486
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1487
        save_curve(T.curvefile);
 
1488
        UxModelShellContext = UxSaveCtx;
 
1489
}
 
1490
 
 
1491
static void     activateCB_me_m_saveascurve( UxWidget, UxClientData, UxCallbackArg )
 
1492
        Widget          UxWidget;
 
1493
        XtPointer       UxClientData, UxCallbackArg;
 
1494
{
 
1495
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1496
        swidget                 UxThisWidget;
 
1497
 
 
1498
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1499
        UxSaveCtx = UxModelShellContext;
 
1500
        UxModelShellContext = UxContext =
 
1501
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1502
        strcpy(G.sel_type,"curve_save");
 
1503
        UxPutText( UxFindSwidget("textAsk"),T.curvefile);
 
1504
        UxPutTitle( UxFindSwidget("AskShell"),"Save Name");
 
1505
        UxPutLabelString( UxFindSwidget("labelAsk"), "Filename :" );
 
1506
        
 
1507
        UxPopupInterface(UxFindSwidget("AskShell"),no_grab);
 
1508
        UxModelShellContext = UxSaveCtx;
 
1509
}
 
1510
 
 
1511
static void     activateCB_me_m_trimx( UxWidget, UxClientData, UxCallbackArg )
 
1512
        Widget          UxWidget;
 
1513
        XtPointer       UxClientData, UxCallbackArg;
 
1514
{
 
1515
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1516
        swidget                 UxThisWidget;
 
1517
 
 
1518
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1519
        UxSaveCtx = UxModelShellContext;
 
1520
        UxModelShellContext = UxContext =
 
1521
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1522
        {
 
1523
        extern int ltrimx,ltrimy;
 
1524
        
 
1525
        ltrimx=TRUE;
 
1526
        ltrimy=FALSE;
 
1527
        
 
1528
        Trim();
 
1529
        
 
1530
        }
 
1531
        UxModelShellContext = UxSaveCtx;
 
1532
}
 
1533
 
 
1534
static void     activateCB_me_m_trimy( UxWidget, UxClientData, UxCallbackArg )
 
1535
        Widget          UxWidget;
 
1536
        XtPointer       UxClientData, UxCallbackArg;
 
1537
{
 
1538
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1539
        swidget                 UxThisWidget;
 
1540
 
 
1541
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1542
        UxSaveCtx = UxModelShellContext;
 
1543
        UxModelShellContext = UxContext =
 
1544
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1545
        {
 
1546
        extern int ltrimx,ltrimy;
 
1547
        
 
1548
        ltrimx=FALSE;
 
1549
        ltrimy=TRUE;
 
1550
        
 
1551
        Trim();
 
1552
        
 
1553
        }
 
1554
        UxModelShellContext = UxSaveCtx;
 
1555
}
 
1556
 
 
1557
static void     activateCB_me_m_unzoom( UxWidget, UxClientData, UxCallbackArg )
 
1558
        Widget          UxWidget;
 
1559
        XtPointer       UxClientData, UxCallbackArg;
 
1560
{
 
1561
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1562
        swidget                 UxThisWidget;
 
1563
 
 
1564
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1565
        UxSaveCtx = UxModelShellContext;
 
1566
        UxModelShellContext = UxContext =
 
1567
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1568
        {
 
1569
        extern int ltrimx,ltrimy;
 
1570
        
 
1571
        ltrimx=FALSE;
 
1572
        ltrimy=FALSE;
 
1573
        
 
1574
        Unzoom();
 
1575
        
 
1576
        }
 
1577
        UxModelShellContext = UxSaveCtx;
 
1578
}
 
1579
 
 
1580
static void     activateCB_me_m_redraw( UxWidget, UxClientData, UxCallbackArg )
 
1581
        Widget          UxWidget;
 
1582
        XtPointer       UxClientData, UxCallbackArg;
 
1583
{
 
1584
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1585
        swidget                 UxThisWidget;
 
1586
 
 
1587
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1588
        UxSaveCtx = UxModelShellContext;
 
1589
        UxModelShellContext = UxContext =
 
1590
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1591
        {
 
1592
        extern int ovpltgr;
 
1593
        
 
1594
        if(ovpltgr)
 
1595
               {
 
1596
                end_graphic();
 
1597
               }
 
1598
        AppendDialogText( "copy/graph G filter.plt \n" );
 
1599
        
 
1600
        }
 
1601
        UxModelShellContext = UxSaveCtx;
 
1602
}
 
1603
 
 
1604
static void     activateCB_me_m_print( UxWidget, UxClientData, UxCallbackArg )
 
1605
        Widget          UxWidget;
 
1606
        XtPointer       UxClientData, UxCallbackArg;
 
1607
{
 
1608
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1609
        swidget                 UxThisWidget;
 
1610
 
 
1611
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1612
        UxSaveCtx = UxModelShellContext;
 
1613
        UxModelShellContext = UxContext =
 
1614
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1615
        {
 
1616
         extern int pltgr,putplt,putplt9,ovpltgr;
 
1617
        extern char Printer[];
 
1618
        
 
1619
        char str[40];
 
1620
        
 
1621
        if(pltgr)
 
1622
            pltgr=FALSE;
 
1623
        
 
1624
        if(putplt)
 
1625
            putplt=FALSE;
 
1626
        
 
1627
        if(putplt9)
 
1628
            putplt9=FALSE;
 
1629
        
 
1630
        if(ovpltgr)
 
1631
                 {
 
1632
                  end_graphic();
 
1633
                  ovpltgr=FALSE;
 
1634
                 }
 
1635
        sprintf( str, "copy/graph %s filter.plt", Printer );
 
1636
        AppendDialogText(str);
 
1637
        }
 
1638
        UxModelShellContext = UxSaveCtx;
 
1639
}
 
1640
 
 
1641
static void     valueChangedCB_me_m_plot( UxWidget, UxClientData, UxCallbackArg )
 
1642
        Widget          UxWidget;
 
1643
        XtPointer       UxClientData, UxCallbackArg;
 
1644
{
 
1645
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1646
        swidget                 UxThisWidget;
 
1647
 
 
1648
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1649
        UxSaveCtx = UxModelShellContext;
 
1650
        UxModelShellContext = UxContext =
 
1651
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1652
        {
 
1653
        extern int plt4gr,pltgr,ovplt4gr,ovpltgr,putplt,putplt9;
 
1654
        
 
1655
        end_viewp();
 
1656
        
 
1657
                plt4gr=FALSE;
 
1658
                pltgr=TRUE;
 
1659
                ovplt4gr=FALSE;
 
1660
                ovpltgr=FALSE;
 
1661
                putplt=FALSE;
 
1662
                putplt9=FALSE;
 
1663
        
 
1664
        UxPutSet(UxFindSwidget("me_f_plot"),"true");
 
1665
        UxPutSet(UxFindSwidget("me_f_oplot"),"false");
 
1666
        }
 
1667
        UxModelShellContext = UxSaveCtx;
 
1668
}
 
1669
 
 
1670
static void     valueChangedCB_me_m_oplot( UxWidget, UxClientData, UxCallbackArg )
 
1671
        Widget          UxWidget;
 
1672
        XtPointer       UxClientData, UxCallbackArg;
 
1673
{
 
1674
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1675
        swidget                 UxThisWidget;
 
1676
 
 
1677
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1678
        UxSaveCtx = UxModelShellContext;
 
1679
        UxModelShellContext = UxContext =
 
1680
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1681
        {
 
1682
        
 
1683
        extern int plt4gr,pltgr,ovplt4gr,ovpltgr,putplt,putplt9,lfirstp;
 
1684
        extern int nc_ovplt;
 
1685
        
 
1686
                if(ovpltgr && !lfirstp )
 
1687
                 {
 
1688
                end_graphic();
 
1689
                 }
 
1690
        
 
1691
                ovpltgr=TRUE;
 
1692
                ovplt4gr=FALSE;
 
1693
                pltgr=FALSE;
 
1694
                putplt9=FALSE;
 
1695
                plt4gr=FALSE;
 
1696
                putplt=FALSE;
 
1697
                lfirstp=TRUE;
 
1698
                nc_ovplt=0;
 
1699
        
 
1700
        UxPutSet(UxFindSwidget("me_f_plot"),"false");
 
1701
        UxPutSet(UxFindSwidget("me_f_oplot"),"true");
 
1702
        
 
1703
        }
 
1704
        UxModelShellContext = UxSaveCtx;
 
1705
}
 
1706
 
 
1707
static void     valueChangedCB_me_m_line( UxWidget, UxClientData, UxCallbackArg )
 
1708
        Widget          UxWidget;
 
1709
        XtPointer       UxClientData, UxCallbackArg;
 
1710
{
 
1711
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1712
        swidget                 UxThisWidget;
 
1713
 
 
1714
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1715
        UxSaveCtx = UxModelShellContext;
 
1716
        UxModelShellContext = UxContext =
 
1717
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1718
        {
 
1719
        extern int tracemode;
 
1720
        
 
1721
        tracemode=FALSE;
 
1722
        UxPutSet(UxFindSwidget("me_f_line"),"true");
 
1723
        UxPutSet(UxFindSwidget("me_f_histo"),"false");
 
1724
        
 
1725
        }
 
1726
        UxModelShellContext = UxSaveCtx;
 
1727
}
 
1728
 
 
1729
static void     valueChangedCB_me_m_histo( UxWidget, UxClientData, UxCallbackArg )
 
1730
        Widget          UxWidget;
 
1731
        XtPointer       UxClientData, UxCallbackArg;
 
1732
{
 
1733
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1734
        swidget                 UxThisWidget;
 
1735
 
 
1736
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1737
        UxSaveCtx = UxModelShellContext;
 
1738
        UxModelShellContext = UxContext =
 
1739
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1740
        {
 
1741
        extern int tracemode;
 
1742
        
 
1743
        tracemode=TRUE;
 
1744
        
 
1745
        UxPutSet(UxFindSwidget("me_f_histo"),"true");
 
1746
        UxPutSet(UxFindSwidget("me_f_line"),"false");
 
1747
        
 
1748
        }
 
1749
        UxModelShellContext = UxSaveCtx;
 
1750
}
 
1751
 
 
1752
static void     activateCB_me_m_hm( UxWidget, UxClientData, UxCallbackArg )
 
1753
        Widget          UxWidget;
 
1754
        XtPointer       UxClientData, UxCallbackArg;
 
1755
{
 
1756
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1757
        swidget                 UxThisWidget;
 
1758
 
 
1759
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1760
        UxSaveCtx = UxModelShellContext;
 
1761
        UxModelShellContext = UxContext =
 
1762
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1763
        {
 
1764
        DisplayExtendedHelp(UxWidget);
 
1765
        }
 
1766
        UxModelShellContext = UxSaveCtx;
 
1767
}
 
1768
 
 
1769
static void     activateCB_me_m_bye( UxWidget, UxClientData, UxCallbackArg )
 
1770
        Widget          UxWidget;
 
1771
        XtPointer       UxClientData, UxCallbackArg;
 
1772
{
 
1773
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1774
        swidget                 UxThisWidget;
 
1775
 
 
1776
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1777
        UxSaveCtx = UxModelShellContext;
 
1778
        UxModelShellContext = UxContext =
 
1779
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1780
        UxPopdownInterface(UxFindSwidget("ModelShell"));
 
1781
        UxPopdownInterface(UxFindSwidget("BruzualModel"));
 
1782
        UxModelShellContext = UxSaveCtx;
 
1783
}
 
1784
 
 
1785
static void     focusCB_tf_SN( UxWidget, UxClientData, UxCallbackArg )
 
1786
        Widget          UxWidget;
 
1787
        XtPointer       UxClientData, UxCallbackArg;
 
1788
{
 
1789
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1790
        swidget                 UxThisWidget;
 
1791
 
 
1792
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1793
        UxSaveCtx = UxModelShellContext;
 
1794
        UxModelShellContext = UxContext =
 
1795
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1796
        {
 
1797
        UxPutText(UxFindSwidget("helptextModel"),"Global Signal to Noise Ratio \n");
 
1798
        
 
1799
        }
 
1800
        UxModelShellContext = UxSaveCtx;
 
1801
}
 
1802
 
 
1803
static void     losingFocusCB_tf_SN( UxWidget, UxClientData, UxCallbackArg )
 
1804
        Widget          UxWidget;
 
1805
        XtPointer       UxClientData, UxCallbackArg;
 
1806
{
 
1807
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1808
        swidget                 UxThisWidget;
 
1809
 
 
1810
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1811
        UxSaveCtx = UxModelShellContext;
 
1812
        UxModelShellContext = UxContext =
 
1813
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1814
        {
 
1815
        int nid;
 
1816
        char am[10];
 
1817
        
 
1818
        nid=sscanf(UxGetText(tf_SN),"%f",&T.SN);
 
1819
        if ((nid==0)||(T.SN<.01))
 
1820
                T.SN=.01;
 
1821
        sprintf(am,"%1.2f",T.SN);
 
1822
        
 
1823
        UxPutText(tf_SN,am);
 
1824
        
 
1825
        UxPutText(UxFindSwidget("helptextModel"),"");
 
1826
        }
 
1827
        UxModelShellContext = UxSaveCtx;
 
1828
}
 
1829
 
 
1830
static void     armCB_tg_etime( UxWidget, UxClientData, UxCallbackArg )
 
1831
        Widget          UxWidget;
 
1832
        XtPointer       UxClientData, UxCallbackArg;
 
1833
{
 
1834
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1835
        swidget                 UxThisWidget;
 
1836
 
 
1837
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1838
        UxSaveCtx = UxModelShellContext;
 
1839
        UxModelShellContext = UxContext =
 
1840
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1841
        {
 
1842
        
 
1843
        T.itimeSN=0;
 
1844
        
 
1845
        }
 
1846
        UxModelShellContext = UxSaveCtx;
 
1847
}
 
1848
 
 
1849
static void     armCB_tg_sn( UxWidget, UxClientData, UxCallbackArg )
 
1850
        Widget          UxWidget;
 
1851
        XtPointer       UxClientData, UxCallbackArg;
 
1852
{
 
1853
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1854
        swidget                 UxThisWidget;
 
1855
 
 
1856
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1857
        UxSaveCtx = UxModelShellContext;
 
1858
        UxModelShellContext = UxContext =
 
1859
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1860
        {
 
1861
         T.itimeSN=1;
 
1862
        }
 
1863
        UxModelShellContext = UxSaveCtx;
 
1864
}
 
1865
 
 
1866
static void     armCB_tg_bright( UxWidget, UxClientData, UxCallbackArg )
 
1867
        Widget          UxWidget;
 
1868
        XtPointer       UxClientData, UxCallbackArg;
 
1869
{
 
1870
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1871
        swidget                 UxThisWidget;
 
1872
 
 
1873
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1874
        UxSaveCtx = UxModelShellContext;
 
1875
        UxModelShellContext = UxContext =
 
1876
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1877
        {
 
1878
        T.darkness=0;
 
1879
        if (T.emlines==0)
 
1880
                strcpy(T.skyfile,"sky_b.dat");
 
1881
        else
 
1882
                strcpy(T.skyfile,"sky_b_em.dat");
 
1883
        
 
1884
        
 
1885
        }
 
1886
        UxModelShellContext = UxSaveCtx;
 
1887
}
 
1888
 
 
1889
static void     armCB_tg_dark( UxWidget, UxClientData, UxCallbackArg )
 
1890
        Widget          UxWidget;
 
1891
        XtPointer       UxClientData, UxCallbackArg;
 
1892
{
 
1893
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1894
        swidget                 UxThisWidget;
 
1895
 
 
1896
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1897
        UxSaveCtx = UxModelShellContext;
 
1898
        UxModelShellContext = UxContext =
 
1899
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1900
        {
 
1901
        T.darkness=1;
 
1902
        if (T.emlines==0)
 
1903
                strcpy(T.skyfile,"sky_d.dat");
 
1904
        else
 
1905
                strcpy(T.skyfile,"sky_d_em.dat");
 
1906
        
 
1907
        
 
1908
        }
 
1909
        UxModelShellContext = UxSaveCtx;
 
1910
}
 
1911
 
 
1912
static void     armCB_tg_emli( UxWidget, UxClientData, UxCallbackArg )
 
1913
        Widget          UxWidget;
 
1914
        XtPointer       UxClientData, UxCallbackArg;
 
1915
{
 
1916
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1917
        swidget                 UxThisWidget;
 
1918
 
 
1919
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1920
        UxSaveCtx = UxModelShellContext;
 
1921
        UxModelShellContext = UxContext =
 
1922
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1923
        {
 
1924
        T.emlines=1;
 
1925
        if (T.darkness==0)
 
1926
                strcpy(T.skyfile,"sky_b_em.dat");
 
1927
        else
 
1928
                strcpy(T.skyfile,"sky_d_em.dat");
 
1929
        
 
1930
        
 
1931
        }
 
1932
        UxModelShellContext = UxSaveCtx;
 
1933
}
 
1934
 
 
1935
static void     armCB_tg_noemli( UxWidget, UxClientData, UxCallbackArg )
 
1936
        Widget          UxWidget;
 
1937
        XtPointer       UxClientData, UxCallbackArg;
 
1938
{
 
1939
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1940
        swidget                 UxThisWidget;
 
1941
 
 
1942
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1943
        UxSaveCtx = UxModelShellContext;
 
1944
        UxModelShellContext = UxContext =
 
1945
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1946
        {
 
1947
        T.emlines=0;
 
1948
        if (T.darkness==0)
 
1949
                strcpy(T.skyfile,"sky_b.dat");
 
1950
        else
 
1951
                strcpy(T.skyfile,"sky_d.dat");
 
1952
        
 
1953
        
 
1954
        }
 
1955
        UxModelShellContext = UxSaveCtx;
 
1956
}
 
1957
 
 
1958
static void     armCB_tg_skyon( UxWidget, UxClientData, UxCallbackArg )
 
1959
        Widget          UxWidget;
 
1960
        XtPointer       UxClientData, UxCallbackArg;
 
1961
{
 
1962
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1963
        swidget                 UxThisWidget;
 
1964
 
 
1965
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1966
        UxSaveCtx = UxModelShellContext;
 
1967
        UxModelShellContext = UxContext =
 
1968
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1969
        {
 
1970
        T.isky=1;
 
1971
        plot_sky(T.skyfile);
 
1972
        }
 
1973
        UxModelShellContext = UxSaveCtx;
 
1974
}
 
1975
 
 
1976
static void     armCB_tg_skyoff( UxWidget, UxClientData, UxCallbackArg )
 
1977
        Widget          UxWidget;
 
1978
        XtPointer       UxClientData, UxCallbackArg;
 
1979
{
 
1980
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1981
        swidget                 UxThisWidget;
 
1982
 
 
1983
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
1984
        UxSaveCtx = UxModelShellContext;
 
1985
        UxModelShellContext = UxContext =
 
1986
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
1987
        {
 
1988
        
 
1989
        T.isky=0;
 
1990
        }
 
1991
        UxModelShellContext = UxSaveCtx;
 
1992
}
 
1993
 
 
1994
static void     armCB_tg_optyes( UxWidget, UxClientData, UxCallbackArg )
 
1995
        Widget          UxWidget;
 
1996
        XtPointer       UxClientData, UxCallbackArg;
 
1997
{
 
1998
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
1999
        swidget                 UxThisWidget;
 
2000
 
 
2001
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2002
        UxSaveCtx = UxModelShellContext;
 
2003
        UxModelShellContext = UxContext =
 
2004
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2005
        {
 
2006
        T.ioptics=1;
 
2007
        plot_optics(T.opticsfile);
 
2008
        }
 
2009
        UxModelShellContext = UxSaveCtx;
 
2010
}
 
2011
 
 
2012
static void     armCB_tg_optno( UxWidget, UxClientData, UxCallbackArg )
 
2013
        Widget          UxWidget;
 
2014
        XtPointer       UxClientData, UxCallbackArg;
 
2015
{
 
2016
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2017
        swidget                 UxThisWidget;
 
2018
 
 
2019
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2020
        UxSaveCtx = UxModelShellContext;
 
2021
        UxModelShellContext = UxContext =
 
2022
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2023
        {
 
2024
        T.ioptics=0;
 
2025
        }
 
2026
        UxModelShellContext = UxSaveCtx;
 
2027
}
 
2028
 
 
2029
static void     armCB_tg_mirnew( UxWidget, UxClientData, UxCallbackArg )
 
2030
        Widget          UxWidget;
 
2031
        XtPointer       UxClientData, UxCallbackArg;
 
2032
{
 
2033
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2034
        swidget                 UxThisWidget;
 
2035
 
 
2036
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2037
        UxSaveCtx = UxModelShellContext;
 
2038
        UxModelShellContext = UxContext =
 
2039
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2040
        {
 
2041
        T.imirror=1;
 
2042
        plot_optics(T.mirnewfile);
 
2043
        
 
2044
        }
 
2045
        UxModelShellContext = UxSaveCtx;
 
2046
}
 
2047
 
 
2048
static void     armCB_tg_mirold( UxWidget, UxClientData, UxCallbackArg )
 
2049
        Widget          UxWidget;
 
2050
        XtPointer       UxClientData, UxCallbackArg;
 
2051
{
 
2052
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2053
        swidget                 UxThisWidget;
 
2054
 
 
2055
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2056
        UxSaveCtx = UxModelShellContext;
 
2057
        UxModelShellContext = UxContext =
 
2058
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2059
        {
 
2060
        T.imirror=2;
 
2061
        plot_mirror(T.miroldfile);
 
2062
        }
 
2063
        UxModelShellContext = UxSaveCtx;
 
2064
}
 
2065
 
 
2066
static void     armCB_tg_mirno( UxWidget, UxClientData, UxCallbackArg )
 
2067
        Widget          UxWidget;
 
2068
        XtPointer       UxClientData, UxCallbackArg;
 
2069
{
 
2070
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2071
        swidget                 UxThisWidget;
 
2072
 
 
2073
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2074
        UxSaveCtx = UxModelShellContext;
 
2075
        UxModelShellContext = UxContext =
 
2076
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2077
        {
 
2078
        T.imirror=0;
 
2079
        }
 
2080
        UxModelShellContext = UxSaveCtx;
 
2081
}
 
2082
 
 
2083
static void     focusCB_tf_disp_pix( UxWidget, UxClientData, UxCallbackArg )
 
2084
        Widget          UxWidget;
 
2085
        XtPointer       UxClientData, UxCallbackArg;
 
2086
{
 
2087
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2088
        swidget                 UxThisWidget;
 
2089
 
 
2090
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2091
        UxSaveCtx = UxModelShellContext;
 
2092
        UxModelShellContext = UxContext =
 
2093
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2094
        {
 
2095
        UxPutText(UxFindSwidget("helptextModel"),"Resolution in nm/pixel of the dispersor");
 
2096
        }
 
2097
        UxModelShellContext = UxSaveCtx;
 
2098
}
 
2099
 
 
2100
static void     losingFocusCB_tf_disp_pix( UxWidget, UxClientData, UxCallbackArg )
 
2101
        Widget          UxWidget;
 
2102
        XtPointer       UxClientData, UxCallbackArg;
 
2103
{
 
2104
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2105
        swidget                 UxThisWidget;
 
2106
 
 
2107
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2108
        UxSaveCtx = UxModelShellContext;
 
2109
        UxModelShellContext = UxContext =
 
2110
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2111
        {
 
2112
        
 
2113
        UxPutText(UxFindSwidget("helptextModel"),"");
 
2114
        }
 
2115
        UxModelShellContext = UxSaveCtx;
 
2116
}
 
2117
 
 
2118
static void     focusCB_tf_TWmax( UxWidget, UxClientData, UxCallbackArg )
 
2119
        Widget          UxWidget;
 
2120
        XtPointer       UxClientData, UxCallbackArg;
 
2121
{
 
2122
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2123
        swidget                 UxThisWidget;
 
2124
 
 
2125
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2126
        UxSaveCtx = UxModelShellContext;
 
2127
        UxModelShellContext = UxContext =
 
2128
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2129
        {
 
2130
        UxPutText(UxFindSwidget("helptextModel"),"Maximum Wavelength (in nm)");
 
2131
        }
 
2132
        UxModelShellContext = UxSaveCtx;
 
2133
}
 
2134
 
 
2135
static void     losingFocusCB_tf_TWmax( UxWidget, UxClientData, UxCallbackArg )
 
2136
        Widget          UxWidget;
 
2137
        XtPointer       UxClientData, UxCallbackArg;
 
2138
{
 
2139
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2140
        swidget                 UxThisWidget;
 
2141
 
 
2142
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2143
        UxSaveCtx = UxModelShellContext;
 
2144
        UxModelShellContext = UxContext =
 
2145
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2146
        {
 
2147
        int nid;
 
2148
        char am[10];
 
2149
        float maxw;
 
2150
        
 
2151
        nid=sscanf(UxGetText(UxFindSwidget("tf_TWmax")),"%f",&maxw);
 
2152
        if (nid==1)
 
2153
                 between(&XWmax,maxw,.5,2000.);
 
2154
        
 
2155
        sprintf(am,"%.1f",XWmax);
 
2156
        UxPutText(UxFindSwidget("tf_TWmax"),am);
 
2157
        
 
2158
        
 
2159
        UxPutText(UxFindSwidget("helptextModel"),"");
 
2160
        }
 
2161
        UxModelShellContext = UxSaveCtx;
 
2162
}
 
2163
 
 
2164
static void     focusCB_tf_TWmin( UxWidget, UxClientData, UxCallbackArg )
 
2165
        Widget          UxWidget;
 
2166
        XtPointer       UxClientData, UxCallbackArg;
 
2167
{
 
2168
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2169
        swidget                 UxThisWidget;
 
2170
 
 
2171
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2172
        UxSaveCtx = UxModelShellContext;
 
2173
        UxModelShellContext = UxContext =
 
2174
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2175
        {
 
2176
        UxPutText(UxFindSwidget("helptextModel"),"Minimum Wavelength (in nm)");
 
2177
        }
 
2178
        UxModelShellContext = UxSaveCtx;
 
2179
}
 
2180
 
 
2181
static void     losingFocusCB_tf_TWmin( UxWidget, UxClientData, UxCallbackArg )
 
2182
        Widget          UxWidget;
 
2183
        XtPointer       UxClientData, UxCallbackArg;
 
2184
{
 
2185
        _UxCModelShell          *UxSaveCtx, *UxContext;
 
2186
        swidget                 UxThisWidget;
 
2187
 
 
2188
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
2189
        UxSaveCtx = UxModelShellContext;
 
2190
        UxModelShellContext = UxContext =
 
2191
                        (_UxCModelShell *) UxGetContext( UxThisWidget );
 
2192
        {
 
2193
        int nid;
 
2194
        char am[10];
 
2195
        float minw;
 
2196
        
 
2197
        nid=sscanf(UxGetText(UxFindSwidget("tf_TWmin")),"%f",&minw);
 
2198
        if (nid==1)
 
2199
                 between(&XWmin,minw,.5,2000.);
 
2200
        
 
2201
        sprintf(am,"%.1f",XWmin);
 
2202
        UxPutText(UxFindSwidget("tf_TWmin"),am);
 
2203
        
 
2204
        
 
2205
        UxPutText(UxFindSwidget("helptextModel"),"");
 
2206
        }
 
2207
        UxModelShellContext = UxSaveCtx;
 
2208
}
 
2209
 
 
2210
/*******************************************************************************
 
2211
        The 'init_' function sets the private properties for all the
 
2212
        swidgets to the values specified in the Property Table.
 
2213
        Some properties need to be set after the X widgets have been
 
2214
        created and the setting of these properties is done in the
 
2215
        'build_' function after the UxCreateWidget call.
 
2216
*******************************************************************************/
 
2217
 
 
2218
static void     _Uxinit_ModelShell()
 
2219
{
 
2220
        UxPutY( ModelShell, 300 );
 
2221
        UxPutX( ModelShell, 100 );
 
2222
        UxPutTitle( ModelShell, "Transmission_Model" );
 
2223
        UxPutKeyboardFocusPolicy( ModelShell, "pointer" );
 
2224
        UxPutBorderColor( ModelShell, WindowBackground );
 
2225
        UxPutWinGravity( ModelShell, "forget_gravity" );
 
2226
        UxPutGeometry( ModelShell, "+650+60" );
 
2227
        UxPutDefaultFontList( ModelShell, TextFont );
 
2228
        UxPutIconName( ModelShell, "Transmission_Model" );
 
2229
        UxPutHeight( ModelShell, 640 );
 
2230
        UxPutWidth( ModelShell, 440 );
 
2231
 
 
2232
        UxPutBorderColor( form4, WindowBackground );
 
2233
        UxPutBackground( form4, WindowBackground );
 
2234
        UxPutHeight( form4, 540 );
 
2235
        UxPutWidth( form4, 490 );
 
2236
        UxPutY( form4, 40 );
 
2237
        UxPutX( form4, 75 );
 
2238
        UxPutUnitType( form4, "pixels" );
 
2239
        UxPutResizePolicy( form4, "resize_none" );
 
2240
 
 
2241
        UxPutForeground( lbl_spec, TextForeground );
 
2242
        UxPutAlignment( lbl_spec, "alignment_beginning" );
 
2243
        UxPutLabelString( lbl_spec, "Spectrum :" );
 
2244
        UxPutFontList( lbl_spec, TextFont );
 
2245
        UxPutBorderColor( lbl_spec, LabelBackground );
 
2246
        UxPutBackground( lbl_spec, LabelBackground );
 
2247
        UxPutHeight( lbl_spec, 25 );
 
2248
        UxPutWidth( lbl_spec, 74 );
 
2249
        UxPutY( lbl_spec, 79 );
 
2250
        UxPutX( lbl_spec, 16 );
 
2251
 
 
2252
        UxPutText( tf_spectrum, "no spectrum" );
 
2253
        UxPutTranslations( tf_spectrum, chooseTS );
 
2254
        UxPutMaxLength( tf_spectrum, 50 );
 
2255
        UxPutForeground( tf_spectrum, TextForeground );
 
2256
        UxPutHighlightOnEnter( tf_spectrum, "true" );
 
2257
        UxPutFontList( tf_spectrum, TextFont );
 
2258
        UxPutBorderColor( tf_spectrum, TextBackground );
 
2259
        UxPutBackground( tf_spectrum, TextBackground );
 
2260
        UxPutHeight( tf_spectrum, 35 );
 
2261
        UxPutWidth( tf_spectrum, 190 );
 
2262
        UxPutY( tf_spectrum, 74 );
 
2263
        UxPutX( tf_spectrum, 234 );
 
2264
 
 
2265
        UxPutForeground( lbl_atm, TextForeground );
 
2266
        UxPutAlignment( lbl_atm, "alignment_beginning" );
 
2267
        UxPutLabelString( lbl_atm, "Atmospheric\nextinction :" );
 
2268
        UxPutFontList( lbl_atm, TextFont );
 
2269
        UxPutBorderColor( lbl_atm, LabelBackground );
 
2270
        UxPutBackground( lbl_atm, LabelBackground );
 
2271
        UxPutHeight( lbl_atm, 39 );
 
2272
        UxPutWidth( lbl_atm, 88 );
 
2273
        UxPutY( lbl_atm, 181 );
 
2274
        UxPutX( lbl_atm, 12 );
 
2275
 
 
2276
        UxPutForeground( lbl_airmass, TextForeground );
 
2277
        UxPutAlignment( lbl_airmass, "alignment_beginning" );
 
2278
        UxPutLabelString( lbl_airmass, "Airmass :" );
 
2279
        UxPutFontList( lbl_airmass, TextFont );
 
2280
        UxPutBorderColor( lbl_airmass, LabelBackground );
 
2281
        UxPutBackground( lbl_airmass, LabelBackground );
 
2282
        UxPutHeight( lbl_airmass, 30 );
 
2283
        UxPutWidth( lbl_airmass, 70 );
 
2284
        UxPutY( lbl_airmass, 185 );
 
2285
        UxPutX( lbl_airmass, 270 );
 
2286
 
 
2287
        UxPutHorizontalSpacing( form6, 10 );
 
2288
        UxPutButtonFontList( form6, BoldTextFont );
 
2289
        UxPutBorderColor( form6, ButtonBackground );
 
2290
        UxPutBackground( form6, ButtonBackground );
 
2291
        UxPutHeight( form6, 66 );
 
2292
        UxPutWidth( form6, 440 );
 
2293
        UxPutY( form6, 572 );
 
2294
        UxPutX( form6, 0 );
 
2295
        UxPutResizePolicy( form6, "resize_none" );
 
2296
 
 
2297
        UxPutWidth( pB_MReset, 120 );
 
2298
        UxPutTranslations( pB_MReset, helpTM );
 
2299
        UxPutLabelString( pB_MReset, "Reset" );
 
2300
        UxPutForeground( pB_MReset, ButtonForeground );
 
2301
        UxPutFontList( pB_MReset, BoldTextFont );
 
2302
        UxPutBorderColor( pB_MReset, ButtonBackground );
 
2303
        UxPutBackground( pB_MReset, ButtonBackground );
 
2304
        UxPutHeight( pB_MReset, 30 );
 
2305
        UxPutY( pB_MReset, 2 );
 
2306
        UxPutX( pB_MReset, 14 );
 
2307
 
 
2308
        UxPutWidth( pB_Mtrans, 120 );
 
2309
        UxPutTranslations( pB_Mtrans, helpTM );
 
2310
        UxPutLabelString( pB_Mtrans, "Transmission" );
 
2311
        UxPutForeground( pB_Mtrans, ApplyForeground );
 
2312
        UxPutFontList( pB_Mtrans, BoldTextFont );
 
2313
        UxPutBorderColor( pB_Mtrans, ButtonBackground );
 
2314
        UxPutBackground( pB_Mtrans, ButtonBackground );
 
2315
        UxPutHeight( pB_Mtrans, 30 );
 
2316
        UxPutY( pB_Mtrans, 34 );
 
2317
        UxPutX( pB_Mtrans, 15 );
 
2318
 
 
2319
        UxPutWidth( pB_Mres, 120 );
 
2320
        UxPutTranslations( pB_Mres, helpTM );
 
2321
        UxPutLabelString( pB_Mres, "Apply" );
 
2322
        UxPutForeground( pB_Mres, ApplyForeground );
 
2323
        UxPutFontList( pB_Mres, BoldTextFont );
 
2324
        UxPutBorderColor( pB_Mres, ButtonBackground );
 
2325
        UxPutBackground( pB_Mres, ButtonBackground );
 
2326
        UxPutHeight( pB_Mres, 30 );
 
2327
        UxPutY( pB_Mres, 34 );
 
2328
        UxPutX( pB_Mres, 160 );
 
2329
 
 
2330
        UxPutWidth( pB_MFCreate, 120 );
 
2331
        UxPutY( pB_MFCreate, 5 );
 
2332
        UxPutX( pB_MFCreate, 308 );
 
2333
        UxPutTranslations( pB_MFCreate, helpTM );
 
2334
        UxPutLabelString( pB_MFCreate, "Create Filter ..." );
 
2335
        UxPutForeground( pB_MFCreate, ButtonForeground );
 
2336
        UxPutFontList( pB_MFCreate, BoldTextFont );
 
2337
        UxPutBorderColor( pB_MFCreate, ButtonBackground );
 
2338
        UxPutBackground( pB_MFCreate, ButtonBackground );
 
2339
        UxPutHeight( pB_MFCreate, 30 );
 
2340
 
 
2341
        UxPutWidth( pB_MPrint, 120 );
 
2342
        UxPutTranslations( pB_MPrint, helpTM );
 
2343
        UxPutLabelString( pB_MPrint, "Print" );
 
2344
        UxPutForeground( pB_MPrint, ButtonForeground );
 
2345
        UxPutFontList( pB_MPrint, BoldTextFont );
 
2346
        UxPutBorderColor( pB_MPrint, ButtonBackground );
 
2347
        UxPutBackground( pB_MPrint, ButtonBackground );
 
2348
        UxPutHeight( pB_MPrint, 30 );
 
2349
        UxPutY( pB_MPrint, 5 );
 
2350
        UxPutX( pB_MPrint, 160 );
 
2351
 
 
2352
        UxPutSpacing( atm_mod, 0 );
 
2353
        UxPutMarginHeight( atm_mod, 0 );
 
2354
        UxPutOrientation( atm_mod, "horizontal" );
 
2355
        UxPutIsAligned( atm_mod, "true" );
 
2356
        UxPutEntryAlignment( atm_mod, "alignment_beginning" );
 
2357
        UxPutBorderWidth( atm_mod, 0 );
 
2358
        UxPutShadowThickness( atm_mod, 0 );
 
2359
        UxPutLabelString( atm_mod, "" );
 
2360
        UxPutEntryBorder( atm_mod, 0 );
 
2361
        UxPutBorderColor( atm_mod, WindowBackground );
 
2362
        UxPutBackground( atm_mod, WindowBackground );
 
2363
        UxPutRadioBehavior( atm_mod, "true" );
 
2364
        UxPutHeight( atm_mod, 37 );
 
2365
        UxPutWidth( atm_mod, 171 );
 
2366
        UxPutY( atm_mod, 186 );
 
2367
        UxPutX( atm_mod, 121 );
 
2368
 
 
2369
        UxPutTranslations( tg_atmyes, helpTM );
 
2370
        UxPutHighlightOnEnter( tg_atmyes, "true" );
 
2371
        UxPutForeground( tg_atmyes, TextForeground );
 
2372
        UxPutSelectColor( tg_atmyes, SelectColor );
 
2373
        UxPutSet( tg_atmyes, "true" );
 
2374
        UxPutLabelString( tg_atmyes, "yes" );
 
2375
        UxPutFontList( tg_atmyes, TextFont );
 
2376
        UxPutBorderColor( tg_atmyes, WindowBackground );
 
2377
        UxPutBackground( tg_atmyes, WindowBackground );
 
2378
        UxPutHeight( tg_atmyes, 28 );
 
2379
        UxPutWidth( tg_atmyes, 77 );
 
2380
        UxPutY( tg_atmyes, 200 );
 
2381
        UxPutX( tg_atmyes, 3 );
 
2382
 
 
2383
        UxPutTranslations( tg_atmno, helpTM );
 
2384
        UxPutHighlightOnEnter( tg_atmno, "true" );
 
2385
        UxPutSet( tg_atmno, "false" );
 
2386
        UxPutForeground( tg_atmno, TextForeground );
 
2387
        UxPutSelectColor( tg_atmno, SelectColor );
 
2388
        UxPutLabelString( tg_atmno, "no " );
 
2389
        UxPutFontList( tg_atmno, TextFont );
 
2390
        UxPutBorderColor( tg_atmno, WindowBackground );
 
2391
        UxPutBackground( tg_atmno, WindowBackground );
 
2392
        UxPutHeight( tg_atmno, 28 );
 
2393
        UxPutWidth( tg_atmno, 119 );
 
2394
        UxPutY( tg_atmno, 200 );
 
2395
        UxPutX( tg_atmno, 54 );
 
2396
 
 
2397
        UxPutFontList( helptextModel, TextFont );
 
2398
        UxPutEditable( helptextModel, "false" );
 
2399
        UxPutCursorPositionVisible( helptextModel, "false" );
 
2400
        UxPutBorderColor( helptextModel, SHelpBackground );
 
2401
        UxPutBackground( helptextModel, SHelpBackground );
 
2402
        UxPutHeight( helptextModel, 50 );
 
2403
        UxPutWidth( helptextModel, 490 );
 
2404
        UxPutY( helptextModel, 300 );
 
2405
        UxPutX( helptextModel, 0 );
 
2406
 
 
2407
        UxPutBorderColor( separator8, WindowBackground );
 
2408
        UxPutBackground( separator8, WindowBackground );
 
2409
        UxPutHeight( separator8, 5 );
 
2410
        UxPutWidth( separator8, 492 );
 
2411
        UxPutY( separator8, 340 );
 
2412
        UxPutX( separator8, 0 );
 
2413
 
 
2414
        UxPutRowColumnType( menu_spec, "menu_pulldown" );
 
2415
 
 
2416
        UxPutForeground( mn_standard, TextForeground );
 
2417
        UxPutFontList( mn_standard, TextFont );
 
2418
        UxPutBorderColor( mn_standard, WindowBackground );
 
2419
        UxPutBackground( mn_standard, WindowBackground );
 
2420
        UxPutLabelString( mn_standard, "Standard" );
 
2421
 
 
2422
        UxPutForeground( mn_hststd, TextForeground );
 
2423
        UxPutFontList( mn_hststd, TextFont );
 
2424
        UxPutBorderColor( mn_hststd, WindowBackground );
 
2425
        UxPutBackground( mn_hststd, WindowBackground );
 
2426
        UxPutLabelString( mn_hststd, "HST Std" );
 
2427
 
 
2428
        UxPutForeground( mn_ctiostd, TextForeground );
 
2429
        UxPutFontList( mn_ctiostd, TextFont );
 
2430
        UxPutBorderColor( mn_ctiostd, WindowBackground );
 
2431
        UxPutBackground( mn_ctiostd, WindowBackground );
 
2432
        UxPutLabelString( mn_ctiostd, "CTIO Std" );
 
2433
 
 
2434
        UxPutMarginWidth( mn_blackbody, 0 );
 
2435
        UxPutForeground( mn_blackbody, TextForeground );
 
2436
        UxPutFontList( mn_blackbody, TextFont );
 
2437
        UxPutBorderColor( mn_blackbody, WindowBackground );
 
2438
        UxPutBackground( mn_blackbody, WindowBackground );
 
2439
        UxPutLabelString( mn_blackbody, "Black Body ..." );
 
2440
 
 
2441
        UxPutTranslations( mn_spec, helpTM );
 
2442
        UxPutHeight( mn_spec, 35 );
 
2443
        UxPutSpacing( mn_spec, 0 );
 
2444
        UxPutMarginWidth( mn_spec, 0 );
 
2445
        UxPutForeground( mn_spec, TextForeground );
 
2446
        UxPutBorderColor( mn_spec, WindowBackground );
 
2447
        UxPutBackground( mn_spec, WindowBackground );
 
2448
        UxPutY( mn_spec, 74 );
 
2449
        UxPutX( mn_spec, 92 );
 
2450
        UxPutRowColumnType( mn_spec, "menu_option" );
 
2451
 
 
2452
        UxPutTranslations( tf_airmass, text_tab );
 
2453
        UxPutText( tf_airmass, "1." );
 
2454
        UxPutForeground( tf_airmass, TextForeground );
 
2455
        UxPutHighlightOnEnter( tf_airmass, "true" );
 
2456
        UxPutFontList( tf_airmass, TextFont );
 
2457
        UxPutBorderColor( tf_airmass, TextBackground );
 
2458
        UxPutBackground( tf_airmass, TextBackground );
 
2459
        UxPutHeight( tf_airmass, 35 );
 
2460
        UxPutWidth( tf_airmass, 80 );
 
2461
        UxPutY( tf_airmass, 183 );
 
2462
        UxPutX( tf_airmass, 342 );
 
2463
 
 
2464
        UxPutForeground( lbl_mirror, TextForeground );
 
2465
        UxPutAlignment( lbl_mirror, "alignment_beginning" );
 
2466
        UxPutLabelString( lbl_mirror, "Mirror :" );
 
2467
        UxPutFontList( lbl_mirror, TextFont );
 
2468
        UxPutBorderColor( lbl_mirror, LabelBackground );
 
2469
        UxPutBackground( lbl_mirror, LabelBackground );
 
2470
        UxPutHeight( lbl_mirror, 30 );
 
2471
        UxPutWidth( lbl_mirror, 62 );
 
2472
        UxPutY( lbl_mirror, 230 );
 
2473
        UxPutX( lbl_mirror, 14 );
 
2474
 
 
2475
        UxPutForeground( lbl_grism, TextForeground );
 
2476
        UxPutAlignment( lbl_grism, "alignment_beginning" );
 
2477
        UxPutLabelString( lbl_grism, "Grism :" );
 
2478
        UxPutFontList( lbl_grism, TextFont );
 
2479
        UxPutBorderColor( lbl_grism, LabelBackground );
 
2480
        UxPutBackground( lbl_grism, LabelBackground );
 
2481
        UxPutHeight( lbl_grism, 30 );
 
2482
        UxPutWidth( lbl_grism, 54 );
 
2483
        UxPutY( lbl_grism, 268 );
 
2484
        UxPutX( lbl_grism, 14 );
 
2485
 
 
2486
        UxPutForeground( lbl_filter, TextForeground );
 
2487
        UxPutAlignment( lbl_filter, "alignment_beginning" );
 
2488
        UxPutLabelString( lbl_filter, "Filter :" );
 
2489
        UxPutFontList( lbl_filter, TextFont );
 
2490
        UxPutBorderColor( lbl_filter, LabelBackground );
 
2491
        UxPutBackground( lbl_filter, LabelBackground );
 
2492
        UxPutHeight( lbl_filter, 30 );
 
2493
        UxPutWidth( lbl_filter, 50 );
 
2494
        UxPutY( lbl_filter, 312 );
 
2495
        UxPutX( lbl_filter, 14 );
 
2496
 
 
2497
        UxPutRowColumnType( me_10grism, "menu_pulldown" );
 
2498
 
 
2499
        UxPutForeground( mn_nogrism, TextForeground );
 
2500
        UxPutFontList( mn_nogrism, TextFont );
 
2501
        UxPutBorderColor( mn_nogrism, WindowBackground );
 
2502
        UxPutBackground( mn_nogrism, WindowBackground );
 
2503
        UxPutLabelString( mn_nogrism, " Free Position " );
 
2504
 
 
2505
        UxPutBorderColor( mn_grism0, WindowBackground );
 
2506
        UxPutBackground( mn_grism0, WindowBackground );
 
2507
        UxPutForeground( mn_grism0, TextForeground );
 
2508
        UxPutFontList( mn_grism0, TextFont );
 
2509
        UxPutLabelString( mn_grism0, " Grism #0 " );
 
2510
 
 
2511
        UxPutForeground( mn_grism1, TextForeground );
 
2512
        UxPutFontList( mn_grism1, TextFont );
 
2513
        UxPutBorderColor( mn_grism1, WindowBackground );
 
2514
        UxPutBackground( mn_grism1, WindowBackground );
 
2515
        UxPutLabelString( mn_grism1, " Grism #1 " );
 
2516
 
 
2517
        UxPutBorderColor( mn_grism2, WindowBackground );
 
2518
        UxPutBackground( mn_grism2, WindowBackground );
 
2519
        UxPutForeground( mn_grism2, TextForeground );
 
2520
        UxPutFontList( mn_grism2, TextFont );
 
2521
        UxPutLabelString( mn_grism2, " Grism #2 " );
 
2522
 
 
2523
        UxPutBorderColor( mn_grism3, WindowBackground );
 
2524
        UxPutBackground( mn_grism3, WindowBackground );
 
2525
        UxPutForeground( mn_grism3, TextForeground );
 
2526
        UxPutFontList( mn_grism3, TextFont );
 
2527
        UxPutLabelString( mn_grism3, " Grism #3 " );
 
2528
 
 
2529
        UxPutBorderColor( mn_grism4, WindowBackground );
 
2530
        UxPutBackground( mn_grism4, WindowBackground );
 
2531
        UxPutForeground( mn_grism4, TextForeground );
 
2532
        UxPutFontList( mn_grism4, TextFont );
 
2533
        UxPutLabelString( mn_grism4, " Grism #4 " );
 
2534
 
 
2535
        UxPutBorderColor( mn_grism5, WindowBackground );
 
2536
        UxPutBackground( mn_grism5, WindowBackground );
 
2537
        UxPutForeground( mn_grism5, TextForeground );
 
2538
        UxPutFontList( mn_grism5, TextFont );
 
2539
        UxPutLabelString( mn_grism5, " Grism #5 " );
 
2540
 
 
2541
        UxPutBorderColor( mn_grism6, WindowBackground );
 
2542
        UxPutBackground( mn_grism6, WindowBackground );
 
2543
        UxPutForeground( mn_grism6, TextForeground );
 
2544
        UxPutFontList( mn_grism6, TextFont );
 
2545
        UxPutLabelString( mn_grism6, " Grism #6 " );
 
2546
 
 
2547
        UxPutBorderColor( mn_grism7, WindowBackground );
 
2548
        UxPutBackground( mn_grism7, WindowBackground );
 
2549
        UxPutForeground( mn_grism7, TextForeground );
 
2550
        UxPutFontList( mn_grism7, TextFont );
 
2551
        UxPutLabelString( mn_grism7, " Grism #7 " );
 
2552
 
 
2553
        UxPutBorderColor( mn_grism8, WindowBackground );
 
2554
        UxPutBackground( mn_grism8, WindowBackground );
 
2555
        UxPutForeground( mn_grism8, TextForeground );
 
2556
        UxPutFontList( mn_grism8, TextFont );
 
2557
        UxPutLabelString( mn_grism8, " Grism #8 " );
 
2558
 
 
2559
        UxPutBorderColor( mn_grism9, WindowBackground );
 
2560
        UxPutBackground( mn_grism9, WindowBackground );
 
2561
        UxPutForeground( mn_grism9, TextForeground );
 
2562
        UxPutFontList( mn_grism9, TextFont );
 
2563
        UxPutLabelString( mn_grism9, " Grism #9 " );
 
2564
 
 
2565
        UxPutLabelString( mn_wgrism, "" );
 
2566
        UxPutTranslations( mn_wgrism, helpTM );
 
2567
        UxPutHeight( mn_wgrism, 35 );
 
2568
        UxPutForeground( mn_wgrism, TextForeground );
 
2569
        UxPutBorderColor( mn_wgrism, WindowBackground );
 
2570
        UxPutBackground( mn_wgrism, WindowBackground );
 
2571
        UxPutY( mn_wgrism, 266 );
 
2572
        UxPutX( mn_wgrism, 68 );
 
2573
        UxPutRowColumnType( mn_wgrism, "menu_option" );
 
2574
 
 
2575
        UxPutTranslations( tf_filter, chooseTF );
 
2576
        UxPutForeground( tf_filter, TextForeground );
 
2577
        UxPutHighlightOnEnter( tf_filter, "true" );
 
2578
        UxPutFontList( tf_filter, TextFont );
 
2579
        UxPutBorderColor( tf_filter, TextBackground );
 
2580
        UxPutBackground( tf_filter, TextBackground );
 
2581
        UxPutHeight( tf_filter, 35 );
 
2582
        UxPutWidth( tf_filter, 190 );
 
2583
        UxPutY( tf_filter, 310 );
 
2584
        UxPutX( tf_filter, 232 );
 
2585
 
 
2586
        UxPutY( lbl_ccd, 354 );
 
2587
        UxPutX( lbl_ccd, 14 );
 
2588
        UxPutForeground( lbl_ccd, TextForeground );
 
2589
        UxPutAlignment( lbl_ccd, "alignment_beginning" );
 
2590
        UxPutLabelString( lbl_ccd, "CCD #00 :" );
 
2591
        UxPutFontList( lbl_ccd, TextFont );
 
2592
        UxPutBorderColor( lbl_ccd, LabelBackground );
 
2593
        UxPutBackground( lbl_ccd, LabelBackground );
 
2594
        UxPutHeight( lbl_ccd, 30 );
 
2595
        UxPutWidth( lbl_ccd, 74 );
 
2596
 
 
2597
        UxPutOrientation( list_filt, "horizontal" );
 
2598
        UxPutIsAligned( list_filt, "true" );
 
2599
        UxPutEntryAlignment( list_filt, "alignment_beginning" );
 
2600
        UxPutBorderWidth( list_filt, 0 );
 
2601
        UxPutShadowThickness( list_filt, 0 );
 
2602
        UxPutLabelString( list_filt, "" );
 
2603
        UxPutEntryBorder( list_filt, 0 );
 
2604
        UxPutBorderColor( list_filt, WindowBackground );
 
2605
        UxPutBackground( list_filt, WindowBackground );
 
2606
        UxPutRadioBehavior( list_filt, "true" );
 
2607
        UxPutHeight( list_filt, 78 );
 
2608
        UxPutWidth( list_filt, 171 );
 
2609
        UxPutY( list_filt, 310 );
 
2610
        UxPutX( list_filt, 57 );
 
2611
 
 
2612
        UxPutTranslations( tg_basic, helpTM );
 
2613
        UxPutHighlightOnEnter( tg_basic, "true" );
 
2614
        UxPutForeground( tg_basic, TextForeground );
 
2615
        UxPutSelectColor( tg_basic, SelectColor );
 
2616
        UxPutSet( tg_basic, "true" );
 
2617
        UxPutLabelString( tg_basic, "Basic" );
 
2618
        UxPutFontList( tg_basic, TextFont );
 
2619
        UxPutBorderColor( tg_basic, WindowBackground );
 
2620
        UxPutBackground( tg_basic, WindowBackground );
 
2621
        UxPutHeight( tg_basic, 28 );
 
2622
        UxPutWidth( tg_basic, 87 );
 
2623
        UxPutY( tg_basic, 0 );
 
2624
        UxPutX( tg_basic, 0 );
 
2625
 
 
2626
        UxPutTranslations( tg_all, helpTM );
 
2627
        UxPutHighlightOnEnter( tg_all, "true" );
 
2628
        UxPutSet( tg_all, "false" );
 
2629
        UxPutForeground( tg_all, TextForeground );
 
2630
        UxPutSelectColor( tg_all, SelectColor );
 
2631
        UxPutLabelString( tg_all, "All" );
 
2632
        UxPutFontList( tg_all, TextFont );
 
2633
        UxPutBorderColor( tg_all, WindowBackground );
 
2634
        UxPutBackground( tg_all, WindowBackground );
 
2635
        UxPutHeight( tg_all, 28 );
 
2636
        UxPutWidth( tg_all, 53 );
 
2637
        UxPutY( tg_all, 10 );
 
2638
        UxPutX( tg_all, 39 );
 
2639
 
 
2640
        UxPutMarginWidth( tg_ccd, 0 );
 
2641
        UxPutSpacing( tg_ccd, 3 );
 
2642
        UxPutMarginHeight( tg_ccd, 0 );
 
2643
        UxPutOrientation( tg_ccd, "horizontal" );
 
2644
        UxPutIsAligned( tg_ccd, "true" );
 
2645
        UxPutEntryAlignment( tg_ccd, "alignment_beginning" );
 
2646
        UxPutBorderWidth( tg_ccd, 0 );
 
2647
        UxPutShadowThickness( tg_ccd, 0 );
 
2648
        UxPutLabelString( tg_ccd, "" );
 
2649
        UxPutEntryBorder( tg_ccd, 0 );
 
2650
        UxPutBorderColor( tg_ccd, WindowBackground );
 
2651
        UxPutBackground( tg_ccd, WindowBackground );
 
2652
        UxPutRadioBehavior( tg_ccd, "true" );
 
2653
        UxPutHeight( tg_ccd, 78 );
 
2654
        UxPutWidth( tg_ccd, 171 );
 
2655
        UxPutY( tg_ccd, 353 );
 
2656
        UxPutX( tg_ccd, 86 );
 
2657
 
 
2658
        UxPutTranslations( tg_ccdyes, helpTM );
 
2659
        UxPutHighlightOnEnter( tg_ccdyes, "true" );
 
2660
        UxPutForeground( tg_ccdyes, TextForeground );
 
2661
        UxPutSelectColor( tg_ccdyes, SelectColor );
 
2662
        UxPutSet( tg_ccdyes, "true" );
 
2663
        UxPutLabelString( tg_ccdyes, "yes" );
 
2664
        UxPutFontList( tg_ccdyes, TextFont );
 
2665
        UxPutBorderColor( tg_ccdyes, WindowBackground );
 
2666
        UxPutBackground( tg_ccdyes, WindowBackground );
 
2667
        UxPutHeight( tg_ccdyes, 28 );
 
2668
        UxPutWidth( tg_ccdyes, 87 );
 
2669
        UxPutY( tg_ccdyes, 0 );
 
2670
        UxPutX( tg_ccdyes, 0 );
 
2671
 
 
2672
        UxPutTranslations( tg_ccdno, helpTM );
 
2673
        UxPutHighlightOnEnter( tg_ccdno, "true" );
 
2674
        UxPutSet( tg_ccdno, "false" );
 
2675
        UxPutForeground( tg_ccdno, TextForeground );
 
2676
        UxPutSelectColor( tg_ccdno, SelectColor );
 
2677
        UxPutLabelString( tg_ccdno, "no" );
 
2678
        UxPutFontList( tg_ccdno, TextFont );
 
2679
        UxPutBorderColor( tg_ccdno, WindowBackground );
 
2680
        UxPutBackground( tg_ccdno, WindowBackground );
 
2681
        UxPutHeight( tg_ccdno, 28 );
 
2682
        UxPutWidth( tg_ccdno, 53 );
 
2683
        UxPutY( tg_ccdno, 3 );
 
2684
        UxPutX( tg_ccdno, 70 );
 
2685
 
 
2686
        UxPutTranslations( tf_time, text_tab );
 
2687
        UxPutText( tf_time, "1.00" );
 
2688
        UxPutForeground( tf_time, TextForeground );
 
2689
        UxPutHighlightOnEnter( tf_time, "true" );
 
2690
        UxPutFontList( tf_time, TextFont );
 
2691
        UxPutBorderColor( tf_time, TextBackground );
 
2692
        UxPutBackground( tf_time, TextBackground );
 
2693
        UxPutHeight( tf_time, 35 );
 
2694
        UxPutWidth( tf_time, 80 );
 
2695
        UxPutY( tf_time, 394 );
 
2696
        UxPutX( tf_time, 188 );
 
2697
 
 
2698
        UxPutForeground( lbl_eadu, TextForeground );
 
2699
        UxPutAlignment( lbl_eadu, "alignment_beginning" );
 
2700
        UxPutLabelString( lbl_eadu, "e-/ADU :" );
 
2701
        UxPutFontList( lbl_eadu, TextFont );
 
2702
        UxPutBorderColor( lbl_eadu, LabelBackground );
 
2703
        UxPutBackground( lbl_eadu, LabelBackground );
 
2704
        UxPutHeight( lbl_eadu, 30 );
 
2705
        UxPutWidth( lbl_eadu, 66 );
 
2706
        UxPutY( lbl_eadu, 352 );
 
2707
        UxPutX( lbl_eadu, 274 );
 
2708
 
 
2709
        UxPutTranslations( tf_eadu, text_tab );
 
2710
        UxPutText( tf_eadu, "1." );
 
2711
        UxPutForeground( tf_eadu, TextForeground );
 
2712
        UxPutHighlightOnEnter( tf_eadu, "true" );
 
2713
        UxPutFontList( tf_eadu, TextFont );
 
2714
        UxPutBorderColor( tf_eadu, TextBackground );
 
2715
        UxPutBackground( tf_eadu, TextBackground );
 
2716
        UxPutHeight( tf_eadu, 35 );
 
2717
        UxPutWidth( tf_eadu, 80 );
 
2718
        UxPutY( tf_eadu, 350 );
 
2719
        UxPutX( tf_eadu, 342 );
 
2720
 
 
2721
        UxPutSpacing( meModel, 10 );
 
2722
        UxPutMenuAccelerator( meModel, "<KeyUp>F10" );
 
2723
        UxPutBorderColor( meModel, MenuBackground );
 
2724
        UxPutBackground( meModel, MenuBackground );
 
2725
        UxPutRowColumnType( meModel, "menu_bar" );
 
2726
 
 
2727
        UxPutBorderColor( me_m_file, MenuBackground );
 
2728
        UxPutBackground( me_m_file, MenuBackground );
 
2729
        UxPutRowColumnType( me_m_file, "menu_pulldown" );
 
2730
 
 
2731
        UxPutMnemonic( me_m_load, "L" );
 
2732
        UxPutForeground( me_m_load, MenuForeground );
 
2733
        UxPutFontList( me_m_load, BoldTextFont );
 
2734
        UxPutBorderColor( me_m_load, MenuBackground );
 
2735
        UxPutBackground( me_m_load, MenuBackground );
 
2736
        UxPutLabelString( me_m_load, "Load Config..." );
 
2737
 
 
2738
        UxPutMnemonic( me_m_save, "S" );
 
2739
        UxPutForeground( me_m_save, MenuForeground );
 
2740
        UxPutFontList( me_m_save, BoldTextFont );
 
2741
        UxPutBorderColor( me_m_save, MenuBackground );
 
2742
        UxPutBackground( me_m_save, MenuBackground );
 
2743
        UxPutLabelString( me_m_save, "Save Config" );
 
2744
 
 
2745
        UxPutMnemonic( me_m_saveas, "a" );
 
2746
        UxPutForeground( me_m_saveas, MenuForeground );
 
2747
        UxPutFontList( me_m_saveas, BoldTextFont );
 
2748
        UxPutBorderColor( me_m_saveas, MenuBackground );
 
2749
        UxPutBackground( me_m_saveas, MenuBackground );
 
2750
        UxPutLabelString( me_m_saveas, "Save Config as..." );
 
2751
 
 
2752
        UxPutForeground( me_m_sep, MenuForeground );
 
2753
        UxPutBorderColor( me_m_sep, MenuBackground );
 
2754
        UxPutBackground( me_m_sep, MenuBackground );
 
2755
 
 
2756
        UxPutForeground( me_m_loadcurve, MenuForeground );
 
2757
        UxPutFontList( me_m_loadcurve, BoldTextFont );
 
2758
        UxPutBorderColor( me_m_loadcurve, MenuBackground );
 
2759
        UxPutBackground( me_m_loadcurve, MenuBackground );
 
2760
        UxPutMnemonic( me_m_loadcurve, "o" );
 
2761
        UxPutLabelString( me_m_loadcurve, "Load Curve..." );
 
2762
 
 
2763
        UxPutForeground( me_m_savecurve, MenuForeground );
 
2764
        UxPutFontList( me_m_savecurve, BoldTextFont );
 
2765
        UxPutBorderColor( me_m_savecurve, MenuBackground );
 
2766
        UxPutBackground( me_m_savecurve, MenuBackground );
 
2767
        UxPutMnemonic( me_m_savecurve, "v" );
 
2768
        UxPutLabelString( me_m_savecurve, "Save Curve" );
 
2769
 
 
2770
        UxPutForeground( me_m_saveascurve, MenuForeground );
 
2771
        UxPutFontList( me_m_saveascurve, BoldTextFont );
 
2772
        UxPutBorderColor( me_m_saveascurve, MenuBackground );
 
2773
        UxPutBackground( me_m_saveascurve, MenuBackground );
 
2774
        UxPutMnemonic( me_m_saveascurve, "s" );
 
2775
        UxPutLabelString( me_m_saveascurve, "Save Curve as ..." );
 
2776
 
 
2777
        UxPutForeground( mt_m_file, MenuForeground );
 
2778
        UxPutFontList( mt_m_file, BoldTextFont );
 
2779
        UxPutBorderColor( mt_m_file, MenuBackground );
 
2780
        UxPutBackground( mt_m_file, MenuBackground );
 
2781
        UxPutMnemonic( mt_m_file, "F" );
 
2782
        UxPutLabelString( mt_m_file, "File" );
 
2783
 
 
2784
        UxPutBorderColor( me_m_frame, MenuBackground );
 
2785
        UxPutBackground( me_m_frame, MenuBackground );
 
2786
        UxPutRowColumnType( me_m_frame, "menu_pulldown" );
 
2787
 
 
2788
        UxPutBorderColor( me_m_trimx, MenuBackground );
 
2789
        UxPutBackground( me_m_trimx, MenuBackground );
 
2790
        UxPutForeground( me_m_trimx, MenuForeground );
 
2791
        UxPutFontList( me_m_trimx, BoldTextFont );
 
2792
        UxPutMnemonic( me_m_trimx, "X" );
 
2793
        UxPutLabelString( me_m_trimx, "Cut X" );
 
2794
 
 
2795
        UxPutBorderColor( me_m_trimy, MenuBackground );
 
2796
        UxPutBackground( me_m_trimy, MenuBackground );
 
2797
        UxPutForeground( me_m_trimy, MenuForeground );
 
2798
        UxPutFontList( me_m_trimy, BoldTextFont );
 
2799
        UxPutMnemonic( me_m_trimy, "Y" );
 
2800
        UxPutLabelString( me_m_trimy, "Cut Y" );
 
2801
 
 
2802
        UxPutBorderColor( me_m_unzoom, MenuBackground );
 
2803
        UxPutBackground( me_m_unzoom, MenuBackground );
 
2804
        UxPutForeground( me_m_unzoom, MenuForeground );
 
2805
        UxPutFontList( me_m_unzoom, BoldTextFont );
 
2806
        UxPutMnemonic( me_m_unzoom, "U" );
 
2807
        UxPutLabelString( me_m_unzoom, "Unzoom" );
 
2808
 
 
2809
        UxPutBorderColor( me_m_redraw, MenuBackground );
 
2810
        UxPutBackground( me_m_redraw, MenuBackground );
 
2811
        UxPutForeground( me_m_redraw, MenuForeground );
 
2812
        UxPutFontList( me_m_redraw, BoldTextFont );
 
2813
        UxPutMnemonic( me_m_redraw, "R" );
 
2814
        UxPutLabelString( me_m_redraw, "Redraw" );
 
2815
 
 
2816
        UxPutBorderColor( me_m_print, MenuBackground );
 
2817
        UxPutBackground( me_m_print, MenuBackground );
 
2818
        UxPutForeground( me_m_print, MenuForeground );
 
2819
        UxPutFontList( me_m_print, BoldTextFont );
 
2820
        UxPutMnemonic( me_m_print, "P" );
 
2821
        UxPutLabelString( me_m_print, "Print" );
 
2822
 
 
2823
        UxPutFontList( mt_m_frame, BoldTextFont );
 
2824
        UxPutForeground( mt_m_frame, MenuForeground );
 
2825
        UxPutBorderColor( mt_m_frame, MenuBackground );
 
2826
        UxPutBackground( mt_m_frame, MenuBackground );
 
2827
        UxPutMnemonic( mt_m_frame, "a" );
 
2828
        UxPutLabelString( mt_m_frame, "Frame" );
 
2829
 
 
2830
        UxPutRowColumnType( me_m_option, "menu_pulldown" );
 
2831
 
 
2832
        UxPutRadioBehavior( me_m_plotoption, "true" );
 
2833
        UxPutForeground( me_m_plotoption, MenuForeground );
 
2834
        UxPutBorderColor( me_m_plotoption, MenuBackground );
 
2835
        UxPutBackground( me_m_plotoption, MenuBackground );
 
2836
        UxPutRowColumnType( me_m_plotoption, "menu_pulldown" );
 
2837
 
 
2838
        UxPutSet( me_m_plot, "true" );
 
2839
        UxPutSelectColor( me_m_plot, SelectColor );
 
2840
        UxPutFontList( me_m_plot, BoldTextFont );
 
2841
        UxPutLabelString( me_m_plot, "PLot one item" );
 
2842
 
 
2843
        UxPutSelectColor( me_m_oplot, SelectColor );
 
2844
        UxPutFontList( me_m_oplot, BoldTextFont );
 
2845
        UxPutLabelString( me_m_oplot, "Overplot items" );
 
2846
 
 
2847
        UxPutForeground( me_m_pmode, MenuForeground );
 
2848
        UxPutFontList( me_m_pmode, BoldTextFont );
 
2849
        UxPutBorderColor( me_m_pmode, MenuBackground );
 
2850
        UxPutBackground( me_m_pmode, MenuBackground );
 
2851
        UxPutMnemonic( me_m_pmode, "P" );
 
2852
        UxPutLabelString( me_m_pmode, "Plot mode" );
 
2853
 
 
2854
        UxPutRadioBehavior( me_m_traceoption, "true" );
 
2855
        UxPutForeground( me_m_traceoption, MenuForeground );
 
2856
        UxPutBorderColor( me_m_traceoption, MenuBackground );
 
2857
        UxPutBackground( me_m_traceoption, MenuBackground );
 
2858
        UxPutRowColumnType( me_m_traceoption, "menu_pulldown" );
 
2859
 
 
2860
        UxPutSet( me_m_line, "true" );
 
2861
        UxPutSelectColor( me_m_line, SelectColor );
 
2862
        UxPutFontList( me_m_line, BoldTextFont );
 
2863
        UxPutMnemonic( me_m_line, "S" );
 
2864
        UxPutLabelString( me_m_line, "Straight Line" );
 
2865
 
 
2866
        UxPutSelectColor( me_m_histo, SelectColor );
 
2867
        UxPutFontList( me_m_histo, BoldTextFont );
 
2868
        UxPutMnemonic( me_m_histo, "H" );
 
2869
        UxPutLabelString( me_m_histo, "Histogram line" );
 
2870
 
 
2871
        UxPutForeground( me_m_tmode, MenuForeground );
 
2872
        UxPutFontList( me_m_tmode, BoldTextFont );
 
2873
        UxPutBorderColor( me_m_tmode, MenuBackground );
 
2874
        UxPutBackground( me_m_tmode, MenuBackground );
 
2875
        UxPutMnemonic( me_m_tmode, "T" );
 
2876
        UxPutLabelString( me_m_tmode, "Trace mode" );
 
2877
 
 
2878
        UxPutForeground( met_m_options, MenuForeground );
 
2879
        UxPutFontList( met_m_options, BoldTextFont );
 
2880
        UxPutBorderColor( met_m_options, MenuBackground );
 
2881
        UxPutBackground( met_m_options, MenuBackground );
 
2882
        UxPutMnemonic( met_m_options, "O" );
 
2883
        UxPutLabelString( met_m_options, "Option" );
 
2884
 
 
2885
        UxPutBorderColor( me_m_help, MenuBackground );
 
2886
        UxPutBackground( me_m_help, MenuBackground );
 
2887
        UxPutRowColumnType( me_m_help, "menu_pulldown" );
 
2888
 
 
2889
        UxPutForeground( me_m_hm, MenuForeground );
 
2890
        UxPutFontList( me_m_hm, BoldTextFont );
 
2891
        UxPutBorderColor( me_m_hm, MenuBackground );
 
2892
        UxPutBackground( me_m_hm, MenuBackground );
 
2893
        UxPutMnemonic( me_m_hm, "M" );
 
2894
        UxPutLabelString( me_m_hm, "On Transmission Model ..." );
 
2895
 
 
2896
        UxPutForeground( mt_m_help, MenuForeground );
 
2897
        UxPutFontList( mt_m_help, BoldTextFont );
 
2898
        UxPutBorderColor( mt_m_help, MenuBackground );
 
2899
        UxPutBackground( mt_m_help, MenuBackground );
 
2900
        UxPutMnemonic( mt_m_help, "H" );
 
2901
        UxPutLabelString( mt_m_help, "Help" );
 
2902
 
 
2903
        UxPutBorderColor( me_m_quit, MenuBackground );
 
2904
        UxPutBackground( me_m_quit, MenuBackground );
 
2905
        UxPutRowColumnType( me_m_quit, "menu_pulldown" );
 
2906
 
 
2907
        UxPutForeground( me_m_bye, MenuForeground );
 
2908
        UxPutFontList( me_m_bye, BoldTextFont );
 
2909
        UxPutBorderColor( me_m_bye, MenuBackground );
 
2910
        UxPutBackground( me_m_bye, MenuBackground );
 
2911
        UxPutMnemonic( me_m_bye, "B" );
 
2912
        UxPutLabelString( me_m_bye, "Bye" );
 
2913
 
 
2914
        UxPutForeground( mt_m_quit, MenuForeground );
 
2915
        UxPutFontList( mt_m_quit, BoldTextFont );
 
2916
        UxPutBorderColor( mt_m_quit, MenuBackground );
 
2917
        UxPutBackground( mt_m_quit, MenuBackground );
 
2918
        UxPutMnemonic( mt_m_quit, "Q" );
 
2919
        UxPutLabelString( mt_m_quit, "Quit" );
 
2920
 
 
2921
        UxPutBorderColor( separator2, WindowBackground );
 
2922
        UxPutBackground( separator2, WindowBackground );
 
2923
        UxPutHeight( separator2, 5 );
 
2924
        UxPutWidth( separator2, 492 );
 
2925
        UxPutY( separator2, 174 );
 
2926
        UxPutX( separator2, 0 );
 
2927
 
 
2928
        UxPutBorderColor( separator3, WindowBackground );
 
2929
        UxPutBackground( separator3, WindowBackground );
 
2930
        UxPutHeight( separator3, 5 );
 
2931
        UxPutWidth( separator3, 492 );
 
2932
        UxPutY( separator3, 388 );
 
2933
        UxPutX( separator3, 0 );
 
2934
 
 
2935
        UxPutBorderColor( separator7, WindowBackground );
 
2936
        UxPutBackground( separator7, WindowBackground );
 
2937
        UxPutHeight( separator7, 5 );
 
2938
        UxPutWidth( separator7, 492 );
 
2939
        UxPutY( separator7, 224 );
 
2940
        UxPutX( separator7, 0 );
 
2941
 
 
2942
        UxPutRecomputeSize( lbl_title, "false" );
 
2943
        UxPutForeground( lbl_title, TextForeground );
 
2944
        UxPutAlignment( lbl_title, "alignment_center" );
 
2945
        UxPutLabelString( lbl_title, "Transmission Model" );
 
2946
        UxPutFontList( lbl_title, BoldTextFont );
 
2947
        UxPutBorderColor( lbl_title, LabelBackground );
 
2948
        UxPutBackground( lbl_title, LabelBackground );
 
2949
        UxPutHeight( lbl_title, 28 );
 
2950
        UxPutWidth( lbl_title, 438 );
 
2951
        UxPutY( lbl_title, 34 );
 
2952
        UxPutX( lbl_title, 1 );
 
2953
 
 
2954
        UxPutTranslations( tf_SN, text_tab );
 
2955
        UxPutText( tf_SN, "1.00" );
 
2956
        UxPutForeground( tf_SN, TextForeground );
 
2957
        UxPutHighlightOnEnter( tf_SN, "true" );
 
2958
        UxPutFontList( tf_SN, TextFont );
 
2959
        UxPutBorderColor( tf_SN, TextBackground );
 
2960
        UxPutBackground( tf_SN, TextBackground );
 
2961
        UxPutHeight( tf_SN, 35 );
 
2962
        UxPutWidth( tf_SN, 80 );
 
2963
        UxPutY( tf_SN, 432 );
 
2964
        UxPutX( tf_SN, 188 );
 
2965
 
 
2966
        UxPutOrientation( tg_time_sn, "vertical" );
 
2967
        UxPutIsAligned( tg_time_sn, "true" );
 
2968
        UxPutEntryAlignment( tg_time_sn, "alignment_beginning" );
 
2969
        UxPutBorderWidth( tg_time_sn, 0 );
 
2970
        UxPutShadowThickness( tg_time_sn, 0 );
 
2971
        UxPutLabelString( tg_time_sn, "" );
 
2972
        UxPutEntryBorder( tg_time_sn, 0 );
 
2973
        UxPutBorderColor( tg_time_sn, WindowBackground );
 
2974
        UxPutBackground( tg_time_sn, WindowBackground );
 
2975
        UxPutRadioBehavior( tg_time_sn, "true" );
 
2976
        UxPutHeight( tg_time_sn, 78 );
 
2977
        UxPutWidth( tg_time_sn, 171 );
 
2978
        UxPutY( tg_time_sn, 400 );
 
2979
        UxPutX( tg_time_sn, 9 );
 
2980
 
 
2981
        UxPutTranslations( tg_etime, helpTM );
 
2982
        UxPutHighlightOnEnter( tg_etime, "true" );
 
2983
        UxPutForeground( tg_etime, TextForeground );
 
2984
        UxPutSelectColor( tg_etime, SelectColor );
 
2985
        UxPutSet( tg_etime, "true" );
 
2986
        UxPutLabelString( tg_etime, "Exposure time (sec)" );
 
2987
        UxPutFontList( tg_etime, TextFont );
 
2988
        UxPutBorderColor( tg_etime, WindowBackground );
 
2989
        UxPutBackground( tg_etime, WindowBackground );
 
2990
        UxPutHeight( tg_etime, 28 );
 
2991
        UxPutWidth( tg_etime, 87 );
 
2992
        UxPutY( tg_etime, 0 );
 
2993
        UxPutX( tg_etime, 0 );
 
2994
 
 
2995
        UxPutTranslations( tg_sn, helpTM );
 
2996
        UxPutHighlightOnEnter( tg_sn, "true" );
 
2997
        UxPutSet( tg_sn, "false" );
 
2998
        UxPutForeground( tg_sn, TextForeground );
 
2999
        UxPutSelectColor( tg_sn, SelectColor );
 
3000
        UxPutLabelString( tg_sn, "Signal to Noise Ratio" );
 
3001
        UxPutFontList( tg_sn, TextFont );
 
3002
        UxPutBorderColor( tg_sn, WindowBackground );
 
3003
        UxPutBackground( tg_sn, WindowBackground );
 
3004
        UxPutHeight( tg_sn, 28 );
 
3005
        UxPutWidth( tg_sn, 53 );
 
3006
        UxPutY( tg_sn, 3 );
 
3007
        UxPutX( tg_sn, 70 );
 
3008
 
 
3009
        UxPutForeground( lbl_sky, TextForeground );
 
3010
        UxPutAlignment( lbl_sky, "alignment_beginning" );
 
3011
        UxPutLabelString( lbl_sky, "Sky :" );
 
3012
        UxPutFontList( lbl_sky, TextFont );
 
3013
        UxPutBorderColor( lbl_sky, LabelBackground );
 
3014
        UxPutBackground( lbl_sky, LabelBackground );
 
3015
        UxPutHeight( lbl_sky, 25 );
 
3016
        UxPutWidth( lbl_sky, 44 );
 
3017
        UxPutY( lbl_sky, 112 );
 
3018
        UxPutX( lbl_sky, 13 );
 
3019
 
 
3020
        UxPutSpacing( tg_brightness, 0 );
 
3021
        UxPutMarginWidth( tg_brightness, 2 );
 
3022
        UxPutMarginHeight( tg_brightness, 0 );
 
3023
        UxPutOrientation( tg_brightness, "vertical" );
 
3024
        UxPutIsAligned( tg_brightness, "true" );
 
3025
        UxPutEntryAlignment( tg_brightness, "alignment_beginning" );
 
3026
        UxPutBorderWidth( tg_brightness, 0 );
 
3027
        UxPutShadowThickness( tg_brightness, 0 );
 
3028
        UxPutLabelString( tg_brightness, "" );
 
3029
        UxPutEntryBorder( tg_brightness, 0 );
 
3030
        UxPutBorderColor( tg_brightness, WindowBackground );
 
3031
        UxPutBackground( tg_brightness, WindowBackground );
 
3032
        UxPutRadioBehavior( tg_brightness, "true" );
 
3033
        UxPutHeight( tg_brightness, 78 );
 
3034
        UxPutWidth( tg_brightness, 171 );
 
3035
        UxPutY( tg_brightness, 112 );
 
3036
        UxPutX( tg_brightness, 152 );
 
3037
 
 
3038
        UxPutTranslations( tg_bright, helpTM );
 
3039
        UxPutHighlightOnEnter( tg_bright, "true" );
 
3040
        UxPutForeground( tg_bright, TextForeground );
 
3041
        UxPutSelectColor( tg_bright, SelectColor );
 
3042
        UxPutSet( tg_bright, "true" );
 
3043
        UxPutLabelString( tg_bright, "Bright" );
 
3044
        UxPutFontList( tg_bright, TextFont );
 
3045
        UxPutBorderColor( tg_bright, WindowBackground );
 
3046
        UxPutBackground( tg_bright, WindowBackground );
 
3047
        UxPutHeight( tg_bright, 28 );
 
3048
        UxPutWidth( tg_bright, 87 );
 
3049
        UxPutY( tg_bright, 12 );
 
3050
        UxPutX( tg_bright, 2 );
 
3051
 
 
3052
        UxPutTranslations( tg_dark, helpTM );
 
3053
        UxPutHighlightOnEnter( tg_dark, "true" );
 
3054
        UxPutSet( tg_dark, "false" );
 
3055
        UxPutForeground( tg_dark, TextForeground );
 
3056
        UxPutSelectColor( tg_dark, SelectColor );
 
3057
        UxPutLabelString( tg_dark, "Dark" );
 
3058
        UxPutFontList( tg_dark, TextFont );
 
3059
        UxPutBorderColor( tg_dark, WindowBackground );
 
3060
        UxPutBackground( tg_dark, WindowBackground );
 
3061
        UxPutHeight( tg_dark, 28 );
 
3062
        UxPutWidth( tg_dark, 53 );
 
3063
        UxPutY( tg_dark, 28 );
 
3064
        UxPutX( tg_dark, 0 );
 
3065
 
 
3066
        UxPutSpacing( tg_lines, 0 );
 
3067
        UxPutMarginWidth( tg_lines, 2 );
 
3068
        UxPutMarginHeight( tg_lines, 0 );
 
3069
        UxPutOrientation( tg_lines, "vertical" );
 
3070
        UxPutIsAligned( tg_lines, "true" );
 
3071
        UxPutEntryAlignment( tg_lines, "alignment_beginning" );
 
3072
        UxPutBorderWidth( tg_lines, 0 );
 
3073
        UxPutShadowThickness( tg_lines, 0 );
 
3074
        UxPutLabelString( tg_lines, "" );
 
3075
        UxPutEntryBorder( tg_lines, 0 );
 
3076
        UxPutBorderColor( tg_lines, WindowBackground );
 
3077
        UxPutBackground( tg_lines, WindowBackground );
 
3078
        UxPutRadioBehavior( tg_lines, "true" );
 
3079
        UxPutHeight( tg_lines, 78 );
 
3080
        UxPutWidth( tg_lines, 171 );
 
3081
        UxPutY( tg_lines, 112 );
 
3082
        UxPutX( tg_lines, 240 );
 
3083
 
 
3084
        UxPutTranslations( tg_emli, helpTM );
 
3085
        UxPutHighlightOnEnter( tg_emli, "true" );
 
3086
        UxPutForeground( tg_emli, TextForeground );
 
3087
        UxPutSelectColor( tg_emli, SelectColor );
 
3088
        UxPutSet( tg_emli, "true" );
 
3089
        UxPutLabelString( tg_emli, "With Emission Lines" );
 
3090
        UxPutFontList( tg_emli, TextFont );
 
3091
        UxPutBorderColor( tg_emli, WindowBackground );
 
3092
        UxPutBackground( tg_emli, WindowBackground );
 
3093
        UxPutHeight( tg_emli, 28 );
 
3094
        UxPutWidth( tg_emli, 87 );
 
3095
        UxPutY( tg_emli, 12 );
 
3096
        UxPutX( tg_emli, 2 );
 
3097
 
 
3098
        UxPutTranslations( tg_noemli, helpTM );
 
3099
        UxPutHighlightOnEnter( tg_noemli, "true" );
 
3100
        UxPutSet( tg_noemli, "false" );
 
3101
        UxPutForeground( tg_noemli, TextForeground );
 
3102
        UxPutSelectColor( tg_noemli, SelectColor );
 
3103
        UxPutLabelString( tg_noemli, "Without Emision Lines" );
 
3104
        UxPutFontList( tg_noemli, TextFont );
 
3105
        UxPutBorderColor( tg_noemli, WindowBackground );
 
3106
        UxPutBackground( tg_noemli, WindowBackground );
 
3107
        UxPutHeight( tg_noemli, 28 );
 
3108
        UxPutWidth( tg_noemli, 53 );
 
3109
        UxPutY( tg_noemli, 3 );
 
3110
        UxPutX( tg_noemli, 70 );
 
3111
 
 
3112
        UxPutBorderColor( separator18, WindowBackground );
 
3113
        UxPutBackground( separator18, WindowBackground );
 
3114
        UxPutHeight( separator18, 5 );
 
3115
        UxPutWidth( separator18, 492 );
 
3116
        UxPutY( separator18, 75 );
 
3117
        UxPutX( separator18, 0 );
 
3118
 
 
3119
        UxPutSpacing( tg_sky, 0 );
 
3120
        UxPutMarginWidth( tg_sky, 2 );
 
3121
        UxPutMarginHeight( tg_sky, 0 );
 
3122
        UxPutOrientation( tg_sky, "vertical" );
 
3123
        UxPutIsAligned( tg_sky, "true" );
 
3124
        UxPutEntryAlignment( tg_sky, "alignment_beginning" );
 
3125
        UxPutBorderWidth( tg_sky, 0 );
 
3126
        UxPutShadowThickness( tg_sky, 0 );
 
3127
        UxPutLabelString( tg_sky, "" );
 
3128
        UxPutEntryBorder( tg_sky, 0 );
 
3129
        UxPutBorderColor( tg_sky, WindowBackground );
 
3130
        UxPutBackground( tg_sky, WindowBackground );
 
3131
        UxPutRadioBehavior( tg_sky, "true" );
 
3132
        UxPutHeight( tg_sky, 78 );
 
3133
        UxPutWidth( tg_sky, 171 );
 
3134
        UxPutY( tg_sky, 112 );
 
3135
        UxPutX( tg_sky, 76 );
 
3136
 
 
3137
        UxPutTranslations( tg_skyon, helpTM );
 
3138
        UxPutHighlightOnEnter( tg_skyon, "true" );
 
3139
        UxPutForeground( tg_skyon, TextForeground );
 
3140
        UxPutSelectColor( tg_skyon, SelectColor );
 
3141
        UxPutSet( tg_skyon, "true" );
 
3142
        UxPutLabelString( tg_skyon, "yes" );
 
3143
        UxPutFontList( tg_skyon, TextFont );
 
3144
        UxPutBorderColor( tg_skyon, WindowBackground );
 
3145
        UxPutBackground( tg_skyon, WindowBackground );
 
3146
        UxPutHeight( tg_skyon, 28 );
 
3147
        UxPutWidth( tg_skyon, 87 );
 
3148
        UxPutY( tg_skyon, 126 );
 
3149
        UxPutX( tg_skyon, 2 );
 
3150
 
 
3151
        UxPutTranslations( tg_skyoff, helpTM );
 
3152
        UxPutHighlightOnEnter( tg_skyoff, "true" );
 
3153
        UxPutSet( tg_skyoff, "false" );
 
3154
        UxPutForeground( tg_skyoff, TextForeground );
 
3155
        UxPutSelectColor( tg_skyoff, SelectColor );
 
3156
        UxPutLabelString( tg_skyoff, "no" );
 
3157
        UxPutFontList( tg_skyoff, TextFont );
 
3158
        UxPutBorderColor( tg_skyoff, WindowBackground );
 
3159
        UxPutBackground( tg_skyoff, WindowBackground );
 
3160
        UxPutHeight( tg_skyoff, 28 );
 
3161
        UxPutWidth( tg_skyoff, 53 );
 
3162
        UxPutY( tg_skyoff, 126 );
 
3163
        UxPutX( tg_skyoff, 2 );
 
3164
 
 
3165
        UxPutTranslations( tg_extsky, helpTM );
 
3166
        UxPutHighlightOnEnter( tg_extsky, "true" );
 
3167
        UxPutForeground( tg_extsky, TextForeground );
 
3168
        UxPutSelectColor( tg_extsky, SelectColor );
 
3169
        UxPutSet( tg_extsky, "true" );
 
3170
        UxPutLabelString( tg_extsky, "Extract Sky" );
 
3171
        UxPutFontList( tg_extsky, TextFont );
 
3172
        UxPutBorderColor( tg_extsky, WindowBackground );
 
3173
        UxPutBackground( tg_extsky, WindowBackground );
 
3174
        UxPutHeight( tg_extsky, 26 );
 
3175
        UxPutWidth( tg_extsky, 104 );
 
3176
        UxPutY( tg_extsky, 418 );
 
3177
        UxPutX( tg_extsky, 314 );
 
3178
 
 
3179
        UxPutForeground( lbl_mirror1, TextForeground );
 
3180
        UxPutAlignment( lbl_mirror1, "alignment_beginning" );
 
3181
        UxPutLabelString( lbl_mirror1, "Optics :" );
 
3182
        UxPutFontList( lbl_mirror1, TextFont );
 
3183
        UxPutBorderColor( lbl_mirror1, LabelBackground );
 
3184
        UxPutBackground( lbl_mirror1, LabelBackground );
 
3185
        UxPutHeight( lbl_mirror1, 30 );
 
3186
        UxPutWidth( lbl_mirror1, 60 );
 
3187
        UxPutY( lbl_mirror1, 230 );
 
3188
        UxPutX( lbl_mirror1, 262 );
 
3189
 
 
3190
        UxPutMarginWidth( tg_opt, 0 );
 
3191
        UxPutSpacing( tg_opt, 3 );
 
3192
        UxPutMarginHeight( tg_opt, 0 );
 
3193
        UxPutOrientation( tg_opt, "horizontal" );
 
3194
        UxPutIsAligned( tg_opt, "true" );
 
3195
        UxPutEntryAlignment( tg_opt, "alignment_beginning" );
 
3196
        UxPutBorderWidth( tg_opt, 0 );
 
3197
        UxPutShadowThickness( tg_opt, 0 );
 
3198
        UxPutLabelString( tg_opt, "" );
 
3199
        UxPutEntryBorder( tg_opt, 0 );
 
3200
        UxPutBorderColor( tg_opt, WindowBackground );
 
3201
        UxPutBackground( tg_opt, WindowBackground );
 
3202
        UxPutRadioBehavior( tg_opt, "true" );
 
3203
        UxPutHeight( tg_opt, 78 );
 
3204
        UxPutWidth( tg_opt, 171 );
 
3205
        UxPutY( tg_opt, 230 );
 
3206
        UxPutX( tg_opt, 318 );
 
3207
 
 
3208
        UxPutTranslations( tg_optyes, helpTM );
 
3209
        UxPutHighlightOnEnter( tg_optyes, "true" );
 
3210
        UxPutForeground( tg_optyes, TextForeground );
 
3211
        UxPutSelectColor( tg_optyes, SelectColor );
 
3212
        UxPutSet( tg_optyes, "true" );
 
3213
        UxPutLabelString( tg_optyes, "yes" );
 
3214
        UxPutFontList( tg_optyes, TextFont );
 
3215
        UxPutBorderColor( tg_optyes, WindowBackground );
 
3216
        UxPutBackground( tg_optyes, WindowBackground );
 
3217
        UxPutHeight( tg_optyes, 28 );
 
3218
        UxPutWidth( tg_optyes, 87 );
 
3219
        UxPutY( tg_optyes, 0 );
 
3220
        UxPutX( tg_optyes, 0 );
 
3221
 
 
3222
        UxPutTranslations( tg_optno, helpTM );
 
3223
        UxPutHighlightOnEnter( tg_optno, "true" );
 
3224
        UxPutSet( tg_optno, "false" );
 
3225
        UxPutForeground( tg_optno, TextForeground );
 
3226
        UxPutSelectColor( tg_optno, SelectColor );
 
3227
        UxPutLabelString( tg_optno, "no" );
 
3228
        UxPutFontList( tg_optno, TextFont );
 
3229
        UxPutBorderColor( tg_optno, WindowBackground );
 
3230
        UxPutBackground( tg_optno, WindowBackground );
 
3231
        UxPutHeight( tg_optno, 28 );
 
3232
        UxPutWidth( tg_optno, 53 );
 
3233
        UxPutY( tg_optno, 3 );
 
3234
        UxPutX( tg_optno, 70 );
 
3235
 
 
3236
        UxPutMarginWidth( tg_mir, 0 );
 
3237
        UxPutSpacing( tg_mir, 3 );
 
3238
        UxPutMarginHeight( tg_mir, 0 );
 
3239
        UxPutOrientation( tg_mir, "horizontal" );
 
3240
        UxPutIsAligned( tg_mir, "true" );
 
3241
        UxPutEntryAlignment( tg_mir, "alignment_beginning" );
 
3242
        UxPutBorderWidth( tg_mir, 0 );
 
3243
        UxPutShadowThickness( tg_mir, 0 );
 
3244
        UxPutLabelString( tg_mir, "" );
 
3245
        UxPutEntryBorder( tg_mir, 0 );
 
3246
        UxPutBorderColor( tg_mir, WindowBackground );
 
3247
        UxPutBackground( tg_mir, WindowBackground );
 
3248
        UxPutRadioBehavior( tg_mir, "true" );
 
3249
        UxPutHeight( tg_mir, 78 );
 
3250
        UxPutWidth( tg_mir, 171 );
 
3251
        UxPutY( tg_mir, 231 );
 
3252
        UxPutX( tg_mir, 80 );
 
3253
 
 
3254
        UxPutTranslations( tg_mirnew, helpTM );
 
3255
        UxPutHighlightOnEnter( tg_mirnew, "true" );
 
3256
        UxPutForeground( tg_mirnew, TextForeground );
 
3257
        UxPutSelectColor( tg_mirnew, SelectColor );
 
3258
        UxPutSet( tg_mirnew, "true" );
 
3259
        UxPutLabelString( tg_mirnew, "new" );
 
3260
        UxPutFontList( tg_mirnew, TextFont );
 
3261
        UxPutBorderColor( tg_mirnew, WindowBackground );
 
3262
        UxPutBackground( tg_mirnew, WindowBackground );
 
3263
        UxPutHeight( tg_mirnew, 28 );
 
3264
        UxPutWidth( tg_mirnew, 87 );
 
3265
        UxPutY( tg_mirnew, 0 );
 
3266
        UxPutX( tg_mirnew, 0 );
 
3267
 
 
3268
        UxPutTranslations( tg_mirold, helpTM );
 
3269
        UxPutHighlightOnEnter( tg_mirold, "true" );
 
3270
        UxPutSet( tg_mirold, "false" );
 
3271
        UxPutForeground( tg_mirold, TextForeground );
 
3272
        UxPutSelectColor( tg_mirold, SelectColor );
 
3273
        UxPutLabelString( tg_mirold, "old" );
 
3274
        UxPutFontList( tg_mirold, TextFont );
 
3275
        UxPutBorderColor( tg_mirold, WindowBackground );
 
3276
        UxPutBackground( tg_mirold, WindowBackground );
 
3277
        UxPutHeight( tg_mirold, 28 );
 
3278
        UxPutWidth( tg_mirold, 53 );
 
3279
        UxPutY( tg_mirold, 0 );
 
3280
        UxPutX( tg_mirold, 46 );
 
3281
 
 
3282
        UxPutTranslations( tg_mirno, helpTM );
 
3283
        UxPutHighlightOnEnter( tg_mirno, "true" );
 
3284
        UxPutSet( tg_mirno, "false" );
 
3285
        UxPutForeground( tg_mirno, TextForeground );
 
3286
        UxPutSelectColor( tg_mirno, SelectColor );
 
3287
        UxPutLabelString( tg_mirno, "no" );
 
3288
        UxPutFontList( tg_mirno, TextFont );
 
3289
        UxPutBorderColor( tg_mirno, WindowBackground );
 
3290
        UxPutBackground( tg_mirno, WindowBackground );
 
3291
        UxPutHeight( tg_mirno, 28 );
 
3292
        UxPutWidth( tg_mirno, 325 );
 
3293
        UxPutY( tg_mirno, 0 );
 
3294
        UxPutX( tg_mirno, -160 );
 
3295
 
 
3296
        UxPutTranslations( tf_disp_pix, text_tab );
 
3297
        UxPutText( tf_disp_pix, "1." );
 
3298
        UxPutForeground( tf_disp_pix, TextForeground );
 
3299
        UxPutHighlightOnEnter( tf_disp_pix, "true" );
 
3300
        UxPutFontList( tf_disp_pix, TextFont );
 
3301
        UxPutBorderColor( tf_disp_pix, TextBackground );
 
3302
        UxPutBackground( tf_disp_pix, TextBackground );
 
3303
        UxPutHeight( tf_disp_pix, 35 );
 
3304
        UxPutWidth( tf_disp_pix, 80 );
 
3305
        UxPutY( tf_disp_pix, 266 );
 
3306
        UxPutX( tf_disp_pix, 342 );
 
3307
 
 
3308
        UxPutForeground( lbl_disp, TextForeground );
 
3309
        UxPutAlignment( lbl_disp, "alignment_beginning" );
 
3310
        UxPutLabelString( lbl_disp, "nm/pix :" );
 
3311
        UxPutFontList( lbl_disp, TextFont );
 
3312
        UxPutBorderColor( lbl_disp, LabelBackground );
 
3313
        UxPutBackground( lbl_disp, LabelBackground );
 
3314
        UxPutHeight( lbl_disp, 30 );
 
3315
        UxPutWidth( lbl_disp, 60 );
 
3316
        UxPutY( lbl_disp, 268 );
 
3317
        UxPutX( lbl_disp, 280 );
 
3318
 
 
3319
        UxPutAlignment( label7, "alignment_beginning" );
 
3320
        UxPutLabelString( label7, "Wavelength Range (nm) :" );
 
3321
        UxPutForeground( label7, TextForeground );
 
3322
        UxPutFontList( label7, TextFont );
 
3323
        UxPutBorderColor( label7, WindowBackground );
 
3324
        UxPutBackground( label7, WindowBackground );
 
3325
        UxPutHeight( label7, 23 );
 
3326
        UxPutWidth( label7, 165 );
 
3327
        UxPutY( label7, 480 );
 
3328
        UxPutX( label7, 16 );
 
3329
 
 
3330
        UxPutTranslations( tf_TWmax, text_tab );
 
3331
        UxPutText( tf_TWmax, "900." );
 
3332
        UxPutForeground( tf_TWmax, TextForeground );
 
3333
        UxPutHighlightOnEnter( tf_TWmax, "true" );
 
3334
        UxPutFontList( tf_TWmax, TextFont );
 
3335
        UxPutBorderColor( tf_TWmax, TextBackground );
 
3336
        UxPutBackground( tf_TWmax, TextBackground );
 
3337
        UxPutHeight( tf_TWmax, 35 );
 
3338
        UxPutWidth( tf_TWmax, 80 );
 
3339
        UxPutY( tf_TWmax, 474 );
 
3340
        UxPutX( tf_TWmax, 274 );
 
3341
 
 
3342
        UxPutTranslations( tf_TWmin, text_tab );
 
3343
        UxPutText( tf_TWmin, "300." );
 
3344
        UxPutForeground( tf_TWmin, TextForeground );
 
3345
        UxPutHighlightOnEnter( tf_TWmin, "true" );
 
3346
        UxPutFontList( tf_TWmin, TextFont );
 
3347
        UxPutBorderColor( tf_TWmin, TextBackground );
 
3348
        UxPutBackground( tf_TWmin, TextBackground );
 
3349
        UxPutHeight( tf_TWmin, 35 );
 
3350
        UxPutWidth( tf_TWmin, 80 );
 
3351
        UxPutY( tf_TWmin, 474 );
 
3352
        UxPutX( tf_TWmin, 188 );
 
3353
 
 
3354
        UxPutBorderColor( separator10, WindowBackground );
 
3355
        UxPutBackground( separator10, WindowBackground );
 
3356
        UxPutHeight( separator10, 5 );
 
3357
        UxPutWidth( separator10, 492 );
 
3358
        UxPutY( separator10, 468 );
 
3359
        UxPutX( separator10, 0 );
 
3360
 
 
3361
        UxPutOrientation( separator4, "vertical" );
 
3362
        UxPutBorderColor( separator4, WindowBackground );
 
3363
        UxPutBackground( separator4, WindowBackground );
 
3364
        UxPutHeight( separator4, 74 );
 
3365
        UxPutWidth( separator4, 8 );
 
3366
        UxPutY( separator4, 394 );
 
3367
        UxPutX( separator4, 296 );
 
3368
 
 
3369
}
 
3370
 
 
3371
/*******************************************************************************
 
3372
        The 'build_' function creates all the swidgets and X widgets,
 
3373
        and sets their properties to the values specified in the
 
3374
        Property Editor.
 
3375
*******************************************************************************/
 
3376
 
 
3377
static swidget  _Uxbuild_ModelShell()
 
3378
{
 
3379
        /* Create the swidgets */
 
3380
 
 
3381
        ModelShell = UxCreateApplicationShell( "ModelShell", NO_PARENT );
 
3382
        UxPutContext( ModelShell, UxModelShellContext );
 
3383
 
 
3384
        form4 = UxCreateForm( "form4", ModelShell );
 
3385
        lbl_spec = UxCreateLabel( "lbl_spec", form4 );
 
3386
        tf_spectrum = UxCreateText( "tf_spectrum", form4 );
 
3387
        lbl_atm = UxCreateLabel( "lbl_atm", form4 );
 
3388
        lbl_airmass = UxCreateLabel( "lbl_airmass", form4 );
 
3389
        form6 = UxCreateForm( "form6", form4 );
 
3390
        pB_MReset = UxCreatePushButton( "pB_MReset", form6 );
 
3391
        pB_Mtrans = UxCreatePushButton( "pB_Mtrans", form6 );
 
3392
        pB_Mres = UxCreatePushButton( "pB_Mres", form6 );
 
3393
        pB_MFCreate = UxCreatePushButton( "pB_MFCreate", form6 );
 
3394
        pB_MPrint = UxCreatePushButton( "pB_MPrint", form6 );
 
3395
        atm_mod = UxCreateRowColumn( "atm_mod", form4 );
 
3396
        tg_atmyes = UxCreateToggleButton( "tg_atmyes", atm_mod );
 
3397
        tg_atmno = UxCreateToggleButton( "tg_atmno", atm_mod );
 
3398
        helptextModel = UxCreateText( "helptextModel", form4 );
 
3399
        separator8 = UxCreateSeparator( "separator8", form4 );
 
3400
        menu_spec = UxCreateRowColumn( "menu_spec", form4 );
 
3401
        mn_standard = UxCreatePushButton( "mn_standard", menu_spec );
 
3402
        mn_hststd = UxCreatePushButton( "mn_hststd", menu_spec );
 
3403
        mn_ctiostd = UxCreatePushButton( "mn_ctiostd", menu_spec );
 
3404
        mn_blackbody = UxCreatePushButton( "mn_blackbody", menu_spec );
 
3405
        mn_spec = UxCreateRowColumn( "mn_spec", form4 );
 
3406
        tf_airmass = UxCreateText( "tf_airmass", form4 );
 
3407
        lbl_mirror = UxCreateLabel( "lbl_mirror", form4 );
 
3408
        lbl_grism = UxCreateLabel( "lbl_grism", form4 );
 
3409
        lbl_filter = UxCreateLabel( "lbl_filter", form4 );
 
3410
        me_10grism = UxCreateRowColumn( "me_10grism", form4 );
 
3411
        mn_nogrism = UxCreatePushButton( "mn_nogrism", me_10grism );
 
3412
        mn_grism0 = UxCreatePushButton( "mn_grism0", me_10grism );
 
3413
        mn_grism1 = UxCreatePushButton( "mn_grism1", me_10grism );
 
3414
        mn_grism2 = UxCreatePushButton( "mn_grism2", me_10grism );
 
3415
        mn_grism3 = UxCreatePushButton( "mn_grism3", me_10grism );
 
3416
        mn_grism4 = UxCreatePushButton( "mn_grism4", me_10grism );
 
3417
        mn_grism5 = UxCreatePushButton( "mn_grism5", me_10grism );
 
3418
        mn_grism6 = UxCreatePushButton( "mn_grism6", me_10grism );
 
3419
        mn_grism7 = UxCreatePushButton( "mn_grism7", me_10grism );
 
3420
        mn_grism8 = UxCreatePushButton( "mn_grism8", me_10grism );
 
3421
        mn_grism9 = UxCreatePushButton( "mn_grism9", me_10grism );
 
3422
        mn_wgrism = UxCreateRowColumn( "mn_wgrism", form4 );
 
3423
        tf_filter = UxCreateText( "tf_filter", form4 );
 
3424
        lbl_ccd = UxCreateLabel( "lbl_ccd", form4 );
 
3425
        list_filt = UxCreateRowColumn( "list_filt", form4 );
 
3426
        tg_basic = UxCreateToggleButton( "tg_basic", list_filt );
 
3427
        tg_all = UxCreateToggleButton( "tg_all", list_filt );
 
3428
        tg_ccd = UxCreateRowColumn( "tg_ccd", form4 );
 
3429
        tg_ccdyes = UxCreateToggleButton( "tg_ccdyes", tg_ccd );
 
3430
        tg_ccdno = UxCreateToggleButton( "tg_ccdno", tg_ccd );
 
3431
        tf_time = UxCreateText( "tf_time", form4 );
 
3432
        lbl_eadu = UxCreateLabel( "lbl_eadu", form4 );
 
3433
        tf_eadu = UxCreateText( "tf_eadu", form4 );
 
3434
        meModel = UxCreateRowColumn( "meModel", form4 );
 
3435
        me_m_file = UxCreateRowColumn( "me_m_file", meModel );
 
3436
        me_m_load = UxCreatePushButton( "me_m_load", me_m_file );
 
3437
        me_m_save = UxCreatePushButton( "me_m_save", me_m_file );
 
3438
        me_m_saveas = UxCreatePushButton( "me_m_saveas", me_m_file );
 
3439
        me_m_sep = UxCreateSeparator( "me_m_sep", me_m_file );
 
3440
        me_m_loadcurve = UxCreatePushButton( "me_m_loadcurve", me_m_file );
 
3441
        me_m_savecurve = UxCreatePushButton( "me_m_savecurve", me_m_file );
 
3442
        me_m_saveascurve = UxCreatePushButton( "me_m_saveascurve", me_m_file );
 
3443
        mt_m_file = UxCreateCascadeButton( "mt_m_file", meModel );
 
3444
        me_m_frame = UxCreateRowColumn( "me_m_frame", meModel );
 
3445
        me_m_trimx = UxCreatePushButton( "me_m_trimx", me_m_frame );
 
3446
        me_m_trimy = UxCreatePushButton( "me_m_trimy", me_m_frame );
 
3447
        me_m_unzoom = UxCreatePushButton( "me_m_unzoom", me_m_frame );
 
3448
        me_m_redraw = UxCreatePushButton( "me_m_redraw", me_m_frame );
 
3449
        me_m_print = UxCreatePushButton( "me_m_print", me_m_frame );
 
3450
        mt_m_frame = UxCreateCascadeButton( "mt_m_frame", meModel );
 
3451
        me_m_option = UxCreateRowColumn( "me_m_option", meModel );
 
3452
        me_m_plotoption = UxCreateRowColumn( "me_m_plotoption", me_m_option );
 
3453
        me_m_plot = UxCreateToggleButtonGadget( "me_m_plot", me_m_plotoption );
 
3454
        me_m_oplot = UxCreateToggleButtonGadget( "me_m_oplot", me_m_plotoption );
 
3455
        me_m_pmode = UxCreateCascadeButton( "me_m_pmode", me_m_option );
 
3456
        me_m_traceoption = UxCreateRowColumn( "me_m_traceoption", me_m_option );
 
3457
        me_m_line = UxCreateToggleButtonGadget( "me_m_line", me_m_traceoption );
 
3458
        me_m_histo = UxCreateToggleButtonGadget( "me_m_histo", me_m_traceoption );
 
3459
        me_m_tmode = UxCreateCascadeButton( "me_m_tmode", me_m_option );
 
3460
        met_m_options = UxCreateCascadeButton( "met_m_options", meModel );
 
3461
        me_m_help = UxCreateRowColumn( "me_m_help", meModel );
 
3462
        me_m_hm = UxCreatePushButton( "me_m_hm", me_m_help );
 
3463
        mt_m_help = UxCreateCascadeButton( "mt_m_help", meModel );
 
3464
        me_m_quit = UxCreateRowColumn( "me_m_quit", meModel );
 
3465
        me_m_bye = UxCreatePushButton( "me_m_bye", me_m_quit );
 
3466
        mt_m_quit = UxCreateCascadeButton( "mt_m_quit", meModel );
 
3467
        separator2 = UxCreateSeparator( "separator2", form4 );
 
3468
        separator3 = UxCreateSeparator( "separator3", form4 );
 
3469
        separator7 = UxCreateSeparator( "separator7", form4 );
 
3470
        lbl_title = UxCreateLabel( "lbl_title", form4 );
 
3471
        tf_SN = UxCreateText( "tf_SN", form4 );
 
3472
        tg_time_sn = UxCreateRowColumn( "tg_time_sn", form4 );
 
3473
        tg_etime = UxCreateToggleButton( "tg_etime", tg_time_sn );
 
3474
        tg_sn = UxCreateToggleButton( "tg_sn", tg_time_sn );
 
3475
        lbl_sky = UxCreateLabel( "lbl_sky", form4 );
 
3476
        tg_brightness = UxCreateRowColumn( "tg_brightness", form4 );
 
3477
        tg_bright = UxCreateToggleButton( "tg_bright", tg_brightness );
 
3478
        tg_dark = UxCreateToggleButton( "tg_dark", tg_brightness );
 
3479
        tg_lines = UxCreateRowColumn( "tg_lines", form4 );
 
3480
        tg_emli = UxCreateToggleButton( "tg_emli", tg_lines );
 
3481
        tg_noemli = UxCreateToggleButton( "tg_noemli", tg_lines );
 
3482
        separator18 = UxCreateSeparator( "separator18", form4 );
 
3483
        tg_sky = UxCreateRowColumn( "tg_sky", form4 );
 
3484
        tg_skyon = UxCreateToggleButton( "tg_skyon", tg_sky );
 
3485
        tg_skyoff = UxCreateToggleButton( "tg_skyoff", tg_sky );
 
3486
        tg_extsky = UxCreateToggleButton( "tg_extsky", form4 );
 
3487
        lbl_mirror1 = UxCreateLabel( "lbl_mirror1", form4 );
 
3488
        tg_opt = UxCreateRowColumn( "tg_opt", form4 );
 
3489
        tg_optyes = UxCreateToggleButton( "tg_optyes", tg_opt );
 
3490
        tg_optno = UxCreateToggleButton( "tg_optno", tg_opt );
 
3491
        tg_mir = UxCreateRowColumn( "tg_mir", form4 );
 
3492
        tg_mirnew = UxCreateToggleButton( "tg_mirnew", tg_mir );
 
3493
        tg_mirold = UxCreateToggleButton( "tg_mirold", tg_mir );
 
3494
        tg_mirno = UxCreateToggleButton( "tg_mirno", tg_mir );
 
3495
        tf_disp_pix = UxCreateText( "tf_disp_pix", form4 );
 
3496
        lbl_disp = UxCreateLabel( "lbl_disp", form4 );
 
3497
        label7 = UxCreateLabel( "label7", form4 );
 
3498
        tf_TWmax = UxCreateText( "tf_TWmax", form4 );
 
3499
        tf_TWmin = UxCreateText( "tf_TWmin", form4 );
 
3500
        separator10 = UxCreateSeparator( "separator10", form4 );
 
3501
        separator4 = UxCreateSeparator( "separator4", form4 );
 
3502
 
 
3503
        _Uxinit_ModelShell();
 
3504
 
 
3505
        /* Create the X widgets */
 
3506
 
 
3507
        UxCreateWidget( ModelShell );
 
3508
        UxCreateWidget( form4 );
 
3509
        UxCreateWidget( lbl_spec );
 
3510
        UxCreateWidget( tf_spectrum );
 
3511
        UxCreateWidget( lbl_atm );
 
3512
        UxCreateWidget( lbl_airmass );
 
3513
        UxPutBottomOffset( form6, 2 );
 
3514
        UxPutBottomAttachment( form6, "attach_form" );
 
3515
        UxPutTopOffset( form6, 5 );
 
3516
        UxPutTopAttachment( form6, "attach_none" );
 
3517
        UxPutRightOffset( form6, 0 );
 
3518
        UxPutRightAttachment( form6, "attach_form" );
 
3519
        UxPutLeftOffset( form6, 0 );
 
3520
        UxPutLeftAttachment( form6, "attach_form" );
 
3521
        UxCreateWidget( form6 );
 
3522
 
 
3523
        UxPutTopOffset( pB_MReset, 5 );
 
3524
        UxPutTopAttachment( pB_MReset, "attach_form" );
 
3525
        UxPutLeftOffset( pB_MReset, 15 );
 
3526
        UxPutLeftAttachment( pB_MReset, "attach_form" );
 
3527
        UxCreateWidget( pB_MReset );
 
3528
 
 
3529
        UxCreateWidget( pB_Mtrans );
 
3530
        UxCreateWidget( pB_Mres );
 
3531
        UxCreateWidget( pB_MFCreate );
 
3532
        UxCreateWidget( pB_MPrint );
 
3533
        UxCreateWidget( atm_mod );
 
3534
        UxCreateWidget( tg_atmyes );
 
3535
        UxCreateWidget( tg_atmno );
 
3536
        UxPutRightOffset( helptextModel, 2 );
 
3537
        UxPutRightAttachment( helptextModel, "attach_form" );
 
3538
        UxPutLeftOffset( helptextModel, 2 );
 
3539
        UxPutLeftAttachment( helptextModel, "attach_form" );
 
3540
        UxPutBottomWidget( helptextModel, "form6" );
 
3541
        UxPutBottomOffset( helptextModel, 1 );
 
3542
        UxPutBottomAttachment( helptextModel, "attach_widget" );
 
3543
        UxCreateWidget( helptextModel );
 
3544
 
 
3545
        UxPutLeftOffset( separator8, 0 );
 
3546
        UxPutRightOffset( separator8, 0 );
 
3547
        UxPutRightAttachment( separator8, "attach_form" );
 
3548
        UxPutLeftAttachment( separator8, "attach_form" );
 
3549
        UxPutBottomWidget( separator8, "helptextModel" );
 
3550
        UxPutBottomOffset( separator8, 0 );
 
3551
        UxPutBottomAttachment( separator8, "attach_widget" );
 
3552
        UxCreateWidget( separator8 );
 
3553
 
 
3554
        UxCreateWidget( menu_spec );
 
3555
        UxCreateWidget( mn_standard );
 
3556
        UxCreateWidget( mn_hststd );
 
3557
        UxCreateWidget( mn_ctiostd );
 
3558
        UxCreateWidget( mn_blackbody );
 
3559
        UxPutSubMenuId( mn_spec, "menu_spec" );
 
3560
        UxCreateWidget( mn_spec );
 
3561
 
 
3562
        UxCreateWidget( tf_airmass );
 
3563
        UxCreateWidget( lbl_mirror );
 
3564
        UxCreateWidget( lbl_grism );
 
3565
        UxCreateWidget( lbl_filter );
 
3566
        UxCreateWidget( me_10grism );
 
3567
        UxCreateWidget( mn_nogrism );
 
3568
        UxCreateWidget( mn_grism0 );
 
3569
        UxCreateWidget( mn_grism1 );
 
3570
        UxCreateWidget( mn_grism2 );
 
3571
        UxCreateWidget( mn_grism3 );
 
3572
        UxCreateWidget( mn_grism4 );
 
3573
        UxCreateWidget( mn_grism5 );
 
3574
        UxCreateWidget( mn_grism6 );
 
3575
        UxCreateWidget( mn_grism7 );
 
3576
        UxCreateWidget( mn_grism8 );
 
3577
        UxCreateWidget( mn_grism9 );
 
3578
        UxPutSubMenuId( mn_wgrism, "me_10grism" );
 
3579
        UxCreateWidget( mn_wgrism );
 
3580
 
 
3581
        UxCreateWidget( tf_filter );
 
3582
        UxCreateWidget( lbl_ccd );
 
3583
        UxCreateWidget( list_filt );
 
3584
        UxCreateWidget( tg_basic );
 
3585
        UxCreateWidget( tg_all );
 
3586
        UxCreateWidget( tg_ccd );
 
3587
        UxCreateWidget( tg_ccdyes );
 
3588
        UxCreateWidget( tg_ccdno );
 
3589
        UxCreateWidget( tf_time );
 
3590
        UxCreateWidget( lbl_eadu );
 
3591
        UxCreateWidget( tf_eadu );
 
3592
        UxPutTopAttachment( meModel, "attach_form" );
 
3593
        UxPutRightAttachment( meModel, "attach_form" );
 
3594
        UxPutLeftAttachment( meModel, "attach_form" );
 
3595
        UxCreateWidget( meModel );
 
3596
 
 
3597
        UxCreateWidget( me_m_file );
 
3598
        UxCreateWidget( me_m_load );
 
3599
        UxCreateWidget( me_m_save );
 
3600
        UxCreateWidget( me_m_saveas );
 
3601
        UxCreateWidget( me_m_sep );
 
3602
        UxCreateWidget( me_m_loadcurve );
 
3603
        UxCreateWidget( me_m_savecurve );
 
3604
        UxCreateWidget( me_m_saveascurve );
 
3605
        UxPutSubMenuId( mt_m_file, "me_m_file" );
 
3606
        UxCreateWidget( mt_m_file );
 
3607
 
 
3608
        UxCreateWidget( me_m_frame );
 
3609
        UxCreateWidget( me_m_trimx );
 
3610
        UxCreateWidget( me_m_trimy );
 
3611
        UxCreateWidget( me_m_unzoom );
 
3612
        UxCreateWidget( me_m_redraw );
 
3613
        UxCreateWidget( me_m_print );
 
3614
        UxPutSubMenuId( mt_m_frame, "me_m_frame" );
 
3615
        UxCreateWidget( mt_m_frame );
 
3616
 
 
3617
        UxCreateWidget( me_m_option );
 
3618
        UxCreateWidget( me_m_plotoption );
 
3619
        UxCreateWidget( me_m_plot );
 
3620
        UxCreateWidget( me_m_oplot );
 
3621
        UxPutSubMenuId( me_m_pmode, "me_m_plotoption" );
 
3622
        UxCreateWidget( me_m_pmode );
 
3623
 
 
3624
        UxCreateWidget( me_m_traceoption );
 
3625
        UxCreateWidget( me_m_line );
 
3626
        UxCreateWidget( me_m_histo );
 
3627
        UxPutSubMenuId( me_m_tmode, "me_m_traceoption" );
 
3628
        UxCreateWidget( me_m_tmode );
 
3629
 
 
3630
        UxPutSubMenuId( met_m_options, "me_m_option" );
 
3631
        UxCreateWidget( met_m_options );
 
3632
 
 
3633
        UxCreateWidget( me_m_help );
 
3634
        UxCreateWidget( me_m_hm );
 
3635
        UxPutSubMenuId( mt_m_help, "me_m_help" );
 
3636
        UxCreateWidget( mt_m_help );
 
3637
 
 
3638
        UxCreateWidget( me_m_quit );
 
3639
        UxCreateWidget( me_m_bye );
 
3640
        UxPutSubMenuId( mt_m_quit, "me_m_quit" );
 
3641
        UxCreateWidget( mt_m_quit );
 
3642
 
 
3643
        UxPutRightOffset( separator2, 0 );
 
3644
        UxPutLeftOffset( separator2, 0 );
 
3645
        UxPutRightAttachment( separator2, "attach_form" );
 
3646
        UxPutLeftAttachment( separator2, "attach_form" );
 
3647
        UxCreateWidget( separator2 );
 
3648
 
 
3649
        UxPutRightAttachment( separator3, "attach_form" );
 
3650
        UxPutLeftAttachment( separator3, "attach_form" );
 
3651
        UxCreateWidget( separator3 );
 
3652
 
 
3653
        UxPutRightAttachment( separator7, "attach_form" );
 
3654
        UxPutLeftAttachment( separator7, "attach_form" );
 
3655
        UxCreateWidget( separator7 );
 
3656
 
 
3657
        UxPutTopWidget( lbl_title, "meModel" );
 
3658
        UxPutTopAttachment( lbl_title, "attach_widget" );
 
3659
        UxPutTopOffset( lbl_title, 0 );
 
3660
        UxPutRightOffset( lbl_title, 1 );
 
3661
        UxPutLeftOffset( lbl_title, 1 );
 
3662
        UxPutRightAttachment( lbl_title, "attach_form" );
 
3663
        UxPutLeftAttachment( lbl_title, "attach_form" );
 
3664
        UxCreateWidget( lbl_title );
 
3665
 
 
3666
        UxCreateWidget( tf_SN );
 
3667
        UxCreateWidget( tg_time_sn );
 
3668
        UxCreateWidget( tg_etime );
 
3669
        UxCreateWidget( tg_sn );
 
3670
        UxCreateWidget( lbl_sky );
 
3671
        UxCreateWidget( tg_brightness );
 
3672
        UxCreateWidget( tg_bright );
 
3673
        UxCreateWidget( tg_dark );
 
3674
        UxCreateWidget( tg_lines );
 
3675
        UxCreateWidget( tg_emli );
 
3676
        UxCreateWidget( tg_noemli );
 
3677
        UxPutTopWidget( separator18, "lbl_title" );
 
3678
        UxPutTopOffset( separator18, 0 );
 
3679
        UxPutTopAttachment( separator18, "attach_widget" );
 
3680
        UxPutRightAttachment( separator18, "attach_form" );
 
3681
        UxPutLeftAttachment( separator18, "attach_form" );
 
3682
        UxCreateWidget( separator18 );
 
3683
 
 
3684
        UxCreateWidget( tg_sky );
 
3685
        UxCreateWidget( tg_skyon );
 
3686
        UxCreateWidget( tg_skyoff );
 
3687
        UxCreateWidget( tg_extsky );
 
3688
        UxCreateWidget( lbl_mirror1 );
 
3689
        UxCreateWidget( tg_opt );
 
3690
        UxCreateWidget( tg_optyes );
 
3691
        UxCreateWidget( tg_optno );
 
3692
        UxCreateWidget( tg_mir );
 
3693
        UxCreateWidget( tg_mirnew );
 
3694
        UxCreateWidget( tg_mirold );
 
3695
        UxCreateWidget( tg_mirno );
 
3696
        UxCreateWidget( tf_disp_pix );
 
3697
        UxCreateWidget( lbl_disp );
 
3698
        UxCreateWidget( label7 );
 
3699
        UxCreateWidget( tf_TWmax );
 
3700
        UxCreateWidget( tf_TWmin );
 
3701
        UxPutRightAttachment( separator10, "attach_form" );
 
3702
        UxPutLeftAttachment( separator10, "attach_form" );
 
3703
        UxCreateWidget( separator10 );
 
3704
 
 
3705
        UxPutTopWidget( separator4, "separator3" );
 
3706
        UxPutTopOffset( separator4, 1 );
 
3707
        UxPutTopAttachment( separator4, "attach_widget" );
 
3708
        UxPutBottomWidget( separator4, "separator10" );
 
3709
        UxPutBottomOffset( separator4, 1 );
 
3710
        UxPutBottomAttachment( separator4, "attach_widget" );
 
3711
        UxCreateWidget( separator4 );
 
3712
 
 
3713
 
 
3714
        UxAddCallback( tf_spectrum, XmNmotionVerifyCallback,
 
3715
                        motionVerifyCB_tf_spectrum,
 
3716
                        (XtPointer) UxModelShellContext );
 
3717
        UxAddCallback( tf_spectrum, XmNfocusCallback,
 
3718
                        focusCB_tf_spectrum,
 
3719
                        (XtPointer) UxModelShellContext );
 
3720
        UxAddCallback( tf_spectrum, XmNlosingFocusCallback,
 
3721
                        losingFocusCB_tf_spectrum,
 
3722
                        (XtPointer) UxModelShellContext );
 
3723
 
 
3724
        UxAddCallback( pB_MReset, XmNactivateCallback,
 
3725
                        activateCB_pB_MReset,
 
3726
                        (XtPointer) UxModelShellContext );
 
3727
 
 
3728
        UxAddCallback( pB_Mtrans, XmNactivateCallback,
 
3729
                        activateCB_pB_Mtrans,
 
3730
                        (XtPointer) UxModelShellContext );
 
3731
 
 
3732
        UxAddCallback( pB_Mres, XmNactivateCallback,
 
3733
                        activateCB_pB_Mres,
 
3734
                        (XtPointer) UxModelShellContext );
 
3735
 
 
3736
        UxAddCallback( pB_MFCreate, XmNactivateCallback,
 
3737
                        activateCB_pB_MFCreate,
 
3738
                        (XtPointer) UxModelShellContext );
 
3739
 
 
3740
        UxAddCallback( pB_MPrint, XmNactivateCallback,
 
3741
                        activateCB_pB_MPrint,
 
3742
                        (XtPointer) UxModelShellContext );
 
3743
 
 
3744
        UxAddCallback( tg_atmyes, XmNarmCallback,
 
3745
                        armCB_tg_atmyes,
 
3746
                        (XtPointer) UxModelShellContext );
 
3747
 
 
3748
        UxAddCallback( tg_atmno, XmNarmCallback,
 
3749
                        armCB_tg_atmno,
 
3750
                        (XtPointer) UxModelShellContext );
 
3751
        UxAddCallback( tg_atmno, XmNvalueChangedCallback,
 
3752
                        valueChangedCB_tg_atmno,
 
3753
                        (XtPointer) UxModelShellContext );
 
3754
 
 
3755
        UxAddCallback( mn_standard, XmNactivateCallback,
 
3756
                        activateCB_mn_standard,
 
3757
                        (XtPointer) UxModelShellContext );
 
3758
 
 
3759
        UxAddCallback( mn_hststd, XmNactivateCallback,
 
3760
                        activateCB_mn_hststd,
 
3761
                        (XtPointer) UxModelShellContext );
 
3762
 
 
3763
        UxAddCallback( mn_ctiostd, XmNactivateCallback,
 
3764
                        activateCB_mn_ctiostd,
 
3765
                        (XtPointer) UxModelShellContext );
 
3766
 
 
3767
        UxAddCallback( mn_blackbody, XmNactivateCallback,
 
3768
                        activateCB_mn_blackbody,
 
3769
                        (XtPointer) UxModelShellContext );
 
3770
 
 
3771
        UxAddCallback( tf_airmass, XmNfocusCallback,
 
3772
                        focusCB_tf_airmass,
 
3773
                        (XtPointer) UxModelShellContext );
 
3774
        UxAddCallback( tf_airmass, XmNlosingFocusCallback,
 
3775
                        losingFocusCB_tf_airmass,
 
3776
                        (XtPointer) UxModelShellContext );
 
3777
 
 
3778
        UxAddCallback( mn_nogrism, XmNactivateCallback,
 
3779
                        activateCB_mn_nogrism,
 
3780
                        (XtPointer) UxModelShellContext );
 
3781
 
 
3782
        UxAddCallback( mn_grism0, XmNactivateCallback,
 
3783
                        activateCB_mn_grism0,
 
3784
                        (XtPointer) UxModelShellContext );
 
3785
 
 
3786
        UxAddCallback( mn_grism1, XmNactivateCallback,
 
3787
                        activateCB_mn_grism1,
 
3788
                        (XtPointer) UxModelShellContext );
 
3789
 
 
3790
        UxAddCallback( mn_grism2, XmNactivateCallback,
 
3791
                        activateCB_mn_grism2,
 
3792
                        (XtPointer) UxModelShellContext );
 
3793
 
 
3794
        UxAddCallback( mn_grism3, XmNactivateCallback,
 
3795
                        activateCB_mn_grism3,
 
3796
                        (XtPointer) UxModelShellContext );
 
3797
 
 
3798
        UxAddCallback( mn_grism4, XmNactivateCallback,
 
3799
                        activateCB_mn_grism4,
 
3800
                        (XtPointer) UxModelShellContext );
 
3801
 
 
3802
        UxAddCallback( mn_grism5, XmNactivateCallback,
 
3803
                        activateCB_mn_grism5,
 
3804
                        (XtPointer) UxModelShellContext );
 
3805
 
 
3806
        UxAddCallback( mn_grism6, XmNactivateCallback,
 
3807
                        activateCB_mn_grism6,
 
3808
                        (XtPointer) UxModelShellContext );
 
3809
 
 
3810
        UxAddCallback( mn_grism7, XmNactivateCallback,
 
3811
                        activateCB_mn_grism7,
 
3812
                        (XtPointer) UxModelShellContext );
 
3813
 
 
3814
        UxAddCallback( mn_grism8, XmNactivateCallback,
 
3815
                        activateCB_mn_grism8,
 
3816
                        (XtPointer) UxModelShellContext );
 
3817
 
 
3818
        UxAddCallback( mn_grism9, XmNactivateCallback,
 
3819
                        activateCB_mn_grism9,
 
3820
                        (XtPointer) UxModelShellContext );
 
3821
 
 
3822
        UxPutMenuHistory( mn_wgrism, "mn_nogrism" );
 
3823
 
 
3824
        UxAddCallback( tf_filter, XmNfocusCallback,
 
3825
                        focusCB_tf_filter,
 
3826
                        (XtPointer) UxModelShellContext );
 
3827
        UxAddCallback( tf_filter, XmNmodifyVerifyCallback,
 
3828
                        modifyVerifyCB_tf_filter,
 
3829
                        (XtPointer) UxModelShellContext );
 
3830
        UxAddCallback( tf_filter, XmNlosingFocusCallback,
 
3831
                        losingFocusCB_tf_filter,
 
3832
                        (XtPointer) UxModelShellContext );
 
3833
 
 
3834
        UxAddCallback( tg_basic, XmNarmCallback,
 
3835
                        armCB_tg_basic,
 
3836
                        (XtPointer) UxModelShellContext );
 
3837
 
 
3838
        UxAddCallback( tg_all, XmNarmCallback,
 
3839
                        armCB_tg_all,
 
3840
                        (XtPointer) UxModelShellContext );
 
3841
 
 
3842
        UxAddCallback( tg_ccdyes, XmNarmCallback,
 
3843
                        armCB_tg_ccdyes,
 
3844
                        (XtPointer) UxModelShellContext );
 
3845
 
 
3846
        UxAddCallback( tg_ccdno, XmNarmCallback,
 
3847
                        armCB_tg_ccdno,
 
3848
                        (XtPointer) UxModelShellContext );
 
3849
 
 
3850
        UxAddCallback( tf_time, XmNfocusCallback,
 
3851
                        focusCB_tf_time,
 
3852
                        (XtPointer) UxModelShellContext );
 
3853
        UxAddCallback( tf_time, XmNlosingFocusCallback,
 
3854
                        losingFocusCB_tf_time,
 
3855
                        (XtPointer) UxModelShellContext );
 
3856
 
 
3857
        UxAddCallback( tf_eadu, XmNfocusCallback,
 
3858
                        focusCB_tf_eadu,
 
3859
                        (XtPointer) UxModelShellContext );
 
3860
        UxAddCallback( tf_eadu, XmNlosingFocusCallback,
 
3861
                        losingFocusCB_tf_eadu,
 
3862
                        (XtPointer) UxModelShellContext );
 
3863
 
 
3864
        UxPutMenuHelpWidget( meModel, "mt_m_quit" );
 
3865
 
 
3866
        UxAddCallback( me_m_load, XmNactivateCallback,
 
3867
                        activateCB_me_m_load,
 
3868
                        (XtPointer) UxModelShellContext );
 
3869
 
 
3870
        UxAddCallback( me_m_save, XmNactivateCallback,
 
3871
                        activateCB_me_m_save,
 
3872
                        (XtPointer) UxModelShellContext );
 
3873
 
 
3874
        UxAddCallback( me_m_saveas, XmNactivateCallback,
 
3875
                        activateCB_me_m_saveas,
 
3876
                        (XtPointer) UxModelShellContext );
 
3877
 
 
3878
        UxAddCallback( me_m_loadcurve, XmNactivateCallback,
 
3879
                        activateCB_me_m_loadcurve,
 
3880
                        (XtPointer) UxModelShellContext );
 
3881
 
 
3882
        UxAddCallback( me_m_savecurve, XmNactivateCallback,
 
3883
                        activateCB_me_m_savecurve,
 
3884
                        (XtPointer) UxModelShellContext );
 
3885
 
 
3886
        UxAddCallback( me_m_saveascurve, XmNactivateCallback,
 
3887
                        activateCB_me_m_saveascurve,
 
3888
                        (XtPointer) UxModelShellContext );
 
3889
 
 
3890
        UxAddCallback( me_m_trimx, XmNactivateCallback,
 
3891
                        activateCB_me_m_trimx,
 
3892
                        (XtPointer) UxModelShellContext );
 
3893
 
 
3894
        UxAddCallback( me_m_trimy, XmNactivateCallback,
 
3895
                        activateCB_me_m_trimy,
 
3896
                        (XtPointer) UxModelShellContext );
 
3897
 
 
3898
        UxAddCallback( me_m_unzoom, XmNactivateCallback,
 
3899
                        activateCB_me_m_unzoom,
 
3900
                        (XtPointer) UxModelShellContext );
 
3901
 
 
3902
        UxAddCallback( me_m_redraw, XmNactivateCallback,
 
3903
                        activateCB_me_m_redraw,
 
3904
                        (XtPointer) UxModelShellContext );
 
3905
 
 
3906
        UxAddCallback( me_m_print, XmNactivateCallback,
 
3907
                        activateCB_me_m_print,
 
3908
                        (XtPointer) UxModelShellContext );
 
3909
 
 
3910
        UxAddCallback( me_m_plot, XmNvalueChangedCallback,
 
3911
                        valueChangedCB_me_m_plot,
 
3912
                        (XtPointer) UxModelShellContext );
 
3913
 
 
3914
        UxAddCallback( me_m_oplot, XmNvalueChangedCallback,
 
3915
                        valueChangedCB_me_m_oplot,
 
3916
                        (XtPointer) UxModelShellContext );
 
3917
 
 
3918
        UxAddCallback( me_m_line, XmNvalueChangedCallback,
 
3919
                        valueChangedCB_me_m_line,
 
3920
                        (XtPointer) UxModelShellContext );
 
3921
 
 
3922
        UxAddCallback( me_m_histo, XmNvalueChangedCallback,
 
3923
                        valueChangedCB_me_m_histo,
 
3924
                        (XtPointer) UxModelShellContext );
 
3925
 
 
3926
        UxAddCallback( me_m_hm, XmNactivateCallback,
 
3927
                        activateCB_me_m_hm,
 
3928
                        (XtPointer) UxModelShellContext );
 
3929
 
 
3930
        UxAddCallback( me_m_bye, XmNactivateCallback,
 
3931
                        activateCB_me_m_bye,
 
3932
                        (XtPointer) UxModelShellContext );
 
3933
 
 
3934
        UxAddCallback( tf_SN, XmNfocusCallback,
 
3935
                        focusCB_tf_SN,
 
3936
                        (XtPointer) UxModelShellContext );
 
3937
        UxAddCallback( tf_SN, XmNlosingFocusCallback,
 
3938
                        losingFocusCB_tf_SN,
 
3939
                        (XtPointer) UxModelShellContext );
 
3940
 
 
3941
        UxAddCallback( tg_etime, XmNarmCallback,
 
3942
                        armCB_tg_etime,
 
3943
                        (XtPointer) UxModelShellContext );
 
3944
 
 
3945
        UxAddCallback( tg_sn, XmNarmCallback,
 
3946
                        armCB_tg_sn,
 
3947
                        (XtPointer) UxModelShellContext );
 
3948
 
 
3949
        UxAddCallback( tg_bright, XmNarmCallback,
 
3950
                        armCB_tg_bright,
 
3951
                        (XtPointer) UxModelShellContext );
 
3952
 
 
3953
        UxAddCallback( tg_dark, XmNarmCallback,
 
3954
                        armCB_tg_dark,
 
3955
                        (XtPointer) UxModelShellContext );
 
3956
 
 
3957
        UxAddCallback( tg_emli, XmNarmCallback,
 
3958
                        armCB_tg_emli,
 
3959
                        (XtPointer) UxModelShellContext );
 
3960
 
 
3961
        UxAddCallback( tg_noemli, XmNarmCallback,
 
3962
                        armCB_tg_noemli,
 
3963
                        (XtPointer) UxModelShellContext );
 
3964
 
 
3965
        UxAddCallback( tg_skyon, XmNarmCallback,
 
3966
                        armCB_tg_skyon,
 
3967
                        (XtPointer) UxModelShellContext );
 
3968
 
 
3969
        UxAddCallback( tg_skyoff, XmNarmCallback,
 
3970
                        armCB_tg_skyoff,
 
3971
                        (XtPointer) UxModelShellContext );
 
3972
 
 
3973
        UxAddCallback( tg_optyes, XmNarmCallback,
 
3974
                        armCB_tg_optyes,
 
3975
                        (XtPointer) UxModelShellContext );
 
3976
 
 
3977
        UxAddCallback( tg_optno, XmNarmCallback,
 
3978
                        armCB_tg_optno,
 
3979
                        (XtPointer) UxModelShellContext );
 
3980
 
 
3981
        UxAddCallback( tg_mirnew, XmNarmCallback,
 
3982
                        armCB_tg_mirnew,
 
3983
                        (XtPointer) UxModelShellContext );
 
3984
 
 
3985
        UxAddCallback( tg_mirold, XmNarmCallback,
 
3986
                        armCB_tg_mirold,
 
3987
                        (XtPointer) UxModelShellContext );
 
3988
 
 
3989
        UxAddCallback( tg_mirno, XmNarmCallback,
 
3990
                        armCB_tg_mirno,
 
3991
                        (XtPointer) UxModelShellContext );
 
3992
 
 
3993
        UxAddCallback( tf_disp_pix, XmNfocusCallback,
 
3994
                        focusCB_tf_disp_pix,
 
3995
                        (XtPointer) UxModelShellContext );
 
3996
        UxAddCallback( tf_disp_pix, XmNlosingFocusCallback,
 
3997
                        losingFocusCB_tf_disp_pix,
 
3998
                        (XtPointer) UxModelShellContext );
 
3999
 
 
4000
        UxAddCallback( tf_TWmax, XmNfocusCallback,
 
4001
                        focusCB_tf_TWmax,
 
4002
                        (XtPointer) UxModelShellContext );
 
4003
        UxAddCallback( tf_TWmax, XmNlosingFocusCallback,
 
4004
                        losingFocusCB_tf_TWmax,
 
4005
                        (XtPointer) UxModelShellContext );
 
4006
 
 
4007
        UxAddCallback( tf_TWmin, XmNfocusCallback,
 
4008
                        focusCB_tf_TWmin,
 
4009
                        (XtPointer) UxModelShellContext );
 
4010
        UxAddCallback( tf_TWmin, XmNlosingFocusCallback,
 
4011
                        losingFocusCB_tf_TWmin,
 
4012
                        (XtPointer) UxModelShellContext );
 
4013
 
 
4014
 
 
4015
        /* Finally, call UxRealizeInterface to create the X windows
 
4016
           for the widgets created above. */
 
4017
 
 
4018
        UxRealizeInterface( ModelShell );
 
4019
 
 
4020
        return ( ModelShell );
 
4021
}
 
4022
 
 
4023
/*******************************************************************************
 
4024
        The following function includes the code that was entered
 
4025
        in the 'Initial Code' and 'Final Code' sections of the
 
4026
        Declarations Editor. This function is called from the
 
4027
        'Interface function' below.
 
4028
*******************************************************************************/
 
4029
 
 
4030
static swidget  _Ux_create_ModelShell()
 
4031
{
 
4032
        swidget                 rtrn;
 
4033
        _UxCModelShell          *UxContext;
 
4034
 
 
4035
        UxModelShellContext = UxContext =
 
4036
                (_UxCModelShell *) UxMalloc( sizeof(_UxCModelShell) );
 
4037
 
 
4038
        rtrn = _Uxbuild_ModelShell();
 
4039
 
 
4040
        return(rtrn);
 
4041
}
 
4042
 
 
4043
/*******************************************************************************
 
4044
        The following is the 'Interface function' which is the
 
4045
        external entry point for creating this interface.
 
4046
        This function should be called from your application or from
 
4047
        a callback function.
 
4048
*******************************************************************************/
 
4049
 
 
4050
swidget create_ModelShell()
 
4051
{
 
4052
        swidget                 _Uxrtrn;
 
4053
        static int              _Uxinit = 0;
 
4054
 
 
4055
        if ( ! _Uxinit )
 
4056
        {
 
4057
                static XtActionsRec     _Uxactions[] = {
 
4058
                                { "ClearShortTM", action_ClearShortTM },
 
4059
                                { "HelpShortTM", action_HelpShortTM },
 
4060
                                { "HelpHelp", action_HelpHelp },
 
4061
                                { "ChooseListUpS", action_ChooseListUpS },
 
4062
                                { "ChooseListUpF", action_ChooseListUpF }
 
4063
                                };
 
4064
 
 
4065
                XtAppAddActions( UxAppContext,
 
4066
                                _Uxactions,
 
4067
                                XtNumber(_Uxactions) );
 
4068
 
 
4069
                _Uxinit = 1;
 
4070
        }
 
4071
 
 
4072
        _Uxrtrn = _Ux_create_ModelShell();
 
4073
 
 
4074
        return ( _Uxrtrn );
 
4075
}
 
4076
 
 
4077
/*******************************************************************************
 
4078
        END OF FILE
 
4079
*******************************************************************************/
 
4080