| 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 |
SearchShell.c |
| 31 |
|
| 32 |
.VERSION |
| 33 |
090825 last modif |
| 34 |
|
| 35 |
*******************************************************************************/ |
| 36 |
|
| 37 |
#include <stdio.h> |
| 38 |
#include "UxLib.h" |
| 39 |
#include "UxPushBG.h" |
| 40 |
#include "UxRowCol.h" |
| 41 |
#include "UxSep.h" |
| 42 |
#include "UxText.h" |
| 43 |
#include "UxPushB.h" |
| 44 |
#include "UxTextF.h" |
| 45 |
#include "UxLabel.h" |
| 46 |
#include "UxForm.h" |
| 47 |
#include "UxApplSh.h" |
| 48 |
|
| 49 |
/******************************************************************************* |
| 50 |
Includes, Defines, and Global variables from the Declarations Editor: |
| 51 |
*******************************************************************************/ |
| 52 |
|
| 53 |
#include <ExternResources.h> |
| 54 |
|
| 55 |
/******************************************************************************* |
| 56 |
The definition of the context structure: |
| 57 |
If you create multiple instances of your interface, the context |
| 58 |
structure ensures that your callbacks use the variables for the |
| 59 |
correct instance. |
| 60 |
|
| 61 |
For each swidget in the interface, each argument to the Interface |
| 62 |
function, and each variable in the Instance Specific section of the |
| 63 |
Declarations Editor, there is an entry in the context structure. |
| 64 |
and a #define. The #define makes the variable name refer to the |
| 65 |
corresponding entry in the context structure. |
| 66 |
*******************************************************************************/ |
| 67 |
|
| 68 |
typedef struct |
| 69 |
{ |
| 70 |
swidget UxSearchShell; |
| 71 |
swidget Uxform2; |
| 72 |
swidget Uxlabel9; |
| 73 |
swidget Uxtf_ywidth1; |
| 74 |
swidget Uxlabel10; |
| 75 |
swidget Uxlabel11; |
| 76 |
swidget Uxtf_ystep1; |
| 77 |
swidget Uxtf_width1; |
| 78 |
swidget Uxlabel12; |
| 79 |
swidget Uxtf_thres1; |
| 80 |
swidget Uxform4; |
| 81 |
swidget Uxpb_search_search1; |
| 82 |
swidget UxpushButton1; |
| 83 |
swidget Uxpb_search_plot6; |
| 84 |
swidget Uxpb_search_plot7; |
| 85 |
swidget Uxpb_search_plot8; |
| 86 |
swidget Uxshelp_search1; |
| 87 |
swidget Uxseparator2; |
| 88 |
swidget Uxseparator3; |
| 89 |
swidget Uxlabel13; |
| 90 |
swidget Uxlabel67; |
| 91 |
swidget Uxtf_thres4; |
| 92 |
swidget Uxpb_main_search16; |
| 93 |
swidget Uxlabel68; |
| 94 |
swidget Uxmenu2_p6; |
| 95 |
swidget Uxmn_tol_angstroms6; |
| 96 |
swidget Uxmn_tol_pixels6; |
| 97 |
swidget Uxmn_tol6; |
| 98 |
swidget Uxtf_thres12; |
| 99 |
} _UxCSearchShell; |
| 100 |
|
| 101 |
#define SearchShell UxSearchShellContext->UxSearchShell |
| 102 |
#define form2 UxSearchShellContext->Uxform2 |
| 103 |
#define label9 UxSearchShellContext->Uxlabel9 |
| 104 |
#define tf_ywidth1 UxSearchShellContext->Uxtf_ywidth1 |
| 105 |
#define label10 UxSearchShellContext->Uxlabel10 |
| 106 |
#define label11 UxSearchShellContext->Uxlabel11 |
| 107 |
#define tf_ystep1 UxSearchShellContext->Uxtf_ystep1 |
| 108 |
#define tf_width1 UxSearchShellContext->Uxtf_width1 |
| 109 |
#define label12 UxSearchShellContext->Uxlabel12 |
| 110 |
#define tf_thres1 UxSearchShellContext->Uxtf_thres1 |
| 111 |
#define form4 UxSearchShellContext->Uxform4 |
| 112 |
#define pb_search_search1 UxSearchShellContext->Uxpb_search_search1 |
| 113 |
#define pushButton1 UxSearchShellContext->UxpushButton1 |
| 114 |
#define pb_search_plot6 UxSearchShellContext->Uxpb_search_plot6 |
| 115 |
#define pb_search_plot7 UxSearchShellContext->Uxpb_search_plot7 |
| 116 |
#define pb_search_plot8 UxSearchShellContext->Uxpb_search_plot8 |
| 117 |
#define shelp_search1 UxSearchShellContext->Uxshelp_search1 |
| 118 |
#define separator2 UxSearchShellContext->Uxseparator2 |
| 119 |
#define separator3 UxSearchShellContext->Uxseparator3 |
| 120 |
#define label13 UxSearchShellContext->Uxlabel13 |
| 121 |
#define label67 UxSearchShellContext->Uxlabel67 |
| 122 |
#define tf_thres4 UxSearchShellContext->Uxtf_thres4 |
| 123 |
#define pb_main_search16 UxSearchShellContext->Uxpb_main_search16 |
| 124 |
#define label68 UxSearchShellContext->Uxlabel68 |
| 125 |
#define menu2_p6 UxSearchShellContext->Uxmenu2_p6 |
| 126 |
#define mn_tol_angstroms6 UxSearchShellContext->Uxmn_tol_angstroms6 |
| 127 |
#define mn_tol_pixels6 UxSearchShellContext->Uxmn_tol_pixels6 |
| 128 |
#define mn_tol6 UxSearchShellContext->Uxmn_tol6 |
| 129 |
#define tf_thres12 UxSearchShellContext->Uxtf_thres12 |
| 130 |
|
| 131 |
static _UxCSearchShell *UxSearchShellContext; |
| 132 |
|
| 133 |
extern void DisplayShortHelp(), DisplayExtendedHelp(), SetFileList(); |
| 134 |
extern void MidasCommand(), PopupLong(), InitAllFields(); |
| 135 |
extern void WidgetLeave(), WidgetEnter(), GetExtendedHelp(), SelectList(); |
| 136 |
|
| 137 |
extern int RadioSet(), PopupList(), AppendDialogText(); |
| 138 |
|
| 139 |
|
| 140 |
/******************************************************************************* |
| 141 |
The following are translation tables. |
| 142 |
*******************************************************************************/ |
| 143 |
|
| 144 |
static char *transTable13 = "#override\n\ |
| 145 |
<Btn3Down>:ExtendedHelp()\n\ |
| 146 |
<EnterWindow>:HelpShort()\n\ |
| 147 |
<LeaveWindow>:ClearShort()\n"; |
| 148 |
|
| 149 |
/******************************************************************************* |
| 150 |
Forward declarations of functions that are defined later in this file. |
| 151 |
*******************************************************************************/ |
| 152 |
|
| 153 |
swidget create_SearchShell(); |
| 154 |
|
| 155 |
/******************************************************************************* |
| 156 |
The following are Action functions. |
| 157 |
*******************************************************************************/ |
| 158 |
|
| 159 |
static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 160 |
Widget UxWidget; |
| 161 |
XEvent *UxEvent; |
| 162 |
String *UxParams; |
| 163 |
Cardinal *p_UxNumParams; |
| 164 |
{ |
| 165 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 166 |
swidget UxThisWidget; |
| 167 |
|
| 168 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 169 |
UxSaveCtx = UxSearchShellContext; |
| 170 |
UxSearchShellContext = UxContext = |
| 171 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 172 |
{ |
| 173 |
DisplayShortHelp(UxWidget); |
| 174 |
} |
| 175 |
UxSearchShellContext = UxSaveCtx; |
| 176 |
} |
| 177 |
|
| 178 |
static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 179 |
Widget UxWidget; |
| 180 |
XEvent *UxEvent; |
| 181 |
String *UxParams; |
| 182 |
Cardinal *p_UxNumParams; |
| 183 |
{ |
| 184 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 185 |
swidget UxThisWidget; |
| 186 |
|
| 187 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 188 |
UxSaveCtx = UxSearchShellContext; |
| 189 |
UxSearchShellContext = UxContext = |
| 190 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 191 |
{ |
| 192 |
/* |
| 193 |
UxPutText(UxFindSwidget("shelp_main"), ""); |
| 194 |
UxPutText(UxFindSwidget("shelp_search"), ""); |
| 195 |
UxPutText(UxFindSwidget("shelp_calib"), ""); |
| 196 |
UxPutText(UxFindSwidget("shelp_rebin"), ""); |
| 197 |
UxPutText(UxFindSwidget("shelp_extract"), ""); |
| 198 |
UxPutText(UxFindSwidget("shelp_flux"), ""); |
| 199 |
*/ |
| 200 |
} |
| 201 |
UxSearchShellContext = UxSaveCtx; |
| 202 |
} |
| 203 |
|
| 204 |
static void action_ClearShort( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 205 |
Widget UxWidget; |
| 206 |
XEvent *UxEvent; |
| 207 |
String *UxParams; |
| 208 |
Cardinal *p_UxNumParams; |
| 209 |
{ |
| 210 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 211 |
swidget UxThisWidget; |
| 212 |
|
| 213 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 214 |
UxSaveCtx = UxSearchShellContext; |
| 215 |
UxSearchShellContext = UxContext = |
| 216 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 217 |
{WidgetLeave(UxWidget);} |
| 218 |
UxSearchShellContext = UxSaveCtx; |
| 219 |
} |
| 220 |
|
| 221 |
static void action_HelpShort( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 222 |
Widget UxWidget; |
| 223 |
XEvent *UxEvent; |
| 224 |
String *UxParams; |
| 225 |
Cardinal *p_UxNumParams; |
| 226 |
{ |
| 227 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 228 |
swidget UxThisWidget; |
| 229 |
|
| 230 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 231 |
UxSaveCtx = UxSearchShellContext; |
| 232 |
UxSearchShellContext = UxContext = |
| 233 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 234 |
{WidgetEnter(UxWidget);} |
| 235 |
UxSearchShellContext = UxSaveCtx; |
| 236 |
} |
| 237 |
|
| 238 |
static void action_ExtendedHelp( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 239 |
Widget UxWidget; |
| 240 |
XEvent *UxEvent; |
| 241 |
String *UxParams; |
| 242 |
Cardinal *p_UxNumParams; |
| 243 |
{ |
| 244 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 245 |
swidget UxThisWidget; |
| 246 |
|
| 247 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 248 |
UxSaveCtx = UxSearchShellContext; |
| 249 |
UxSearchShellContext = UxContext = |
| 250 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 251 |
{ |
| 252 |
DisplayExtendedHelp(UxWidget); |
| 253 |
} |
| 254 |
UxSearchShellContext = UxSaveCtx; |
| 255 |
} |
| 256 |
|
| 257 |
static void action_FileSelectACT( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 258 |
Widget UxWidget; |
| 259 |
XEvent *UxEvent; |
| 260 |
String *UxParams; |
| 261 |
Cardinal *p_UxNumParams; |
| 262 |
{ |
| 263 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 264 |
swidget UxThisWidget; |
| 265 |
|
| 266 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 267 |
UxSaveCtx = UxSearchShellContext; |
| 268 |
UxSearchShellContext = UxContext = |
| 269 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 270 |
{ |
| 271 |
#include <xm_defs.h> |
| 272 |
#include <spec_comm.h> |
| 273 |
|
| 274 |
extern swidget FileListInterface, TextFieldSwidget; |
| 275 |
extern Widget FileListWidget; |
| 276 |
extern char DirSpecs[]; |
| 277 |
extern int ListType; |
| 278 |
|
| 279 |
int strip = 1; /* strip off */ |
| 280 |
|
| 281 |
TextFieldSwidget = UxThisWidget; |
| 282 |
|
| 283 |
if ( UxWidget == UxGetWidget(UxFindSwidget("tf_lincat")) ) { |
| 284 |
SET_LIST_TITLE("Enter line catalog"); |
| 285 |
ListType = LIST_LINCAT; |
| 286 |
} |
| 287 |
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_guess")) ) { |
| 288 |
SET_LIST_TITLE("Enter guess table"); |
| 289 |
ListType = LIST_GUESS; |
| 290 |
} |
| 291 |
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_flux_tbl")) ) { |
| 292 |
SET_LIST_TITLE("Enter flux table"); |
| 293 |
ListType = LIST_FLUX_TBL; |
| 294 |
} |
| 295 |
else if ( UxWidget == UxGetWidget(UxFindSwidget("tf_extin_tbl")) ) { |
| 296 |
SET_LIST_TITLE("Enter extinction table"); |
| 297 |
ListType = LIST_EXTIN_TBL; |
| 298 |
} |
| 299 |
|
| 300 |
strcpy(DirSpecs, "*.tbl"); |
| 301 |
SetFileList(FileListWidget, strip, DirSpecs); |
| 302 |
UxPopupInterface(FileListInterface, exclusive_grab); |
| 303 |
|
| 304 |
} |
| 305 |
UxSearchShellContext = UxSaveCtx; |
| 306 |
} |
| 307 |
|
| 308 |
/******************************************************************************* |
| 309 |
The following are callback functions. |
| 310 |
*******************************************************************************/ |
| 311 |
|
| 312 |
static void losingFocusCB_tf_ywidth1( UxWidget, UxClientData, UxCallbackArg ) |
| 313 |
Widget UxWidget; |
| 314 |
XtPointer UxClientData, UxCallbackArg; |
| 315 |
{ |
| 316 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 317 |
swidget UxThisWidget; |
| 318 |
|
| 319 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 320 |
UxSaveCtx = UxSearchShellContext; |
| 321 |
UxSearchShellContext = UxContext = |
| 322 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 323 |
{ |
| 324 |
|
| 325 |
} |
| 326 |
UxSearchShellContext = UxSaveCtx; |
| 327 |
} |
| 328 |
|
| 329 |
static void losingFocusCB_tf_ystep1( UxWidget, UxClientData, UxCallbackArg ) |
| 330 |
Widget UxWidget; |
| 331 |
XtPointer UxClientData, UxCallbackArg; |
| 332 |
{ |
| 333 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 334 |
swidget UxThisWidget; |
| 335 |
|
| 336 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 337 |
UxSaveCtx = UxSearchShellContext; |
| 338 |
UxSearchShellContext = UxContext = |
| 339 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 340 |
{ |
| 341 |
|
| 342 |
} |
| 343 |
UxSearchShellContext = UxSaveCtx; |
| 344 |
} |
| 345 |
|
| 346 |
static void losingFocusCB_tf_width1( UxWidget, UxClientData, UxCallbackArg ) |
| 347 |
Widget UxWidget; |
| 348 |
XtPointer UxClientData, UxCallbackArg; |
| 349 |
{ |
| 350 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 351 |
swidget UxThisWidget; |
| 352 |
|
| 353 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 354 |
UxSaveCtx = UxSearchShellContext; |
| 355 |
UxSearchShellContext = UxContext = |
| 356 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 357 |
{ |
| 358 |
|
| 359 |
} |
| 360 |
UxSearchShellContext = UxSaveCtx; |
| 361 |
} |
| 362 |
|
| 363 |
static void losingFocusCB_tf_thres1( UxWidget, UxClientData, UxCallbackArg ) |
| 364 |
Widget UxWidget; |
| 365 |
XtPointer UxClientData, UxCallbackArg; |
| 366 |
{ |
| 367 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 368 |
swidget UxThisWidget; |
| 369 |
|
| 370 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 371 |
UxSaveCtx = UxSearchShellContext; |
| 372 |
UxSearchShellContext = UxContext = |
| 373 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 374 |
{ |
| 375 |
|
| 376 |
} |
| 377 |
UxSearchShellContext = UxSaveCtx; |
| 378 |
} |
| 379 |
|
| 380 |
static void activateCB_pb_search_search1( UxWidget, UxClientData, UxCallbackArg ) |
| 381 |
Widget UxWidget; |
| 382 |
XtPointer UxClientData, UxCallbackArg; |
| 383 |
{ |
| 384 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 385 |
swidget UxThisWidget; |
| 386 |
|
| 387 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 388 |
UxSaveCtx = UxSearchShellContext; |
| 389 |
UxSearchShellContext = UxContext = |
| 390 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 391 |
{ |
| 392 |
MidasCommand(UxWidget); |
| 393 |
|
| 394 |
} |
| 395 |
UxSearchShellContext = UxSaveCtx; |
| 396 |
} |
| 397 |
|
| 398 |
static void activateCB_pushButton1( UxWidget, UxClientData, UxCallbackArg ) |
| 399 |
Widget UxWidget; |
| 400 |
XtPointer UxClientData, UxCallbackArg; |
| 401 |
{ |
| 402 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 403 |
swidget UxThisWidget; |
| 404 |
|
| 405 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 406 |
UxSaveCtx = UxSearchShellContext; |
| 407 |
UxSearchShellContext = UxContext = |
| 408 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 409 |
{ |
| 410 |
UxPopdownInterface(UxFindSwidget("SearchShell")); |
| 411 |
} |
| 412 |
UxSearchShellContext = UxSaveCtx; |
| 413 |
} |
| 414 |
|
| 415 |
static void activateCB_pb_search_plot6( UxWidget, UxClientData, UxCallbackArg ) |
| 416 |
Widget UxWidget; |
| 417 |
XtPointer UxClientData, UxCallbackArg; |
| 418 |
{ |
| 419 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 420 |
swidget UxThisWidget; |
| 421 |
|
| 422 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 423 |
UxSaveCtx = UxSearchShellContext; |
| 424 |
UxSearchShellContext = UxContext = |
| 425 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 426 |
{ |
| 427 |
GetExtendedHelp(UxWidget); |
| 428 |
} |
| 429 |
UxSearchShellContext = UxSaveCtx; |
| 430 |
} |
| 431 |
|
| 432 |
static void activateCB_pb_search_plot7( UxWidget, UxClientData, UxCallbackArg ) |
| 433 |
Widget UxWidget; |
| 434 |
XtPointer UxClientData, UxCallbackArg; |
| 435 |
{ |
| 436 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 437 |
swidget UxThisWidget; |
| 438 |
|
| 439 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 440 |
UxSaveCtx = UxSearchShellContext; |
| 441 |
UxSearchShellContext = UxContext = |
| 442 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 443 |
{ |
| 444 |
MidasCommand(UxWidget); |
| 445 |
|
| 446 |
} |
| 447 |
UxSearchShellContext = UxSaveCtx; |
| 448 |
} |
| 449 |
|
| 450 |
static void activateCB_pb_search_plot8( UxWidget, UxClientData, UxCallbackArg ) |
| 451 |
Widget UxWidget; |
| 452 |
XtPointer UxClientData, UxCallbackArg; |
| 453 |
{ |
| 454 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 455 |
swidget UxThisWidget; |
| 456 |
|
| 457 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 458 |
UxSaveCtx = UxSearchShellContext; |
| 459 |
UxSearchShellContext = UxContext = |
| 460 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 461 |
{ |
| 462 |
MidasCommand(UxWidget); |
| 463 |
|
| 464 |
} |
| 465 |
UxSearchShellContext = UxSaveCtx; |
| 466 |
} |
| 467 |
|
| 468 |
static void losingFocusCB_tf_thres4( UxWidget, UxClientData, UxCallbackArg ) |
| 469 |
Widget UxWidget; |
| 470 |
XtPointer UxClientData, UxCallbackArg; |
| 471 |
{ |
| 472 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 473 |
swidget UxThisWidget; |
| 474 |
|
| 475 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 476 |
UxSaveCtx = UxSearchShellContext; |
| 477 |
UxSearchShellContext = UxContext = |
| 478 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 479 |
{ |
| 480 |
|
| 481 |
} |
| 482 |
UxSearchShellContext = UxSaveCtx; |
| 483 |
} |
| 484 |
|
| 485 |
static void activateCB_pb_main_search16( UxWidget, UxClientData, UxCallbackArg ) |
| 486 |
Widget UxWidget; |
| 487 |
XtPointer UxClientData, UxCallbackArg; |
| 488 |
{ |
| 489 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 490 |
swidget UxThisWidget; |
| 491 |
|
| 492 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 493 |
UxSaveCtx = UxSearchShellContext; |
| 494 |
UxSearchShellContext = UxContext = |
| 495 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 496 |
{ |
| 497 |
SelectList(UxWidget); |
| 498 |
|
| 499 |
} |
| 500 |
UxSearchShellContext = UxSaveCtx; |
| 501 |
} |
| 502 |
|
| 503 |
static void activateCB_mn_tol_angstroms6( UxWidget, UxClientData, UxCallbackArg ) |
| 504 |
Widget UxWidget; |
| 505 |
XtPointer UxClientData, UxCallbackArg; |
| 506 |
{ |
| 507 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 508 |
swidget UxThisWidget; |
| 509 |
|
| 510 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 511 |
UxSaveCtx = UxSearchShellContext; |
| 512 |
UxSearchShellContext = UxContext = |
| 513 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 514 |
{RadioSet ( UxWidget ) ; } |
| 515 |
UxSearchShellContext = UxSaveCtx; |
| 516 |
} |
| 517 |
|
| 518 |
static void activateCB_mn_tol_pixels6( UxWidget, UxClientData, UxCallbackArg ) |
| 519 |
Widget UxWidget; |
| 520 |
XtPointer UxClientData, UxCallbackArg; |
| 521 |
{ |
| 522 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 523 |
swidget UxThisWidget; |
| 524 |
|
| 525 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 526 |
UxSaveCtx = UxSearchShellContext; |
| 527 |
UxSearchShellContext = UxContext = |
| 528 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 529 |
{RadioSet ( UxWidget ) ; } |
| 530 |
UxSearchShellContext = UxSaveCtx; |
| 531 |
} |
| 532 |
|
| 533 |
static void losingFocusCB_tf_thres12( UxWidget, UxClientData, UxCallbackArg ) |
| 534 |
Widget UxWidget; |
| 535 |
XtPointer UxClientData, UxCallbackArg; |
| 536 |
{ |
| 537 |
_UxCSearchShell *UxSaveCtx, *UxContext; |
| 538 |
swidget UxThisWidget; |
| 539 |
|
| 540 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 541 |
UxSaveCtx = UxSearchShellContext; |
| 542 |
UxSearchShellContext = UxContext = |
| 543 |
(_UxCSearchShell *) UxGetContext( UxThisWidget ); |
| 544 |
{ |
| 545 |
|
| 546 |
} |
| 547 |
UxSearchShellContext = UxSaveCtx; |
| 548 |
} |
| 549 |
|
| 550 |
/******************************************************************************* |
| 551 |
The 'init_' function sets the private properties for all the |
| 552 |
swidgets to the values specified in the Property Table. |
| 553 |
Some properties need to be set after the X widgets have been |
| 554 |
created and the setting of these properties is done in the |
| 555 |
'build_' function after the UxCreateWidget call. |
| 556 |
*******************************************************************************/ |
| 557 |
|
| 558 |
static void _Uxinit_SearchShell() |
| 559 |
{ |
| 560 |
UxPutBackground( SearchShell, WindowBackground ); |
| 561 |
UxPutGeometry( SearchShell, "+10+60" ); |
| 562 |
UxPutKeyboardFocusPolicy( SearchShell, "pointer" ); |
| 563 |
UxPutTitle( SearchShell, "XEchelle: Search Arc Lines" ); |
| 564 |
UxPutHeight( SearchShell, 350 ); |
| 565 |
UxPutWidth( SearchShell, 620 ); |
| 566 |
UxPutY( SearchShell, 53 ); |
| 567 |
UxPutX( SearchShell, 370 ); |
| 568 |
|
| 569 |
UxPutTextFontList( form2, TextFont ); |
| 570 |
UxPutLabelFontList( form2, TextFont ); |
| 571 |
UxPutBackground( form2, WindowBackground ); |
| 572 |
UxPutHeight( form2, 350 ); |
| 573 |
UxPutWidth( form2, 666 ); |
| 574 |
UxPutY( form2, 0 ); |
| 575 |
UxPutX( form2, -16 ); |
| 576 |
UxPutUnitType( form2, "pixels" ); |
| 577 |
UxPutResizePolicy( form2, "resize_none" ); |
| 578 |
|
| 579 |
UxPutForeground( label9, TextForeground ); |
| 580 |
UxPutAlignment( label9, "alignment_beginning" ); |
| 581 |
UxPutLabelString( label9, "Width:" ); |
| 582 |
UxPutFontList( label9, TextFont ); |
| 583 |
UxPutBackground( label9, LabelBackground ); |
| 584 |
UxPutHeight( label9, 30 ); |
| 585 |
UxPutWidth( label9, 124 ); |
| 586 |
UxPutY( label9, 172 ); |
| 587 |
UxPutX( label9, 354 ); |
| 588 |
|
| 589 |
UxPutForeground( tf_ywidth1, TextForeground ); |
| 590 |
UxPutHighlightOnEnter( tf_ywidth1, "true" ); |
| 591 |
UxPutFontList( tf_ywidth1, TextFont ); |
| 592 |
UxPutBackground( tf_ywidth1, TextBackground ); |
| 593 |
UxPutHeight( tf_ywidth1, 35 ); |
| 594 |
UxPutWidth( tf_ywidth1, 120 ); |
| 595 |
UxPutY( tf_ywidth1, 162 ); |
| 596 |
UxPutX( tf_ywidth1, 480 ); |
| 597 |
|
| 598 |
UxPutForeground( label10, TextForeground ); |
| 599 |
UxPutAlignment( label10, "alignment_beginning" ); |
| 600 |
UxPutLabelString( label10, "Threshold:" ); |
| 601 |
UxPutFontList( label10, TextFont ); |
| 602 |
UxPutBackground( label10, LabelBackground ); |
| 603 |
UxPutHeight( label10, 30 ); |
| 604 |
UxPutWidth( label10, 120 ); |
| 605 |
UxPutY( label10, 120 ); |
| 606 |
UxPutX( label10, 354 ); |
| 607 |
|
| 608 |
UxPutForeground( label11, TextForeground ); |
| 609 |
UxPutAlignment( label11, "alignment_beginning" ); |
| 610 |
UxPutLabelString( label11, "Slit:" ); |
| 611 |
UxPutFontList( label11, TextFont ); |
| 612 |
UxPutBackground( label11, LabelBackground ); |
| 613 |
UxPutHeight( label11, 30 ); |
| 614 |
UxPutWidth( label11, 120 ); |
| 615 |
UxPutY( label11, 124 ); |
| 616 |
UxPutX( label11, 28 ); |
| 617 |
|
| 618 |
UxPutForeground( tf_ystep1, TextForeground ); |
| 619 |
UxPutHighlightOnEnter( tf_ystep1, "true" ); |
| 620 |
UxPutFontList( tf_ystep1, TextFont ); |
| 621 |
UxPutBackground( tf_ystep1, TextBackground ); |
| 622 |
UxPutHeight( tf_ystep1, 35 ); |
| 623 |
UxPutWidth( tf_ystep1, 120 ); |
| 624 |
UxPutY( tf_ystep1, 116 ); |
| 625 |
UxPutX( tf_ystep1, 480 ); |
| 626 |
|
| 627 |
UxPutForeground( tf_width1, TextForeground ); |
| 628 |
UxPutHighlightOnEnter( tf_width1, "true" ); |
| 629 |
UxPutFontList( tf_width1, TextFont ); |
| 630 |
UxPutBackground( tf_width1, TextBackground ); |
| 631 |
UxPutHeight( tf_width1, 35 ); |
| 632 |
UxPutWidth( tf_width1, 120 ); |
| 633 |
UxPutY( tf_width1, 170 ); |
| 634 |
UxPutX( tf_width1, 170 ); |
| 635 |
|
| 636 |
UxPutForeground( label12, TextForeground ); |
| 637 |
UxPutAlignment( label12, "alignment_beginning" ); |
| 638 |
UxPutLabelString( label12, "Extraction method:" ); |
| 639 |
UxPutFontList( label12, TextFont ); |
| 640 |
UxPutBackground( label12, LabelBackground ); |
| 641 |
UxPutHeight( label12, 30 ); |
| 642 |
UxPutWidth( label12, 120 ); |
| 643 |
UxPutY( label12, 80 ); |
| 644 |
UxPutX( label12, 28 ); |
| 645 |
|
| 646 |
UxPutForeground( tf_thres1, TextForeground ); |
| 647 |
UxPutHighlightOnEnter( tf_thres1, "true" ); |
| 648 |
UxPutFontList( tf_thres1, TextFont ); |
| 649 |
UxPutBackground( tf_thres1, TextBackground ); |
| 650 |
UxPutHeight( tf_thres1, 35 ); |
| 651 |
UxPutWidth( tf_thres1, 120 ); |
| 652 |
UxPutY( tf_thres1, 182 ); |
| 653 |
UxPutX( tf_thres1, 238 ); |
| 654 |
|
| 655 |
UxPutBackground( form4, ButtonBackground ); |
| 656 |
UxPutHeight( form4, 40 ); |
| 657 |
UxPutWidth( form4, 666 ); |
| 658 |
UxPutY( form4, 304 ); |
| 659 |
UxPutX( form4, 0 ); |
| 660 |
UxPutResizePolicy( form4, "resize_none" ); |
| 661 |
|
| 662 |
UxPutLabelString( pb_search_search1, "Extract and Search" ); |
| 663 |
UxPutForeground( pb_search_search1, ApplyForeground ); |
| 664 |
UxPutFontList( pb_search_search1, BoldTextFont ); |
| 665 |
UxPutBackground( pb_search_search1, ButtonBackground ); |
| 666 |
UxPutHeight( pb_search_search1, 30 ); |
| 667 |
UxPutWidth( pb_search_search1, 184 ); |
| 668 |
UxPutY( pb_search_search1, 4 ); |
| 669 |
UxPutX( pb_search_search1, 8 ); |
| 670 |
|
| 671 |
UxPutLabelString( pushButton1, "Cancel" ); |
| 672 |
UxPutForeground( pushButton1, CancelForeground ); |
| 673 |
UxPutFontList( pushButton1, BoldTextFont ); |
| 674 |
UxPutBackground( pushButton1, ButtonBackground ); |
| 675 |
UxPutHeight( pushButton1, 30 ); |
| 676 |
UxPutWidth( pushButton1, 86 ); |
| 677 |
UxPutY( pushButton1, 4 ); |
| 678 |
UxPutX( pushButton1, 528 ); |
| 679 |
|
| 680 |
UxPutLabelString( pb_search_plot6, "Help..." ); |
| 681 |
UxPutForeground( pb_search_plot6, ButtonForeground ); |
| 682 |
UxPutFontList( pb_search_plot6, BoldTextFont ); |
| 683 |
UxPutBackground( pb_search_plot6, ButtonBackground ); |
| 684 |
UxPutHeight( pb_search_plot6, 30 ); |
| 685 |
UxPutWidth( pb_search_plot6, 86 ); |
| 686 |
UxPutY( pb_search_plot6, 4 ); |
| 687 |
UxPutX( pb_search_plot6, 432 ); |
| 688 |
|
| 689 |
UxPutLabelString( pb_search_plot7, "Load Search" ); |
| 690 |
UxPutForeground( pb_search_plot7, ButtonForeground ); |
| 691 |
UxPutFontList( pb_search_plot7, BoldTextFont ); |
| 692 |
UxPutBackground( pb_search_plot7, ButtonBackground ); |
| 693 |
UxPutHeight( pb_search_plot7, 30 ); |
| 694 |
UxPutWidth( pb_search_plot7, 118 ); |
| 695 |
UxPutY( pb_search_plot7, 4 ); |
| 696 |
UxPutX( pb_search_plot7, 198 ); |
| 697 |
|
| 698 |
UxPutLabelString( pb_search_plot8, "Save..." ); |
| 699 |
UxPutForeground( pb_search_plot8, ButtonForeground ); |
| 700 |
UxPutFontList( pb_search_plot8, BoldTextFont ); |
| 701 |
UxPutBackground( pb_search_plot8, ButtonBackground ); |
| 702 |
UxPutHeight( pb_search_plot8, 30 ); |
| 703 |
UxPutWidth( pb_search_plot8, 86 ); |
| 704 |
UxPutY( pb_search_plot8, 4 ); |
| 705 |
UxPutX( pb_search_plot8, 332 ); |
| 706 |
|
| 707 |
UxPutFontList( shelp_search1, TextFont ); |
| 708 |
UxPutEditable( shelp_search1, "false" ); |
| 709 |
UxPutCursorPositionVisible( shelp_search1, "false" ); |
| 710 |
UxPutBackground( shelp_search1, SHelpBackground ); |
| 711 |
UxPutHeight( shelp_search1, 50 ); |
| 712 |
UxPutWidth( shelp_search1, 664 ); |
| 713 |
UxPutY( shelp_search1, 244 ); |
| 714 |
UxPutX( shelp_search1, 2 ); |
| 715 |
|
| 716 |
UxPutBackground( separator2, WindowBackground ); |
| 717 |
UxPutHeight( separator2, 10 ); |
| 718 |
UxPutWidth( separator2, 664 ); |
| 719 |
UxPutY( separator2, 234 ); |
| 720 |
UxPutX( separator2, 0 ); |
| 721 |
|
| 722 |
UxPutBackground( separator3, WindowBackground ); |
| 723 |
UxPutHeight( separator3, 10 ); |
| 724 |
UxPutWidth( separator3, 672 ); |
| 725 |
UxPutY( separator3, 292 ); |
| 726 |
UxPutX( separator3, -2 ); |
| 727 |
|
| 728 |
UxPutForeground( label13, TextForeground ); |
| 729 |
UxPutAlignment( label13, "alignment_beginning" ); |
| 730 |
UxPutLabelString( label13, "Offset:" ); |
| 731 |
UxPutFontList( label13, TextFont ); |
| 732 |
UxPutBackground( label13, LabelBackground ); |
| 733 |
UxPutHeight( label13, 30 ); |
| 734 |
UxPutWidth( label13, 120 ); |
| 735 |
UxPutY( label13, 174 ); |
| 736 |
UxPutX( label13, 28 ); |
| 737 |
|
| 738 |
UxPutForeground( label67, TextForeground ); |
| 739 |
UxPutAlignment( label67, "alignment_beginning" ); |
| 740 |
UxPutLabelString( label67, "Wavelength Calibration Frame:" ); |
| 741 |
UxPutFontList( label67, TextFont ); |
| 742 |
UxPutBackground( label67, LabelBackground ); |
| 743 |
UxPutHeight( label67, 30 ); |
| 744 |
UxPutWidth( label67, 216 ); |
| 745 |
UxPutY( label67, 14 ); |
| 746 |
UxPutX( label67, 20 ); |
| 747 |
|
| 748 |
UxPutForeground( tf_thres4, TextForeground ); |
| 749 |
UxPutHighlightOnEnter( tf_thres4, "true" ); |
| 750 |
UxPutFontList( tf_thres4, TextFont ); |
| 751 |
UxPutBackground( tf_thres4, TextBackground ); |
| 752 |
UxPutHeight( tf_thres4, 35 ); |
| 753 |
UxPutWidth( tf_thres4, 272 ); |
| 754 |
UxPutY( tf_thres4, 12 ); |
| 755 |
UxPutX( tf_thres4, 242 ); |
| 756 |
|
| 757 |
UxPutWidth( pb_main_search16, 46 ); |
| 758 |
UxPutRecomputeSize( pb_main_search16, "true" ); |
| 759 |
UxPutLabelString( pb_main_search16, "..." ); |
| 760 |
UxPutForeground( pb_main_search16, ButtonForeground ); |
| 761 |
UxPutFontList( pb_main_search16, BoldTextFont ); |
| 762 |
UxPutBackground( pb_main_search16, ButtonBackground ); |
| 763 |
UxPutHeight( pb_main_search16, 28 ); |
| 764 |
UxPutY( pb_main_search16, 14 ); |
| 765 |
UxPutX( pb_main_search16, 548 ); |
| 766 |
|
| 767 |
UxPutForeground( label68, TextForeground ); |
| 768 |
UxPutAlignment( label68, "alignment_beginning" ); |
| 769 |
UxPutLabelString( label68, "Search method" ); |
| 770 |
UxPutFontList( label68, TextFont ); |
| 771 |
UxPutBackground( label68, LabelBackground ); |
| 772 |
UxPutHeight( label68, 30 ); |
| 773 |
UxPutWidth( label68, 120 ); |
| 774 |
UxPutY( label68, 82 ); |
| 775 |
UxPutX( label68, 354 ); |
| 776 |
|
| 777 |
UxPutX( menu2_p6, 520 ); |
| 778 |
UxPutWidth( menu2_p6, 120 ); |
| 779 |
UxPutForeground( menu2_p6, TextForeground ); |
| 780 |
UxPutBackground( menu2_p6, WindowBackground ); |
| 781 |
UxPutRowColumnType( menu2_p6, "menu_pulldown" ); |
| 782 |
|
| 783 |
UxPutX( mn_tol_angstroms6, 520 ); |
| 784 |
UxPutWidth( mn_tol_angstroms6, 120 ); |
| 785 |
UxPutFontList( mn_tol_angstroms6, TextFont ); |
| 786 |
UxPutLabelString( mn_tol_angstroms6, " Gaussian " ); |
| 787 |
|
| 788 |
UxPutX( mn_tol_pixels6, 520 ); |
| 789 |
UxPutWidth( mn_tol_pixels6, 120 ); |
| 790 |
UxPutFontList( mn_tol_pixels6, TextFont ); |
| 791 |
UxPutLabelString( mn_tol_pixels6, " Gravity " ); |
| 792 |
|
| 793 |
UxPutTranslations( mn_tol6, transTable13 ); |
| 794 |
UxPutWidth( mn_tol6, 120 ); |
| 795 |
UxPutLabelString( mn_tol6, " " ); |
| 796 |
UxPutSpacing( mn_tol6, 0 ); |
| 797 |
UxPutMarginWidth( mn_tol6, 0 ); |
| 798 |
UxPutForeground( mn_tol6, TextForeground ); |
| 799 |
UxPutBackground( mn_tol6, WindowBackground ); |
| 800 |
UxPutY( mn_tol6, 76 ); |
| 801 |
UxPutX( mn_tol6, 474 ); |
| 802 |
UxPutRowColumnType( mn_tol6, "menu_option" ); |
| 803 |
|
| 804 |
UxPutHighlightColor( tf_thres12, WindowBackground ); |
| 805 |
UxPutEditable( tf_thres12, "false" ); |
| 806 |
UxPutForeground( tf_thres12, TextForeground ); |
| 807 |
UxPutHighlightOnEnter( tf_thres12, "true" ); |
| 808 |
UxPutFontList( tf_thres12, TextFont ); |
| 809 |
UxPutBackground( tf_thres12, WindowBackground ); |
| 810 |
UxPutHeight( tf_thres12, 35 ); |
| 811 |
UxPutWidth( tf_thres12, 120 ); |
| 812 |
UxPutY( tf_thres12, 80 ); |
| 813 |
UxPutX( tf_thres12, 170 ); |
| 814 |
|
| 815 |
} |
| 816 |
|
| 817 |
/******************************************************************************* |
| 818 |
The 'build_' function creates all the swidgets and X widgets, |
| 819 |
and sets their properties to the values specified in the |
| 820 |
Property Editor. |
| 821 |
*******************************************************************************/ |
| 822 |
|
| 823 |
static swidget _Uxbuild_SearchShell() |
| 824 |
{ |
| 825 |
/* Create the swidgets */ |
| 826 |
|
| 827 |
SearchShell = UxCreateApplicationShell( "SearchShell", NO_PARENT ); |
| 828 |
UxPutContext( SearchShell, UxSearchShellContext ); |
| 829 |
|
| 830 |
form2 = UxCreateForm( "form2", SearchShell ); |
| 831 |
label9 = UxCreateLabel( "label9", form2 ); |
| 832 |
tf_ywidth1 = UxCreateTextField( "tf_ywidth1", form2 ); |
| 833 |
label10 = UxCreateLabel( "label10", form2 ); |
| 834 |
label11 = UxCreateLabel( "label11", form2 ); |
| 835 |
tf_ystep1 = UxCreateTextField( "tf_ystep1", form2 ); |
| 836 |
tf_width1 = UxCreateTextField( "tf_width1", form2 ); |
| 837 |
label12 = UxCreateLabel( "label12", form2 ); |
| 838 |
tf_thres1 = UxCreateTextField( "tf_thres1", form2 ); |
| 839 |
form4 = UxCreateForm( "form4", form2 ); |
| 840 |
pb_search_search1 = UxCreatePushButton( "pb_search_search1", form4 ); |
| 841 |
pushButton1 = UxCreatePushButton( "pushButton1", form4 ); |
| 842 |
pb_search_plot6 = UxCreatePushButton( "pb_search_plot6", form4 ); |
| 843 |
pb_search_plot7 = UxCreatePushButton( "pb_search_plot7", form4 ); |
| 844 |
pb_search_plot8 = UxCreatePushButton( "pb_search_plot8", form4 ); |
| 845 |
shelp_search1 = UxCreateText( "shelp_search1", form2 ); |
| 846 |
separator2 = UxCreateSeparator( "separator2", form2 ); |
| 847 |
separator3 = UxCreateSeparator( "separator3", form2 ); |
| 848 |
label13 = UxCreateLabel( "label13", form2 ); |
| 849 |
label67 = UxCreateLabel( "label67", form2 ); |
| 850 |
tf_thres4 = UxCreateTextField( "tf_thres4", form2 ); |
| 851 |
pb_main_search16 = UxCreatePushButton( "pb_main_search16", form2 ); |
| 852 |
label68 = UxCreateLabel( "label68", form2 ); |
| 853 |
menu2_p6 = UxCreateRowColumn( "menu2_p6", form2 ); |
| 854 |
mn_tol_angstroms6 = UxCreatePushButtonGadget( "mn_tol_angstroms6", menu2_p6 ); |
| 855 |
mn_tol_pixels6 = UxCreatePushButtonGadget( "mn_tol_pixels6", menu2_p6 ); |
| 856 |
mn_tol6 = UxCreateRowColumn( "mn_tol6", form2 ); |
| 857 |
tf_thres12 = UxCreateTextField( "tf_thres12", form2 ); |
| 858 |
|
| 859 |
_Uxinit_SearchShell(); |
| 860 |
|
| 861 |
/* Create the X widgets */ |
| 862 |
|
| 863 |
UxCreateWidget( SearchShell ); |
| 864 |
UxCreateWidget( form2 ); |
| 865 |
UxPutLeftOffset( label9, 350 ); |
| 866 |
UxPutLeftAttachment( label9, "attach_form" ); |
| 867 |
UxPutTopOffset( label9, 160 ); |
| 868 |
UxPutTopAttachment( label9, "attach_form" ); |
| 869 |
UxCreateWidget( label9 ); |
| 870 |
|
| 871 |
UxPutLeftOffset( tf_ywidth1, 480 ); |
| 872 |
UxPutLeftAttachment( tf_ywidth1, "attach_form" ); |
| 873 |
UxPutTopOffset( tf_ywidth1, 160 ); |
| 874 |
UxPutTopAttachment( tf_ywidth1, "attach_form" ); |
| 875 |
UxCreateWidget( tf_ywidth1 ); |
| 876 |
|
| 877 |
UxPutLeftOffset( label10, 350 ); |
| 878 |
UxPutLeftAttachment( label10, "attach_form" ); |
| 879 |
UxPutTopOffset( label10, 120 ); |
| 880 |
UxPutTopAttachment( label10, "attach_form" ); |
| 881 |
UxCreateWidget( label10 ); |
| 882 |
|
| 883 |
UxPutLeftOffset( label11, 20 ); |
| 884 |
UxPutLeftAttachment( label11, "attach_form" ); |
| 885 |
UxPutTopOffset( label11, 120 ); |
| 886 |
UxPutTopAttachment( label11, "attach_form" ); |
| 887 |
UxCreateWidget( label11 ); |
| 888 |
|
| 889 |
UxPutLeftOffset( tf_ystep1, 480 ); |
| 890 |
UxPutLeftAttachment( tf_ystep1, "attach_form" ); |
| 891 |
UxPutTopOffset( tf_ystep1, 120 ); |
| 892 |
UxPutTopAttachment( tf_ystep1, "attach_form" ); |
| 893 |
UxCreateWidget( tf_ystep1 ); |
| 894 |
|
| 895 |
UxPutLeftOffset( tf_width1, 170 ); |
| 896 |
UxPutLeftAttachment( tf_width1, "attach_form" ); |
| 897 |
UxPutTopOffset( tf_width1, 160 ); |
| 898 |
UxPutTopAttachment( tf_width1, "attach_form" ); |
| 899 |
UxCreateWidget( tf_width1 ); |
| 900 |
|
| 901 |
UxPutLeftOffset( label12, 20 ); |
| 902 |
UxPutLeftAttachment( label12, "attach_form" ); |
| 903 |
UxPutTopOffset( label12, 80 ); |
| 904 |
UxPutTopAttachment( label12, "attach_form" ); |
| 905 |
UxCreateWidget( label12 ); |
| 906 |
|
| 907 |
UxPutLeftOffset( tf_thres1, 170 ); |
| 908 |
UxPutLeftAttachment( tf_thres1, "attach_form" ); |
| 909 |
UxPutTopOffset( tf_thres1, 120 ); |
| 910 |
UxPutTopAttachment( tf_thres1, "attach_form" ); |
| 911 |
UxCreateWidget( tf_thres1 ); |
| 912 |
|
| 913 |
UxCreateWidget( form4 ); |
| 914 |
UxCreateWidget( pb_search_search1 ); |
| 915 |
UxCreateWidget( pushButton1 ); |
| 916 |
UxCreateWidget( pb_search_plot6 ); |
| 917 |
UxCreateWidget( pb_search_plot7 ); |
| 918 |
UxCreateWidget( pb_search_plot8 ); |
| 919 |
UxPutRightOffset( shelp_search1, 5 ); |
| 920 |
UxPutRightAttachment( shelp_search1, "attach_form" ); |
| 921 |
UxPutLeftOffset( shelp_search1, 5 ); |
| 922 |
UxPutLeftAttachment( shelp_search1, "attach_form" ); |
| 923 |
UxCreateWidget( shelp_search1 ); |
| 924 |
|
| 925 |
UxPutRightOffset( separator2, 5 ); |
| 926 |
UxPutRightAttachment( separator2, "attach_form" ); |
| 927 |
UxPutLeftOffset( separator2, 5 ); |
| 928 |
UxPutLeftAttachment( separator2, "attach_form" ); |
| 929 |
UxCreateWidget( separator2 ); |
| 930 |
|
| 931 |
UxPutRightOffset( separator3, 5 ); |
| 932 |
UxPutRightAttachment( separator3, "attach_form" ); |
| 933 |
UxPutLeftOffset( separator3, 5 ); |
| 934 |
UxPutLeftAttachment( separator3, "attach_form" ); |
| 935 |
UxCreateWidget( separator3 ); |
| 936 |
|
| 937 |
UxPutLeftOffset( label13, 20 ); |
| 938 |
UxPutLeftAttachment( label13, "attach_form" ); |
| 939 |
UxPutTopOffset( label13, 160 ); |
| 940 |
UxPutTopAttachment( label13, "attach_form" ); |
| 941 |
UxCreateWidget( label13 ); |
| 942 |
|
| 943 |
UxPutLeftOffset( label67, 20 ); |
| 944 |
UxPutLeftAttachment( label67, "attach_form" ); |
| 945 |
UxPutTopOffset( label67, 20 ); |
| 946 |
UxPutTopAttachment( label67, "attach_form" ); |
| 947 |
UxPutBottomOffset( label67, 10 ); |
| 948 |
UxPutBottomAttachment( label67, "attach_none" ); |
| 949 |
UxCreateWidget( label67 ); |
| 950 |
|
| 951 |
UxPutTopOffset( tf_thres4, 20 ); |
| 952 |
UxPutTopAttachment( tf_thres4, "attach_form" ); |
| 953 |
UxPutBottomOffset( tf_thres4, 10 ); |
| 954 |
UxPutBottomAttachment( tf_thres4, "attach_none" ); |
| 955 |
UxCreateWidget( tf_thres4 ); |
| 956 |
|
| 957 |
UxPutTopOffset( pb_main_search16, 20 ); |
| 958 |
UxPutTopAttachment( pb_main_search16, "attach_form" ); |
| 959 |
UxPutBottomOffset( pb_main_search16, 10 ); |
| 960 |
UxPutBottomAttachment( pb_main_search16, "attach_none" ); |
| 961 |
UxCreateWidget( pb_main_search16 ); |
| 962 |
|
| 963 |
UxPutLeftOffset( label68, 350 ); |
| 964 |
UxPutLeftAttachment( label68, "attach_form" ); |
| 965 |
UxPutTopOffset( label68, 80 ); |
| 966 |
UxPutTopAttachment( label68, "attach_form" ); |
| 967 |
UxCreateWidget( label68 ); |
| 968 |
|
| 969 |
UxCreateWidget( menu2_p6 ); |
| 970 |
UxCreateWidget( mn_tol_angstroms6 ); |
| 971 |
UxCreateWidget( mn_tol_pixels6 ); |
| 972 |
UxPutLeftOffset( mn_tol6, 480 ); |
| 973 |
UxPutLeftAttachment( mn_tol6, "attach_form" ); |
| 974 |
UxPutTopOffset( mn_tol6, 80 ); |
| 975 |
UxPutSubMenuId( mn_tol6, "menu2_p6" ); |
| 976 |
UxCreateWidget( mn_tol6 ); |
| 977 |
|
| 978 |
UxCreateWidget( tf_thres12 ); |
| 979 |
|
| 980 |
UxAddCallback( tf_ywidth1, XmNlosingFocusCallback, |
| 981 |
losingFocusCB_tf_ywidth1, |
| 982 |
(XtPointer) UxSearchShellContext ); |
| 983 |
|
| 984 |
UxAddCallback( tf_ystep1, XmNlosingFocusCallback, |
| 985 |
losingFocusCB_tf_ystep1, |
| 986 |
(XtPointer) UxSearchShellContext ); |
| 987 |
|
| 988 |
UxAddCallback( tf_width1, XmNlosingFocusCallback, |
| 989 |
losingFocusCB_tf_width1, |
| 990 |
(XtPointer) UxSearchShellContext ); |
| 991 |
|
| 992 |
UxAddCallback( tf_thres1, XmNlosingFocusCallback, |
| 993 |
losingFocusCB_tf_thres1, |
| 994 |
(XtPointer) UxSearchShellContext ); |
| 995 |
|
| 996 |
UxAddCallback( pb_search_search1, XmNactivateCallback, |
| 997 |
activateCB_pb_search_search1, |
| 998 |
(XtPointer) UxSearchShellContext ); |
| 999 |
|
| 1000 |
UxAddCallback( pushButton1, XmNactivateCallback, |
| 1001 |
activateCB_pushButton1, |
| 1002 |
(XtPointer) UxSearchShellContext ); |
| 1003 |
|
| 1004 |
UxAddCallback( pb_search_plot6, XmNactivateCallback, |
| 1005 |
activateCB_pb_search_plot6, |
| 1006 |
(XtPointer) UxSearchShellContext ); |
| 1007 |
|
| 1008 |
UxAddCallback( pb_search_plot7, XmNactivateCallback, |
| 1009 |
activateCB_pb_search_plot7, |
| 1010 |
(XtPointer) UxSearchShellContext ); |
| 1011 |
|
| 1012 |
UxAddCallback( pb_search_plot8, XmNactivateCallback, |
| 1013 |
activateCB_pb_search_plot8, |
| 1014 |
(XtPointer) UxSearchShellContext ); |
| 1015 |
|
| 1016 |
UxAddCallback( tf_thres4, XmNlosingFocusCallback, |
| 1017 |
losingFocusCB_tf_thres4, |
| 1018 |
(XtPointer) UxSearchShellContext ); |
| 1019 |
|
| 1020 |
UxAddCallback( pb_main_search16, XmNactivateCallback, |
| 1021 |
activateCB_pb_main_search16, |
| 1022 |
(XtPointer) UxSearchShellContext ); |
| 1023 |
|
| 1024 |
UxAddCallback( mn_tol_angstroms6, XmNactivateCallback, |
| 1025 |
activateCB_mn_tol_angstroms6, |
| 1026 |
(XtPointer) UxSearchShellContext ); |
| 1027 |
|
| 1028 |
UxAddCallback( mn_tol_pixels6, XmNactivateCallback, |
| 1029 |
activateCB_mn_tol_pixels6, |
| 1030 |
(XtPointer) UxSearchShellContext ); |
| 1031 |
|
| 1032 |
UxAddCallback( tf_thres12, XmNlosingFocusCallback, |
| 1033 |
losingFocusCB_tf_thres12, |
| 1034 |
(XtPointer) UxSearchShellContext ); |
| 1035 |
|
| 1036 |
|
| 1037 |
/* Finally, call UxRealizeInterface to create the X windows |
| 1038 |
for the widgets created above. */ |
| 1039 |
|
| 1040 |
UxRealizeInterface( SearchShell ); |
| 1041 |
|
| 1042 |
return ( SearchShell ); |
| 1043 |
} |
| 1044 |
|
| 1045 |
/******************************************************************************* |
| 1046 |
The following function includes the code that was entered |
| 1047 |
in the 'Initial Code' and 'Final Code' sections of the |
| 1048 |
Declarations Editor. This function is called from the |
| 1049 |
'Interface function' below. |
| 1050 |
*******************************************************************************/ |
| 1051 |
|
| 1052 |
static swidget _Ux_create_SearchShell() |
| 1053 |
{ |
| 1054 |
swidget rtrn; |
| 1055 |
_UxCSearchShell *UxContext; |
| 1056 |
|
| 1057 |
UxSearchShellContext = UxContext = |
| 1058 |
(_UxCSearchShell *) UxMalloc( sizeof(_UxCSearchShell) ); |
| 1059 |
|
| 1060 |
rtrn = _Uxbuild_SearchShell(); |
| 1061 |
|
| 1062 |
return(rtrn); |
| 1063 |
} |
| 1064 |
|
| 1065 |
/******************************************************************************* |
| 1066 |
The following is the 'Interface function' which is the |
| 1067 |
external entry point for creating this interface. |
| 1068 |
This function should be called from your application or from |
| 1069 |
a callback function. |
| 1070 |
*******************************************************************************/ |
| 1071 |
|
| 1072 |
swidget create_SearchShell() |
| 1073 |
{ |
| 1074 |
swidget _Uxrtrn; |
| 1075 |
static int _Uxinit = 0; |
| 1076 |
|
| 1077 |
if ( ! _Uxinit ) |
| 1078 |
{ |
| 1079 |
static XtActionsRec _Uxactions[] = { |
| 1080 |
{ "WriteHelp", action_WriteHelp }, |
| 1081 |
{ "ClearHelp", action_ClearHelp }, |
| 1082 |
{ "ClearShort", action_ClearShort }, |
| 1083 |
{ "HelpShort", action_HelpShort }, |
| 1084 |
{ "ExtendedHelp", action_ExtendedHelp }, |
| 1085 |
{ "FileSelectACT", action_FileSelectACT } |
| 1086 |
}; |
| 1087 |
|
| 1088 |
XtAppAddActions( UxAppContext, |
| 1089 |
_Uxactions, |
| 1090 |
XtNumber(_Uxactions) ); |
| 1091 |
|
| 1092 |
_Uxinit = 1; |
| 1093 |
} |
| 1094 |
|
| 1095 |
_Uxrtrn = _Ux_create_SearchShell(); |
| 1096 |
|
| 1097 |
return ( _Uxrtrn ); |
| 1098 |
} |
| 1099 |
|
| 1100 |
/******************************************************************************* |
| 1101 |
END OF FILE |
| 1102 |
*******************************************************************************/ |
| 1103 |
|