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