Debian Codegraph @

gui/XDo/src/ApplicWindow.c

raw
1
2 /*
3 .VERSION
4 090825 last modif
5 */
6
7 /*******************************************************************************
8 ApplicWindow.c
9
10 Associated Resource file: ApplicWindow.rf
11 *******************************************************************************/
12
13 #include <stdlib.h>
14 #include <stdio.h>
15
16 #include "UxLib.h"
17 #include "UxLabel.h"
18 #include "UxScText.h"
19 #include "UxPushB.h"
20 #include "UxScList.h"
21 #include "UxScrW.h"
22 #include "UxText.h"
23 #include "UxFrame.h"
24 #include "UxForm.h"
25 #include "UxCascB.h"
26 #include "UxSep.h"
27 #include "UxPushBG.h"
28 #include "UxRowCol.h"
29 #include "UxMainW.h"
30 #include "UxApplSh.h"
31
32 /*******************************************************************************
33 Includes, Defines, and Global variables from the Declarations Editor:
34 *******************************************************************************/
35
36 #include <ExternResources.h>
37 #include <Xm/Protocols.h>
38
39 #include <Xm/Text.h>
40 #include <Xm/LabelG.h>
41 #include <midas_def.h>
42 #include <tbldef.h>
43 extern swidget scrolledtable;
44 extern Widget sb;
45 extern void myscrollv(),myscrollh();
46
47
48 /* Definitions for History mechanism */
49
50 #define SIZHIST 50
51 #define SIZTEXT 40
52 int ItemNumber = 0, ItemPosition = 0;
53 int DispItem = 0;
54
55 char ItemHistory[SIZHIST][SIZTEXT];
56 char HistList[SIZHIST*SIZTEXT];
57
58 Widget sb1,sb2,hbs;
59 int height;
60
61 /* Variables for SelectionArray */
62
63 XmTextScanType Sarray[60];
64 int SarI = 0;
65
66
67 /* Include for UxPut calls on the fileSelectionBox */
68
69 void CreateWindowManagerProtocols();
70 void ExitCB();
71 void CreateSessionManagerProtocols();
72 void SaveSessionCB();
73
74 extern Boolean saving; /* declared in file selection box declarations */
75 extern swidget fileSelectionDialog;
76 extern swidget fileSelectionBox;
77 extern swidget exitDialog;
78 extern swidget create_fileSelectionDialog();
79 extern swidget create_exitDialog();
80
81 /*******************************************************************************
82 The definition of the context structure:
83 If you create multiple instances of your interface, the context
84 structure ensures that your callbacks use the variables for the
85 correct instance.
86
87 For each swidget in the interface, each argument to the Interface
88 function, and each variable in the Instance Specific section of the
89 Declarations Editor, there is an entry in the context structure.
90 and a #define. The #define makes the variable name refer to the
91 corresponding entry in the context structure.
92 *******************************************************************************/
93
94 typedef struct
95 {
96 swidget UxmainWindow;
97 swidget UxpullDownMenu;
98 swidget UxquitPane;
99 swidget UxquitPane_b2;
100 swidget UxpullDownMenu_top_b1;
101 swidget UxUtilsPane;
102 swidget UxUtilsPane_b5;
103 swidget UxUtilsPane_b6;
104 swidget UxUtilsPane_b7;
105 swidget UxUtilsPane_b9;
106 swidget UxcommandsCascade;
107 swidget UxHelpPane;
108 swidget UxpullDownMenu_p3_b1;
109 swidget UxHelpPane_b2;
110 swidget UxHelpPane_b3;
111 swidget UxpullDownMenu_top_b5;
112 swidget UxworkAreaForm;
113 swidget UxworkAreaFrame;
114 swidget UxworkArea;
115 swidget UxSHelp;
116 swidget Uxscrol2;
117 swidget Uxreadtable;
118 swidget Uxscrol1;
119 swidget Uxidentlist;
120 swidget UxColButton;
121 swidget UxtextWindow;
122 swidget Uxscrollabel;
123 swidget UxIDENT;
124 swidget UxRowButton;
125 swidget Uxlabel9;
126 swidget Uxseparator6;
127 swidget Uxseparator7;
128 swidget Uxseparator8;
129 swidget Uxseparator9;
130 swidget Uxlabel10;
131 swidget Uxseparator10;
132 swidget Uxseparator11;
133 swidget Uxseparator12;
134 swidget Uxseparator13;
135 swidget UxAssoButton1;
136 swidget UxClassiButton;
137 swidget UxAssoButton;
138 } _UxCApplicWindow;
139
140 #define mainWindow UxApplicWindowContext->UxmainWindow
141 #define pullDownMenu UxApplicWindowContext->UxpullDownMenu
142 #define quitPane UxApplicWindowContext->UxquitPane
143 #define quitPane_b2 UxApplicWindowContext->UxquitPane_b2
144 #define pullDownMenu_top_b1 UxApplicWindowContext->UxpullDownMenu_top_b1
145 #define UtilsPane UxApplicWindowContext->UxUtilsPane
146 #define UtilsPane_b5 UxApplicWindowContext->UxUtilsPane_b5
147 #define UtilsPane_b6 UxApplicWindowContext->UxUtilsPane_b6
148 #define UtilsPane_b7 UxApplicWindowContext->UxUtilsPane_b7
149 #define UtilsPane_b9 UxApplicWindowContext->UxUtilsPane_b9
150 #define commandsCascade UxApplicWindowContext->UxcommandsCascade
151 #define HelpPane UxApplicWindowContext->UxHelpPane
152 #define pullDownMenu_p3_b1 UxApplicWindowContext->UxpullDownMenu_p3_b1
153 #define HelpPane_b2 UxApplicWindowContext->UxHelpPane_b2
154 #define HelpPane_b3 UxApplicWindowContext->UxHelpPane_b3
155 #define pullDownMenu_top_b5 UxApplicWindowContext->UxpullDownMenu_top_b5
156 #define workAreaForm UxApplicWindowContext->UxworkAreaForm
157 #define workAreaFrame UxApplicWindowContext->UxworkAreaFrame
158 #define workArea UxApplicWindowContext->UxworkArea
159 #define SHelp UxApplicWindowContext->UxSHelp
160 #define scrol2 UxApplicWindowContext->Uxscrol2
161 #define readtable UxApplicWindowContext->Uxreadtable
162 #define scrol1 UxApplicWindowContext->Uxscrol1
163 #define identlist UxApplicWindowContext->Uxidentlist
164 #define ColButton UxApplicWindowContext->UxColButton
165 #define textWindow UxApplicWindowContext->UxtextWindow
166 #define scrollabel UxApplicWindowContext->Uxscrollabel
167 #define IDENT UxApplicWindowContext->UxIDENT
168 #define RowButton UxApplicWindowContext->UxRowButton
169 #define label9 UxApplicWindowContext->Uxlabel9
170 #define separator6 UxApplicWindowContext->Uxseparator6
171 #define separator7 UxApplicWindowContext->Uxseparator7
172 #define separator8 UxApplicWindowContext->Uxseparator8
173 #define separator9 UxApplicWindowContext->Uxseparator9
174 #define label10 UxApplicWindowContext->Uxlabel10
175 #define separator10 UxApplicWindowContext->Uxseparator10
176 #define separator11 UxApplicWindowContext->Uxseparator11
177 #define separator12 UxApplicWindowContext->Uxseparator12
178 #define separator13 UxApplicWindowContext->Uxseparator13
179 #define AssoButton1 UxApplicWindowContext->UxAssoButton1
180 #define ClassiButton UxApplicWindowContext->UxClassiButton
181 #define AssoButton UxApplicWindowContext->UxAssoButton
182
183 static _UxCApplicWindow *UxApplicWindowContext;
184
185 extern void SetFileList(), display_help();
186
187 extern int populate(), read_table_column(), selectlist();
188
189
190 swidget ApplicWindow;
191
192 /*******************************************************************************
193 The following are translation tables.
194 *******************************************************************************/
195
196
197 static char *ChangeAttr = "#override\n\
198 <Btn1Up>:ChangeFor()\n\
199 <Btn1Down>:grab-focus()\n";
200
201 /*******************************************************************************
202 Forward declarations of functions that are defined later in this file.
203 *******************************************************************************/
204
205 swidget popup_ApplicWindow();
206
207 /*******************************************************************************
208 The following are Action functions.
209 *******************************************************************************/
210
211 static void action_HInit( UxWidget, UxEvent, UxParams, p_UxNumParams )
212 Widget UxWidget;
213 XEvent *UxEvent;
214 String *UxParams;
215 Cardinal *p_UxNumParams;
216 {
217 _UxCApplicWindow *UxSaveCtx, *UxContext;
218 swidget UxThisWidget;
219
220 UxThisWidget = UxWidgetToSwidget( UxWidget );
221 UxSaveCtx = UxApplicWindowContext;
222 UxApplicWindowContext = UxContext =
223 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
224 {
225
226 }
227 UxApplicWindowContext = UxSaveCtx;
228 }
229
230 static void action_ChangeFor( UxWidget, UxEvent, UxParams, p_UxNumParams )
231 Widget UxWidget;
232 XEvent *UxEvent;
233 String *UxParams;
234 Cardinal *p_UxNumParams;
235 {
236 _UxCApplicWindow *UxSaveCtx, *UxContext;
237 swidget UxThisWidget;
238
239 UxThisWidget = UxWidgetToSwidget( UxWidget );
240 UxSaveCtx = UxApplicWindowContext;
241 UxApplicWindowContext = UxContext =
242 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
243 {
244 extern swidget attri;
245 extern int tidost;
246 extern int collabchan;
247 char mylab[1+TBL_LABLEN];
248 char *text,form[1+TBL_LABLEN];
249 int dummy;
250 text = XmTextGetSelection(UxGetWidget(UxFindSwidget("scrollabel")));
251 if (text != NULL) strcpy(mylab,text);
252 XtFree(text);
253 TCLSER(tidost,mylab,&collabchan);
254 TCFGET(tidost,collabchan,form,&dummy,&dummy);
255 UxPutText(UxFindSwidget("newform"),form);
256 UxPopupInterface(attri,no_grab);
257 }
258 UxApplicWindowContext = UxSaveCtx;
259 }
260
261 static void action_nothing( UxWidget, UxEvent, UxParams, p_UxNumParams )
262 Widget UxWidget;
263 XEvent *UxEvent;
264 String *UxParams;
265 Cardinal *p_UxNumParams;
266 {
267 _UxCApplicWindow *UxSaveCtx, *UxContext;
268 swidget UxThisWidget;
269
270 UxThisWidget = UxWidgetToSwidget( UxWidget );
271 UxSaveCtx = UxApplicWindowContext;
272 UxApplicWindowContext = UxContext =
273 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
274 {
275 printf("toto:\n");
276 }
277 UxApplicWindowContext = UxSaveCtx;
278 }
279
280 static void action_SelectCommand( UxWidget, UxEvent, UxParams, p_UxNumParams )
281 Widget UxWidget;
282 XEvent *UxEvent;
283 String *UxParams;
284 Cardinal *p_UxNumParams;
285 {
286 _UxCApplicWindow *UxSaveCtx, *UxContext;
287 swidget UxThisWidget;
288
289 UxThisWidget = UxWidgetToSwidget( UxWidget );
290 UxSaveCtx = UxApplicWindowContext;
291 UxApplicWindowContext = UxContext =
292 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
293 {
294
295
296
297 }
298 UxApplicWindowContext = UxSaveCtx;
299 }
300
301 static void action_ClearHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
302 Widget UxWidget;
303 XEvent *UxEvent;
304 String *UxParams;
305 Cardinal *p_UxNumParams;
306 {
307 _UxCApplicWindow *UxSaveCtx, *UxContext;
308 swidget UxThisWidget;
309
310 UxThisWidget = UxWidgetToSwidget( UxWidget );
311 UxSaveCtx = UxApplicWindowContext;
312 UxApplicWindowContext = UxContext =
313 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
314 {
315 UxPutText(UxFindSwidget("SHelp"),"");
316 }
317 UxApplicWindowContext = UxSaveCtx;
318 }
319
320 static void action_WriteHelp( UxWidget, UxEvent, UxParams, p_UxNumParams )
321 Widget UxWidget;
322 XEvent *UxEvent;
323 String *UxParams;
324 Cardinal *p_UxNumParams;
325 {
326 _UxCApplicWindow *UxSaveCtx, *UxContext;
327 swidget UxThisWidget;
328
329 UxThisWidget = UxWidgetToSwidget( UxWidget );
330 UxSaveCtx = UxApplicWindowContext;
331 UxApplicWindowContext = UxContext =
332 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
333 {
334 char s[100];
335 Widget sw = UxWidget;
336
337 strcpy(s,"");
338
339 if (sw == UxGetWidget(UxFindSwidget("ColButton"))) {
340 strcpy(s,"Select the OST columns to be displayed into the scrolled window");
341 UxPutText(UxFindSwidget("SHelp") ,s);
342 }
343 else if (sw == UxGetWidget(UxFindSwidget("ClassiButton"))) {
344 strcpy(s,"Activate interface for defining classification rules ");
345 UxPutText(UxFindSwidget("SHelp") ,s);
346 }
347 else if (sw == UxGetWidget(UxFindSwidget("AssoButton"))) {
348 strcpy(s,"Activate interface for classifying images");
349 UxPutText(UxFindSwidget("SHelp") ,s);
350 }
351 else if (sw == UxGetWidget(UxFindSwidget("AssoButton1"))) {
352 strcpy(s,"Activate interface for associating calibration exposures to scientific frames");
353 UxPutText(UxFindSwidget("SHelp") ,s);
354 }
355 else if (sw == UxGetWidget(UxFindSwidget("NewsButton3"))) {
356 strcpy(s,"Create the OST table");
357 UxPutText(UxFindSwidget("SHelp3") ,s);
358 }
359 else if (sw == UxGetWidget(UxFindSwidget("PrintButton3"))) {
360 strcpy(s,"Popdown this interface");
361 UxPutText(UxFindSwidget("SHelp3") ,s);
362 }
363 else if (sw == UxGetWidget(UxFindSwidget("ost_t1"))){
364 strcpy(s,"Name of the Observation Summary Table to be created ");
365 UxPutText(UxFindSwidget("SHelp3") ,s);
366 }
367 else if (sw == UxGetWidget(UxFindSwidget("ost_t2"))){
368 strcpy(s,"List of frames to be processed ");
369 UxPutText(UxFindSwidget("SHelp3") ,s);
370 }
371 else if (sw == UxGetWidget(UxFindSwidget("ost_t3"))){
372 strcpy(s,"Name of the table containing the list of relevant Midas descriptors");
373 UxPutText(UxFindSwidget("SHelp3") ,s);
374 }
375 else if (sw == UxGetWidget(UxFindSwidget("pushButton4"))){
376 strcpy(s,"Push button to popup the File Selection Box");
377 UxPutText(UxFindSwidget("SHelp3") ,s);
378 }
379 else if (sw == UxGetWidget(UxFindSwidget("pushButton5"))){
380 strcpy(s,"Push button to popup the File Selection Box");
381 UxPutText(UxFindSwidget("SHelp3") ,s);
382 }
383 }
384 UxApplicWindowContext = UxSaveCtx;
385 }
386
387 static void action_HelpACT( UxWidget, UxEvent, UxParams, p_UxNumParams )
388 Widget UxWidget;
389 XEvent *UxEvent;
390 String *UxParams;
391 Cardinal *p_UxNumParams;
392 {
393 _UxCApplicWindow *UxSaveCtx, *UxContext;
394 swidget UxThisWidget;
395
396 UxThisWidget = UxWidgetToSwidget( UxWidget );
397 UxSaveCtx = UxApplicWindowContext;
398 UxApplicWindowContext = UxContext =
399 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
400 {
401 /* char *s;
402 s = XmTextGetSelection(UxWidget);
403
404 XmTextClearSelection(UxWidget,XtLastTimestampProcessed(UxDisplay));
405 */}
406 UxApplicWindowContext = UxSaveCtx;
407 }
408
409 /*******************************************************************************
410 The following are callback functions.
411 *******************************************************************************/
412
413 static void popupCB_ApplicWindow( UxWidget, UxClientData, UxCallbackArg )
414 Widget UxWidget;
415 XtPointer UxClientData, UxCallbackArg;
416 {
417 _UxCApplicWindow *UxSaveCtx, *UxContext;
418 swidget UxThisWidget;
419
420 UxThisWidget = UxWidgetToSwidget( UxWidget );
421 UxSaveCtx = UxApplicWindowContext;
422 UxApplicWindowContext = UxContext =
423 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
424 {
425
426 }
427 UxApplicWindowContext = UxSaveCtx;
428 }
429
430 static void activateCB_quitPane_b2( UxWidget, UxClientData, UxCallbackArg )
431 Widget UxWidget;
432 XtPointer UxClientData, UxCallbackArg;
433 {
434 _UxCApplicWindow *UxSaveCtx, *UxContext;
435 swidget UxThisWidget;
436
437 UxThisWidget = UxWidgetToSwidget( UxWidget );
438 UxSaveCtx = UxApplicWindowContext;
439 UxApplicWindowContext = UxContext =
440 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
441 {
442 int exist;
443 exist = SCFINF("TAB_COMM.tbl",99,&exist);
444 if (exist == 0) SCFDEL("TAB_COMM.tbl");
445
446
447 exit(0);}
448 UxApplicWindowContext = UxSaveCtx;
449 }
450
451 static void activateCB_UtilsPane_b5( UxWidget, UxClientData, UxCallbackArg )
452 Widget UxWidget;
453 XtPointer UxClientData, UxCallbackArg;
454 {
455 _UxCApplicWindow *UxSaveCtx, *UxContext;
456 swidget UxThisWidget;
457
458 UxThisWidget = UxWidgetToSwidget( UxWidget );
459 UxSaveCtx = UxApplicWindowContext;
460 UxApplicWindowContext = UxContext =
461 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
462 {
463 char s[1000];
464 extern swidget klist,tablelist;
465 extern int do8;
466 int strip =1;
467 strcpy(s,"*.tbl");
468 SetFileList(UxGetWidget(tablelist),strip,s);
469 do8 = 0;
470 UxPutTitle(UxFindSwidget("transientShell8"),"Select OST Table");
471 UxPopupInterface(klist,no_grab);
472 }
473 UxApplicWindowContext = UxSaveCtx;
474 }
475
476 static void activateCB_UtilsPane_b6( UxWidget, UxClientData, UxCallbackArg )
477 Widget UxWidget;
478 XtPointer UxClientData, UxCallbackArg;
479 {
480 _UxCApplicWindow *UxSaveCtx, *UxContext;
481 swidget UxThisWidget;
482
483 UxThisWidget = UxWidgetToSwidget( UxWidget );
484 UxSaveCtx = UxApplicWindowContext;
485 UxApplicWindowContext = UxContext =
486 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
487 {
488 extern swidget crea;
489 UxPopupInterface(crea,no_grab);
490 }
491 UxApplicWindowContext = UxSaveCtx;
492 }
493
494 static void activateCB_pullDownMenu_p3_b1( UxWidget, UxClientData, UxCallbackArg )
495 Widget UxWidget;
496 XtPointer UxClientData, UxCallbackArg;
497 {
498 _UxCApplicWindow *UxSaveCtx, *UxContext;
499 swidget UxThisWidget;
500
501 UxThisWidget = UxWidgetToSwidget( UxWidget );
502 UxSaveCtx = UxApplicWindowContext;
503 UxApplicWindowContext = UxContext =
504 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
505 {
506 extern swidget help;
507
508 display_help (help,"XDo.help");
509 }
510 UxApplicWindowContext = UxSaveCtx;
511 }
512
513 static void activateCB_HelpPane_b2( UxWidget, UxClientData, UxCallbackArg )
514 Widget UxWidget;
515 XtPointer UxClientData, UxCallbackArg;
516 {
517 _UxCApplicWindow *UxSaveCtx, *UxContext;
518 swidget UxThisWidget;
519
520 UxThisWidget = UxWidgetToSwidget( UxWidget );
521 UxSaveCtx = UxApplicWindowContext;
522 UxApplicWindowContext = UxContext =
523 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
524 {
525 extern swidget help;
526 display_help(help,"XDo_default.help");
527 }
528 UxApplicWindowContext = UxSaveCtx;
529 }
530
531 static void activateCB_HelpPane_b3( UxWidget, UxClientData, UxCallbackArg )
532 Widget UxWidget;
533 XtPointer UxClientData, UxCallbackArg;
534 {
535 _UxCApplicWindow *UxSaveCtx, *UxContext;
536 swidget UxThisWidget;
537
538 UxThisWidget = UxWidgetToSwidget( UxWidget );
539 UxSaveCtx = UxApplicWindowContext;
540 UxApplicWindowContext = UxContext =
541 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
542 {
543 extern swidget help;
544 display_help(help,"XDo_list.help");
545 }
546 UxApplicWindowContext = UxSaveCtx;
547 }
548
549 static void mapCB_workArea( UxWidget, UxClientData, UxCallbackArg )
550 Widget UxWidget;
551 XtPointer UxClientData, UxCallbackArg;
552 {
553 _UxCApplicWindow *UxSaveCtx, *UxContext;
554 swidget UxThisWidget;
555
556 UxThisWidget = UxWidgetToSwidget( UxWidget );
557 UxSaveCtx = UxApplicWindowContext;
558 UxApplicWindowContext = UxContext =
559 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
560 {
561
562 }
563 UxApplicWindowContext = UxSaveCtx;
564 }
565
566 static void createCB_workArea( 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
579 }
580 UxApplicWindowContext = UxSaveCtx;
581 }
582
583 static void activateCB_SHelp( UxWidget, UxClientData, UxCallbackArg )
584 Widget UxWidget;
585 XtPointer UxClientData, UxCallbackArg;
586 {
587 _UxCApplicWindow *UxSaveCtx, *UxContext;
588 swidget UxThisWidget;
589
590 UxThisWidget = UxWidgetToSwidget( UxWidget );
591 UxSaveCtx = UxApplicWindowContext;
592 UxApplicWindowContext = UxContext =
593 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
594 UxApplicWindowContext = UxSaveCtx;
595 }
596
597 static void extendedSelectionCB_readtable( UxWidget, UxClientData, UxCallbackArg )
598 Widget UxWidget;
599 XtPointer UxClientData, UxCallbackArg;
600 {
601 _UxCApplicWindow *UxSaveCtx, *UxContext;
602 swidget UxThisWidget;
603
604 UxThisWidget = UxWidgetToSwidget( UxWidget );
605 UxSaveCtx = UxApplicWindowContext;
606 UxApplicWindowContext = UxContext =
607 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
608 UxApplicWindowContext = UxSaveCtx;
609 }
610
611 static void browseSelectionCB_readtable( UxWidget, UxClientData, UxCallbackArg )
612 Widget UxWidget;
613 XtPointer UxClientData, UxCallbackArg;
614 {
615 _UxCApplicWindow *UxSaveCtx, *UxContext;
616 swidget UxThisWidget;
617
618 UxThisWidget = UxWidgetToSwidget( UxWidget );
619 UxSaveCtx = UxApplicWindowContext;
620 UxApplicWindowContext = UxContext =
621 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
622 {
623 printf("browse:");
624 }
625 UxApplicWindowContext = UxSaveCtx;
626 }
627
628 static void extendedSelectionCB_identlist( UxWidget, UxClientData, UxCallbackArg )
629 Widget UxWidget;
630 XtPointer UxClientData, UxCallbackArg;
631 {
632 _UxCApplicWindow *UxSaveCtx, *UxContext;
633 swidget UxThisWidget;
634
635 UxThisWidget = UxWidgetToSwidget( UxWidget );
636 UxSaveCtx = UxApplicWindowContext;
637 UxApplicWindowContext = UxContext =
638 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
639 {
640 XmListCallbackStruct *cbs;
641 char *choice;
642 int i;
643 cbs = (XmListCallbackStruct *)UxCallbackArg;
644 if (cbs->reason == XmCR_EXTENDED_SELECT ){
645
646 for (i=0; i<cbs->selected_item_count; i++) {
647 XmStringGetLtoR(cbs->selected_items[i],XmSTRING_DEFAULT_CHARSET,&choice);
648 printf("choice: %s \n",choice);
649 XtFree(choice);
650 }
651 }else {
652 XmStringGetLtoR(cbs->item,XmSTRING_DEFAULT_CHARSET,&choice);
653 printf("choice:%s\n",choice);
654 XtFree(choice);
655 }
656
657
658 }
659 UxApplicWindowContext = UxSaveCtx;
660 }
661
662 static void activateCB_ColButton( UxWidget, UxClientData, UxCallbackArg )
663 Widget UxWidget;
664 XtPointer UxClientData, UxCallbackArg;
665 {
666 _UxCApplicWindow *UxSaveCtx, *UxContext;
667 swidget UxThisWidget;
668
669 UxThisWidget = UxWidgetToSwidget( UxWidget );
670 UxSaveCtx = UxApplicWindowContext;
671 UxApplicWindowContext = UxContext =
672 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
673 {
674 extern swidget clist,myerror;
675 extern int tidost,colno;
676
677 if (tidost < 0) {
678 UxPutMessageString(UxFindSwidget("errorDialog1"),"No OST opened");
679 UxPopupInterface(myerror,no_grab);
680 return;
681 }
682
683 populate(UxGetWidget(UxFindSwidget("columnlist1")));
684 read_table_column(UxGetWidget(UxFindSwidget("columnlist")));
685
686 if (colno) selectlist("COPY",UxGetWidget(UxFindSwidget("columnlist")));
687 UxPopupInterface(clist,no_grab);
688 }
689 UxApplicWindowContext = UxSaveCtx;
690 }
691
692 static void activateCB_RowButton( UxWidget, UxClientData, UxCallbackArg )
693 Widget UxWidget;
694 XtPointer UxClientData, UxCallbackArg;
695 {
696 _UxCApplicWindow *UxSaveCtx, *UxContext;
697 swidget UxThisWidget;
698
699 UxThisWidget = UxWidgetToSwidget( UxWidget );
700 UxSaveCtx = UxApplicWindowContext;
701 UxApplicWindowContext = UxContext =
702 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
703 {
704
705 }
706 UxApplicWindowContext = UxSaveCtx;
707 }
708
709 static void activateCB_AssoButton1( UxWidget, UxClientData, UxCallbackArg )
710 Widget UxWidget;
711 XtPointer UxClientData, UxCallbackArg;
712 {
713 _UxCApplicWindow *UxSaveCtx, *UxContext;
714 swidget UxThisWidget;
715
716 UxThisWidget = UxWidgetToSwidget( UxWidget );
717 UxSaveCtx = UxApplicWindowContext;
718 UxApplicWindowContext = UxContext =
719 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
720 {
721 extern swidget assohaupt;
722
723 UxPopupInterface(assohaupt,no_grab);
724
725 }
726 UxApplicWindowContext = UxSaveCtx;
727 }
728
729 static void activateCB_ClassiButton( UxWidget, UxClientData, UxCallbackArg )
730 Widget UxWidget;
731 XtPointer UxClientData, UxCallbackArg;
732 {
733 _UxCApplicWindow *UxSaveCtx, *UxContext;
734 swidget UxThisWidget;
735
736 UxThisWidget = UxWidgetToSwidget( UxWidget );
737 UxSaveCtx = UxApplicWindowContext;
738 UxApplicWindowContext = UxContext =
739 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
740 {
741 extern void myrow(),never_called(),checkdigit(),checkchar();
742 extern swidget classi,myerror;
743 extern Widget rowrule[256][2];
744 extern int tidost;
745 XmString str;
746 int i,j ,dummy,ncol,type;
747 static int rowrul = 0;
748 char mylabel[TBL_LABLEN+1],mytext[8];
749 UxPutText(UxFindSwidget("criteria"),"l01");
750
751 if (tidost < 0) {
752 UxPutMessageString(UxFindSwidget("errorDialog1"),"No OST opened");
753 UxPopupInterface(myerror,no_grab);
754 return;
755 }
756 TCIGET(tidost,&ncol,&dummy,&dummy,&dummy,&dummy);
757 if (!rowrule[0][0]) {
758 XtAddCallback(UxGetWidget(UxFindSwidget("rowdescr")),XmNentryCallback,myrow,NULL);
759 rowrul = ncol;
760 XtVaSetValues(UxGetWidget(UxFindSwidget("rowdescr")),
761 XmNnumColumns,ncol,NULL);
762
763 for (i=1; i<=ncol; i++) {
764 TCLGET(tidost,i,mylabel);
765 TCBGET(tidost,i,&type,&dummy,&dummy);
766 rowrule[i-1][0] = XtVaCreateWidget(mylabel,xmLabelGadgetClass,
767 UxGetWidget(UxFindSwidget("rowdescr")),
768 NULL);
769 sprintf(mytext,"text_%d",i);
770 rowrule[i-1][1] = XtVaCreateWidget(mytext, xmTextWidgetClass,UxGetWidget(UxFindSwidget("rowdescr")),
771 NULL);
772 UxPutForeground(UxWidgetToSwidget(rowrule[i-1][1]),TextForeground);
773 UxPutBackground(UxWidgetToSwidget(rowrule[i-1][1]),WindowBackground);
774 UxPutFontList(UxWidgetToSwidget(rowrule[i-1][1]),BoldSmallFont);
775 if (type == D_C_FORMAT)
776 XtAddCallback(rowrule[i-1][1],XmNmodifyVerifyCallback,checkchar,NULL);
777 else
778 XtAddCallback(rowrule[i-1][1],XmNmodifyVerifyCallback,checkdigit,NULL);
779
780 }
781 XtManageChildren((WidgetList) rowrule, ncol * 2);
782 }
783 else {
784
785 if (ncol > rowrul) {
786 XtVaSetValues(UxGetWidget(UxFindSwidget("rowdescr")),
787 XmNnumColumns,ncol,NULL);
788 rowrul = ncol;
789 }
790 else if (ncol < rowrul) {
791 for (j=ncol; j< rowrul;j++) {
792 XmTextSetString(rowrule[j][1],"");
793 str = XmStringCreateSimple("");
794 XtVaSetValues (rowrule[j][0], XmNlabelString,str ,
795 NULL);
796 XmStringFree(str);
797 }
798 }
799 for (i=1; i<=ncol; i++) {
800 TCLGET(tidost,i,mylabel);
801 if (!rowrule[i-1][0])
802 rowrule[i-1][0] = XtVaCreateWidget(mylabel,
803 xmLabelGadgetClass,
804 UxGetWidget(UxFindSwidget("rowdescr")),
805 NULL);
806 else {
807 str = XmStringCreateSimple(mylabel);
808 XtVaSetValues (rowrule[i-1][0],XmNlabelString,str ,
809 NULL);
810 XmStringFree(str);
811 }
812
813 if (!rowrule[i-1][1]) {
814 sprintf(mytext,"text_%d",i);
815 rowrule[i-1][1] = XtVaCreateWidget(mytext, xmTextWidgetClass,
816 UxGetWidget(UxFindSwidget("rowdescr")),
817 XmNrightAttachment,XmATTACH_WIDGET,
818 XmNrightWidget,UxGetWidget(UxFindSwidget("scrolledWindow6")),
819 XmNleftAttachment,XmATTACH_POSITION,
820 XmNrightPosition,200,
821 NULL);
822 UxPutForeground(UxWidgetToSwidget(rowrule[i-1][1]),TextForeground);
823 UxPutBackground(UxWidgetToSwidget(rowrule[i-1][1]),TextBackground);
824 UxPutFontList(UxWidgetToSwidget(rowrule[i-1][1]),BoldSmallFont);
825 }
826 }
827 XtManageChildren((WidgetList) rowrule, ncol * 2);
828 }
829 UxPutText(UxFindSwidget("criteria"),"");
830 UxPopupInterface(classi,no_grab);
831
832 }
833 UxApplicWindowContext = UxSaveCtx;
834 }
835
836 static void activateCB_AssoButton( UxWidget, UxClientData, UxCallbackArg )
837 Widget UxWidget;
838 XtPointer UxClientData, UxCallbackArg;
839 {
840 _UxCApplicWindow *UxSaveCtx, *UxContext;
841 swidget UxThisWidget;
842
843 UxThisWidget = UxWidgetToSwidget( UxWidget );
844 UxSaveCtx = UxApplicWindowContext;
845 UxApplicWindowContext = UxContext =
846 (_UxCApplicWindow *) UxGetContext( UxThisWidget );
847 {
848 extern swidget clashaupt;
849 extern Widget row1[40],row2[40],row3[40];
850 int rows = 5;
851 extern int rowno;
852 int i;
853 char mytext[8];
854
855 XtVaSetValues(UxGetWidget(UxFindSwidget("rowproc")),XmNnumColumns,rows,NULL);
856 if (!row1[0]) {
857 rowno = 5;
858 for (i=0; i<rows; i++)
859 {
860 sprintf(mytext,"text1_%d",i);
861 row1[i] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget(UxFindSwidget("rowproc")),NULL);
862 sprintf(mytext,"text2_%d",i);
863 UxPutForeground(UxWidgetToSwidget(row1[i]),TextForeground);
864 UxPutBackground(UxWidgetToSwidget(row1[i]),TextBackground);
865 UxPutFontList(UxWidgetToSwidget(row1[i]),BoldSmallFont);
866 row2[i] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget(UxFindSwidget("rowproc")),NULL);
867 UxPutForeground(UxWidgetToSwidget(row2[i]),TextForeground);
868 UxPutBackground(UxWidgetToSwidget(row2[i]),TextBackground);
869 UxPutFontList(UxWidgetToSwidget(row2[i]),BoldSmallFont);
870 sprintf(mytext,"text3_%d",i);
871 row3[i] = XtVaCreateManagedWidget(mytext, xmTextWidgetClass,UxGetWidget(UxFindSwidget("rowproc")),NULL);
872 UxPutForeground(UxWidgetToSwidget(row3[i]),TextForeground);
873 UxPutBackground(UxWidgetToSwidget(row3[i]),TextBackground);
874 UxPutFontList(UxWidgetToSwidget(row3[i]),BoldSmallFont);
875 }
876
877 }
878
879
880 UxPopupInterface(clashaupt,no_grab);
881
882 }
883 UxApplicWindowContext = UxSaveCtx;
884 }
885
886 /*******************************************************************************
887 The 'init_' function sets the private properties for all the
888 swidgets to the values specified in the Property Table.
889 Some properties need to be set after the X widgets have been
890 created and the setting of these properties is done in the
891 'build_' function after the UxCreateWidget call.
892 *******************************************************************************/
893
894 static void _Uxinit_ApplicWindow()
895 {
896 UxPutGeometry( ApplicWindow, "700x540+30+30" );
897 UxPutBackground( ApplicWindow, WindowBackground );
898 UxPutIconName( ApplicWindow, "New" );
899 UxPutDeleteResponse( ApplicWindow, "do_nothing" );
900 UxPutTitle( ApplicWindow, "XDo" );
901 UxPutHeight( ApplicWindow, 680 );
902 UxPutWidth( ApplicWindow, 700 );
903 UxPutY( ApplicWindow, 577 );
904 UxPutX( ApplicWindow, 550 );
905
906 UxPutBackground( mainWindow, WindowBackground );
907 UxPutHeight( mainWindow, 680 );
908 UxPutWidth( mainWindow, 700 );
909 UxPutY( mainWindow, 180 );
910 UxPutX( mainWindow, 200 );
911
912 UxPutForeground( pullDownMenu, MenuForeground );
913 UxPutBackground( pullDownMenu, MenuBackground );
914 UxPutMenuAccelerator( pullDownMenu, "<KeyUp>F10" );
915 UxPutRowColumnType( pullDownMenu, "menu_bar" );
916 UxPutBorderWidth( pullDownMenu, 0 );
917
918 UxPutForeground( quitPane, MenuForeground );
919 UxPutBackground( quitPane, MenuBackground );
920 UxPutRowColumnType( quitPane, "menu_pulldown" );
921
922 UxPutFontList( quitPane_b2, BoldTextFont );
923 UxPutLabelString( quitPane_b2, "Bye" );
924
925 UxPutForeground( pullDownMenu_top_b1, MenuForeground );
926 UxPutFontList( pullDownMenu_top_b1, BoldTextFont );
927 UxPutBackground( pullDownMenu_top_b1, MenuBackground );
928 UxPutMnemonic( pullDownMenu_top_b1, "Q" );
929 UxPutLabelString( pullDownMenu_top_b1, "Quit" );
930
931 UxPutForeground( UtilsPane, MenuForeground );
932 UxPutBackground( UtilsPane, MenuBackground );
933 UxPutRowColumnType( UtilsPane, "menu_pulldown" );
934
935 UxPutFontList( UtilsPane_b5, BoldTextFont );
936 UxPutLabelString( UtilsPane_b5, "Open ..." );
937
938 UxPutFontList( UtilsPane_b6, BoldTextFont );
939 UxPutLabelString( UtilsPane_b6, "New ..." );
940
941 UxPutSensitive( UtilsPane_b9, "false" );
942 UxPutFontList( UtilsPane_b9, BoldTextFont );
943 UxPutLabelString( UtilsPane_b9, "Add ..." );
944
945 UxPutX( commandsCascade, 101 );
946 UxPutMnemonic( commandsCascade, "F" );
947 UxPutForeground( commandsCascade, MenuForeground );
948 UxPutFontList( commandsCascade, BoldTextFont );
949 UxPutBackground( commandsCascade, MenuBackground );
950 UxPutLabelString( commandsCascade, "File" );
951
952 UxPutForeground( HelpPane, MenuForeground );
953 UxPutBackground( HelpPane, MenuBackground );
954 UxPutRowColumnType( HelpPane, "menu_pulldown" );
955
956 UxPutFontList( pullDownMenu_p3_b1, BoldTextFont );
957 UxPutLabelString( pullDownMenu_p3_b1, "On XDo..." );
958
959 UxPutFontList( HelpPane_b2, BoldTextFont );
960 UxPutLabelString( HelpPane_b2, "On NTT defaults..." );
961
962 UxPutFontList( HelpPane_b3, BoldTextFont );
963 UxPutLabelString( HelpPane_b3, "On scrolled lists..." );
964
965 UxPutForeground( pullDownMenu_top_b5, MenuForeground );
966 UxPutFontList( pullDownMenu_top_b5, BoldTextFont );
967 UxPutBackground( pullDownMenu_top_b5, MenuBackground );
968 UxPutMnemonic( pullDownMenu_top_b5, "H" );
969 UxPutLabelString( pullDownMenu_top_b5, "Help" );
970
971 UxPutBackground( workAreaForm, WindowBackground );
972 UxPutBorderWidth( workAreaForm, 0 );
973 UxPutHeight( workAreaForm, 440 );
974 UxPutWidth( workAreaForm, 490 );
975
976 UxPutBackground( workAreaFrame, WindowBackground );
977 UxPutHeight( workAreaFrame, 230 );
978 UxPutWidth( workAreaFrame, 390 );
979 UxPutY( workAreaFrame, 30 );
980 UxPutX( workAreaFrame, 50 );
981
982 UxPutMarginWidth( workArea, 5 );
983 UxPutMarginHeight( workArea, 5 );
984 UxPutBorderColor( workArea, WindowBackground );
985 UxPutBackground( workArea, WindowBackground );
986 UxPutBorderWidth( workArea, 0 );
987 UxPutHeight( workArea, 448 );
988 UxPutWidth( workArea, 698 );
989 UxPutY( workArea, 2 );
990 UxPutX( workArea, 2 );
991
992 UxPutAccelerators( SHelp, "" );
993 UxPutWordWrap( SHelp, "false" );
994 UxPutHighlightOnEnter( SHelp, "true" );
995 UxPutEditMode( SHelp, "single_line_edit" );
996 UxPutBlinkRate( SHelp, 500 );
997 UxPutPendingDelete( SHelp, "true" );
998 UxPutTranslations( SHelp, "" );
999 UxPutCursorPositionVisible( SHelp, "false" );
1000 UxPutFontList( SHelp, TextFont );
1001 UxPutHighlightColor( SHelp, ApplicBackground );
1002 UxPutForeground( SHelp, TextForeground );
1003 UxPutBackground( SHelp, SHelpBackground );
1004 UxPutHeight( SHelp, 40 );
1005 UxPutWidth( SHelp, 401 );
1006 UxPutY( SHelp, 337 );
1007 UxPutX( SHelp, 290 );
1008
1009 UxPutMappedWhenManaged( scrol2, "true" );
1010 UxPutWidth( scrol2, 481 );
1011 UxPutBackground( scrol2, WindowBackground );
1012 UxPutScrollBarPlacement( scrol2, "bottom_right" );
1013 UxPutShadowThickness( scrol2, 0 );
1014 UxPutScrollBarDisplayPolicy( scrol2, "static" );
1015 UxPutVisualPolicy( scrol2, "variable" );
1016 UxPutY( scrol2, 55 );
1017 UxPutX( scrol2, 176 );
1018 UxPutScrollingPolicy( scrol2, "application_defined" );
1019
1020 UxPutForeground( readtable, TextForeground );
1021 UxPutFontList( readtable, BoldSmallFont );
1022 UxPutSelectionPolicy( readtable, "extended_select" );
1023 UxPutBackground( readtable, TextBackground );
1024 UxPutVisibleItemCount( readtable, 16 );
1025 UxPutListSizePolicy( readtable, "resize_if_possible" );
1026 UxPutScrollBarDisplayPolicy( readtable, "static" );
1027 UxPutHeight( readtable, 250 );
1028 UxPutWidth( readtable, 521 );
1029
1030 UxPutBackground( scrol1, WindowBackground );
1031 UxPutScrollBarPlacement( scrol1, "bottom_right" );
1032 UxPutHeight( scrol1, 302 );
1033 UxPutShadowThickness( scrol1, 0 );
1034 UxPutScrollBarDisplayPolicy( scrol1, "static" );
1035 UxPutVisualPolicy( scrol1, "variable" );
1036 UxPutY( scrol1, 10 );
1037 UxPutX( scrol1, 10 );
1038 UxPutScrollingPolicy( scrol1, "application_defined" );
1039
1040 UxPutForeground( identlist, TextForeground );
1041 UxPutAncestorSensitive( identlist, "true" );
1042 UxPutNavigationType( identlist, "tab_group" );
1043 UxPutTraversalOn( identlist, "false" );
1044 UxPutFontList( identlist, BoldSmallFont );
1045 UxPutSelectionPolicy( identlist, "extended_select" );
1046 UxPutVisibleItemCount( identlist, 16 );
1047 UxPutListSizePolicy( identlist, "constant" );
1048 UxPutScrollBarDisplayPolicy( identlist, "static" );
1049 UxPutBackground( identlist, TextBackground );
1050 UxPutTopShadowColor( identlist, "Gray80" );
1051 UxPutHeight( identlist, 302 );
1052 UxPutWidth( identlist, 150 );
1053
1054 UxPutHighlightColor( ColButton, "Black" );
1055 UxPutRecomputeSize( ColButton, "false" );
1056 UxPutForeground( ColButton, ButtonForeground );
1057 UxPutFontList( ColButton, BoldTextFont );
1058 UxPutLabelString( ColButton, "Sel Cols.." );
1059 UxPutBackground( ColButton, ButtonBackground );
1060 UxPutHeight( ColButton, 30 );
1061 UxPutWidth( ColButton, 90 );
1062 UxPutY( ColButton, 380 );
1063 UxPutX( ColButton, 110 );
1064
1065 UxPutHeight( textWindow, 70 );
1066 UxPutBottomShadowColor( textWindow, "#707070" );
1067 UxPutForeground( textWindow, "black" );
1068 UxPutHighlightColor( textWindow, WindowBackground );
1069 UxPutTopShadowColor( textWindow, "#a3a3a3" );
1070 UxPutBorderColor( textWindow, "black" );
1071 UxPutBackground( textWindow, WindowBackground );
1072 UxPutShadowThickness( textWindow, 0 );
1073 UxPutScrollBarDisplayPolicy( textWindow, "static" );
1074 UxPutVisualPolicy( textWindow, "variable" );
1075 UxPutY( textWindow, 0 );
1076 UxPutX( textWindow, 220 );
1077 UxPutScrollingPolicy( textWindow, "application_defined" );
1078
1079 UxPutTranslations( scrollabel, ChangeAttr );
1080 UxPutSelectionArray( scrollabel, "select_word select_word select_word select_word" );
1081 UxPutHighlightOnEnter( scrollabel, "false" );
1082 UxPutMarginWidth( scrollabel, 0 );
1083 UxPutTopShadowColor( scrollabel, "#a3a3a3" );
1084 UxPutAutoShowCursorPosition( scrollabel, "false" );
1085 UxPutShadowThickness( scrollabel, 0 );
1086 UxPutHighlightColor( scrollabel, "grey" );
1087 UxPutBottomShadowColor( scrollabel, "#707070" );
1088 UxPutHighlightThickness( scrollabel, 0 );
1089 UxPutMarginHeight( scrollabel, 0 );
1090 UxPutCursorPosition( scrollabel, 100 );
1091 UxPutText( scrollabel, "" );
1092 UxPutRows( scrollabel, 1 );
1093 UxPutCursorPositionVisible( scrollabel, "false" );
1094 UxPutForeground( scrollabel, "Red" );
1095 UxPutFontList( scrollabel, BoldSmallFont );
1096 UxPutBorderColor( scrollabel, WindowBackground );
1097 UxPutBackground( scrollabel, WindowBackground );
1098 UxPutEditable( scrollabel, "false" );
1099 UxPutEditMode( scrollabel, "single_line_edit" );
1100 UxPutHeight( scrollabel, 60 );
1101 UxPutWidth( scrollabel, 460 );
1102
1103 UxPutForeground( IDENT, ButtonForeground );
1104 UxPutLabelString( IDENT, "IDENT" );
1105 UxPutFontList( IDENT, BoldSmallFont );
1106 UxPutBackground( IDENT, WindowBackground );
1107 UxPutHeight( IDENT, 50 );
1108 UxPutWidth( IDENT, 210 );
1109 UxPutY( IDENT, 0 );
1110 UxPutX( IDENT, 0 );
1111
1112 UxPutSensitive( RowButton, "false" );
1113 UxPutHighlightColor( RowButton, "Black" );
1114 UxPutRecomputeSize( RowButton, "false" );
1115 UxPutFontList( RowButton, BoldTextFont );
1116 UxPutForeground( RowButton, ButtonForeground );
1117 UxPutLabelString( RowButton, "Sel Rows.." );
1118 UxPutBackground( RowButton, ButtonBackground );
1119 UxPutHeight( RowButton, 30 );
1120 UxPutWidth( RowButton, 90 );
1121 UxPutY( RowButton, 380 );
1122 UxPutX( RowButton, 20 );
1123
1124 UxPutLabelString( label9, "Selection" );
1125 UxPutFontList( label9, BoldTextFont );
1126 UxPutBackground( label9, WindowBackground );
1127 UxPutHeight( label9, 30 );
1128 UxPutWidth( label9, 75 );
1129 UxPutY( label9, 390 );
1130 UxPutX( label9, 30 );
1131
1132 UxPutBackground( separator6, WindowBackground );
1133 UxPutHeight( separator6, 10 );
1134 UxPutWidth( separator6, 205 );
1135 UxPutY( separator6, 410 );
1136 UxPutX( separator6, 20 );
1137
1138 UxPutBackground( separator7, WindowBackground );
1139 UxPutHeight( separator7, 10 );
1140 UxPutWidth( separator7, 205 );
1141 UxPutY( separator7, 420 );
1142 UxPutX( separator7, 25 );
1143
1144 UxPutBackground( separator8, WindowBackground );
1145 UxPutOrientation( separator8, "vertical" );
1146 UxPutHeight( separator8, 70 );
1147 UxPutWidth( separator8, 10 );
1148 UxPutY( separator8, 410 );
1149 UxPutX( separator8, 220 );
1150
1151 UxPutBackground( separator9, WindowBackground );
1152 UxPutOrientation( separator9, "vertical" );
1153 UxPutHeight( separator9, 70 );
1154 UxPutWidth( separator9, 10 );
1155 UxPutY( separator9, 422 );
1156 UxPutX( separator9, 230 );
1157
1158 UxPutLabelString( label10, "Classification" );
1159 UxPutFontList( label10, BoldTextFont );
1160 UxPutBackground( label10, WindowBackground );
1161 UxPutHeight( label10, 30 );
1162 UxPutWidth( label10, 100 );
1163 UxPutY( label10, 407 );
1164 UxPutX( label10, 80 );
1165
1166 UxPutBackground( separator10, WindowBackground );
1167 UxPutOrientation( separator10, "vertical" );
1168 UxPutHeight( separator10, 70 );
1169 UxPutWidth( separator10, 10 );
1170 UxPutY( separator10, 427 );
1171 UxPutX( separator10, 225 );
1172
1173 UxPutBackground( separator11, WindowBackground );
1174 UxPutHeight( separator11, 10 );
1175 UxPutWidth( separator11, 205 );
1176 UxPutY( separator11, 492 );
1177 UxPutX( separator11, 25 );
1178
1179 UxPutBackground( separator12, WindowBackground );
1180 UxPutHeight( separator12, 10 );
1181 UxPutWidth( separator12, 205 );
1182 UxPutY( separator12, 420 );
1183 UxPutX( separator12, 25 );
1184
1185 UxPutBackground( separator13, WindowBackground );
1186 UxPutOrientation( separator13, "vertical" );
1187 UxPutHeight( separator13, 70 );
1188 UxPutWidth( separator13, 10 );
1189 UxPutY( separator13, 427 );
1190 UxPutX( separator13, 270 );
1191
1192 UxPutHighlightColor( AssoButton1, "Black" );
1193 UxPutRecomputeSize( AssoButton1, "false" );
1194 UxPutForeground( AssoButton1, ButtonForeground );
1195 UxPutFontList( AssoButton1, BoldTextFont );
1196 UxPutLabelString( AssoButton1, "Associate.." );
1197 UxPutBackground( AssoButton1, ButtonBackground );
1198 UxPutHeight( AssoButton1, 30 );
1199 UxPutWidth( AssoButton1, 90 );
1200 UxPutY( AssoButton1, 442 );
1201 UxPutX( AssoButton1, 380 );
1202
1203 UxPutHighlightColor( ClassiButton, "Black" );
1204 UxPutRecomputeSize( ClassiButton, "false" );
1205 UxPutFontList( ClassiButton, BoldTextFont );
1206 UxPutForeground( ClassiButton, ButtonForeground );
1207 UxPutLabelString( ClassiButton, "Rule.." );
1208 UxPutBackground( ClassiButton, ButtonBackground );
1209 UxPutHeight( ClassiButton, 30 );
1210 UxPutWidth( ClassiButton, 90 );
1211 UxPutY( ClassiButton, 330 );
1212 UxPutX( ClassiButton, 180 );
1213
1214 UxPutHighlightColor( AssoButton, "Black" );
1215 UxPutRecomputeSize( AssoButton, "false" );
1216 UxPutForeground( AssoButton, ButtonForeground );
1217 UxPutFontList( AssoButton, BoldTextFont );
1218 UxPutLabelString( AssoButton, "Classify.." );
1219 UxPutBackground( AssoButton, ButtonBackground );
1220 UxPutHeight( AssoButton, 30 );
1221 UxPutWidth( AssoButton, 90 );
1222 UxPutY( AssoButton, 380 );
1223 UxPutX( AssoButton, 110 );
1224
1225 }
1226
1227 /*******************************************************************************
1228 The 'build_' function creates all the swidgets and X widgets,
1229 and sets their properties to the values specified in the
1230 Property Editor.
1231 *******************************************************************************/
1232
1233 static swidget _Uxbuild_ApplicWindow()
1234 {
1235 /* Create the swidgets */
1236
1237 ApplicWindow = UxCreateApplicationShell( "ApplicWindow", NO_PARENT );
1238 UxPutContext( ApplicWindow, UxApplicWindowContext );
1239
1240 mainWindow = UxCreateMainWindow( "mainWindow", ApplicWindow );
1241 pullDownMenu = UxCreateRowColumn( "pullDownMenu", mainWindow );
1242 quitPane = UxCreateRowColumn( "quitPane", pullDownMenu );
1243 quitPane_b2 = UxCreatePushButtonGadget( "quitPane_b2", quitPane );
1244 pullDownMenu_top_b1 = UxCreateCascadeButton( "pullDownMenu_top_b1", pullDownMenu );
1245 UtilsPane = UxCreateRowColumn( "UtilsPane", pullDownMenu );
1246 UtilsPane_b5 = UxCreatePushButtonGadget( "UtilsPane_b5", UtilsPane );
1247 UtilsPane_b6 = UxCreatePushButtonGadget( "UtilsPane_b6", UtilsPane );
1248 UtilsPane_b7 = UxCreateSeparator( "UtilsPane_b7", UtilsPane );
1249 UtilsPane_b9 = UxCreatePushButtonGadget( "UtilsPane_b9", UtilsPane );
1250 commandsCascade = UxCreateCascadeButton( "commandsCascade", pullDownMenu );
1251 HelpPane = UxCreateRowColumn( "HelpPane", pullDownMenu );
1252 pullDownMenu_p3_b1 = UxCreatePushButtonGadget( "pullDownMenu_p3_b1", HelpPane );
1253 HelpPane_b2 = UxCreatePushButtonGadget( "HelpPane_b2", HelpPane );
1254 HelpPane_b3 = UxCreatePushButtonGadget( "HelpPane_b3", HelpPane );
1255 pullDownMenu_top_b5 = UxCreateCascadeButton( "pullDownMenu_top_b5", pullDownMenu );
1256 workAreaForm = UxCreateForm( "workAreaForm", mainWindow );
1257 workAreaFrame = UxCreateFrame( "workAreaFrame", workAreaForm );
1258 workArea = UxCreateForm( "workArea", workAreaFrame );
1259 SHelp = UxCreateText( "SHelp", workArea );
1260 scrol2 = UxCreateScrolledWindow( "scrol2", workArea );
1261 readtable = UxCreateScrolledList( "readtable", scrol2 );
1262 scrol1 = UxCreateScrolledWindow( "scrol1", workArea );
1263 identlist = UxCreateScrolledList( "identlist", scrol1 );
1264 ColButton = UxCreatePushButton( "ColButton", workArea );
1265 textWindow = UxCreateScrolledWindow( "textWindow", workArea );
1266 scrollabel = UxCreateScrolledText( "scrollabel", textWindow );
1267 IDENT = UxCreateLabel( "IDENT", workArea );
1268 RowButton = UxCreatePushButton( "RowButton", workArea );
1269 label9 = UxCreateLabel( "label9", workArea );
1270 separator6 = UxCreateSeparator( "separator6", workArea );
1271 separator7 = UxCreateSeparator( "separator7", workArea );
1272 separator8 = UxCreateSeparator( "separator8", workArea );
1273 separator9 = UxCreateSeparator( "separator9", workArea );
1274 label10 = UxCreateLabel( "label10", workArea );
1275 separator10 = UxCreateSeparator( "separator10", workArea );
1276 separator11 = UxCreateSeparator( "separator11", workArea );
1277 separator12 = UxCreateSeparator( "separator12", workArea );
1278 separator13 = UxCreateSeparator( "separator13", workArea );
1279 AssoButton1 = UxCreatePushButton( "AssoButton1", workArea );
1280 ClassiButton = UxCreatePushButton( "ClassiButton", workArea );
1281 AssoButton = UxCreatePushButton( "AssoButton", workArea );
1282
1283 _Uxinit_ApplicWindow();
1284
1285 /* Create the X widgets */
1286
1287 UxCreateWidget( ApplicWindow );
1288 UxCreateWidget( mainWindow );
1289 UxCreateWidget( pullDownMenu );
1290 UxCreateWidget( quitPane );
1291 UxCreateWidget( quitPane_b2 );
1292 UxPutSubMenuId( pullDownMenu_top_b1, "quitPane" );
1293 UxCreateWidget( pullDownMenu_top_b1 );
1294
1295 UxCreateWidget( UtilsPane );
1296 UxCreateWidget( UtilsPane_b5 );
1297 UxCreateWidget( UtilsPane_b6 );
1298 UxCreateWidget( UtilsPane_b7 );
1299 UxCreateWidget( UtilsPane_b9 );
1300 UxPutSubMenuId( commandsCascade, "UtilsPane" );
1301 UxCreateWidget( commandsCascade );
1302
1303 UxCreateWidget( HelpPane );
1304 UxCreateWidget( pullDownMenu_p3_b1 );
1305 UxCreateWidget( HelpPane_b2 );
1306 UxCreateWidget( HelpPane_b3 );
1307 UxPutSubMenuId( pullDownMenu_top_b5, "HelpPane" );
1308 UxCreateWidget( pullDownMenu_top_b5 );
1309
1310 UxCreateWidget( workAreaForm );
1311 UxPutTopOffset( workAreaFrame, 0 );
1312 UxPutTopAttachment( workAreaFrame, "attach_form" );
1313 UxPutRightAttachment( workAreaFrame, "attach_form" );
1314 UxPutLeftAttachment( workAreaFrame, "attach_form" );
1315 UxPutBottomAttachment( workAreaFrame, "attach_form" );
1316 UxCreateWidget( workAreaFrame );
1317
1318 UxCreateWidget( workArea );
1319 createCB_workArea( UxGetWidget( workArea ),
1320 (XtPointer) UxApplicWindowContext, (XtPointer) NULL );
1321
1322 UxPutBottomOffset( SHelp, 125 );
1323 UxPutBottomAttachment( SHelp, "attach_form" );
1324 UxPutRightOffset( SHelp, 5 );
1325 UxPutRightAttachment( SHelp, "attach_form" );
1326 UxPutLeftOffset( SHelp, 5 );
1327 UxPutLeftAttachment( SHelp, "attach_form" );
1328 UxCreateWidget( SHelp );
1329
1330 UxPutTopOffset( scrol2, 35 );
1331 UxPutTopAttachment( scrol2, "attach_form" );
1332 UxPutLeftOffset( scrol2, 176 );
1333 UxPutLeftAttachment( scrol2, "attach_form" );
1334 UxPutBottomOffset( scrol2, 184 );
1335 UxPutBottomAttachment( scrol2, "attach_form" );
1336 UxPutRightOffset( scrol2, -20 );
1337 UxPutRightAttachment( scrol2, "attach_form" );
1338 UxCreateWidget( scrol2 );
1339
1340 UxCreateWidget( readtable );
1341 UxPutLeftOffset( scrol1, 5 );
1342 UxPutTopOffset( scrol1, 35 );
1343 UxPutTopAttachment( scrol1, "attach_form" );
1344 UxPutRightAttachment( scrol1, "attach_none" );
1345 UxPutLeftAttachment( scrol1, "attach_form" );
1346 UxPutBottomOffset( scrol1, 184 );
1347 UxPutBottomAttachment( scrol1, "attach_form" );
1348 UxCreateWidget( scrol1 );
1349
1350 UxCreateWidget( identlist );
1351 UxPutLeftWidget( ColButton, "" );
1352 UxPutLeftOffset( ColButton, 20 );
1353 UxPutLeftAttachment( ColButton, "attach_form" );
1354 UxPutTopWidget( ColButton, "SHelp" );
1355 UxPutTopOffset( ColButton, 55 );
1356 UxPutTopAttachment( ColButton, "attach_widget" );
1357 UxPutBottomOffset( ColButton, 25 );
1358 UxPutBottomAttachment( ColButton, "attach_form" );
1359 UxCreateWidget( ColButton );
1360
1361 UxPutTopPosition( textWindow, 0 );
1362 UxPutTopOffset( textWindow, 11 );
1363 UxPutTopAttachment( textWindow, "attach_form" );
1364 UxPutBottomOffset( textWindow, 360 );
1365 UxPutBottomAttachment( textWindow, "attach_form" );
1366 UxPutRightOffset( textWindow, -30 );
1367 UxPutRightAttachment( textWindow, "attach_form" );
1368 UxPutLeftOffset( textWindow, 182 );
1369 UxPutLeftAttachment( textWindow, "attach_form" );
1370 UxCreateWidget( textWindow );
1371
1372 UxCreateWidget( scrollabel );
1373 UxPutRightWidget( IDENT, "textWindow" );
1374 UxPutRightOffset( IDENT, 0 );
1375 UxPutRightAttachment( IDENT, "attach_widget" );
1376 UxPutBottomWidget( IDENT, "scrol1" );
1377 UxPutBottomAttachment( IDENT, "attach_widget" );
1378 UxPutTopOffset( IDENT, 0 );
1379 UxPutTopAttachment( IDENT, "attach_form" );
1380 UxPutLeftOffset( IDENT, -20 );
1381 UxPutLeftAttachment( IDENT, "attach_form" );
1382 UxCreateWidget( IDENT );
1383
1384 UxPutLeftWidget( RowButton, "ColButton" );
1385 UxPutBottomOffset( RowButton, 25 );
1386 UxPutBottomAttachment( RowButton, "attach_form" );
1387 UxPutTopWidget( RowButton, "SHelp" );
1388 UxPutTopOffset( RowButton, 55 );
1389 UxPutTopAttachment( RowButton, "attach_widget" );
1390 UxPutLeftOffset( RowButton, 10 );
1391 UxPutLeftAttachment( RowButton, "attach_widget" );
1392 UxCreateWidget( RowButton );
1393
1394 UxPutBottomOffset( label9, 75 );
1395 UxPutBottomAttachment( label9, "attach_form" );
1396 UxPutLeftOffset( label9, 80 );
1397 UxPutLeftAttachment( label9, "attach_form" );
1398 UxCreateWidget( label9 );
1399
1400 UxPutLeftOffset( separator6, 15 );
1401 UxPutLeftAttachment( separator6, "attach_form" );
1402 UxCreateWidget( separator6 );
1403
1404 UxPutBottomOffset( separator7, 10 );
1405 UxPutBottomAttachment( separator7, "attach_form" );
1406 UxPutLeftOffset( separator7, 15 );
1407 UxPutLeftAttachment( separator7, "attach_form" );
1408 UxCreateWidget( separator7 );
1409
1410 UxPutLeftOffset( separator8, 215 );
1411 UxPutLeftAttachment( separator8, "attach_form" );
1412 UxPutBottomOffset( separator8, 15 );
1413 UxPutBottomAttachment( separator8, "attach_form" );
1414 UxCreateWidget( separator8 );
1415
1416 UxPutBottomOffset( separator9, 15 );
1417 UxPutBottomAttachment( separator9, "attach_form" );
1418 UxPutLeftOffset( separator9, 10 );
1419 UxPutLeftAttachment( separator9, "attach_form" );
1420 UxCreateWidget( separator9 );
1421
1422 UxPutBottomOffset( label10, 75 );
1423 UxPutBottomAttachment( label10, "attach_form" );
1424 UxPutRightAttachment( label10, "attach_none" );
1425 UxPutLeftOffset( label10, 305 );
1426 UxPutLeftAttachment( label10, "attach_form" );
1427 UxCreateWidget( label10 );
1428
1429 UxPutBottomOffset( separator10, 15 );
1430 UxPutBottomAttachment( separator10, "attach_form" );
1431 UxPutLeftOffset( separator10, 245 );
1432 UxPutLeftAttachment( separator10, "attach_form" );
1433 UxCreateWidget( separator10 );
1434
1435 UxPutBottomOffset( separator11, 10 );
1436 UxPutBottomAttachment( separator11, "attach_form" );
1437 UxPutLeftOffset( separator11, 250 );
1438 UxPutLeftAttachment( separator11, "attach_form" );
1439 UxCreateWidget( separator11 );
1440
1441 UxPutTopOffset( separator12, 410 );
1442 UxPutTopAttachment( separator12, "attach_form" );
1443 UxPutLeftOffset( separator12, 250 );
1444 UxPutLeftAttachment( separator12, "attach_form" );
1445 UxCreateWidget( separator12 );
1446
1447 UxPutBottomOffset( separator13, 15 );
1448 UxPutBottomAttachment( separator13, "attach_form" );
1449 UxPutLeftOffset( separator13, 450 );
1450 UxPutLeftAttachment( separator13, "attach_form" );
1451 UxCreateWidget( separator13 );
1452
1453 UxPutBottomOffset( AssoButton1, 25 );
1454 UxPutBottomAttachment( AssoButton1, "attach_form" );
1455 UxPutTopWidget( AssoButton1, "SHelp" );
1456 UxPutTopOffset( AssoButton1, 55 );
1457 UxPutTopAttachment( AssoButton1, "attach_widget" );
1458 UxPutRightOffset( AssoButton1, 70 );
1459 UxPutRightAttachment( AssoButton1, "attach_form" );
1460 UxCreateWidget( AssoButton1 );
1461
1462 UxPutBottomOffset( ClassiButton, 25 );
1463 UxPutBottomAttachment( ClassiButton, "attach_form" );
1464 UxPutLeftWidget( ClassiButton, "RowButton" );
1465 UxPutLeftOffset( ClassiButton, 45 );
1466 UxPutLeftAttachment( ClassiButton, "attach_widget" );
1467 UxPutTopWidget( ClassiButton, "SHelp" );
1468 UxPutTopOffset( ClassiButton, 55 );
1469 UxPutTopAttachment( ClassiButton, "attach_widget" );
1470 UxCreateWidget( ClassiButton );
1471
1472 UxPutTopWidget( AssoButton, "SHelp" );
1473 UxPutTopOffset( AssoButton, 55 );
1474 UxPutTopAttachment( AssoButton, "attach_widget" );
1475 UxPutLeftWidget( AssoButton, "ClassiButton" );
1476 UxPutLeftOffset( AssoButton, 10 );
1477 UxPutLeftAttachment( AssoButton, "attach_widget" );
1478 UxPutBottomOffset( AssoButton, 25 );
1479 UxPutBottomAttachment( AssoButton, "attach_form" );
1480 UxCreateWidget( AssoButton );
1481
1482
1483 UxAddCallback( ApplicWindow, XmNpopupCallback,
1484 popupCB_ApplicWindow,
1485 (XtPointer) UxApplicWindowContext );
1486
1487 UxPutMenuHelpWidget( pullDownMenu, "pullDownMenu_top_b1" );
1488
1489 UxAddCallback( quitPane_b2, XmNactivateCallback,
1490 activateCB_quitPane_b2,
1491 (XtPointer) UxApplicWindowContext );
1492
1493 UxAddCallback( UtilsPane_b5, XmNactivateCallback,
1494 activateCB_UtilsPane_b5,
1495 (XtPointer) UxApplicWindowContext );
1496
1497 UxAddCallback( UtilsPane_b6, XmNactivateCallback,
1498 activateCB_UtilsPane_b6,
1499 (XtPointer) UxApplicWindowContext );
1500
1501 UxAddCallback( pullDownMenu_p3_b1, XmNactivateCallback,
1502 activateCB_pullDownMenu_p3_b1,
1503 (XtPointer) UxApplicWindowContext );
1504
1505 UxAddCallback( HelpPane_b2, XmNactivateCallback,
1506 activateCB_HelpPane_b2,
1507 (XtPointer) UxApplicWindowContext );
1508
1509 UxAddCallback( HelpPane_b3, XmNactivateCallback,
1510 activateCB_HelpPane_b3,
1511 (XtPointer) UxApplicWindowContext );
1512
1513 UxAddCallback( workArea, XmNmapCallback,
1514 mapCB_workArea,
1515 (XtPointer) UxApplicWindowContext );
1516
1517 UxAddCallback( SHelp, XmNactivateCallback,
1518 activateCB_SHelp,
1519 (XtPointer) UxApplicWindowContext );
1520
1521 UxAddCallback( readtable, XmNextendedSelectionCallback,
1522 extendedSelectionCB_readtable,
1523 (XtPointer) UxApplicWindowContext );
1524 UxAddCallback( readtable, XmNbrowseSelectionCallback,
1525 browseSelectionCB_readtable,
1526 (XtPointer) UxApplicWindowContext );
1527
1528 UxAddCallback( identlist, XmNextendedSelectionCallback,
1529 extendedSelectionCB_identlist,
1530 (XtPointer) UxApplicWindowContext );
1531
1532 UxAddCallback( ColButton, XmNactivateCallback,
1533 activateCB_ColButton,
1534 (XtPointer) UxApplicWindowContext );
1535
1536 UxAddCallback( RowButton, XmNactivateCallback,
1537 activateCB_RowButton,
1538 (XtPointer) UxApplicWindowContext );
1539
1540 UxAddCallback( AssoButton1, XmNactivateCallback,
1541 activateCB_AssoButton1,
1542 (XtPointer) UxApplicWindowContext );
1543
1544 UxAddCallback( ClassiButton, XmNactivateCallback,
1545 activateCB_ClassiButton,
1546 (XtPointer) UxApplicWindowContext );
1547
1548 UxAddCallback( AssoButton, XmNactivateCallback,
1549 activateCB_AssoButton,
1550 (XtPointer) UxApplicWindowContext );
1551
1552
1553 /* Finally, call UxRealizeInterface to create the X windows
1554 for the widgets created above. */
1555
1556 UxRealizeInterface( ApplicWindow );
1557
1558 UxMainWindowSetAreas( mainWindow, pullDownMenu, NULL_SWIDGET,
1559 NULL_SWIDGET, NULL_SWIDGET, workAreaForm );
1560 return ( ApplicWindow );
1561 }
1562
1563 /*******************************************************************************
1564 The following function includes the code that was entered
1565 in the 'Initial Code' and 'Final Code' sections of the
1566 Declarations Editor. This function is called from the
1567 'Interface function' below.
1568 *******************************************************************************/
1569
1570 static swidget _Ux_popup_ApplicWindow()
1571 {
1572 swidget rtrn;
1573 _UxCApplicWindow *UxContext;
1574
1575 UxApplicWindowContext = UxContext =
1576 (_UxCApplicWindow *) UxMalloc( sizeof(_UxCApplicWindow) );
1577
1578 rtrn = _Uxbuild_ApplicWindow();
1579
1580 XtVaGetValues(UxGetWidget(UxFindSwidget("scrol2")),XmNverticalScrollBar,&sb1,NULL);
1581 XtVaGetValues(UxGetWidget(UxFindSwidget("scrol1")),XmNverticalScrollBar,&sb,NULL);
1582 /*UxUnmap(UxWidgetToSwidget(sb1));*/
1583 /*XtVaGetValues(sb,XmNmaximum,&height,NULL);
1584 printf("height:%d \n",height);*/
1585 /*UxPutMappedWhenManaged(UxWidgetToSwidget(sb1),"false");*/
1586 XtUnmapWidget(sb1);
1587 XtVaGetValues(UxGetWidget(UxFindSwidget("textWindow")),XmNhorizontalScrollBar,&sb2,NULL);
1588 XtUnmapWidget(sb2);
1589 XtVaGetValues(UxGetWidget(UxFindSwidget("textWindow")),XmNverticalScrollBar,&sb2,NULL);
1590 XtUnmapWidget(sb2);
1591 /*UxPutTranslations(UxWidgetToSwidget(sb),transTable1);*/
1592 /*XtAddCallback(sb,XmNvalueChangedCallback,myscrollv,XmVERTICAL);*/
1593 /*XtVaGetValues(UxGetWidget(UxFindSwidget("identlist")),XmNheight,&height,XmNvisibleItemCount,&count,NULL);
1594 itemsize = height/count;
1595 printf("size:%d,height: %d, count: %d",itemsize,height,count);*/
1596
1597
1598 XtRemoveAllCallbacks(sb,XmNdragCallback);
1599 XtRemoveAllCallbacks(sb,XmNvalueChangedCallback);
1600 XtRemoveAllCallbacks(sb,XmNincrementCallback);
1601 XtRemoveAllCallbacks(sb,XmNdecrementCallback);
1602 XtRemoveAllCallbacks(sb,XmNpageIncrementCallback);
1603 XtRemoveAllCallbacks(sb,XmNpageDecrementCallback);
1604 XtRemoveAllCallbacks(sb,XmNtoTopCallback);
1605 XtRemoveAllCallbacks(sb,XmNtoBottomCallback);
1606
1607 XtAddCallback(sb,XmNdragCallback,myscrollv,NULL);
1608 XtAddCallback(sb,XmNincrementCallback,myscrollv,NULL);
1609 XtAddCallback(sb,XmNdecrementCallback,myscrollv,NULL);
1610 XtAddCallback(sb,XmNpageIncrementCallback,myscrollv,NULL);
1611 XtAddCallback(sb,XmNpageDecrementCallback,myscrollv,NULL);
1612 XtAddCallback(sb,XmNtoTopCallback,myscrollv,NULL);
1613 XtAddCallback(sb,XmNtoBottomCallback,myscrollv,NULL);
1614
1615 XtVaGetValues(UxGetWidget(UxFindSwidget("scrol2")),XmNhorizontalScrollBar,&hbs,NULL);
1616 XtAddCallback(hbs,XmNdragCallback,myscrollh,NULL);
1617 XtAddCallback(hbs,XmNincrementCallback,myscrollh,NULL);
1618 return(rtrn);
1619 }
1620
1621 /*******************************************************************************
1622 The following is the 'Interface function' which is the
1623 external entry point for creating this interface.
1624 This function should be called from your application or from
1625 a callback function.
1626 *******************************************************************************/
1627
1628 swidget popup_ApplicWindow()
1629 {
1630 swidget _Uxrtrn;
1631 static int _Uxinit = 0;
1632
1633 if ( ! _Uxinit )
1634 {
1635 static XtActionsRec _Uxactions[] = {
1636 { "HInit", action_HInit },
1637 { "ChangeFor", action_ChangeFor },
1638 { "nothing", action_nothing },
1639 { "SelectCommand", action_SelectCommand },
1640 { "ClearHelp", action_ClearHelp },
1641 { "WriteHelp", action_WriteHelp },
1642 { "HelpACT", action_HelpACT }
1643 };
1644
1645 XtAppAddActions( UxAppContext,
1646 _Uxactions,
1647 XtNumber(_Uxactions) );
1648
1649 UxLoadResources( "ApplicWindow.rf" );
1650 _Uxinit = 1;
1651 }
1652
1653 _Uxrtrn = _Ux_popup_ApplicWindow();
1654
1655 return ( _Uxrtrn );
1656 }
1657
1658 /*******************************************************************************
1659 END OF FILE
1660 *******************************************************************************/
1661