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

« back to all changes in this revision

Viewing changes to .pc/writting.patch/gui/XFilter/src/WaveBShell.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-sl34juxohmn4aty4
Tags: 13.09pl1.2+dfsg-1
Initial release. (Closes: #740702)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*===========================================================================
 
2
  Copyright (C) 1995-2009 European Southern Observatory (ESO)
 
3
 
 
4
  This program is free software; you can redistribute it and/or 
 
5
  modify it under the terms of the GNU General Public License as 
 
6
  published by the Free Software Foundation; either version 2 of 
 
7
  the License, or (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public 
 
15
  License along with this program; if not, write to the Free 
 
16
  Software Foundation, Inc., 675 Massachusetss Ave, Cambridge, 
 
17
  MA 02139, USA.
 
18
 
 
19
  Corresponding concerning ESO-MIDAS should be addressed as follows:
 
20
        Internet e-mail: midas@eso.org
 
21
        Postal address: European Southern Observatory
 
22
                        Data Management Division 
 
23
                        Karl-Schwarzschild-Strasse 2
 
24
                        D 85748 Garching bei Muenchen 
 
25
                        GERMANY
 
26
===========================================================================*/
 
27
 
 
28
 
 
29
/*******************************************************************************
 
30
        WaveBShell.c
 
31
 
 
32
.VERSION
 
33
 090826         last modif
 
34
 
 
35
*******************************************************************************/
 
36
 
 
37
#include <stdio.h>
 
38
#include "UxLib.h"
 
39
#include "UxTogB.h"
 
40
#include "UxText.h"
 
41
#include "UxLabel.h"
 
42
#include "UxSep.h"
 
43
#include "UxPushB.h"
 
44
#include "UxForm.h"
 
45
#include "UxApplSh.h"
 
46
 
 
47
/*******************************************************************************
 
48
        Includes, Defines, and Global variables from the Declarations Editor:
 
49
*******************************************************************************/
 
50
 
 
51
#include <ExternResources.h> 
 
52
#include <global.h>
 
53
 
 
54
/*******************************************************************************
 
55
        The definition of the context structure:
 
56
        If you create multiple instances of your interface, the context
 
57
        structure ensures that your callbacks use the variables for the
 
58
        correct instance.
 
59
 
 
60
        For each swidget in the interface, each argument to the Interface
 
61
        function, and each variable in the Instance Specific section of the
 
62
        Declarations Editor, there is an entry in the context structure.
 
63
        and a #define.  The #define makes the variable name refer to the
 
64
        corresponding entry in the context structure.
 
65
*******************************************************************************/
 
66
 
 
67
typedef struct
 
68
{
 
69
        swidget Uxform3;
 
70
        swidget Uxform5;
 
71
        swidget UxApplyWaveB;
 
72
        swidget UxCancelWaveB;
 
73
        swidget Uxseparator5;
 
74
        swidget Uxlabel3;
 
75
        swidget Uxlabel4;
 
76
        swidget Uxtextcwmin1;
 
77
        swidget Uxtextcwmax1;
 
78
        swidget Uxlabel5;
 
79
        swidget Uxlabel6;
 
80
        swidget Uxtextbwmin;
 
81
        swidget Uxtextbwmax;
 
82
        swidget Uxtg_imaqual1;
 
83
} _UxCWaveBShell;
 
84
 
 
85
#define form3                   UxWaveBShellContext->Uxform3
 
86
#define form5                   UxWaveBShellContext->Uxform5
 
87
#define ApplyWaveB              UxWaveBShellContext->UxApplyWaveB
 
88
#define CancelWaveB             UxWaveBShellContext->UxCancelWaveB
 
89
#define separator5              UxWaveBShellContext->Uxseparator5
 
90
#define label3                  UxWaveBShellContext->Uxlabel3
 
91
#define label4                  UxWaveBShellContext->Uxlabel4
 
92
#define textcwmin1              UxWaveBShellContext->Uxtextcwmin1
 
93
#define textcwmax1              UxWaveBShellContext->Uxtextcwmax1
 
94
#define label5                  UxWaveBShellContext->Uxlabel5
 
95
#define label6                  UxWaveBShellContext->Uxlabel6
 
96
#define textbwmin               UxWaveBShellContext->Uxtextbwmin
 
97
#define textbwmax               UxWaveBShellContext->Uxtextbwmax
 
98
#define tg_imaqual1             UxWaveBShellContext->Uxtg_imaqual1
 
99
 
 
100
static _UxCWaveBShell   *UxWaveBShellContext;
 
101
 
 
102
extern void search_cwbw();
 
103
 
 
104
 
 
105
swidget WaveBShell;
 
106
 
 
107
/*******************************************************************************
 
108
        The following are translation tables.
 
109
*******************************************************************************/
 
110
 
 
111
static char     *WBtext_tab = "#override\n\
 
112
<Key>Delete:delete-previous-character()\n\
 
113
<Key>BackSpace:delete-previous-character()\n\
 
114
<Key>osfBackSpace:delete-previous-character()\n\
 
115
<Key>osfDelete:delete-previous-character()\n";
 
116
 
 
117
/*******************************************************************************
 
118
        Forward declarations of functions that are defined later in this file.
 
119
*******************************************************************************/
 
120
 
 
121
swidget create_WaveBShell();
 
122
 
 
123
/*******************************************************************************
 
124
        The following are callback functions.
 
125
*******************************************************************************/
 
126
 
 
127
static void     activateCB_ApplyWaveB( UxWidget, UxClientData, UxCallbackArg )
 
128
        Widget          UxWidget;
 
129
        XtPointer       UxClientData, UxCallbackArg;
 
130
{
 
131
        _UxCWaveBShell          *UxSaveCtx, *UxContext;
 
132
        swidget                 UxThisWidget;
 
133
 
 
134
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
135
        UxSaveCtx = UxWaveBShellContext;
 
136
        UxWaveBShellContext = UxContext =
 
137
                        (_UxCWaveBShell *) UxGetContext( UxThisWidget );
 
138
        {
 
139
        extern float cw1,cw2,bw1,bw2;
 
140
        
 
141
        search_cwbw(cw1,cw2,bw1,bw2);
 
142
        
 
143
        UxPopdownInterface(WaveBShell);
 
144
        }
 
145
        UxWaveBShellContext = UxSaveCtx;
 
146
}
 
147
 
 
148
static void     activateCB_CancelWaveB( UxWidget, UxClientData, UxCallbackArg )
 
149
        Widget          UxWidget;
 
150
        XtPointer       UxClientData, UxCallbackArg;
 
151
{
 
152
        _UxCWaveBShell          *UxSaveCtx, *UxContext;
 
153
        swidget                 UxThisWidget;
 
154
 
 
155
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
156
        UxSaveCtx = UxWaveBShellContext;
 
157
        UxWaveBShellContext = UxContext =
 
158
                        (_UxCWaveBShell *) UxGetContext( UxThisWidget );
 
159
        {
 
160
        UxPopdownInterface(WaveBShell);
 
161
        }
 
162
        UxWaveBShellContext = UxSaveCtx;
 
163
}
 
164
 
 
165
static void     losingFocusCB_textcwmin1( UxWidget, UxClientData, UxCallbackArg )
 
166
        Widget          UxWidget;
 
167
        XtPointer       UxClientData, UxCallbackArg;
 
168
{
 
169
        _UxCWaveBShell          *UxSaveCtx, *UxContext;
 
170
        swidget                 UxThisWidget;
 
171
 
 
172
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
173
        UxSaveCtx = UxWaveBShellContext;
 
174
        UxWaveBShellContext = UxContext =
 
175
                        (_UxCWaveBShell *) UxGetContext( UxThisWidget );
 
176
        {
 
177
        
 
178
        int nid;
 
179
        char am[10];
 
180
        float minw;
 
181
        extern float cw1;
 
182
        
 
183
        nid=sscanf(UxGetText(UxFindSwidget("textcwmin1")),"%f",&minw);
 
184
        if (nid==1)
 
185
                {
 
186
                if ((minw>=300.)&&(minw<=1100.))
 
187
                        cw1=minw;
 
188
                else if (minw<300.)
 
189
                        cw1=300.;
 
190
                else if (minw>1100.)
 
191
                        cw1=1100.;
 
192
                }
 
193
        
 
194
        sprintf(am,"%.1f",cw1);
 
195
        UxPutText(UxFindSwidget("textcwmin1"),am);
 
196
        
 
197
        
 
198
        }
 
199
        UxWaveBShellContext = UxSaveCtx;
 
200
}
 
201
 
 
202
static void     losingFocusCB_textcwmax1( UxWidget, UxClientData, UxCallbackArg )
 
203
        Widget          UxWidget;
 
204
        XtPointer       UxClientData, UxCallbackArg;
 
205
{
 
206
        _UxCWaveBShell          *UxSaveCtx, *UxContext;
 
207
        swidget                 UxThisWidget;
 
208
 
 
209
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
210
        UxSaveCtx = UxWaveBShellContext;
 
211
        UxWaveBShellContext = UxContext =
 
212
                        (_UxCWaveBShell *) UxGetContext( UxThisWidget );
 
213
        {
 
214
         int nid;
 
215
        char am[20];
 
216
        float maxw;
 
217
        extern float cw2;
 
218
        
 
219
        
 
220
        nid=sscanf(UxGetText(UxFindSwidget("textcwmax1")),"%f",&maxw);
 
221
        if (nid==1)
 
222
                {
 
223
                if ((maxw>=400.)&&(maxw<=1200.))
 
224
                        cw2=maxw;
 
225
                else if (maxw<400.)
 
226
                        cw2=400.;
 
227
                else if (maxw>1200.)
 
228
                        cw2=1200.;
 
229
                }
 
230
        
 
231
        sprintf(am,"%.1f",cw2);
 
232
        UxPutText(UxFindSwidget("textcwmax1"),am);
 
233
        
 
234
        
 
235
        }
 
236
        UxWaveBShellContext = UxSaveCtx;
 
237
}
 
238
 
 
239
static void     losingFocusCB_textbwmin( UxWidget, UxClientData, UxCallbackArg )
 
240
        Widget          UxWidget;
 
241
        XtPointer       UxClientData, UxCallbackArg;
 
242
{
 
243
        _UxCWaveBShell          *UxSaveCtx, *UxContext;
 
244
        swidget                 UxThisWidget;
 
245
 
 
246
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
247
        UxSaveCtx = UxWaveBShellContext;
 
248
        UxWaveBShellContext = UxContext =
 
249
                        (_UxCWaveBShell *) UxGetContext( UxThisWidget );
 
250
        {
 
251
        int nid;
 
252
        char am[10];
 
253
        float minw;
 
254
        extern float bw1;
 
255
        
 
256
        nid=sscanf(UxGetText(UxFindSwidget("textbwmin")),"%f",&minw);
 
257
        if (nid==1)
 
258
                {
 
259
                if ((minw>=0.)&&(minw<=500.))
 
260
                        bw1=minw;
 
261
                else if (minw<0.)
 
262
                        bw1=0.;
 
263
                else if (minw>500.)
 
264
                        bw1=500.;
 
265
                }
 
266
        
 
267
        sprintf(am,"%.1f",bw1);
 
268
        UxPutText(UxFindSwidget("textbwmin"),am);
 
269
        
 
270
        }
 
271
        UxWaveBShellContext = UxSaveCtx;
 
272
}
 
273
 
 
274
static void     losingFocusCB_textbwmax( UxWidget, UxClientData, UxCallbackArg )
 
275
        Widget          UxWidget;
 
276
        XtPointer       UxClientData, UxCallbackArg;
 
277
{
 
278
        _UxCWaveBShell          *UxSaveCtx, *UxContext;
 
279
        swidget                 UxThisWidget;
 
280
 
 
281
        UxThisWidget = UxWidgetToSwidget( UxWidget );
 
282
        UxSaveCtx = UxWaveBShellContext;
 
283
        UxWaveBShellContext = UxContext =
 
284
                        (_UxCWaveBShell *) UxGetContext( UxThisWidget );
 
285
        {
 
286
         
 
287
        int nid;
 
288
        char am[20];
 
289
        float maxw;
 
290
        extern float bw2;
 
291
        
 
292
        
 
293
        nid=sscanf(UxGetText(UxFindSwidget("textbwmax")),"%f",&maxw);
 
294
        if (nid==1)
 
295
                {
 
296
                if ((maxw>=5.)&&(maxw<=600.))
 
297
                        bw2=maxw;
 
298
                else if (maxw<5.)
 
299
                        bw2=5.;
 
300
                else if (maxw>600.)
 
301
                        bw2=600.;
 
302
                }
 
303
        
 
304
        sprintf(am,"%.1f",bw2);
 
305
        UxPutText(UxFindSwidget("textbwmax"),am);
 
306
        
 
307
        }
 
308
        UxWaveBShellContext = UxSaveCtx;
 
309
}
 
310
 
 
311
/*******************************************************************************
 
312
        The 'init_' function sets the private properties for all the
 
313
        swidgets to the values specified in the Property Table.
 
314
        Some properties need to be set after the X widgets have been
 
315
        created and the setting of these properties is done in the
 
316
        'build_' function after the UxCreateWidget call.
 
317
*******************************************************************************/
 
318
 
 
319
static void     _Uxinit_WaveBShell()
 
320
{
 
321
        UxPutBackground( WaveBShell, WindowBackground );
 
322
        UxPutBorderColor( WaveBShell, WindowBackground );
 
323
        UxPutKeyboardFocusPolicy( WaveBShell, "pointer" );
 
324
        UxPutIconName( WaveBShell, "Wavelength & Bandwith" );
 
325
        UxPutHeight( WaveBShell, 260 );
 
326
        UxPutWidth( WaveBShell, 325 );
 
327
        UxPutY( WaveBShell, 275 );
 
328
        UxPutX( WaveBShell, 619 );
 
329
 
 
330
        UxPutBorderColor( form3, WindowBackground );
 
331
        UxPutBackground( form3, WindowBackground );
 
332
        UxPutHeight( form3, 548 );
 
333
        UxPutWidth( form3, 490 );
 
334
        UxPutY( form3, 4 );
 
335
        UxPutX( form3, 4 );
 
336
        UxPutUnitType( form3, "pixels" );
 
337
        UxPutResizePolicy( form3, "resize_none" );
 
338
 
 
339
        UxPutBorderColor( form5, ButtonBackground );
 
340
        UxPutBackground( form5, ButtonBackground );
 
341
        UxPutHeight( form5, 44 );
 
342
        UxPutWidth( form5, 490 );
 
343
        UxPutY( form5, 150 );
 
344
        UxPutX( form5, 0 );
 
345
        UxPutResizePolicy( form5, "resize_none" );
 
346
 
 
347
        UxPutLabelString( ApplyWaveB, "Apply" );
 
348
        UxPutForeground( ApplyWaveB, ApplyForeground );
 
349
        UxPutFontList( ApplyWaveB, BoldTextFont );
 
350
        UxPutBorderColor( ApplyWaveB, ButtonBackground );
 
351
        UxPutBackground( ApplyWaveB, ButtonBackground );
 
352
        UxPutHeight( ApplyWaveB, 30 );
 
353
        UxPutWidth( ApplyWaveB, 80 );
 
354
        UxPutY( ApplyWaveB, 6 );
 
355
        UxPutX( ApplyWaveB, 10 );
 
356
 
 
357
        UxPutLabelString( CancelWaveB, "Cancel" );
 
358
        UxPutForeground( CancelWaveB, CancelForeground );
 
359
        UxPutFontList( CancelWaveB, BoldTextFont );
 
360
        UxPutBorderColor( CancelWaveB, ButtonBackground );
 
361
        UxPutBackground( CancelWaveB, ButtonBackground );
 
362
        UxPutHeight( CancelWaveB, 30 );
 
363
        UxPutWidth( CancelWaveB, 86 );
 
364
        UxPutY( CancelWaveB, 6 );
 
365
        UxPutX( CancelWaveB, 110 );
 
366
 
 
367
        UxPutBorderColor( separator5, WindowBackground );
 
368
        UxPutBackground( separator5, WindowBackground );
 
369
        UxPutHeight( separator5, 10 );
 
370
        UxPutWidth( separator5, 492 );
 
371
        UxPutY( separator5, 140 );
 
372
        UxPutX( separator5, 0 );
 
373
 
 
374
        UxPutForeground( label3, TextForeground );
 
375
        UxPutAlignment( label3, "alignment_beginning" );
 
376
        UxPutLabelString( label3, "Central Wavelenght min (nm) :" );
 
377
        UxPutFontList( label3, TextFont );
 
378
        UxPutBorderColor( label3, LabelBackground );
 
379
        UxPutBackground( label3, LabelBackground );
 
380
        UxPutHeight( label3, 30 );
 
381
        UxPutWidth( label3, 220 );
 
382
        UxPutY( label3, 10 );
 
383
        UxPutX( label3, 10 );
 
384
 
 
385
        UxPutForeground( label4, TextForeground );
 
386
        UxPutAlignment( label4, "alignment_beginning" );
 
387
        UxPutLabelString( label4, "Central Wavelenght max (nm) :" );
 
388
        UxPutFontList( label4, TextFont );
 
389
        UxPutBorderColor( label4, LabelBackground );
 
390
        UxPutBackground( label4, LabelBackground );
 
391
        UxPutHeight( label4, 28 );
 
392
        UxPutWidth( label4, 220 );
 
393
        UxPutY( label4, 52 );
 
394
        UxPutX( label4, 10 );
 
395
 
 
396
        UxPutTranslations( textcwmin1, WBtext_tab );
 
397
        UxPutSelectionArrayCount( textcwmin1, 3 );
 
398
        UxPutMaxLength( textcwmin1, 200 );
 
399
        UxPutForeground( textcwmin1, TextForeground );
 
400
        UxPutFontList( textcwmin1, TextFont );
 
401
        UxPutBorderColor( textcwmin1, TextBackground );
 
402
        UxPutBackground( textcwmin1, TextBackground );
 
403
        UxPutHeight( textcwmin1, 35 );
 
404
        UxPutWidth( textcwmin1, 80 );
 
405
        UxPutY( textcwmin1, 8 );
 
406
        UxPutX( textcwmin1, 236 );
 
407
 
 
408
        UxPutTranslations( textcwmax1, WBtext_tab );
 
409
        UxPutSelectionArrayCount( textcwmax1, 3 );
 
410
        UxPutMaxLength( textcwmax1, 200 );
 
411
        UxPutForeground( textcwmax1, TextForeground );
 
412
        UxPutFontList( textcwmax1, TextFont );
 
413
        UxPutBorderColor( textcwmax1, TextBackground );
 
414
        UxPutBackground( textcwmax1, TextBackground );
 
415
        UxPutHeight( textcwmax1, 35 );
 
416
        UxPutWidth( textcwmax1, 80 );
 
417
        UxPutY( textcwmax1, 48 );
 
418
        UxPutX( textcwmax1, 236 );
 
419
 
 
420
        UxPutForeground( label5, TextForeground );
 
421
        UxPutAlignment( label5, "alignment_beginning" );
 
422
        UxPutLabelString( label5, "Bandwidth min (nm) :" );
 
423
        UxPutFontList( label5, TextFont );
 
424
        UxPutBorderColor( label5, LabelBackground );
 
425
        UxPutBackground( label5, LabelBackground );
 
426
        UxPutHeight( label5, 30 );
 
427
        UxPutWidth( label5, 220 );
 
428
        UxPutY( label5, 90 );
 
429
        UxPutX( label5, 10 );
 
430
 
 
431
        UxPutForeground( label6, TextForeground );
 
432
        UxPutAlignment( label6, "alignment_beginning" );
 
433
        UxPutLabelString( label6, "Bandwidth max (nm) :" );
 
434
        UxPutFontList( label6, TextFont );
 
435
        UxPutBorderColor( label6, LabelBackground );
 
436
        UxPutBackground( label6, LabelBackground );
 
437
        UxPutHeight( label6, 30 );
 
438
        UxPutWidth( label6, 220 );
 
439
        UxPutY( label6, 130 );
 
440
        UxPutX( label6, 10 );
 
441
 
 
442
        UxPutTranslations( textbwmin, WBtext_tab );
 
443
        UxPutSelectionArrayCount( textbwmin, 3 );
 
444
        UxPutMaxLength( textbwmin, 200 );
 
445
        UxPutForeground( textbwmin, TextForeground );
 
446
        UxPutFontList( textbwmin, TextFont );
 
447
        UxPutBorderColor( textbwmin, TextBackground );
 
448
        UxPutBackground( textbwmin, TextBackground );
 
449
        UxPutHeight( textbwmin, 35 );
 
450
        UxPutWidth( textbwmin, 80 );
 
451
        UxPutY( textbwmin, 88 );
 
452
        UxPutX( textbwmin, 236 );
 
453
 
 
454
        UxPutTranslations( textbwmax, WBtext_tab );
 
455
        UxPutSelectionArrayCount( textbwmax, 3 );
 
456
        UxPutMaxLength( textbwmax, 200 );
 
457
        UxPutForeground( textbwmax, TextForeground );
 
458
        UxPutFontList( textbwmax, TextFont );
 
459
        UxPutBorderColor( textbwmax, TextBackground );
 
460
        UxPutBackground( textbwmax, TextBackground );
 
461
        UxPutHeight( textbwmax, 35 );
 
462
        UxPutWidth( textbwmax, 80 );
 
463
        UxPutY( textbwmax, 128 );
 
464
        UxPutX( textbwmax, 236 );
 
465
 
 
466
        UxPutHighlightOnEnter( tg_imaqual1, "true" );
 
467
        UxPutForeground( tg_imaqual1, TextForeground );
 
468
        UxPutSelectColor( tg_imaqual1, SelectColor );
 
469
        UxPutSet( tg_imaqual1, "true" );
 
470
        UxPutLabelString( tg_imaqual1, "Image Quality" );
 
471
        UxPutFontList( tg_imaqual1, TextFont );
 
472
        UxPutBorderColor( tg_imaqual1, WindowBackground );
 
473
        UxPutBackground( tg_imaqual1, WindowBackground );
 
474
        UxPutHeight( tg_imaqual1, 26 );
 
475
        UxPutWidth( tg_imaqual1, 134 );
 
476
        UxPutY( tg_imaqual1, 170 );
 
477
        UxPutX( tg_imaqual1, 10 );
 
478
 
 
479
}
 
480
 
 
481
/*******************************************************************************
 
482
        The 'build_' function creates all the swidgets and X widgets,
 
483
        and sets their properties to the values specified in the
 
484
        Property Editor.
 
485
*******************************************************************************/
 
486
 
 
487
static swidget  _Uxbuild_WaveBShell()
 
488
{
 
489
        /* Create the swidgets */
 
490
 
 
491
        WaveBShell = UxCreateApplicationShell( "WaveBShell", NO_PARENT );
 
492
        UxPutContext( WaveBShell, UxWaveBShellContext );
 
493
 
 
494
        form3 = UxCreateForm( "form3", WaveBShell );
 
495
        form5 = UxCreateForm( "form5", form3 );
 
496
        ApplyWaveB = UxCreatePushButton( "ApplyWaveB", form5 );
 
497
        CancelWaveB = UxCreatePushButton( "CancelWaveB", form5 );
 
498
        separator5 = UxCreateSeparator( "separator5", form3 );
 
499
        label3 = UxCreateLabel( "label3", form3 );
 
500
        label4 = UxCreateLabel( "label4", form3 );
 
501
        textcwmin1 = UxCreateText( "textcwmin1", form3 );
 
502
        textcwmax1 = UxCreateText( "textcwmax1", form3 );
 
503
        label5 = UxCreateLabel( "label5", form3 );
 
504
        label6 = UxCreateLabel( "label6", form3 );
 
505
        textbwmin = UxCreateText( "textbwmin", form3 );
 
506
        textbwmax = UxCreateText( "textbwmax", form3 );
 
507
        tg_imaqual1 = UxCreateToggleButton( "tg_imaqual1", form3 );
 
508
 
 
509
        _Uxinit_WaveBShell();
 
510
 
 
511
        /* Create the X widgets */
 
512
 
 
513
        UxCreateWidget( WaveBShell );
 
514
        UxCreateWidget( form3 );
 
515
        UxPutRightAttachment( form5, "attach_form" );
 
516
        UxPutLeftAttachment( form5, "attach_form" );
 
517
        UxPutBottomOffset( form5, 2 );
 
518
        UxPutBottomAttachment( form5, "attach_form" );
 
519
        UxCreateWidget( form5 );
 
520
 
 
521
        UxCreateWidget( ApplyWaveB );
 
522
        UxCreateWidget( CancelWaveB );
 
523
        UxPutRightAttachment( separator5, "attach_form" );
 
524
        UxPutLeftAttachment( separator5, "attach_form" );
 
525
        UxPutBottomWidget( separator5, "form5" );
 
526
        UxPutBottomOffset( separator5, 0 );
 
527
        UxPutBottomAttachment( separator5, "attach_widget" );
 
528
        UxCreateWidget( separator5 );
 
529
 
 
530
        UxCreateWidget( label3 );
 
531
        UxCreateWidget( label4 );
 
532
        UxCreateWidget( textcwmin1 );
 
533
        UxCreateWidget( textcwmax1 );
 
534
        UxCreateWidget( label5 );
 
535
        UxCreateWidget( label6 );
 
536
        UxCreateWidget( textbwmin );
 
537
        UxCreateWidget( textbwmax );
 
538
        UxCreateWidget( tg_imaqual1 );
 
539
 
 
540
        UxAddCallback( ApplyWaveB, XmNactivateCallback,
 
541
                        activateCB_ApplyWaveB,
 
542
                        (XtPointer) UxWaveBShellContext );
 
543
 
 
544
        UxAddCallback( CancelWaveB, XmNactivateCallback,
 
545
                        activateCB_CancelWaveB,
 
546
                        (XtPointer) UxWaveBShellContext );
 
547
 
 
548
        UxAddCallback( textcwmin1, XmNlosingFocusCallback,
 
549
                        losingFocusCB_textcwmin1,
 
550
                        (XtPointer) UxWaveBShellContext );
 
551
 
 
552
        UxAddCallback( textcwmax1, XmNlosingFocusCallback,
 
553
                        losingFocusCB_textcwmax1,
 
554
                        (XtPointer) UxWaveBShellContext );
 
555
 
 
556
        UxAddCallback( textbwmin, XmNlosingFocusCallback,
 
557
                        losingFocusCB_textbwmin,
 
558
                        (XtPointer) UxWaveBShellContext );
 
559
 
 
560
        UxAddCallback( textbwmax, XmNlosingFocusCallback,
 
561
                        losingFocusCB_textbwmax,
 
562
                        (XtPointer) UxWaveBShellContext );
 
563
 
 
564
 
 
565
        /* Finally, call UxRealizeInterface to create the X windows
 
566
           for the widgets created above. */
 
567
 
 
568
        UxRealizeInterface( WaveBShell );
 
569
 
 
570
        return ( WaveBShell );
 
571
}
 
572
 
 
573
/*******************************************************************************
 
574
        The following function includes the code that was entered
 
575
        in the 'Initial Code' and 'Final Code' sections of the
 
576
        Declarations Editor. This function is called from the
 
577
        'Interface function' below.
 
578
*******************************************************************************/
 
579
 
 
580
static swidget  _Ux_create_WaveBShell()
 
581
{
 
582
        swidget                 rtrn;
 
583
        _UxCWaveBShell          *UxContext;
 
584
 
 
585
        UxWaveBShellContext = UxContext =
 
586
                (_UxCWaveBShell *) UxMalloc( sizeof(_UxCWaveBShell) );
 
587
 
 
588
        rtrn = _Uxbuild_WaveBShell();
 
589
 
 
590
        return(rtrn);
 
591
}
 
592
 
 
593
/*******************************************************************************
 
594
        The following is the 'Interface function' which is the
 
595
        external entry point for creating this interface.
 
596
        This function should be called from your application or from
 
597
        a callback function.
 
598
*******************************************************************************/
 
599
 
 
600
swidget create_WaveBShell()
 
601
{
 
602
        swidget                 _Uxrtrn;
 
603
 
 
604
        _Uxrtrn = _Ux_create_WaveBShell();
 
605
 
 
606
        return ( _Uxrtrn );
 
607
}
 
608
 
 
609
/*******************************************************************************
 
610
        END OF FILE
 
611
*******************************************************************************/
 
612