Debian Codegraph @

gui/XEchelle/src/OrderShell.c

raw
1 /*===========================================================================
2 Copyright (C) 1995-2009 European Southern Observatory (ESO)
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public
15 License along with this program; if not, write to the Free
16 Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
17 MA 02139, USA.
18
19 Correspondence concerning ESO-MIDAS should be addressed as follows:
20 Internet e-mail: [email protected]
21 Postal address: European Southern Observatory
22 Data Management Division
23 Karl-Schwarzschild-Strasse 2
24 D 85748 Garching bei Muenchen
25 GERMANY
26 ===========================================================================*/
27
28
29 /*******************************************************************************
30 OrderShell.c
31
32 .VERSION
33 090825 last modif
34
35 *******************************************************************************/
36
37 #include <stdio.h>
38 #include "UxLib.h"
39 #include "UxSep.h"
40 #include "UxText.h"
41 #include "UxPushB.h"
42 #include "UxSepG.h"
43 #include "UxTogB.h"
44 #include "UxRowCol.h"
45 #include "UxTextF.h"
46 #include "UxLabel.h"
47 #include "UxForm.h"
48 #include "UxTranSh.h"
49
50 /*******************************************************************************
51 Includes, Defines, and Global variables from the Declarations Editor:
52 *******************************************************************************/
53
54 #include <ExternResources.h>
55
56 /*******************************************************************************
57 The definition of the context structure:
58 If you create multiple instances of your interface, the context
59 structure ensures that your callbacks use the variables for the
60 correct instance.
61
62 For each swidget in the interface, each argument to the Interface
63 function, and each variable in the Instance Specific section of the
64 Declarations Editor, there is an entry in the context structure.
65 and a #define. The #define makes the variable name refer to the
66 corresponding entry in the context structure.
67 *******************************************************************************/
68
69 typedef struct
70 {
71 swidget UxOrderShell;
72 swidget Uxform27;
73 swidget Uxlabel61;
74 swidget Uxtf_ywidth2;
75 swidget Uxlabel62;
76 swidget Uxlabel63;
77 swidget Uxtf_ystep2;
78 swidget Uxtf_width2;
79 swidget UxrowColumn26;
80 swidget Uxrb_seamtd_gaus2;
81 swidget Uxrb_seamtd_grav2;
82 swidget Uxrb_seamtd_maxi2;
83 swidget Uxlabel64;
84 swidget UxseparatorGadget6;
85 swidget UxseparatorGadget7;
86 swidget UxseparatorGadget8;
87 swidget UxseparatorGadget9;
88 swidget Uxtf_thres2;
89 swidget Uxform28;
90 swidget Uxpb_search_search3;
91 swidget UxpushButton3;
92 swidget Uxpb_search_plot3;
93 swidget Uxpb_search_plot4;
94 swidget Uxpb_search_plot5;
95 swidget Uxshelp_search3;
96 swidget Uxseparator22;
97 swidget Uxseparator23;
98 swidget UxseparatorGadget10;
99 swidget Uxlabel65;
100 swidget Uxtf_thres3;
101 swidget Uxlabel66;
102 swidget Uxpb_main_search15;
103 } _UxCOrderShell;
104
105 #define OrderShell UxOrderShellContext->UxOrderShell
106 #define form27 UxOrderShellContext->Uxform27
107 #define label61 UxOrderShellContext->Uxlabel61
108 #define tf_ywidth2 UxOrderShellContext->Uxtf_ywidth2
109 #define label62 UxOrderShellContext->Uxlabel62
110 #define label63 UxOrderShellContext->Uxlabel63
111 #define tf_ystep2 UxOrderShellContext->Uxtf_ystep2
112 #define tf_width2 UxOrderShellContext->Uxtf_width2
113 #define rowColumn26 UxOrderShellContext->UxrowColumn26
114 #define rb_seamtd_gaus2 UxOrderShellContext->Uxrb_seamtd_gaus2
115 #define rb_seamtd_grav2 UxOrderShellContext->Uxrb_seamtd_grav2
116 #define rb_seamtd_maxi2 UxOrderShellContext->Uxrb_seamtd_maxi2
117 #define label64 UxOrderShellContext->Uxlabel64
118 #define separatorGadget6 UxOrderShellContext->UxseparatorGadget6
119 #define separatorGadget7 UxOrderShellContext->UxseparatorGadget7
120 #define separatorGadget8 UxOrderShellContext->UxseparatorGadget8
121 #define separatorGadget9 UxOrderShellContext->UxseparatorGadget9
122 #define tf_thres2 UxOrderShellContext->Uxtf_thres2
123 #define form28 UxOrderShellContext->Uxform28
124 #define pb_search_search3 UxOrderShellContext->Uxpb_search_search3
125 #define pushButton3 UxOrderShellContext->UxpushButton3
126 #define pb_search_plot3 UxOrderShellContext->Uxpb_search_plot3
127 #define pb_search_plot4 UxOrderShellContext->Uxpb_search_plot4
128 #define pb_search_plot5 UxOrderShellContext->Uxpb_search_plot5
129 #define shelp_search3 UxOrderShellContext->Uxshelp_search3
130 #define separator22 UxOrderShellContext->Uxseparator22
131 #define separator23 UxOrderShellContext->Uxseparator23
132 #define separatorGadget10 UxOrderShellContext->UxseparatorGadget10
133 #define label65 UxOrderShellContext->Uxlabel65
134 #define tf_thres3 UxOrderShellContext->Uxtf_thres3
135 #define label66 UxOrderShellContext->Uxlabel66
136 #define pb_main_search15 UxOrderShellContext->Uxpb_main_search15
137
138 static _UxCOrderShell *UxOrderShellContext;
139
140 extern void DisplayShortHelp(), DisplayExtendedHelp(), SetFileList();
141 extern void MidasCommand(), PopupLong(), InitAllFields();
142 extern void WidgetLeave(), WidgetEnter();
143 extern void WriteKeyword(), GetExtendedHelp(), SelectList();
144
145
146 extern int RadioSet(), PopupList(), AppendDialogText();
147
148 /*******************************************************************************
149 The following are translation tables.
150 *******************************************************************************/
151
152 static char *transTable11 = "#override\n\
153 <Btn3Down>:ExtendedHelp()\n\
154 <EnterWindow>:HelpShort()\n\
155 <LeaveWindow>:ClearShort()\n";
156
157 /*******************************************************************************
158 Forward declarations of functions that are defined later in this file.
159 *******************************************************************************/
160
161 swidget create_OrderShell();
162
163 /*******************************************************************************
164 The following are Action functions.
165 *******************************************************************************/
166
167 static void action_ClearShort( UxWidget, UxEvent, UxParams, p_UxNumParams )
168 Widget UxWidget;
169 XEvent *UxEvent;
170 String *UxParams;
171 Cardinal *p_UxNumParams;
172 {
173 _UxCOrderShell *UxSaveCtx, *UxContext;
174 swidget UxThisWidget;
175
176 UxThisWidget = UxWidgetToSwidget( UxWidget );
177 UxSaveCtx = UxOrderShellContext;
178 UxOrderShellContext = UxContext =
179 (_UxCOrderShell *) UxGetContext( UxThisWidget );
180 {WidgetLeave(UxWidget);}
181 UxOrderShellContext = UxSaveCtx;
182 }
183
184 static void action_HelpShort( UxWidget, UxEvent, UxParams, p_UxNumParams )
185 Widget UxWidget;
186 XEvent *UxEvent;
187 String *UxParams;
188 Cardinal *p_UxNumParams;
189 {
190 _UxCOrderShell *UxSaveCtx, *UxContext;
191 swidget UxThisWidget;
192
193 UxThisWidget = UxWidgetToSwidget( UxWidget );
194 UxSaveCtx = UxOrderShellContext;
195 UxOrderShellContext = UxContext =
196 (_UxCOrderShell *) UxGetContext( UxThisWidget );
197 {WidgetEnter(UxWidget);}
198 UxOrderShellContext = UxSaveCtx;
199 }
200
201 static void action_ExtendedHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
202 Widget UxWidget;
203 XEvent *UxEvent;
204 String *UxParams;
205 Cardinal *p_UxNumParams;
206 {
207 _UxCOrderShell *UxSaveCtx, *UxContext;
208 swidget UxThisWidget;
209
210 UxThisWidget = UxWidgetToSwidget( UxWidget );
211 UxSaveCtx = UxOrderShellContext;
212 UxOrderShellContext = UxContext =
213 (_UxCOrderShell *) UxGetContext( UxThisWidget );
214 {
215 DisplayExtendedHelp(UxWidget);
216 }
217 UxOrderShellContext = UxSaveCtx;
218 }
219
220 static void action_FileSelectACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
221 Widget UxWidget;
222 XEvent *UxEvent;
223 String *UxParams;
224 Cardinal *p_UxNumParams;
225 {
226 _UxCOrderShell *UxSaveCtx, *UxContext;
227 swidget UxThisWidget;
228
229 UxThisWidget = UxWidgetToSwidget( UxWidget );
230 UxSaveCtx = UxOrderShellContext;
231 UxOrderShellContext = UxContext =
232 (_UxCOrderShell *) UxGetContext( UxThisWidget );
233 {
234 #include <xm_defs.h>
235 #include <spec_comm.h>
236
237 extern swidget FileListInterface, TextFieldSwidget;
238 extern Widget FileListWidget;
239 extern char DirSpecs[];
240 extern int ListType;
241
242 int strip = 1; /* strip off */
243
244 TextFieldSwidget = UxThisWidget;
245
246 if ( UxWidget == UxGetWidget(UxFindSwidget("tf_lincat")) ) {
247 SET_LIST_TITLE("Enter line catalog");
248 ListType = LIST_LINCAT;
249 }
250 else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_guess")) ) {
251 SET_LIST_TITLE("Enter guess table");
252 ListType = LIST_GUESS;
253 }
254 else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_flux_tbl")) ) {
255 SET_LIST_TITLE("Enter flux table");
256 ListType = LIST_FLUX_TBL;
257 }
258 else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_extin_tbl")) ) {
259 SET_LIST_TITLE("Enter extinction table");
260 ListType = LIST_EXTIN_TBL;
261 }
262
263 strcpy(DirSpecs, "*.tbl");
264 SetFileList(FileListWidget, strip, DirSpecs);
265 UxPopupInterface(FileListInterface, exclusive_grab);
266
267 }
268 UxOrderShellContext = UxSaveCtx;
269 }
270
271 /*******************************************************************************
272 The following are callback functions.
273 *******************************************************************************/
274
275 static void losingFocusCB_tf_ywidth2( UxWidget, UxClientData, UxCallbackArg )
276 Widget UxWidget;
277 XtPointer UxClientData, UxCallbackArg;
278 {
279 _UxCOrderShell *UxSaveCtx, *UxContext;
280 swidget UxThisWidget;
281
282 UxThisWidget = UxWidgetToSwidget( UxWidget );
283 UxSaveCtx = UxOrderShellContext;
284 UxOrderShellContext = UxContext =
285 (_UxCOrderShell *) UxGetContext( UxThisWidget );
286 {
287
288 }
289 UxOrderShellContext = UxSaveCtx;
290 }
291
292 static void losingFocusCB_tf_ystep2( UxWidget, UxClientData, UxCallbackArg )
293 Widget UxWidget;
294 XtPointer UxClientData, UxCallbackArg;
295 {
296 _UxCOrderShell *UxSaveCtx, *UxContext;
297 swidget UxThisWidget;
298
299 UxThisWidget = UxWidgetToSwidget( UxWidget );
300 UxSaveCtx = UxOrderShellContext;
301 UxOrderShellContext = UxContext =
302 (_UxCOrderShell *) UxGetContext( UxThisWidget );
303 {
304
305 }
306 UxOrderShellContext = UxSaveCtx;
307 }
308
309 static void losingFocusCB_tf_width2( UxWidget, UxClientData, UxCallbackArg )
310 Widget UxWidget;
311 XtPointer UxClientData, UxCallbackArg;
312 {
313 _UxCOrderShell *UxSaveCtx, *UxContext;
314 swidget UxThisWidget;
315
316 UxThisWidget = UxWidgetToSwidget( UxWidget );
317 UxSaveCtx = UxOrderShellContext;
318 UxOrderShellContext = UxContext =
319 (_UxCOrderShell *) UxGetContext( UxThisWidget );
320 {
321
322 }
323 UxOrderShellContext = UxSaveCtx;
324 }
325
326 static void armCB_rb_seamtd_gaus2( UxWidget, UxClientData, UxCallbackArg )
327 Widget UxWidget;
328 XtPointer UxClientData, UxCallbackArg;
329 {
330 _UxCOrderShell *UxSaveCtx, *UxContext;
331 swidget UxThisWidget;
332
333 UxThisWidget = UxWidgetToSwidget( UxWidget );
334 UxSaveCtx = UxOrderShellContext;
335 UxOrderShellContext = UxContext =
336 (_UxCOrderShell *) UxGetContext( UxThisWidget );
337 RadioSet ( UxWidget ) ;
338 UxOrderShellContext = UxSaveCtx;
339 }
340
341 static void valueChangedCB_rb_seamtd_gaus2( UxWidget, UxClientData, UxCallbackArg )
342 Widget UxWidget;
343 XtPointer UxClientData, UxCallbackArg;
344 {
345 _UxCOrderShell *UxSaveCtx, *UxContext;
346 swidget UxThisWidget;
347
348 UxThisWidget = UxWidgetToSwidget( UxWidget );
349 UxSaveCtx = UxOrderShellContext;
350 UxOrderShellContext = UxContext =
351 (_UxCOrderShell *) UxGetContext( UxThisWidget );
352 {
353
354 }
355 UxOrderShellContext = UxSaveCtx;
356 }
357
358 static void armCB_rb_seamtd_grav2( UxWidget, UxClientData, UxCallbackArg )
359 Widget UxWidget;
360 XtPointer UxClientData, UxCallbackArg;
361 {
362 _UxCOrderShell *UxSaveCtx, *UxContext;
363 swidget UxThisWidget;
364
365 UxThisWidget = UxWidgetToSwidget( UxWidget );
366 UxSaveCtx = UxOrderShellContext;
367 UxOrderShellContext = UxContext =
368 (_UxCOrderShell *) UxGetContext( UxThisWidget );
369 RadioSet ( UxWidget ) ;
370 UxOrderShellContext = UxSaveCtx;
371 }
372
373 static void valueChangedCB_rb_seamtd_grav2( UxWidget, UxClientData, UxCallbackArg )
374 Widget UxWidget;
375 XtPointer UxClientData, UxCallbackArg;
376 {
377 _UxCOrderShell *UxSaveCtx, *UxContext;
378 swidget UxThisWidget;
379
380 UxThisWidget = UxWidgetToSwidget( UxWidget );
381 UxSaveCtx = UxOrderShellContext;
382 UxOrderShellContext = UxContext =
383 (_UxCOrderShell *) UxGetContext( UxThisWidget );
384 {
385
386 }
387 UxOrderShellContext = UxSaveCtx;
388 }
389
390 static void armCB_rb_seamtd_maxi2( UxWidget, UxClientData, UxCallbackArg )
391 Widget UxWidget;
392 XtPointer UxClientData, UxCallbackArg;
393 {
394 _UxCOrderShell *UxSaveCtx, *UxContext;
395 swidget UxThisWidget;
396
397 UxThisWidget = UxWidgetToSwidget( UxWidget );
398 UxSaveCtx = UxOrderShellContext;
399 UxOrderShellContext = UxContext =
400 (_UxCOrderShell *) UxGetContext( UxThisWidget );
401 RadioSet ( UxWidget ) ;
402 UxOrderShellContext = UxSaveCtx;
403 }
404
405 static void valueChangedCB_rb_seamtd_maxi2( UxWidget, UxClientData, UxCallbackArg )
406 Widget UxWidget;
407 XtPointer UxClientData, UxCallbackArg;
408 {
409 _UxCOrderShell *UxSaveCtx, *UxContext;
410 swidget UxThisWidget;
411
412 UxThisWidget = UxWidgetToSwidget( UxWidget );
413 UxSaveCtx = UxOrderShellContext;
414 UxOrderShellContext = UxContext =
415 (_UxCOrderShell *) UxGetContext( UxThisWidget );
416 {
417
418 }
419 UxOrderShellContext = UxSaveCtx;
420 }
421
422 static void losingFocusCB_tf_thres2( UxWidget, UxClientData, UxCallbackArg )
423 Widget UxWidget;
424 XtPointer UxClientData, UxCallbackArg;
425 {
426 _UxCOrderShell *UxSaveCtx, *UxContext;
427 swidget UxThisWidget;
428
429 UxThisWidget = UxWidgetToSwidget( UxWidget );
430 UxSaveCtx = UxOrderShellContext;
431 UxOrderShellContext = UxContext =
432 (_UxCOrderShell *) UxGetContext( UxThisWidget );
433 {
434
435 }
436 UxOrderShellContext = UxSaveCtx;
437 }
438
439 static void activateCB_pb_search_search3( UxWidget, UxClientData, UxCallbackArg )
440 Widget UxWidget;
441 XtPointer UxClientData, UxCallbackArg;
442 {
443 _UxCOrderShell *UxSaveCtx, *UxContext;
444 swidget UxThisWidget;
445
446 UxThisWidget = UxWidgetToSwidget( UxWidget );
447 UxSaveCtx = UxOrderShellContext;
448 UxOrderShellContext = UxContext =
449 (_UxCOrderShell *) UxGetContext( UxThisWidget );
450 {
451 MidasCommand(UxWidget);
452
453 }
454 UxOrderShellContext = UxSaveCtx;
455 }
456
457 static void activateCB_pushButton3( UxWidget, UxClientData, UxCallbackArg )
458 Widget UxWidget;
459 XtPointer UxClientData, UxCallbackArg;
460 {
461 _UxCOrderShell *UxSaveCtx, *UxContext;
462 swidget UxThisWidget;
463
464 UxThisWidget = UxWidgetToSwidget( UxWidget );
465 UxSaveCtx = UxOrderShellContext;
466 UxOrderShellContext = UxContext =
467 (_UxCOrderShell *) UxGetContext( UxThisWidget );
468 {
469 UxPopdownInterface(UxFindSwidget("OrderShell"));
470 }
471 UxOrderShellContext = UxSaveCtx;
472 }
473
474 static void activateCB_pb_search_plot3( UxWidget, UxClientData, UxCallbackArg )
475 Widget UxWidget;
476 XtPointer UxClientData, UxCallbackArg;
477 {
478 _UxCOrderShell *UxSaveCtx, *UxContext;
479 swidget UxThisWidget;
480
481 UxThisWidget = UxWidgetToSwidget( UxWidget );
482 UxSaveCtx = UxOrderShellContext;
483 UxOrderShellContext = UxContext =
484 (_UxCOrderShell *) UxGetContext( UxThisWidget );
485 {
486 MidasCommand(UxWidget);
487
488 }
489 UxOrderShellContext = UxSaveCtx;
490 }
491
492 static void activateCB_pb_search_plot4( UxWidget, UxClientData, UxCallbackArg )
493 Widget UxWidget;
494 XtPointer UxClientData, UxCallbackArg;
495 {
496 _UxCOrderShell *UxSaveCtx, *UxContext;
497 swidget UxThisWidget;
498
499 UxThisWidget = UxWidgetToSwidget( UxWidget );
500 UxSaveCtx = UxOrderShellContext;
501 UxOrderShellContext = UxContext =
502 (_UxCOrderShell *) UxGetContext( UxThisWidget );
503 {
504 MidasCommand(UxWidget);
505
506 }
507 UxOrderShellContext = UxSaveCtx;
508 }
509
510 static void activateCB_pb_search_plot5( UxWidget, UxClientData, UxCallbackArg )
511 Widget UxWidget;
512 XtPointer UxClientData, UxCallbackArg;
513 {
514 _UxCOrderShell *UxSaveCtx, *UxContext;
515 swidget UxThisWidget;
516
517 UxThisWidget = UxWidgetToSwidget( UxWidget );
518 UxSaveCtx = UxOrderShellContext;
519 UxOrderShellContext = UxContext =
520 (_UxCOrderShell *) UxGetContext( UxThisWidget );
521 {
522 GetExtendedHelp(UxWidget);
523 }
524 UxOrderShellContext = UxSaveCtx;
525 }
526
527 static void losingFocusCB_tf_thres3( UxWidget, UxClientData, UxCallbackArg )
528 Widget UxWidget;
529 XtPointer UxClientData, UxCallbackArg;
530 {
531 _UxCOrderShell *UxSaveCtx, *UxContext;
532 swidget UxThisWidget;
533
534 UxThisWidget = UxWidgetToSwidget( UxWidget );
535 UxSaveCtx = UxOrderShellContext;
536 UxOrderShellContext = UxContext =
537 (_UxCOrderShell *) UxGetContext( UxThisWidget );
538 {
539
540 }
541 UxOrderShellContext = UxSaveCtx;
542 }
543
544 static void activateCB_pb_main_search15( UxWidget, UxClientData, UxCallbackArg )
545 Widget UxWidget;
546 XtPointer UxClientData, UxCallbackArg;
547 {
548 _UxCOrderShell *UxSaveCtx, *UxContext;
549 swidget UxThisWidget;
550
551 UxThisWidget = UxWidgetToSwidget( UxWidget );
552 UxSaveCtx = UxOrderShellContext;
553 UxOrderShellContext = UxContext =
554 (_UxCOrderShell *) UxGetContext( UxThisWidget );
555 {
556 SelectList(UxWidget);
557
558 }
559 UxOrderShellContext = UxSaveCtx;
560 }
561
562 /*******************************************************************************
563 The 'init_' function sets the private properties for all the
564 swidgets to the values specified in the Property Table.
565 Some properties need to be set after the X widgets have been
566 created and the setting of these properties is done in the
567 'build_' function after the UxCreateWidget call.
568 *******************************************************************************/
569
570 static void _Uxinit_OrderShell()
571 {
572 UxPutGeometry( OrderShell, "+10+60" );
573 UxPutTitle( OrderShell, "XEchelle: Order Definition" );
574 UxPutHeight( OrderShell, 344 );
575 UxPutWidth( OrderShell, 500 );
576 UxPutY( OrderShell, 107 );
577 UxPutX( OrderShell, 845 );
578
579 UxPutBackground( form27, WindowBackground );
580 UxPutHeight( form27, 344 );
581 UxPutWidth( form27, 500 );
582 UxPutY( form27, 2 );
583 UxPutX( form27, 4 );
584 UxPutUnitType( form27, "pixels" );
585 UxPutResizePolicy( form27, "resize_none" );
586
587 UxPutForeground( label61, TextForeground );
588 UxPutAlignment( label61, "alignment_beginning" );
589 UxPutLabelString( label61, "Threshold:" );
590 UxPutFontList( label61, TextFont );
591 UxPutBackground( label61, LabelBackground );
592 UxPutHeight( label61, 30 );
593 UxPutWidth( label61, 170 );
594 UxPutY( label61, 134 );
595 UxPutX( label61, 18 );
596
597 UxPutForeground( tf_ywidth2, TextForeground );
598 UxPutHighlightOnEnter( tf_ywidth2, "true" );
599 UxPutFontList( tf_ywidth2, TextFont );
600 UxPutBackground( tf_ywidth2, TextBackground );
601 UxPutHeight( tf_ywidth2, 34 );
602 UxPutWidth( tf_ywidth2, 82 );
603 UxPutY( tf_ywidth2, 132 );
604 UxPutX( tf_ywidth2, 208 );
605
606 UxPutForeground( label62, TextForeground );
607 UxPutAlignment( label62, "alignment_beginning" );
608 UxPutLabelString( label62, "Slope:" );
609 UxPutFontList( label62, TextFont );
610 UxPutBackground( label62, LabelBackground );
611 UxPutHeight( label62, 30 );
612 UxPutWidth( label62, 170 );
613 UxPutY( label62, 170 );
614 UxPutX( label62, 18 );
615
616 UxPutForeground( label63, TextForeground );
617 UxPutAlignment( label63, "alignment_beginning" );
618 UxPutLabelString( label63, "Number of orders:" );
619 UxPutFontList( label63, TextFont );
620 UxPutBackground( label63, LabelBackground );
621 UxPutHeight( label63, 30 );
622 UxPutWidth( label63, 170 );
623 UxPutY( label63, 58 );
624 UxPutX( label63, 18 );
625
626 UxPutForeground( tf_ystep2, TextForeground );
627 UxPutHighlightOnEnter( tf_ystep2, "true" );
628 UxPutFontList( tf_ystep2, TextFont );
629 UxPutBackground( tf_ystep2, TextBackground );
630 UxPutHeight( tf_ystep2, 34 );
631 UxPutWidth( tf_ystep2, 82 );
632 UxPutY( tf_ystep2, 170 );
633 UxPutX( tf_ystep2, 208 );
634
635 UxPutForeground( tf_width2, TextForeground );
636 UxPutHighlightOnEnter( tf_width2, "true" );
637 UxPutFontList( tf_width2, TextFont );
638 UxPutBackground( tf_width2, TextBackground );
639 UxPutHeight( tf_width2, 34 );
640 UxPutWidth( tf_width2, 82 );
641 UxPutY( tf_width2, 94 );
642 UxPutX( tf_width2, 208 );
643
644 UxPutIsAligned( rowColumn26, "true" );
645 UxPutAdjustMargin( rowColumn26, "true" );
646 UxPutAdjustLast( rowColumn26, "false" );
647 UxPutEntryAlignment( rowColumn26, "alignment_beginning" );
648 UxPutBorderWidth( rowColumn26, 0 );
649 UxPutShadowThickness( rowColumn26, 0 );
650 UxPutLabelString( rowColumn26, "" );
651 UxPutEntryBorder( rowColumn26, 0 );
652 UxPutBackground( rowColumn26, WindowBackground );
653 UxPutRadioBehavior( rowColumn26, "true" );
654 UxPutHeight( rowColumn26, 96 );
655 UxPutWidth( rowColumn26, 106 );
656 UxPutY( rowColumn26, 82 );
657 UxPutX( rowColumn26, 332 );
658
659 UxPutTranslations( rb_seamtd_gaus2, transTable11 );
660 UxPutForeground( rb_seamtd_gaus2, TextForeground );
661 UxPutIndicatorSize( rb_seamtd_gaus2, 16 );
662 UxPutHighlightOnEnter( rb_seamtd_gaus2, "true" );
663 UxPutSelectColor( rb_seamtd_gaus2, SelectColor );
664 UxPutSet( rb_seamtd_gaus2, "true" );
665 UxPutLabelString( rb_seamtd_gaus2, "Hough" );
666 UxPutFontList( rb_seamtd_gaus2, TextFont );
667 UxPutBackground( rb_seamtd_gaus2, WindowBackground );
668 UxPutHeight( rb_seamtd_gaus2, 30 );
669 UxPutWidth( rb_seamtd_gaus2, 148 );
670 UxPutY( rb_seamtd_gaus2, 12 );
671 UxPutX( rb_seamtd_gaus2, 12 );
672
673 UxPutTranslations( rb_seamtd_grav2, transTable11 );
674 UxPutForeground( rb_seamtd_grav2, TextForeground );
675 UxPutIndicatorSize( rb_seamtd_grav2, 16 );
676 UxPutHighlightOnEnter( rb_seamtd_grav2, "true" );
677 UxPutSelectColor( rb_seamtd_grav2, SelectColor );
678 UxPutLabelString( rb_seamtd_grav2, "Standard" );
679 UxPutFontList( rb_seamtd_grav2, TextFont );
680 UxPutBackground( rb_seamtd_grav2, WindowBackground );
681 UxPutHeight( rb_seamtd_grav2, 30 );
682 UxPutWidth( rb_seamtd_grav2, 148 );
683 UxPutY( rb_seamtd_grav2, 85 );
684 UxPutX( rb_seamtd_grav2, 5 );
685
686 UxPutTranslations( rb_seamtd_maxi2, transTable11 );
687 UxPutForeground( rb_seamtd_maxi2, TextForeground );
688 UxPutIndicatorSize( rb_seamtd_maxi2, 16 );
689 UxPutHighlightOnEnter( rb_seamtd_maxi2, "true" );
690 UxPutSelectColor( rb_seamtd_maxi2, SelectColor );
691 UxPutLabelString( rb_seamtd_maxi2, "Complement" );
692 UxPutFontList( rb_seamtd_maxi2, TextFont );
693 UxPutBackground( rb_seamtd_maxi2, WindowBackground );
694 UxPutHeight( rb_seamtd_maxi2, 24 );
695 UxPutWidth( rb_seamtd_maxi2, 96 );
696 UxPutY( rb_seamtd_maxi2, 66 );
697 UxPutX( rb_seamtd_maxi2, 4 );
698
699 UxPutForeground( label64, TextForeground );
700 UxPutAlignment( label64, "alignment_center" );
701 UxPutLabelString( label64, "Method" );
702 UxPutFontList( label64, TextFont );
703 UxPutBackground( label64, LabelBackground );
704 UxPutHeight( label64, 30 );
705 UxPutWidth( label64, 106 );
706 UxPutY( label64, 52 );
707 UxPutX( label64, 336 );
708
709 UxPutOrientation( separatorGadget6, "vertical" );
710 UxPutHeight( separatorGadget6, 120 );
711 UxPutWidth( separatorGadget6, 12 );
712 UxPutY( separatorGadget6, 66 );
713 UxPutX( separatorGadget6, 450 );
714
715 UxPutOrientation( separatorGadget7, "vertical" );
716 UxPutHeight( separatorGadget7, 120 );
717 UxPutWidth( separatorGadget7, 12 );
718 UxPutY( separatorGadget7, 66 );
719 UxPutX( separatorGadget7, 314 );
720
721 UxPutHeight( separatorGadget8, 10 );
722 UxPutWidth( separatorGadget8, 16 );
723 UxPutY( separatorGadget8, 64 );
724 UxPutX( separatorGadget8, 318 );
725
726 UxPutHeight( separatorGadget9, 10 );
727 UxPutWidth( separatorGadget9, 14 );
728 UxPutY( separatorGadget9, 64 );
729 UxPutX( separatorGadget9, 442 );
730
731 UxPutForeground( tf_thres2, TextForeground );
732 UxPutHighlightOnEnter( tf_thres2, "true" );
733 UxPutFontList( tf_thres2, TextFont );
734 UxPutBackground( tf_thres2, TextBackground );
735 UxPutHeight( tf_thres2, 34 );
736 UxPutWidth( tf_thres2, 82 );
737 UxPutY( tf_thres2, 56 );
738 UxPutX( tf_thres2, 208 );
739
740 UxPutBackground( form28, ButtonBackground );
741 UxPutHeight( form28, 40 );
742 UxPutWidth( form28, 490 );
743 UxPutY( form28, 282 );
744 UxPutX( form28, 2 );
745 UxPutResizePolicy( form28, "resize_none" );
746
747 UxPutLabelString( pb_search_search3, "Define" );
748 UxPutForeground( pb_search_search3, ApplyForeground );
749 UxPutFontList( pb_search_search3, BoldTextFont );
750 UxPutBackground( pb_search_search3, ButtonBackground );
751 UxPutHeight( pb_search_search3, 30 );
752 UxPutWidth( pb_search_search3, 86 );
753 UxPutY( pb_search_search3, 4 );
754 UxPutX( pb_search_search3, 8 );
755
756 UxPutLabelString( pushButton3, "Cancel" );
757 UxPutForeground( pushButton3, CancelForeground );
758 UxPutFontList( pushButton3, BoldTextFont );
759 UxPutBackground( pushButton3, ButtonBackground );
760 UxPutHeight( pushButton3, 30 );
761 UxPutWidth( pushButton3, 86 );
762 UxPutY( pushButton3, 6 );
763 UxPutX( pushButton3, 392 );
764
765 UxPutLabelString( pb_search_plot3, "Load Orders" );
766 UxPutForeground( pb_search_plot3, ButtonForeground );
767 UxPutFontList( pb_search_plot3, BoldTextFont );
768 UxPutBackground( pb_search_plot3, ButtonBackground );
769 UxPutHeight( pb_search_plot3, 30 );
770 UxPutWidth( pb_search_plot3, 100 );
771 UxPutY( pb_search_plot3, 4 );
772 UxPutX( pb_search_plot3, 102 );
773
774 UxPutLabelString( pb_search_plot4, "Save..." );
775 UxPutForeground( pb_search_plot4, ButtonForeground );
776 UxPutFontList( pb_search_plot4, BoldTextFont );
777 UxPutBackground( pb_search_plot4, ButtonBackground );
778 UxPutHeight( pb_search_plot4, 30 );
779 UxPutWidth( pb_search_plot4, 86 );
780 UxPutY( pb_search_plot4, 4 );
781 UxPutX( pb_search_plot4, 214 );
782
783 UxPutLabelString( pb_search_plot5, "Help..." );
784 UxPutForeground( pb_search_plot5, ButtonForeground );
785 UxPutFontList( pb_search_plot5, BoldTextFont );
786 UxPutBackground( pb_search_plot5, ButtonBackground );
787 UxPutHeight( pb_search_plot5, 30 );
788 UxPutWidth( pb_search_plot5, 86 );
789 UxPutY( pb_search_plot5, 4 );
790 UxPutX( pb_search_plot5, 304 );
791
792 UxPutFontList( shelp_search3, TextFont );
793 UxPutEditable( shelp_search3, "false" );
794 UxPutCursorPositionVisible( shelp_search3, "false" );
795 UxPutBackground( shelp_search3, SHelpBackground );
796 UxPutHeight( shelp_search3, 50 );
797 UxPutWidth( shelp_search3, 484 );
798 UxPutY( shelp_search3, 222 );
799 UxPutX( shelp_search3, 4 );
800
801 UxPutBackground( separator22, WindowBackground );
802 UxPutHeight( separator22, 10 );
803 UxPutWidth( separator22, 492 );
804 UxPutY( separator22, 212 );
805 UxPutX( separator22, 2 );
806
807 UxPutBackground( separator23, WindowBackground );
808 UxPutHeight( separator23, 10 );
809 UxPutWidth( separator23, 492 );
810 UxPutY( separator23, 270 );
811 UxPutX( separator23, 0 );
812
813 UxPutHeight( separatorGadget10, 10 );
814 UxPutWidth( separatorGadget10, 138 );
815 UxPutY( separatorGadget10, 180 );
816 UxPutX( separatorGadget10, 318 );
817
818 UxPutForeground( label65, TextForeground );
819 UxPutAlignment( label65, "alignment_beginning" );
820 UxPutLabelString( label65, "Order width:" );
821 UxPutFontList( label65, TextFont );
822 UxPutBackground( label65, LabelBackground );
823 UxPutHeight( label65, 30 );
824 UxPutWidth( label65, 170 );
825 UxPutY( label65, 94 );
826 UxPutX( label65, 18 );
827
828 UxPutForeground( tf_thres3, TextForeground );
829 UxPutHighlightOnEnter( tf_thres3, "true" );
830 UxPutFontList( tf_thres3, TextFont );
831 UxPutBackground( tf_thres3, TextBackground );
832 UxPutHeight( tf_thres3, 34 );
833 UxPutWidth( tf_thres3, 212 );
834 UxPutY( tf_thres3, 12 );
835 UxPutX( tf_thres3, 208 );
836
837 UxPutForeground( label66, TextForeground );
838 UxPutAlignment( label66, "alignment_beginning" );
839 UxPutLabelString( label66, "Order Definition Frame:" );
840 UxPutFontList( label66, TextFont );
841 UxPutBackground( label66, LabelBackground );
842 UxPutHeight( label66, 30 );
843 UxPutWidth( label66, 170 );
844 UxPutY( label66, 14 );
845 UxPutX( label66, 20 );
846
847 UxPutWidth( pb_main_search15, 46 );
848 UxPutRecomputeSize( pb_main_search15, "true" );
849 UxPutLabelString( pb_main_search15, "..." );
850 UxPutForeground( pb_main_search15, ButtonForeground );
851 UxPutFontList( pb_main_search15, BoldTextFont );
852 UxPutBackground( pb_main_search15, ButtonBackground );
853 UxPutHeight( pb_main_search15, 28 );
854 UxPutY( pb_main_search15, 14 );
855 UxPutX( pb_main_search15, 426 );
856
857 }
858
859 /*******************************************************************************
860 The 'build_' function creates all the swidgets and X widgets,
861 and sets their properties to the values specified in the
862 Property Editor.
863 *******************************************************************************/
864
865 static swidget _Uxbuild_OrderShell()
866 {
867 /* Create the swidgets */
868
869 OrderShell = UxCreateTransientShell( "OrderShell", NO_PARENT );
870 UxPutContext( OrderShell, UxOrderShellContext );
871
872 form27 = UxCreateForm( "form27", OrderShell );
873 label61 = UxCreateLabel( "label61", form27 );
874 tf_ywidth2 = UxCreateTextField( "tf_ywidth2", form27 );
875 label62 = UxCreateLabel( "label62", form27 );
876 label63 = UxCreateLabel( "label63", form27 );
877 tf_ystep2 = UxCreateTextField( "tf_ystep2", form27 );
878 tf_width2 = UxCreateTextField( "tf_width2", form27 );
879 rowColumn26 = UxCreateRowColumn( "rowColumn26", form27 );
880 rb_seamtd_gaus2 = UxCreateToggleButton( "rb_seamtd_gaus2", rowColumn26 );
881 rb_seamtd_grav2 = UxCreateToggleButton( "rb_seamtd_grav2", rowColumn26 );
882 rb_seamtd_maxi2 = UxCreateToggleButton( "rb_seamtd_maxi2", rowColumn26 );
883 label64 = UxCreateLabel( "label64", form27 );
884 separatorGadget6 = UxCreateSeparatorGadget( "separatorGadget6", form27 );
885 separatorGadget7 = UxCreateSeparatorGadget( "separatorGadget7", form27 );
886 separatorGadget8 = UxCreateSeparatorGadget( "separatorGadget8", form27 );
887 separatorGadget9 = UxCreateSeparatorGadget( "separatorGadget9", form27 );
888 tf_thres2 = UxCreateTextField( "tf_thres2", form27 );
889 form28 = UxCreateForm( "form28", form27 );
890 pb_search_search3 = UxCreatePushButton( "pb_search_search3", form28 );
891 pushButton3 = UxCreatePushButton( "pushButton3", form28 );
892 pb_search_plot3 = UxCreatePushButton( "pb_search_plot3", form28 );
893 pb_search_plot4 = UxCreatePushButton( "pb_search_plot4", form28 );
894 pb_search_plot5 = UxCreatePushButton( "pb_search_plot5", form28 );
895 shelp_search3 = UxCreateText( "shelp_search3", form27 );
896 separator22 = UxCreateSeparator( "separator22", form27 );
897 separator23 = UxCreateSeparator( "separator23", form27 );
898 separatorGadget10 = UxCreateSeparatorGadget( "separatorGadget10", form27 );
899 label65 = UxCreateLabel( "label65", form27 );
900 tf_thres3 = UxCreateTextField( "tf_thres3", form27 );
901 label66 = UxCreateLabel( "label66", form27 );
902 pb_main_search15 = UxCreatePushButton( "pb_main_search15", form27 );
903
904 _Uxinit_OrderShell();
905
906 /* Create the X widgets */
907
908 UxCreateWidget( OrderShell );
909 UxCreateWidget( form27 );
910 UxCreateWidget( label61 );
911 UxCreateWidget( tf_ywidth2 );
912 UxCreateWidget( label62 );
913 UxCreateWidget( label63 );
914 UxCreateWidget( tf_ystep2 );
915 UxCreateWidget( tf_width2 );
916 UxCreateWidget( rowColumn26 );
917 UxCreateWidget( rb_seamtd_gaus2 );
918 UxCreateWidget( rb_seamtd_grav2 );
919 UxCreateWidget( rb_seamtd_maxi2 );
920 UxCreateWidget( label64 );
921 UxCreateWidget( separatorGadget6 );
922 UxCreateWidget( separatorGadget7 );
923 UxCreateWidget( separatorGadget8 );
924 UxCreateWidget( separatorGadget9 );
925 UxCreateWidget( tf_thres2 );
926 UxCreateWidget( form28 );
927 UxCreateWidget( pb_search_search3 );
928 UxCreateWidget( pushButton3 );
929 UxCreateWidget( pb_search_plot3 );
930 UxCreateWidget( pb_search_plot4 );
931 UxCreateWidget( pb_search_plot5 );
932 UxCreateWidget( shelp_search3 );
933 UxCreateWidget( separator22 );
934 UxCreateWidget( separator23 );
935 UxCreateWidget( separatorGadget10 );
936 UxCreateWidget( label65 );
937 UxCreateWidget( tf_thres3 );
938 UxCreateWidget( label66 );
939 UxCreateWidget( pb_main_search15 );
940
941 UxAddCallback( tf_ywidth2, XmNlosingFocusCallback,
942 losingFocusCB_tf_ywidth2,
943 (XtPointer) UxOrderShellContext );
944
945 UxAddCallback( tf_ystep2, XmNlosingFocusCallback,
946 losingFocusCB_tf_ystep2,
947 (XtPointer) UxOrderShellContext );
948
949 UxAddCallback( tf_width2, XmNlosingFocusCallback,
950 losingFocusCB_tf_width2,
951 (XtPointer) UxOrderShellContext );
952
953 UxAddCallback( rb_seamtd_gaus2, XmNarmCallback,
954 armCB_rb_seamtd_gaus2,
955 (XtPointer) UxOrderShellContext );
956 UxAddCallback( rb_seamtd_gaus2, XmNvalueChangedCallback,
957 valueChangedCB_rb_seamtd_gaus2,
958 (XtPointer) UxOrderShellContext );
959
960 UxAddCallback( rb_seamtd_grav2, XmNarmCallback,
961 armCB_rb_seamtd_grav2,
962 (XtPointer) UxOrderShellContext );
963 UxAddCallback( rb_seamtd_grav2, XmNvalueChangedCallback,
964 valueChangedCB_rb_seamtd_grav2,
965 (XtPointer) UxOrderShellContext );
966
967 UxAddCallback( rb_seamtd_maxi2, XmNarmCallback,
968 armCB_rb_seamtd_maxi2,
969 (XtPointer) UxOrderShellContext );
970 UxAddCallback( rb_seamtd_maxi2, XmNvalueChangedCallback,
971 valueChangedCB_rb_seamtd_maxi2,
972 (XtPointer) UxOrderShellContext );
973
974 UxAddCallback( tf_thres2, XmNlosingFocusCallback,
975 losingFocusCB_tf_thres2,
976 (XtPointer) UxOrderShellContext );
977
978 UxAddCallback( pb_search_search3, XmNactivateCallback,
979 activateCB_pb_search_search3,
980 (XtPointer) UxOrderShellContext );
981
982 UxAddCallback( pushButton3, XmNactivateCallback,
983 activateCB_pushButton3,
984 (XtPointer) UxOrderShellContext );
985
986 UxAddCallback( pb_search_plot3, XmNactivateCallback,
987 activateCB_pb_search_plot3,
988 (XtPointer) UxOrderShellContext );
989
990 UxAddCallback( pb_search_plot4, XmNactivateCallback,
991 activateCB_pb_search_plot4,
992 (XtPointer) UxOrderShellContext );
993
994 UxAddCallback( pb_search_plot5, XmNactivateCallback,
995 activateCB_pb_search_plot5,
996 (XtPointer) UxOrderShellContext );
997
998 UxAddCallback( tf_thres3, XmNlosingFocusCallback,
999 losingFocusCB_tf_thres3,
1000 (XtPointer) UxOrderShellContext );
1001
1002 UxAddCallback( pb_main_search15, XmNactivateCallback,
1003 activateCB_pb_main_search15,
1004 (XtPointer) UxOrderShellContext );
1005
1006
1007 /* Finally, call UxRealizeInterface to create the X windows
1008 for the widgets created above. */
1009
1010 UxRealizeInterface( OrderShell );
1011
1012 return ( OrderShell );
1013 }
1014
1015 /*******************************************************************************
1016 The following function includes the code that was entered
1017 in the 'Initial Code' and 'Final Code' sections of the
1018 Declarations Editor. This function is called from the
1019 'Interface function' below.
1020 *******************************************************************************/
1021
1022 static swidget _Ux_create_OrderShell()
1023 {
1024 swidget rtrn;
1025 _UxCOrderShell *UxContext;
1026
1027 UxOrderShellContext = UxContext =
1028 (_UxCOrderShell *) UxMalloc( sizeof(_UxCOrderShell) );
1029
1030 rtrn = _Uxbuild_OrderShell();
1031
1032 return(rtrn);
1033 }
1034
1035 /*******************************************************************************
1036 The following is the 'Interface function' which is the
1037 external entry point for creating this interface.
1038 This function should be called from your application or from
1039 a callback function.
1040 *******************************************************************************/
1041
1042 swidget create_OrderShell()
1043 {
1044 swidget _Uxrtrn;
1045 static int _Uxinit = 0;
1046
1047 if ( ! _Uxinit )
1048 {
1049 static XtActionsRec _Uxactions[] = {
1050 { "ClearShort", action_ClearShort },
1051 { "HelpShort", action_HelpShort },
1052 { "ExtendedHelp", action_ExtendedHelp },
1053 { "FileSelectACT", action_FileSelectACT }
1054 };
1055
1056 XtAppAddActions( UxAppContext,
1057 _Uxactions,
1058 XtNumber(_Uxactions) );
1059
1060 _Uxinit = 1;
1061 }
1062
1063 _Uxrtrn = _Ux_create_OrderShell();
1064
1065 return ( _Uxrtrn );
1066 }
1067
1068 /*******************************************************************************
1069 END OF FILE
1070 *******************************************************************************/
1071