| 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 |
/* .VERSION |
| 29 |
|
| 30 |
090819 last modif |
| 31 |
*/ |
| 32 |
|
| 33 |
|
| 34 |
/******************************************************************************* |
| 35 |
ApplicWindow.c |
| 36 |
|
| 37 |
*******************************************************************************/ |
| 38 |
|
| 39 |
#include <stdlib.h> |
| 40 |
#include <stdio.h> |
| 41 |
#include "UxLib.h" |
| 42 |
#include "UxLabel.h" |
| 43 |
#include "UxScList.h" |
| 44 |
#include "UxScrW.h" |
| 45 |
#include "UxText.h" |
| 46 |
#include "UxPushB.h" |
| 47 |
#include "UxForm.h" |
| 48 |
#include "UxCascB.h" |
| 49 |
#include "UxSep.h" |
| 50 |
#include "UxPushBG.h" |
| 51 |
#include "UxRowCol.h" |
| 52 |
#include "UxMainW.h" |
| 53 |
#include "UxApplSh.h" |
| 54 |
|
| 55 |
#include <spec_comm.h> |
| 56 |
|
| 57 |
|
| 58 |
/* parameters for identification */ |
| 59 |
#define IDBEGIN 0 |
| 60 |
#define IDCONT 1 |
| 61 |
|
| 62 |
/* label or no label the spectrum representing the starting line */ |
| 63 |
#define LABEL_SPEC 0 |
| 64 |
#define NO_LABEL 1 |
| 65 |
|
| 66 |
|
| 67 |
void ident_line(), delete_idents(); |
| 68 |
void show_current_idents(), redraw_plot(); |
| 69 |
|
| 70 |
void read_params_long(); |
| 71 |
int read_lincat_table(), read_line_x(); |
| 72 |
int SCTPUT(); |
| 73 |
int plot_spec(); |
| 74 |
void display_lincat_table(), get_wlc_value(); |
| 75 |
void cutx_spectrum(), cuty_spectrum(), shift_spectrum(); |
| 76 |
void unzoom_spectrum(), getcur_spectrum(), end_gmidas(); |
| 77 |
void AppendDialogText(), DisplayShortHelp(), DisplayExtendedHelp(); |
| 78 |
|
| 79 |
|
| 80 |
/******************************************************************************* |
| 81 |
Includes, Defines, and Global variables from the Declarations Editor: |
| 82 |
*******************************************************************************/ |
| 83 |
|
| 84 |
#include <ExternResources.h> |
| 85 |
|
| 86 |
/******************************************************************************* |
| 87 |
The definition of the context structure: |
| 88 |
If you create multiple instances of your interface, the context |
| 89 |
structure ensures that your callbacks use the variables for the |
| 90 |
correct instance. |
| 91 |
|
| 92 |
For each swidget in the interface, each argument to the Interface |
| 93 |
function, and each variable in the Instance Specific section of the |
| 94 |
Declarations Editor, there is an entry in the context structure. |
| 95 |
and a #define. The #define makes the variable name refer to the |
| 96 |
corresponding entry in the context structure. |
| 97 |
*******************************************************************************/ |
| 98 |
|
| 99 |
typedef struct |
| 100 |
{ |
| 101 |
swidget UxApplicWindow; |
| 102 |
swidget UxMainWindow; |
| 103 |
swidget Uxmenu3; |
| 104 |
swidget Uxmenu3_p2; |
| 105 |
swidget Uxmenu3_p2_b1; |
| 106 |
swidget Uxmenu3_p2_b2; |
| 107 |
swidget Uxmenu3_p2_b3; |
| 108 |
swidget Uxmenu3_p2_b4; |
| 109 |
swidget Uxmenu3_p2_b5; |
| 110 |
swidget Uxmenu3_p2_b7; |
| 111 |
swidget Uxmenu3_p2_b8; |
| 112 |
swidget Uxmenu3_top_b2; |
| 113 |
swidget Uxmenu3_p3; |
| 114 |
swidget Uxmenu3_p3_b1; |
| 115 |
swidget Uxmenu3_p3_b2; |
| 116 |
swidget Uxmenu3_p3_b3; |
| 117 |
swidget Uxmenu3_top_b3; |
| 118 |
swidget Uxmenu3_p4; |
| 119 |
swidget Uxmenu_help_window; |
| 120 |
swidget Uxmenu3_top_b4; |
| 121 |
swidget Uxform3; |
| 122 |
swidget Uxform2; |
| 123 |
swidget Uxpb_begin; |
| 124 |
swidget Uxpb_continue; |
| 125 |
swidget Uxpb_delete; |
| 126 |
swidget Uxseparator1; |
| 127 |
swidget UxSHelp; |
| 128 |
swidget UxscrolledWindow1; |
| 129 |
swidget Uxls_lincat; |
| 130 |
swidget Uxlabel1; |
| 131 |
} _UxCApplicWindow; |
| 132 |
|
| 133 |
#define ApplicWindow UxApplicWindowContext->UxApplicWindow |
| 134 |
#define MainWindow UxApplicWindowContext->UxMainWindow |
| 135 |
#define menu3 UxApplicWindowContext->Uxmenu3 |
| 136 |
#define menu3_p2 UxApplicWindowContext->Uxmenu3_p2 |
| 137 |
#define menu3_p2_b1 UxApplicWindowContext->Uxmenu3_p2_b1 |
| 138 |
#define menu3_p2_b2 UxApplicWindowContext->Uxmenu3_p2_b2 |
| 139 |
#define menu3_p2_b3 UxApplicWindowContext->Uxmenu3_p2_b3 |
| 140 |
#define menu3_p2_b4 UxApplicWindowContext->Uxmenu3_p2_b4 |
| 141 |
#define menu3_p2_b5 UxApplicWindowContext->Uxmenu3_p2_b5 |
| 142 |
#define menu3_p2_b7 UxApplicWindowContext->Uxmenu3_p2_b7 |
| 143 |
#define menu3_p2_b8 UxApplicWindowContext->Uxmenu3_p2_b8 |
| 144 |
#define menu3_top_b2 UxApplicWindowContext->Uxmenu3_top_b2 |
| 145 |
#define menu3_p3 UxApplicWindowContext->Uxmenu3_p3 |
| 146 |
#define menu3_p3_b1 UxApplicWindowContext->Uxmenu3_p3_b1 |
| 147 |
#define menu3_p3_b2 UxApplicWindowContext->Uxmenu3_p3_b2 |
| 148 |
#define menu3_p3_b3 UxApplicWindowContext->Uxmenu3_p3_b3 |
| 149 |
#define menu3_top_b3 UxApplicWindowContext->Uxmenu3_top_b3 |
| 150 |
#define menu3_p4 UxApplicWindowContext->Uxmenu3_p4 |
| 151 |
#define menu_help_window UxApplicWindowContext->Uxmenu_help_window |
| 152 |
#define menu3_top_b4 UxApplicWindowContext->Uxmenu3_top_b4 |
| 153 |
#define form3 UxApplicWindowContext->Uxform3 |
| 154 |
#define form2 UxApplicWindowContext->Uxform2 |
| 155 |
#define pb_begin UxApplicWindowContext->Uxpb_begin |
| 156 |
#define pb_continue UxApplicWindowContext->Uxpb_continue |
| 157 |
#define pb_delete UxApplicWindowContext->Uxpb_delete |
| 158 |
#define separator1 UxApplicWindowContext->Uxseparator1 |
| 159 |
#define SHelp UxApplicWindowContext->UxSHelp |
| 160 |
#define scrolledWindow1 UxApplicWindowContext->UxscrolledWindow1 |
| 161 |
#define ls_lincat UxApplicWindowContext->Uxls_lincat |
| 162 |
#define label1 UxApplicWindowContext->Uxlabel1 |
| 163 |
|
| 164 |
static _UxCApplicWindow *UxApplicWindowContext; |
| 165 |
|
| 166 |
|
| 167 |
/******************************************************************************* |
| 168 |
Forward declarations of functions that are defined later in this file. |
| 169 |
*******************************************************************************/ |
| 170 |
|
| 171 |
swidget create_ApplicWindow(); |
| 172 |
|
| 173 |
/******************************************************************************* |
| 174 |
The following are Action functions. |
| 175 |
*******************************************************************************/ |
| 176 |
|
| 177 |
static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 178 |
Widget UxWidget; |
| 179 |
XEvent *UxEvent; |
| 180 |
String *UxParams; |
| 181 |
Cardinal *p_UxNumParams; |
| 182 |
{ |
| 183 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 184 |
swidget UxThisWidget; |
| 185 |
|
| 186 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 187 |
UxSaveCtx = UxApplicWindowContext; |
| 188 |
UxApplicWindowContext = UxContext = |
| 189 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 190 |
{ |
| 191 |
UxPutText(SHelp, ""); |
| 192 |
} |
| 193 |
UxApplicWindowContext = UxSaveCtx; |
| 194 |
} |
| 195 |
|
| 196 |
static void action_ExtendedHelp( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 197 |
Widget UxWidget; |
| 198 |
XEvent *UxEvent; |
| 199 |
String *UxParams; |
| 200 |
Cardinal *p_UxNumParams; |
| 201 |
{ |
| 202 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 203 |
swidget UxThisWidget; |
| 204 |
|
| 205 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 206 |
UxSaveCtx = UxApplicWindowContext; |
| 207 |
UxApplicWindowContext = UxContext = |
| 208 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 209 |
{ |
| 210 |
DisplayExtendedHelp(UxWidget); |
| 211 |
} |
| 212 |
UxApplicWindowContext = UxSaveCtx; |
| 213 |
} |
| 214 |
|
| 215 |
static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams ) |
| 216 |
Widget UxWidget; |
| 217 |
XEvent *UxEvent; |
| 218 |
String *UxParams; |
| 219 |
Cardinal *p_UxNumParams; |
| 220 |
{ |
| 221 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 222 |
swidget UxThisWidget; |
| 223 |
|
| 224 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 225 |
UxSaveCtx = UxApplicWindowContext; |
| 226 |
UxApplicWindowContext = UxContext = |
| 227 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 228 |
{ |
| 229 |
DisplayShortHelp(UxWidget); |
| 230 |
} |
| 231 |
UxApplicWindowContext = UxSaveCtx; |
| 232 |
} |
| 233 |
|
| 234 |
/******************************************************************************* |
| 235 |
The following are callback functions. |
| 236 |
*******************************************************************************/ |
| 237 |
|
| 238 |
static void activateCB_menu3_p2_b1( UxWidget, UxClientData, UxCallbackArg ) |
| 239 |
Widget UxWidget; |
| 240 |
XtPointer UxClientData, UxCallbackArg; |
| 241 |
{ |
| 242 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 243 |
swidget UxThisWidget; |
| 244 |
|
| 245 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 246 |
UxSaveCtx = UxApplicWindowContext; |
| 247 |
UxApplicWindowContext = UxContext = |
| 248 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 249 |
cutx_spectrum(); |
| 250 |
UxApplicWindowContext = UxSaveCtx; |
| 251 |
} |
| 252 |
|
| 253 |
static void activateCB_menu3_p2_b2( UxWidget, UxClientData, UxCallbackArg ) |
| 254 |
Widget UxWidget; |
| 255 |
XtPointer UxClientData, UxCallbackArg; |
| 256 |
{ |
| 257 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 258 |
swidget UxThisWidget; |
| 259 |
|
| 260 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 261 |
UxSaveCtx = UxApplicWindowContext; |
| 262 |
UxApplicWindowContext = UxContext = |
| 263 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 264 |
cuty_spectrum(); |
| 265 |
UxApplicWindowContext = UxSaveCtx; |
| 266 |
} |
| 267 |
|
| 268 |
static void activateCB_menu3_p2_b3( UxWidget, UxClientData, UxCallbackArg ) |
| 269 |
Widget UxWidget; |
| 270 |
XtPointer UxClientData, UxCallbackArg; |
| 271 |
{ |
| 272 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 273 |
swidget UxThisWidget; |
| 274 |
|
| 275 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 276 |
UxSaveCtx = UxApplicWindowContext; |
| 277 |
UxApplicWindowContext = UxContext = |
| 278 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 279 |
shift_spectrum(); |
| 280 |
UxApplicWindowContext = UxSaveCtx; |
| 281 |
} |
| 282 |
|
| 283 |
static void activateCB_menu3_p2_b4( UxWidget, UxClientData, UxCallbackArg ) |
| 284 |
Widget UxWidget; |
| 285 |
XtPointer UxClientData, UxCallbackArg; |
| 286 |
{ |
| 287 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 288 |
swidget UxThisWidget; |
| 289 |
|
| 290 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 291 |
UxSaveCtx = UxApplicWindowContext; |
| 292 |
UxApplicWindowContext = UxContext = |
| 293 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 294 |
unzoom_spectrum(); |
| 295 |
UxApplicWindowContext = UxSaveCtx; |
| 296 |
} |
| 297 |
|
| 298 |
static void activateCB_menu3_p2_b5( UxWidget, UxClientData, UxCallbackArg ) |
| 299 |
Widget UxWidget; |
| 300 |
XtPointer UxClientData, UxCallbackArg; |
| 301 |
{ |
| 302 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 303 |
swidget UxThisWidget; |
| 304 |
|
| 305 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 306 |
UxSaveCtx = UxApplicWindowContext; |
| 307 |
UxApplicWindowContext = UxContext = |
| 308 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 309 |
getcur_spectrum(); |
| 310 |
UxApplicWindowContext = UxSaveCtx; |
| 311 |
} |
| 312 |
|
| 313 |
static void activateCB_menu3_p2_b8( UxWidget, UxClientData, UxCallbackArg ) |
| 314 |
Widget UxWidget; |
| 315 |
XtPointer UxClientData, UxCallbackArg; |
| 316 |
{ |
| 317 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 318 |
swidget UxThisWidget; |
| 319 |
|
| 320 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 321 |
UxSaveCtx = UxApplicWindowContext; |
| 322 |
UxApplicWindowContext = UxContext = |
| 323 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 324 |
{ |
| 325 |
AppendDialogText("select/tab 'LINTAB' all"); |
| 326 |
end_gmidas(); |
| 327 |
exit(0); |
| 328 |
} |
| 329 |
UxApplicWindowContext = UxSaveCtx; |
| 330 |
} |
| 331 |
|
| 332 |
static void activateCB_menu3_p3_b1( UxWidget, UxClientData, UxCallbackArg ) |
| 333 |
Widget UxWidget; |
| 334 |
XtPointer UxClientData, UxCallbackArg; |
| 335 |
{ |
| 336 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 337 |
swidget UxThisWidget; |
| 338 |
|
| 339 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 340 |
UxSaveCtx = UxApplicWindowContext; |
| 341 |
UxApplicWindowContext = UxContext = |
| 342 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 343 |
AppendDialogText("graph/long"); |
| 344 |
UxApplicWindowContext = UxSaveCtx; |
| 345 |
} |
| 346 |
|
| 347 |
static void activateCB_menu3_p3_b2( UxWidget, UxClientData, UxCallbackArg ) |
| 348 |
Widget UxWidget; |
| 349 |
XtPointer UxClientData, UxCallbackArg; |
| 350 |
{ |
| 351 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 352 |
swidget UxThisWidget; |
| 353 |
|
| 354 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 355 |
UxSaveCtx = UxApplicWindowContext; |
| 356 |
UxApplicWindowContext = UxContext = |
| 357 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 358 |
AppendDialogText("copy/graphic laser"); |
| 359 |
UxApplicWindowContext = UxSaveCtx; |
| 360 |
} |
| 361 |
|
| 362 |
static void activateCB_menu3_p3_b3( UxWidget, UxClientData, UxCallbackArg ) |
| 363 |
Widget UxWidget; |
| 364 |
XtPointer UxClientData, UxCallbackArg; |
| 365 |
{ |
| 366 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 367 |
swidget UxThisWidget; |
| 368 |
|
| 369 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 370 |
UxSaveCtx = UxApplicWindowContext; |
| 371 |
UxApplicWindowContext = UxContext = |
| 372 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 373 |
AppendDialogText("reset/display"); |
| 374 |
UxApplicWindowContext = UxSaveCtx; |
| 375 |
} |
| 376 |
|
| 377 |
static void activateCB_menu_help_window( UxWidget, UxClientData, UxCallbackArg ) |
| 378 |
Widget UxWidget; |
| 379 |
XtPointer UxClientData, UxCallbackArg; |
| 380 |
{ |
| 381 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 382 |
swidget UxThisWidget; |
| 383 |
|
| 384 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 385 |
UxSaveCtx = UxApplicWindowContext; |
| 386 |
UxApplicWindowContext = UxContext = |
| 387 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 388 |
DisplayExtendedHelp(UxWidget); |
| 389 |
UxApplicWindowContext = UxSaveCtx; |
| 390 |
} |
| 391 |
|
| 392 |
static void activateCB_pb_begin( UxWidget, UxClientData, UxCallbackArg ) |
| 393 |
Widget UxWidget; |
| 394 |
XtPointer UxClientData, UxCallbackArg; |
| 395 |
{ |
| 396 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 397 |
swidget UxThisWidget; |
| 398 |
|
| 399 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 400 |
UxSaveCtx = UxApplicWindowContext; |
| 401 |
UxApplicWindowContext = UxContext = |
| 402 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 403 |
{ |
| 404 |
|
| 405 |
|
| 406 |
extern int NumLincatPos; /* cardinality of LincatPos[] */ |
| 407 |
extern int NumWlcPos; /* cardinality of WlcPos[] */ |
| 408 |
extern int IdentBegin; |
| 409 |
|
| 410 |
NumLincatPos = NumWlcPos = 0; |
| 411 |
|
| 412 |
AppendDialogText(C_SELINE); |
| 413 |
read_params_long(); |
| 414 |
if ( ! read_lincat_table() ) |
| 415 |
return; |
| 416 |
|
| 417 |
if ( !read_line_x(IDBEGIN) ) { /* :X of line table */ |
| 418 |
SCTPUT( "*** Lines have not been searched ***" ); |
| 419 |
return; |
| 420 |
} |
| 421 |
|
| 422 |
if ( !plot_spec(LABEL_SPEC) ) /* plot 'WLC(Ystart)' */ |
| 423 |
return; |
| 424 |
IdentBegin = TRUE; |
| 425 |
|
| 426 |
get_wlc_value(); |
| 427 |
|
| 428 |
display_lincat_table(UxGetWidget(UxFindSwidget("ls_lincat"))); |
| 429 |
} |
| 430 |
UxApplicWindowContext = UxSaveCtx; |
| 431 |
} |
| 432 |
|
| 433 |
static void activateCB_pb_continue( UxWidget, UxClientData, UxCallbackArg ) |
| 434 |
Widget UxWidget; |
| 435 |
XtPointer UxClientData, UxCallbackArg; |
| 436 |
{ |
| 437 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 438 |
swidget UxThisWidget; |
| 439 |
|
| 440 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 441 |
UxSaveCtx = UxApplicWindowContext; |
| 442 |
UxApplicWindowContext = UxContext = |
| 443 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 444 |
{ |
| 445 |
|
| 446 |
extern int NumWlcPos, NumLincatPos; |
| 447 |
extern int IdentBegin; |
| 448 |
|
| 449 |
NumWlcPos = NumLincatPos = 0; |
| 450 |
|
| 451 |
AppendDialogText(C_SELINE); |
| 452 |
read_params_long(); |
| 453 |
if ( ! read_lincat_table() ) |
| 454 |
return; |
| 455 |
|
| 456 |
if ( !read_line_x(IDCONT) ) { /* :X of line table */ |
| 457 |
SCTPUT( "*** Lines have not been searched ***" ); |
| 458 |
return; |
| 459 |
} |
| 460 |
|
| 461 |
if ( !IdentBegin ) { |
| 462 |
if ( !plot_spec(LABEL_SPEC) ) /* plot 'WLC(Ystart)' */ |
| 463 |
return; |
| 464 |
} |
| 465 |
else |
| 466 |
redraw_plot(); |
| 467 |
|
| 468 |
show_current_idents(); |
| 469 |
get_wlc_value(); |
| 470 |
|
| 471 |
display_lincat_table(UxGetWidget(UxFindSwidget("ls_lincat"))); |
| 472 |
|
| 473 |
IdentBegin = TRUE; |
| 474 |
} |
| 475 |
UxApplicWindowContext = UxSaveCtx; |
| 476 |
} |
| 477 |
|
| 478 |
static void activateCB_pb_delete( UxWidget, UxClientData, UxCallbackArg ) |
| 479 |
Widget UxWidget; |
| 480 |
XtPointer UxClientData, UxCallbackArg; |
| 481 |
{ |
| 482 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 483 |
swidget UxThisWidget; |
| 484 |
|
| 485 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 486 |
UxSaveCtx = UxApplicWindowContext; |
| 487 |
UxApplicWindowContext = UxContext = |
| 488 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 489 |
{ |
| 490 |
|
| 491 |
extern int NumWlcPos, NumLincatPos; |
| 492 |
extern int IdentBegin; |
| 493 |
|
| 494 |
NumWlcPos = NumLincatPos = 0; |
| 495 |
|
| 496 |
AppendDialogText(C_SELINE); |
| 497 |
read_params_long(); |
| 498 |
if ( ! read_lincat_table() ) |
| 499 |
return; |
| 500 |
|
| 501 |
if ( !read_line_x(IDCONT) ) { /* :X of line table */ |
| 502 |
SCTPUT( "*** Lines have not been searched ***" ); |
| 503 |
return; |
| 504 |
} |
| 505 |
|
| 506 |
if ( !IdentBegin ) { |
| 507 |
if ( !plot_spec(LABEL_SPEC) ) /* plot 'WLC(Ystart)' */ |
| 508 |
return; |
| 509 |
} |
| 510 |
else |
| 511 |
redraw_plot(); |
| 512 |
|
| 513 |
show_current_idents(); |
| 514 |
delete_idents(); |
| 515 |
|
| 516 |
IdentBegin = TRUE; |
| 517 |
} |
| 518 |
UxApplicWindowContext = UxSaveCtx; |
| 519 |
} |
| 520 |
|
| 521 |
static void browseSelectionCB_ls_lincat( UxWidget, UxClientData, UxCallbackArg ) |
| 522 |
Widget UxWidget; |
| 523 |
XtPointer UxClientData, UxCallbackArg; |
| 524 |
{ |
| 525 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 526 |
swidget UxThisWidget; |
| 527 |
|
| 528 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 529 |
UxSaveCtx = UxApplicWindowContext; |
| 530 |
UxApplicWindowContext = UxContext = |
| 531 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 532 |
{ |
| 533 |
char *choice; |
| 534 |
int i; |
| 535 |
float item_value; |
| 536 |
XmListCallbackStruct *cbs; |
| 537 |
|
| 538 |
extern int NumLincatPos, NumWlcPos; |
| 539 |
extern float LincatPos[]; |
| 540 |
|
| 541 |
cbs = (XmListCallbackStruct *)UxCallbackArg; |
| 542 |
|
| 543 |
if ( NumLincatPos == NumWlcPos ) /* Noclick in graphic window */ |
| 544 |
return; |
| 545 |
|
| 546 |
XmStringGetLtoR(cbs->item, XmSTRING_DEFAULT_CHARSET, &choice); |
| 547 |
|
| 548 |
sscanf( choice, "%f", &item_value ); |
| 549 |
|
| 550 |
for ( i = NumLincatPos-1; i >= 0; i-- ) |
| 551 |
if ( item_value == LincatPos[i] ) /* value already selected */ |
| 552 |
return; |
| 553 |
|
| 554 |
LincatPos[NumLincatPos] = item_value; |
| 555 |
NumLincatPos++; |
| 556 |
|
| 557 |
|
| 558 |
ident_line(); /* Ident wavelength in line table */ |
| 559 |
get_wlc_value(); /* let's go to graphic window again */ |
| 560 |
|
| 561 |
XtFree(choice); |
| 562 |
} |
| 563 |
UxApplicWindowContext = UxSaveCtx; |
| 564 |
} |
| 565 |
|
| 566 |
static void createCB_ls_lincat( UxWidget, UxClientData, UxCallbackArg ) |
| 567 |
Widget UxWidget; |
| 568 |
XtPointer UxClientData, UxCallbackArg; |
| 569 |
{ |
| 570 |
_UxCApplicWindow *UxSaveCtx, *UxContext; |
| 571 |
swidget UxThisWidget; |
| 572 |
|
| 573 |
UxThisWidget = UxWidgetToSwidget( UxWidget ); |
| 574 |
UxSaveCtx = UxApplicWindowContext; |
| 575 |
UxApplicWindowContext = UxContext = |
| 576 |
(_UxCApplicWindow *) UxGetContext( UxThisWidget ); |
| 577 |
{ |
| 578 |
display_lincat_table(UxWidget); |
| 579 |
} |
| 580 |
UxApplicWindowContext = UxSaveCtx; |
| 581 |
} |
| 582 |
|
| 583 |
/******************************************************************************* |
| 584 |
The 'init_' function sets the private properties for all the |
| 585 |
swidgets to the values specified in the Property Table. |
| 586 |
Some properties need to be set after the X widgets have been |
| 587 |
created and the setting of these properties is done in the |
| 588 |
'build_' function after the UxCreateWidget call. |
| 589 |
*******************************************************************************/ |
| 590 |
|
| 591 |
static void _Uxinit_ApplicWindow() |
| 592 |
{ |
| 593 |
UxPutBackground( ApplicWindow, ApplicBackground ); |
| 594 |
UxPutTitle( ApplicWindow, "Lines Identification" ); |
| 595 |
UxPutKeyboardFocusPolicy( ApplicWindow, "pointer" ); |
| 596 |
UxPutIconName( ApplicWindow, "Lines Identification" ); |
| 597 |
UxPutHeight( ApplicWindow, 476 ); |
| 598 |
UxPutWidth( ApplicWindow, 367 ); |
| 599 |
UxPutY( ApplicWindow, 6 ); |
| 600 |
UxPutX( ApplicWindow, 6 ); |
| 601 |
|
| 602 |
UxPutBackground( MainWindow, WindowBackground ); |
| 603 |
UxPutHeight( MainWindow, 470 ); |
| 604 |
UxPutWidth( MainWindow, 400 ); |
| 605 |
UxPutY( MainWindow, 0 ); |
| 606 |
UxPutX( MainWindow, 0 ); |
| 607 |
UxPutUnitType( MainWindow, "pixels" ); |
| 608 |
|
| 609 |
UxPutBackground( menu3, MenuBackground ); |
| 610 |
UxPutMenuAccelerator( menu3, "<KeyUp>F10" ); |
| 611 |
UxPutRowColumnType( menu3, "menu_bar" ); |
| 612 |
|
| 613 |
UxPutForeground( menu3_p2, MenuForeground ); |
| 614 |
UxPutBackground( menu3_p2, MenuBackground ); |
| 615 |
UxPutRowColumnType( menu3_p2, "menu_pulldown" ); |
| 616 |
|
| 617 |
UxPutFontList( menu3_p2_b1, BoldTextFont ); |
| 618 |
UxPutMnemonic( menu3_p2_b1, "x" ); |
| 619 |
UxPutLabelString( menu3_p2_b1, "Cut x" ); |
| 620 |
|
| 621 |
UxPutFontList( menu3_p2_b2, BoldTextFont ); |
| 622 |
UxPutMnemonic( menu3_p2_b2, "y" ); |
| 623 |
UxPutLabelString( menu3_p2_b2, "Cut y" ); |
| 624 |
|
| 625 |
UxPutFontList( menu3_p2_b3, BoldTextFont ); |
| 626 |
UxPutMnemonic( menu3_p2_b3, "S" ); |
| 627 |
UxPutLabelString( menu3_p2_b3, "Scroll" ); |
| 628 |
|
| 629 |
UxPutFontList( menu3_p2_b4, BoldTextFont ); |
| 630 |
UxPutMnemonic( menu3_p2_b4, "U" ); |
| 631 |
UxPutLabelString( menu3_p2_b4, "Unzoom" ); |
| 632 |
|
| 633 |
UxPutFontList( menu3_p2_b5, BoldTextFont ); |
| 634 |
UxPutMnemonic( menu3_p2_b5, "G" ); |
| 635 |
UxPutLabelString( menu3_p2_b5, "Get cursor" ); |
| 636 |
|
| 637 |
UxPutFontList( menu3_p2_b8, BoldTextFont ); |
| 638 |
UxPutAccelerator( menu3_p2_b8, "E" ); |
| 639 |
UxPutLabelString( menu3_p2_b8, "Exit" ); |
| 640 |
|
| 641 |
UxPutForeground( menu3_top_b2, MenuForeground ); |
| 642 |
UxPutFontList( menu3_top_b2, BoldTextFont ); |
| 643 |
UxPutBackground( menu3_top_b2, MenuBackground ); |
| 644 |
UxPutMnemonic( menu3_top_b2, "F" ); |
| 645 |
UxPutLabelString( menu3_top_b2, "Frame" ); |
| 646 |
|
| 647 |
UxPutForeground( menu3_p3, MenuForeground ); |
| 648 |
UxPutBackground( menu3_p3, MenuBackground ); |
| 649 |
UxPutRowColumnType( menu3_p3, "menu_pulldown" ); |
| 650 |
|
| 651 |
UxPutFontList( menu3_p3_b1, BoldTextFont ); |
| 652 |
UxPutMnemonic( menu3_p3_b1, "C" ); |
| 653 |
UxPutLabelString( menu3_p3_b1, "Create graphics" ); |
| 654 |
|
| 655 |
UxPutFontList( menu3_p3_b2, BoldTextFont ); |
| 656 |
UxPutMnemonic( menu3_p3_b2, "P" ); |
| 657 |
UxPutLabelString( menu3_p3_b2, "Print graphics" ); |
| 658 |
|
| 659 |
UxPutFontList( menu3_p3_b3, BoldTextFont ); |
| 660 |
UxPutMnemonic( menu3_p3_b3, "R" ); |
| 661 |
UxPutLabelString( menu3_p3_b3, "Reset graphics" ); |
| 662 |
|
| 663 |
UxPutForeground( menu3_top_b3, MenuForeground ); |
| 664 |
UxPutFontList( menu3_top_b3, BoldTextFont ); |
| 665 |
UxPutBackground( menu3_top_b3, MenuBackground ); |
| 666 |
UxPutMnemonic( menu3_top_b3, "U" ); |
| 667 |
UxPutLabelString( menu3_top_b3, "Utils" ); |
| 668 |
|
| 669 |
UxPutForeground( menu3_p4, MenuForeground ); |
| 670 |
UxPutBackground( menu3_p4, MenuBackground ); |
| 671 |
UxPutRowColumnType( menu3_p4, "menu_pulldown" ); |
| 672 |
|
| 673 |
UxPutFontList( menu_help_window, BoldTextFont ); |
| 674 |
UxPutMnemonic( menu_help_window, "W" ); |
| 675 |
UxPutLabelString( menu_help_window, "On Window ..." ); |
| 676 |
|
| 677 |
UxPutForeground( menu3_top_b4, MenuForeground ); |
| 678 |
UxPutFontList( menu3_top_b4, BoldTextFont ); |
| 679 |
UxPutBackground( menu3_top_b4, MenuBackground ); |
| 680 |
UxPutMnemonic( menu3_top_b4, "H" ); |
| 681 |
UxPutLabelString( menu3_top_b4, "Help" ); |
| 682 |
|
| 683 |
UxPutY( form3, 34 ); |
| 684 |
UxPutBackground( form3, WindowBackground ); |
| 685 |
|
| 686 |
UxPutBackground( form2, ButtonBackground ); |
| 687 |
UxPutHeight( form2, 42 ); |
| 688 |
UxPutWidth( form2, 368 ); |
| 689 |
UxPutY( form2, 400 ); |
| 690 |
UxPutX( form2, -2 ); |
| 691 |
UxPutResizePolicy( form2, "resize_none" ); |
| 692 |
|
| 693 |
UxPutHighlightOnEnter( pb_begin, "true" ); |
| 694 |
UxPutLabelString( pb_begin, "begin" ); |
| 695 |
UxPutFontList( pb_begin, BoldTextFont ); |
| 696 |
UxPutForeground( pb_begin, ButtonForeground ); |
| 697 |
UxPutBackground( pb_begin, ButtonBackground ); |
| 698 |
UxPutHeight( pb_begin, 30 ); |
| 699 |
UxPutWidth( pb_begin, 85 ); |
| 700 |
UxPutY( pb_begin, 5 ); |
| 701 |
UxPutX( pb_begin, 5 ); |
| 702 |
|
| 703 |
UxPutHighlightOnEnter( pb_continue, "true" ); |
| 704 |
UxPutLabelString( pb_continue, "continue" ); |
| 705 |
UxPutFontList( pb_continue, BoldTextFont ); |
| 706 |
UxPutForeground( pb_continue, ButtonForeground ); |
| 707 |
UxPutBackground( pb_continue, ButtonBackground ); |
| 708 |
UxPutHeight( pb_continue, 30 ); |
| 709 |
UxPutWidth( pb_continue, 85 ); |
| 710 |
UxPutY( pb_continue, 5 ); |
| 711 |
UxPutX( pb_continue, 94 ); |
| 712 |
|
| 713 |
UxPutHighlightOnEnter( pb_delete, "true" ); |
| 714 |
UxPutLabelString( pb_delete, "delete" ); |
| 715 |
UxPutFontList( pb_delete, BoldTextFont ); |
| 716 |
UxPutForeground( pb_delete, ButtonForeground ); |
| 717 |
UxPutBackground( pb_delete, ButtonBackground ); |
| 718 |
UxPutHeight( pb_delete, 30 ); |
| 719 |
UxPutWidth( pb_delete, 85 ); |
| 720 |
UxPutY( pb_delete, 5 ); |
| 721 |
UxPutX( pb_delete, 184 ); |
| 722 |
|
| 723 |
UxPutBackground( separator1, WindowBackground ); |
| 724 |
UxPutHeight( separator1, 6 ); |
| 725 |
UxPutWidth( separator1, 372 ); |
| 726 |
UxPutY( separator1, 394 ); |
| 727 |
UxPutX( separator1, -2 ); |
| 728 |
|
| 729 |
UxPutFontList( SHelp, TextFont ); |
| 730 |
UxPutEditable( SHelp, "false" ); |
| 731 |
UxPutCursorPositionVisible( SHelp, "false" ); |
| 732 |
UxPutBackground( SHelp, SHelpBackground ); |
| 733 |
UxPutHeight( SHelp, 50 ); |
| 734 |
UxPutWidth( SHelp, 368 ); |
| 735 |
UxPutY( SHelp, 346 ); |
| 736 |
UxPutX( SHelp, 0 ); |
| 737 |
|
| 738 |
UxPutBackground( scrolledWindow1, ListBackground ); |
| 739 |
UxPutScrollBarPlacement( scrolledWindow1, "bottom_left" ); |
| 740 |
UxPutShadowThickness( scrolledWindow1, 0 ); |
| 741 |
UxPutScrollBarDisplayPolicy( scrolledWindow1, "static" ); |
| 742 |
UxPutVisualPolicy( scrolledWindow1, "variable" ); |
| 743 |
UxPutY( scrolledWindow1, 35 ); |
| 744 |
UxPutX( scrolledWindow1, 0 ); |
| 745 |
UxPutScrollingPolicy( scrolledWindow1, "application_defined" ); |
| 746 |
|
| 747 |
UxPutForeground( ls_lincat, ListForeground ); |
| 748 |
UxPutFontList( ls_lincat, SmallFont ); |
| 749 |
UxPutBackground( ls_lincat, ListBackground ); |
| 750 |
UxPutVisibleItemCount( ls_lincat, 18 ); |
| 751 |
UxPutScrollBarDisplayPolicy( ls_lincat, "static" ); |
| 752 |
UxPutListSizePolicy( ls_lincat, "constant" ); |
| 753 |
UxPutHeight( ls_lincat, 295 ); |
| 754 |
UxPutWidth( ls_lincat, 346 ); |
| 755 |
|
| 756 |
UxPutForeground( label1, TextForeground ); |
| 757 |
UxPutBackground( label1, WindowBackground ); |
| 758 |
UxPutAlignment( label1, "alignment_beginning" ); |
| 759 |
UxPutLabelString( label1, " Wavelength Intensity ION" ); |
| 760 |
UxPutFontList( label1, BoldTextFont ); |
| 761 |
UxPutHeight( label1, 35 ); |
| 762 |
UxPutWidth( label1, 365 ); |
| 763 |
UxPutY( label1, 0 ); |
| 764 |
UxPutX( label1, 0 ); |
| 765 |
|
| 766 |
} |
| 767 |
|
| 768 |
/******************************************************************************* |
| 769 |
The 'build_' function creates all the swidgets and X widgets, |
| 770 |
and sets their properties to the values specified in the |
| 771 |
Property Editor. |
| 772 |
*******************************************************************************/ |
| 773 |
|
| 774 |
static swidget _Uxbuild_ApplicWindow() |
| 775 |
{ |
| 776 |
/* Create the swidgets */ |
| 777 |
|
| 778 |
ApplicWindow = UxCreateApplicationShell( "ApplicWindow", NO_PARENT ); |
| 779 |
UxPutContext( ApplicWindow, UxApplicWindowContext ); |
| 780 |
|
| 781 |
MainWindow = UxCreateMainWindow( "MainWindow", ApplicWindow ); |
| 782 |
menu3 = UxCreateRowColumn( "menu3", MainWindow ); |
| 783 |
menu3_p2 = UxCreateRowColumn( "menu3_p2", menu3 ); |
| 784 |
menu3_p2_b1 = UxCreatePushButtonGadget( "menu3_p2_b1", menu3_p2 ); |
| 785 |
menu3_p2_b2 = UxCreatePushButtonGadget( "menu3_p2_b2", menu3_p2 ); |
| 786 |
menu3_p2_b3 = UxCreatePushButtonGadget( "menu3_p2_b3", menu3_p2 ); |
| 787 |
menu3_p2_b4 = UxCreatePushButtonGadget( "menu3_p2_b4", menu3_p2 ); |
| 788 |
menu3_p2_b5 = UxCreatePushButtonGadget( "menu3_p2_b5", menu3_p2 ); |
| 789 |
menu3_p2_b7 = UxCreateSeparator( "menu3_p2_b7", menu3_p2 ); |
| 790 |
menu3_p2_b8 = UxCreatePushButtonGadget( "menu3_p2_b8", menu3_p2 ); |
| 791 |
menu3_top_b2 = UxCreateCascadeButton( "menu3_top_b2", menu3 ); |
| 792 |
menu3_p3 = UxCreateRowColumn( "menu3_p3", menu3 ); |
| 793 |
menu3_p3_b1 = UxCreatePushButtonGadget( "menu3_p3_b1", menu3_p3 ); |
| 794 |
menu3_p3_b2 = UxCreatePushButtonGadget( "menu3_p3_b2", menu3_p3 ); |
| 795 |
menu3_p3_b3 = UxCreatePushButtonGadget( "menu3_p3_b3", menu3_p3 ); |
| 796 |
menu3_top_b3 = UxCreateCascadeButton( "menu3_top_b3", menu3 ); |
| 797 |
menu3_p4 = UxCreateRowColumn( "menu3_p4", menu3 ); |
| 798 |
menu_help_window = UxCreatePushButtonGadget( "menu_help_window", menu3_p4 ); |
| 799 |
menu3_top_b4 = UxCreateCascadeButton( "menu3_top_b4", menu3 ); |
| 800 |
form3 = UxCreateForm( "form3", MainWindow ); |
| 801 |
form2 = UxCreateForm( "form2", form3 ); |
| 802 |
pb_begin = UxCreatePushButton( "pb_begin", form2 ); |
| 803 |
pb_continue = UxCreatePushButton( "pb_continue", form2 ); |
| 804 |
pb_delete = UxCreatePushButton( "pb_delete", form2 ); |
| 805 |
separator1 = UxCreateSeparator( "separator1", form3 ); |
| 806 |
SHelp = UxCreateText( "SHelp", form3 ); |
| 807 |
scrolledWindow1 = UxCreateScrolledWindow( "scrolledWindow1", form3 ); |
| 808 |
ls_lincat = UxCreateScrolledList( "ls_lincat", scrolledWindow1 ); |
| 809 |
label1 = UxCreateLabel( "label1", form3 ); |
| 810 |
|
| 811 |
_Uxinit_ApplicWindow(); |
| 812 |
|
| 813 |
/* Create the X widgets */ |
| 814 |
|
| 815 |
UxCreateWidget( ApplicWindow ); |
| 816 |
UxCreateWidget( MainWindow ); |
| 817 |
UxCreateWidget( menu3 ); |
| 818 |
UxCreateWidget( menu3_p2 ); |
| 819 |
UxCreateWidget( menu3_p2_b1 ); |
| 820 |
UxCreateWidget( menu3_p2_b2 ); |
| 821 |
UxCreateWidget( menu3_p2_b3 ); |
| 822 |
UxCreateWidget( menu3_p2_b4 ); |
| 823 |
UxCreateWidget( menu3_p2_b5 ); |
| 824 |
UxCreateWidget( menu3_p2_b7 ); |
| 825 |
UxCreateWidget( menu3_p2_b8 ); |
| 826 |
UxPutSubMenuId( menu3_top_b2, "menu3_p2" ); |
| 827 |
UxCreateWidget( menu3_top_b2 ); |
| 828 |
|
| 829 |
UxCreateWidget( menu3_p3 ); |
| 830 |
UxCreateWidget( menu3_p3_b1 ); |
| 831 |
UxCreateWidget( menu3_p3_b2 ); |
| 832 |
UxCreateWidget( menu3_p3_b3 ); |
| 833 |
UxPutSubMenuId( menu3_top_b3, "menu3_p3" ); |
| 834 |
UxCreateWidget( menu3_top_b3 ); |
| 835 |
|
| 836 |
UxCreateWidget( menu3_p4 ); |
| 837 |
UxCreateWidget( menu_help_window ); |
| 838 |
UxPutSubMenuId( menu3_top_b4, "menu3_p4" ); |
| 839 |
UxCreateWidget( menu3_top_b4 ); |
| 840 |
|
| 841 |
UxCreateWidget( form3 ); |
| 842 |
UxPutBottomAttachment( form2, "attach_form" ); |
| 843 |
UxCreateWidget( form2 ); |
| 844 |
|
| 845 |
UxCreateWidget( pb_begin ); |
| 846 |
UxCreateWidget( pb_continue ); |
| 847 |
UxCreateWidget( pb_delete ); |
| 848 |
UxPutBottomWidget( separator1, "form2" ); |
| 849 |
UxPutBottomAttachment( separator1, "attach_widget" ); |
| 850 |
UxCreateWidget( separator1 ); |
| 851 |
|
| 852 |
UxPutBottomWidget( SHelp, "separator1" ); |
| 853 |
UxPutBottomAttachment( SHelp, "attach_widget" ); |
| 854 |
UxCreateWidget( SHelp ); |
| 855 |
|
| 856 |
UxPutBottomWidget( scrolledWindow1, "SHelp" ); |
| 857 |
UxPutBottomAttachment( scrolledWindow1, "attach_widget" ); |
| 858 |
UxCreateWidget( scrolledWindow1 ); |
| 859 |
|
| 860 |
UxCreateWidget( ls_lincat ); |
| 861 |
createCB_ls_lincat( UxGetWidget( ls_lincat ), |
| 862 |
(XtPointer) UxApplicWindowContext, (XtPointer) NULL ); |
| 863 |
|
| 864 |
UxPutBottomWidget( label1, "scrolledWindow1" ); |
| 865 |
UxPutBottomAttachment( label1, "attach_widget" ); |
| 866 |
UxCreateWidget( label1 ); |
| 867 |
|
| 868 |
|
| 869 |
UxPutMenuHelpWidget( menu3, "menu3_top_b4" ); |
| 870 |
|
| 871 |
UxAddCallback( menu3_p2_b1, XmNactivateCallback, |
| 872 |
activateCB_menu3_p2_b1, |
| 873 |
(XtPointer) UxApplicWindowContext ); |
| 874 |
|
| 875 |
UxAddCallback( menu3_p2_b2, XmNactivateCallback, |
| 876 |
activateCB_menu3_p2_b2, |
| 877 |
(XtPointer) UxApplicWindowContext ); |
| 878 |
|
| 879 |
UxAddCallback( menu3_p2_b3, XmNactivateCallback, |
| 880 |
activateCB_menu3_p2_b3, |
| 881 |
(XtPointer) UxApplicWindowContext ); |
| 882 |
|
| 883 |
UxAddCallback( menu3_p2_b4, XmNactivateCallback, |
| 884 |
activateCB_menu3_p2_b4, |
| 885 |
(XtPointer) UxApplicWindowContext ); |
| 886 |
|
| 887 |
UxAddCallback( menu3_p2_b5, XmNactivateCallback, |
| 888 |
activateCB_menu3_p2_b5, |
| 889 |
(XtPointer) UxApplicWindowContext ); |
| 890 |
|
| 891 |
UxAddCallback( menu3_p2_b8, XmNactivateCallback, |
| 892 |
activateCB_menu3_p2_b8, |
| 893 |
(XtPointer) UxApplicWindowContext ); |
| 894 |
|
| 895 |
UxAddCallback( menu3_p3_b1, XmNactivateCallback, |
| 896 |
activateCB_menu3_p3_b1, |
| 897 |
(XtPointer) UxApplicWindowContext ); |
| 898 |
|
| 899 |
UxAddCallback( menu3_p3_b2, XmNactivateCallback, |
| 900 |
activateCB_menu3_p3_b2, |
| 901 |
(XtPointer) UxApplicWindowContext ); |
| 902 |
|
| 903 |
UxAddCallback( menu3_p3_b3, XmNactivateCallback, |
| 904 |
activateCB_menu3_p3_b3, |
| 905 |
(XtPointer) UxApplicWindowContext ); |
| 906 |
|
| 907 |
UxAddCallback( menu_help_window, XmNactivateCallback, |
| 908 |
activateCB_menu_help_window, |
| 909 |
(XtPointer) UxApplicWindowContext ); |
| 910 |
|
| 911 |
UxAddCallback( pb_begin, XmNactivateCallback, |
| 912 |
activateCB_pb_begin, |
| 913 |
(XtPointer) UxApplicWindowContext ); |
| 914 |
|
| 915 |
UxAddCallback( pb_continue, XmNactivateCallback, |
| 916 |
activateCB_pb_continue, |
| 917 |
(XtPointer) UxApplicWindowContext ); |
| 918 |
|
| 919 |
UxAddCallback( pb_delete, XmNactivateCallback, |
| 920 |
activateCB_pb_delete, |
| 921 |
(XtPointer) UxApplicWindowContext ); |
| 922 |
|
| 923 |
UxAddCallback( ls_lincat, XmNbrowseSelectionCallback, |
| 924 |
browseSelectionCB_ls_lincat, |
| 925 |
(XtPointer) UxApplicWindowContext ); |
| 926 |
|
| 927 |
|
| 928 |
/* Finally, call UxRealizeInterface to create the X windows |
| 929 |
for the widgets created above. */ |
| 930 |
|
| 931 |
UxRealizeInterface( ApplicWindow ); |
| 932 |
|
| 933 |
UxMainWindowSetAreas( MainWindow, menu3, NULL_SWIDGET, |
| 934 |
NULL_SWIDGET, NULL_SWIDGET, form3 ); |
| 935 |
return ( ApplicWindow ); |
| 936 |
} |
| 937 |
|
| 938 |
/******************************************************************************* |
| 939 |
The following function includes the code that was entered |
| 940 |
in the 'Initial Code' and 'Final Code' sections of the |
| 941 |
Declarations Editor. This function is called from the |
| 942 |
'Interface function' below. |
| 943 |
*******************************************************************************/ |
| 944 |
|
| 945 |
static swidget _Ux_create_ApplicWindow() |
| 946 |
{ |
| 947 |
swidget rtrn; |
| 948 |
_UxCApplicWindow *UxContext; |
| 949 |
|
| 950 |
UxApplicWindowContext = UxContext = |
| 951 |
(_UxCApplicWindow *) UxMalloc( sizeof(_UxCApplicWindow) ); |
| 952 |
|
| 953 |
{ |
| 954 |
extern swidget create_HelpShell(); |
| 955 |
rtrn = _Uxbuild_ApplicWindow(); |
| 956 |
|
| 957 |
create_HelpShell(); |
| 958 |
|
| 959 |
return(rtrn); |
| 960 |
} |
| 961 |
} |
| 962 |
|
| 963 |
/******************************************************************************* |
| 964 |
The following is the 'Interface function' which is the |
| 965 |
external entry point for creating this interface. |
| 966 |
This function should be called from your application or from |
| 967 |
a callback function. |
| 968 |
*******************************************************************************/ |
| 969 |
|
| 970 |
swidget create_ApplicWindow() |
| 971 |
{ |
| 972 |
swidget _Uxrtrn; |
| 973 |
static int _Uxinit = 0; |
| 974 |
|
| 975 |
if ( ! _Uxinit ) |
| 976 |
{ |
| 977 |
static XtActionsRec _Uxactions[] = { |
| 978 |
{ "ClearHelp", action_ClearHelp }, |
| 979 |
{ "ExtendedHelp", action_ExtendedHelp }, |
| 980 |
{ "WriteHelp", action_WriteHelp } |
| 981 |
}; |
| 982 |
|
| 983 |
XtAppAddActions( UxAppContext, |
| 984 |
_Uxactions, |
| 985 |
XtNumber(_Uxactions) ); |
| 986 |
|
| 987 |
_Uxinit = 1; |
| 988 |
} |
| 989 |
|
| 990 |
_Uxrtrn = _Ux_create_ApplicWindow(); |
| 991 |
|
| 992 |
return ( _Uxrtrn ); |
| 993 |
} |
| 994 |
|
| 995 |
/******************************************************************************* |
| 996 |
END OF FILE |
| 997 |
*******************************************************************************/ |
| 998 |
|