ed0f854a84a9551a361f8dd1f57f721bbe2f0306
[oweals/cde.git] / cde / programs / ttsnoop / ttChooser_stubs.C.src
1 /*** DTB_USER_CODE_START vvv Add file header below vvv ***/
2 //%%  (c) Copyright 1993, 1994 Hewlett-Packard Company
3 //%%  (c) Copyright 1993, 1994 International Business Machines Corp.
4 //%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
5 //%%  (c) Copyright 1993, 1994 Novell, Inc.
6 //%%  $XConsortium: ttChooser_stubs.C.src /main/3 1995/11/06 17:14:10 rswiston $
7 /*** DTB_USER_CODE_END   ^^^ Add file header above ^^^ ***/
8
9 /*
10  * File: ttChooser_stubs.c
11  * Contains: Module callbacks and connection functions
12  *
13  * This file was generated by dtcodegen, from module ttChooser
14  *
15  * Any text may be added between the DTB_USER_CODE_START and
16  * DTB_USER_CODE_END comments (even non-C code). Descriptive comments
17  * are provided only as an aid.
18  *
19  *  ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS.  **
20  *  ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR  **
21  *  ** DELETE THE GENERATED COMMENTS!                                 **
22  */
23
24 #include <stdio.h>
25 #include <Xm/Xm.h>
26 #include "dtb_utils.h"
27 #include "ttChooser_ui.h"
28
29 /*
30  * Header files for cross-module connections
31  */
32 #include "ttsnoop_ui.h"
33
34
35 /**************************************************************************
36  *** DTB_USER_CODE_START
37  ***
38  *** All necessary header files have been included.
39  ***
40  *** Add include files, types, macros, externs, and user functions here.
41  ***/
42
43 #include <stdio.h>
44
45 #if defined(linux) || defined(CSRG_BASED)
46 #include <strstream>
47 #else
48 #include <strstream.h>
49 #endif
50
51 #include <Xm/TextF.h>
52 #include <Xm/List.h>
53 #include "DtTt.h"
54
55 void
56 _DtTtChooserSet(
57         _DtTtChooserAction      choice,
58         void *                  entity
59 )
60 {
61     DtbTtChooserChooserInfo instance = &dtb_tt_chooser_chooser;
62     if (! instance->initialized) {
63             dtb_tt_chooser_chooser_initialize(
64                         instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin );
65     }
66     char *okString;
67     char *title;
68     char *valueLabel;
69     char *valuesLabel;
70     switch (choice) {
71         case _DtTtChooserNone:
72             return;
73         case _DtTtChooserMessageOpen:
74             okString = "Open";
75             title = "Open Tt_message";
76             break;
77         case _DtTtChooserMessageCreateStandard:
78             okString = "Create";
79             title = "Create Standard Tt_message";
80             break;
81         case _DtTtChooserMessageOpSet:
82             okString = "Set";
83             title = "tt_message_op_set";
84             break;
85         case _DtTtChooserMessageHandlerSet:
86             okString = "Set";
87             title = "tt_message_handler_set";
88             break;
89         case _DtTtChooserMessageDestroy:
90             okString = "Destroy";
91             title = "tt_message_destroy";
92             break;
93         case _DtTtChooserPatternOpen:
94             okString = "Open";
95             title = "Open Tt_pattern";
96             break;
97         case _DtTtChooserPatternOpAdd:
98             okString = "Add";
99             title = "tt_pattern_op_add";
100             break;
101         case _DtTtChooserPatternSenderAdd:
102             okString = "Add";
103             title = "tt_pattern_sender_add";
104             break;
105         case _DtTtChooserPatternDestroy:
106             okString = "Destroy";
107             title = "tt_pattern_destroy";
108             break;
109         case _DtTtChooserDtSessionQuit:
110             okString = "Quit";
111             title = "ttdt_session_quit";
112             break;
113         case _DtTtChooserDtFileDeleted:
114             okString = "Send";
115             title = "ttdt_file_event(,TTDT_DELETED)";
116             break;
117         case _DtTtChooserDtFileModified:
118             okString = "Send";
119             title = "ttdt_file_event(,TTDT_MODIFIED)";
120             break;
121         case _DtTtChooserDtFileReverted:
122             okString = "Send";
123             title = "ttdt_file_event(,TTDT_REVERTED)";
124             break;
125         case _DtTtChooserDtFileMoved:
126             okString = "Send";
127             title = "ttdt_file_event(,TTDT_MOVED)";
128             break;
129         case _DtTtChooserDtFileSaved:
130             okString = "Send";
131             title = "ttdt_file_event(,TTDT_SAVED)";
132             break;
133         case _DtTtChooserDtFileQuit:
134             okString = "Quit";
135             title = "ttdt_file_quit";
136             break;
137         case _DtTtChooserProcidSetDefault:
138             okString = "Set";
139             title = "tt_default_procid_set";
140             break;
141         case _DtTtChooserProcidSuspend:
142             okString = "Remove";
143             title = "XtRemoveInput";
144             break;
145         case _DtTtChooserProcidResume:
146             okString = "Add";
147             title = "XtAppAddInput";
148             break;
149         case _DtTtChooserDtProcidClose:
150             okString = "Close";
151             title = "ttdt_close";
152             break;
153     }
154     DtTtType type;
155     switch (choice) {
156         case _DtTtChooserNone:
157             return;
158         case _DtTtChooserMessageOpSet:
159         case _DtTtChooserPatternOpAdd:
160         case _DtTtChooserMessageCreateStandard:
161             valueLabel = "Op:";
162             valuesLabel = "Standard Op";
163             type = DTTT_OP;
164             break;
165         case _DtTtChooserMessageOpen:
166         case _DtTtChooserMessageDestroy:
167             valueLabel = "Tt_message:";
168             valuesLabel = "Tt_message";
169             type = DTTT_MESSAGE;
170             break;
171         case _DtTtChooserPatternOpen:
172         case _DtTtChooserPatternDestroy:
173             valueLabel = "Tt_pattern:";
174             valuesLabel = "Tt_pattern";
175             type = DTTT_PATTERN;
176             break;
177         case _DtTtChooserDtSessionQuit:
178             valueLabel = "Tt_pattern *:";
179             valuesLabel = "Desktop-joined session";
180             type = DTTT_DTSESSION;
181             break;
182         case _DtTtChooserDtFileDeleted:
183         case _DtTtChooserDtFileModified:
184         case _DtTtChooserDtFileReverted:
185         case _DtTtChooserDtFileMoved:
186         case _DtTtChooserDtFileSaved:
187         case _DtTtChooserDtFileQuit:
188             valueLabel = "Tt_pattern *:";
189             valuesLabel = "Desktop-joined file";
190             type = DTTT_DTFILE;
191             break;
192         case _DtTtChooserMessageHandlerSet:
193         case _DtTtChooserPatternSenderAdd:
194         case _DtTtChooserProcidSetDefault:
195         case _DtTtChooserProcidSuspend:
196         case _DtTtChooserProcidResume:
197         case _DtTtChooserDtProcidClose:
198             valueLabel = "Procid:";
199             valuesLabel = "Procid";
200             type = DTTT_PROCID;
201             break;
202     }
203     DtTtSetLabel( instance->chooserOkButton, okString );
204     DtTtSetLabel( instance->chooserText_label, valueLabel );
205
206     int itemCount;
207     XmString *items = _DtTtChoices( type, &itemCount );
208     XtVaSetValues( instance->chooserList,
209                    XmNitemCount, itemCount,
210                    XmNitems, items,
211                    NULL );
212     XmListDeselectAllItems( instance->chooserList );
213     XmTextFieldSetString( instance->chooserText, 0 );
214     XtVaSetValues( instance->chooser, XmNtitle, title, NULL );
215
216     std::ostrstream valuesStream;
217     valuesStream << itemCount << " " << valuesLabel;
218     if (itemCount != 1) valuesStream << "s";
219     valuesStream << ends;
220     DtTtSetLabel( instance->chooserList_label, valuesStream.str() );
221     delete valuesStream.str();
222
223     // Remember dialog mode, entity
224     XtVaSetValues( instance->chooserOkButton, XmNuserData, choice, NULL );
225     XtVaSetValues( instance->chooserCancelButton, XmNuserData, entity, NULL );
226
227     XtManageChild( instance->chooser_shellform );
228 }
229
230 /*** DTB_USER_CODE_END
231  ***
232  *** End of user code section
233  ***
234  **************************************************************************/
235
236
237
238 void 
239 ttChooser_chooserCancelButton_CB1(
240     Widget widget,
241     XtPointer clientData,
242     XtPointer callData
243 )
244 {
245     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
246     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
247     
248     DtbTtChooserChooserInfo     instance = (DtbTtChooserChooserInfo)clientData;
249     
250     if (!(instance->initialized))
251     {
252         dtb_tt_chooser_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin);
253     }
254     XtUnmanageChild(instance->chooser_shellform);
255     
256     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
257     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
258 }
259
260
261 void 
262 choiceSelected(
263     Widget widget,
264     XtPointer clientData,
265     XtPointer callData
266 )
267 {
268     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
269     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
270     
271     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
272     DtbTtChooserChooserInfo instance = (DtbTtChooserChooserInfo)clientData;
273     XmListCallbackStruct *info = (XmListCallbackStruct *)callData;
274     int choice;
275     XtVaGetValues( instance->chooserOkButton, XmNuserData, &choice, NULL );
276     DtTtType type;
277     Boolean isString = False;
278     switch ((_DtTtChooserAction)choice) {
279         case _DtTtChooserNone:
280             return;
281         case _DtTtChooserMessageOpSet:
282         case _DtTtChooserPatternOpAdd:
283         case _DtTtChooserMessageCreateStandard:
284             isString = True;
285             type = DTTT_OP;
286             break;
287         case _DtTtChooserMessageOpen:
288         case _DtTtChooserMessageDestroy:
289             type = DTTT_MESSAGE;
290             break;
291         case _DtTtChooserPatternOpen:
292         case _DtTtChooserPatternDestroy:
293             type = DTTT_PATTERN;
294             break;
295         case _DtTtChooserDtSessionQuit:
296             type = DTTT_DTSESSION;
297             break;
298         case _DtTtChooserDtFileDeleted:
299         case _DtTtChooserDtFileModified:
300         case _DtTtChooserDtFileReverted:
301         case _DtTtChooserDtFileMoved:
302         case _DtTtChooserDtFileSaved:
303         case _DtTtChooserDtFileQuit:
304             type = DTTT_DTFILE;
305             break;
306         case _DtTtChooserMessageHandlerSet:
307         case _DtTtChooserPatternSenderAdd:
308         case _DtTtChooserProcidSetDefault:
309         case _DtTtChooserProcidSuspend:
310         case _DtTtChooserProcidResume:
311         case _DtTtChooserDtProcidClose:
312             isString = True;
313             type = DTTT_PROCID;
314             break;
315     }
316     void *entity = DtTtNth( type, info->item_position - 1 );
317     std::ostrstream entityName;
318     if (isString) {
319             entityName << (char *)entity << ends;
320     } else {
321             entityName << entity << ends;
322     }
323     XmTextFieldSetString( instance->chooserText, entityName.str() );
324     delete entityName.str();
325     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
326 }
327
328
329 void 
330 choiceOkayed(
331     Widget widget,
332     XtPointer clientData,
333     XtPointer callData
334 )
335 {
336     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
337     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
338     
339     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
340     DtbTtChooserChooserInfo instance = (DtbTtChooserChooserInfo)clientData;
341     char *text = XmTextFieldGetString( instance->chooserText );
342     int ival;
343     XtVaGetValues( instance->chooserOkButton, XmNuserData, &ival, NULL );
344     _DtTtChooserAction choice = (_DtTtChooserAction)ival;
345     Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
346     switch (choice) {
347             int ival, fd;
348             Tt_message msg;
349             Tt_pattern pat;
350             Tt_pattern *pats;
351             Tt_status status;
352             char *func, *procid;
353             XtPointer xtPtr;
354             XtInputId id;
355             Widget newWidget;
356         case _DtTtChooserNone:
357             return;
358         case _DtTtChooserMessageCreateStandard:
359             msg = tttk_message_create( text );
360             status = DtTtSetLabel( label, "tt_message_create()", msg );
361             if (tt_is_err( status )) {
362                     break;
363             }
364             DtTtCreated( DTTT_MESSAGE, msg );
365             newWidget = DtTtMessageWidgetCreate(
366                                 dtb_ttsnoop_ttsnoop_win.ttsnoopWin, msg,
367                                 DtTtMessageWidgetUpdate );
368             status = tt_ptr_error( newWidget );
369             if (tt_is_err( status )) {
370                     return;
371             }
372             XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget ));
373             XtUnmanageChild( instance->chooser_shellform );
374             break;
375         case _DtTtChooserMessageOpSet:
376             XtVaGetValues( instance->chooserCancelButton,
377                            XmNuserData, &xtPtr, NULL );
378             _DtTtMessageUpdate( (Tt_message)xtPtr, choice, text );
379             XtUnmanageChild( instance->chooser_shellform );
380             break;
381         case _DtTtChooserPatternOpAdd:
382             XtVaGetValues( instance->chooserCancelButton,
383                            XmNuserData, &xtPtr, NULL );
384             _DtTtPatternUpdate( (Tt_pattern)xtPtr, choice, text );
385             XtUnmanageChild( instance->chooser_shellform );
386             break;
387         case _DtTtChooserMessageHandlerSet:
388             XtVaGetValues( instance->chooserCancelButton,
389                            XmNuserData, &xtPtr, NULL );
390             _DtTtMessageUpdate( (Tt_message)xtPtr, choice, text );
391             XtUnmanageChild( instance->chooser_shellform );
392             break;
393         case _DtTtChooserPatternSenderAdd:
394             XtVaGetValues( instance->chooserCancelButton,
395                            XmNuserData, &xtPtr, NULL );
396             _DtTtPatternUpdate( (Tt_pattern)xtPtr, choice, text );
397             XtUnmanageChild( instance->chooser_shellform );
398             break;
399         case _DtTtChooserMessageOpen:
400         case _DtTtChooserMessageDestroy:
401             if (text == 0) {
402                     return;
403             }
404             ival = 0;
405             sscanf( text, "%i", &ival );
406             msg = (Tt_message)ival;
407             if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
408                     return;
409             }
410             if (choice == _DtTtChooserMessageOpen) {
411                     Widget newWidget = DtTtMessageWidgetCreate(
412                                         dtb_ttsnoop_ttsnoop_win.ttsnoopWin,
413                                         msg, DtTtMessageWidgetUpdate );
414                     Tt_status status = tt_ptr_error( newWidget );
415                     if (tt_is_err( status )) {
416                             return;
417                     }
418                     XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget ));
419             } else {
420                     Widget msgWidget = DtTtMessageWidget( msg );
421                     Tt_status status = tttk_message_destroy( msg );
422                     if (status == TT_WRN_STOPPED) {
423                             DtTtSetLabel( label, "tttk_message_destroy()",
424                                           status );
425                             return;
426                     }
427                     DtTtDestroyed( DTTT_MESSAGE, msg );
428                     if (msgWidget != 0) {
429                             XtDestroyWidget( msgWidget );
430                     }
431                     _DtTtChooserSet( _DtTtChooserMessageDestroy );
432             }
433             break;
434         case _DtTtChooserPatternOpen:
435         case _DtTtChooserPatternDestroy:
436             if (text == 0) {
437                     return;
438             }
439             ival = 0;
440             sscanf( text, "%i", &ival );
441             pat = (Tt_pattern)ival;
442             if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
443                     return;
444             }
445             if (choice == _DtTtChooserPatternOpen) {
446                     Widget newWidget = DtTtPatternWidgetCreate(
447                                         dtb_ttsnoop_ttsnoop_win.ttsnoopWin,
448                                         pat, 0 );
449                     Tt_status status = tt_ptr_error( newWidget );
450                     if (tt_is_err( status )) {
451                             return;
452                     }
453                     XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget ));
454             } else {
455                     Widget patWidget = DtTtPatternWidget( pat );
456                     Tt_status status = tt_pattern_destroy( pat );
457                     if (status == TT_WRN_STOPPED) {
458                             DtTtSetLabel( label, "tt_pattern_destroy()",
459                                           status );
460                             return;
461                     }
462                     DtTtDestroyed( DTTT_PATTERN, pat );
463                     if (patWidget != 0) {
464                             XtDestroyWidget( patWidget );
465                     }
466                     _DtTtChooserSet( _DtTtChooserPatternDestroy );
467             }
468             break;
469         case _DtTtChooserDtSessionQuit:
470             if (text == 0) {
471                     return;
472             }
473             ival = 0;
474             sscanf( text, "%i", &ival );
475             pats = (Tt_pattern *)ival;
476             if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
477                     return;
478             }
479             text = (char *)tt_pattern_user( *pats, _DtTtPatsNameKey );
480             if (tt_is_err( tt_ptr_error( text )) || text == 0) {
481                     return;
482             }
483             status = ttdt_session_quit( text, pats, 1 );
484             DtTtSetLabel( label, "ttdt_session_quit()", status );
485             if (status == TT_OK) {
486                     DtTtDestroyed( DTTT_DTSESSION, pats );
487             }
488             XtUnmanageChild( instance->chooser_shellform );
489             break;
490         case _DtTtChooserDtFileDeleted:
491         case _DtTtChooserDtFileModified:
492         case _DtTtChooserDtFileReverted:
493         case _DtTtChooserDtFileMoved:
494         case _DtTtChooserDtFileSaved:
495         case _DtTtChooserDtFileQuit:
496             if (text == 0) {
497                     return;
498             }
499             ival = 0;
500             sscanf( text, "%i", &ival );
501             pats = (Tt_pattern *)ival;
502             if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
503                     return;
504             }
505             switch ((_DtTtChooserAction)choice) {
506                 case _DtTtChooserDtFileModified:
507                     status = ttdt_file_event( 0, TTDT_MODIFIED, pats, 1 );
508                     func = "ttdt_file_event(,TTDT_MODIFIED)";
509                     break;
510                 case _DtTtChooserDtFileReverted:
511                     status = ttdt_file_event( 0, TTDT_REVERTED, pats, 1 );
512                     func = "ttdt_file_event(,TTDT_REVERTED)";
513                     break;
514                 case _DtTtChooserDtFileSaved:
515                     status = ttdt_file_event( 0, TTDT_SAVED, pats, 1 );
516                     func = "ttdt_file_event(,TTDT_SAVED)";
517                     break;
518                 case _DtTtChooserDtFileQuit:
519                     status = ttdt_file_quit( pats, 1 );
520                     func = "ttdt_file_quit()";
521                     if (status == TT_OK) {
522                             DtTtDestroyed( DTTT_DTFILE, pats );
523                     }
524                     break;
525             }
526             DtTtSetLabel( label, func, status );
527             XtUnmanageChild( instance->chooser_shellform );
528         case _DtTtChooserProcidSetDefault:
529             status = tt_default_procid_set( text );
530             DtTtSetLabel( label, "tt_default_procid_set()", status );
531             XtUnmanageChild( instance->chooser_shellform );
532             break;
533         case _DtTtChooserProcidSuspend:
534             ival = DtTtIndex( DTTT_PROCID, text );
535             if (ival < 0) {
536                     return;
537             }
538             id = (XtInputId)DtTtNthClientDatum( DTTT_PROCID, ival );
539             if (id != 0) {
540                     XtRemoveInput( id );
541                     DtTtSetLabel( label, "XtRemoveInput()" );
542             }
543             XtUnmanageChild( instance->chooser_shellform );
544             break;
545         case _DtTtChooserProcidResume:
546             ival = DtTtIndex( DTTT_PROCID, text );
547             if (ival < 0) {
548                     return;
549             }
550             fd = tt_procid_fd( text );
551             if (tt_is_err( tt_int_error( fd ))) {
552                     return;
553             }
554             id = XtAppAddInput( XtWidgetToApplicationContext( label ),
555                                 fd, (XtPointer)XtInputReadMask,
556                                 tttk_Xt_input_handler, text );
557             DtTtSetLabel( label, "XtAppAddInput()", (int)id );
558             if (id != 0) {
559                     DtTtNthClientDatumSet( DTTT_PROCID, ival, (void *)id );
560             }
561             XtUnmanageChild( instance->chooser_shellform );
562             break;
563         case _DtTtChooserDtProcidClose:
564             status = ttdt_close( text, 0, 1 );
565             DtTtSetLabel( label, "ttdt_close()", status );
566             ival = DtTtIndex( DTTT_PROCID, text );
567             if (ival < 0) {
568                     return;
569             }
570             id = (XtInputId)DtTtNthClientDatum( DTTT_PROCID, ival );
571             if (id != 0) {
572                     XtRemoveInput( id );
573             }
574             DtTtDestroyed( DTTT_PROCID, text );
575             XtUnmanageChild( instance->chooser_shellform );
576             break;
577     }
578     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
579 }
580
581
582 void 
583 ttChooserHelp(
584     Widget widget,
585     XtPointer clientData,
586     XtPointer callData
587 )
588 {
589     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
590     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
591     
592     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
593     DtbTtChooserChooserInfo instance = (DtbTtChooserChooserInfo)clientData;
594     int ival;
595     XtVaGetValues( instance->chooserOkButton, XmNuserData, &ival, NULL );
596     _DtTtChooserAction choice = (_DtTtChooserAction)ival;
597     Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
598     switch (choice) {
599             char *op;
600         case _DtTtChooserNone:
601             return;
602         case _DtTtChooserMessageOpSet:
603         case _DtTtChooserMessageCreateStandard:
604         case _DtTtChooserPatternOpAdd:
605             op = XmTextFieldGetString( instance->chooserText );
606             if (op != 0) {
607                     _DtMan( label, op );
608             }
609             if (choice == _DtTtChooserMessageOpSet) {
610                     _DtMan( label, "tt_message_op_set" );
611             } else {
612                     _DtMan( label, "tt_pattern_op_add" );
613             }
614             break;
615         case _DtTtChooserMessageOpen:
616             _DtMan( label, "tt_message_print" );
617             break;
618         case _DtTtChooserMessageHandlerSet:
619             _DtMan( label, "tt_message_handler_set" );
620             break;
621         case _DtTtChooserMessageDestroy:
622             _DtMan( label, "tt_message_destroy" );
623             break;
624         case _DtTtChooserPatternOpen:
625             _DtMan( label, "tt_pattern_print" );
626             break;
627         case _DtTtChooserPatternSenderAdd:
628             _DtMan( label, "tt_pattern_sender_add" );
629             break;
630         case _DtTtChooserPatternDestroy:
631             _DtMan( label, "tt_pattern_destroy" );
632             break;
633         case _DtTtChooserDtSessionQuit:
634             _DtMan( label, "ttdt_session_quit" );
635             break;
636         case _DtTtChooserDtFileDeleted:
637         case _DtTtChooserDtFileModified:
638         case _DtTtChooserDtFileReverted:
639         case _DtTtChooserDtFileMoved:
640         case _DtTtChooserDtFileSaved:
641             _DtMan( label, "ttdt_file_event" );
642             break;
643         case _DtTtChooserDtFileQuit:
644             _DtMan( label, "ttdt_file_quit" );
645             break;
646         case _DtTtChooserProcidSetDefault:
647             _DtMan( label, "tt_default_procid_set" );
648             break;
649         case _DtTtChooserProcidSuspend:
650             _DtMan( label, "XtRemoveInput" );
651             break;
652         case _DtTtChooserProcidResume:
653             _DtMan( label, "XtAppAddInput" );
654             break;
655         case _DtTtChooserDtProcidClose:
656             _DtMan( label, "ttdt_close" );
657             break;
658     }
659     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
660 }
661
662
663
664 /**************************************************************************
665  *** DTB_USER_CODE_START
666  ***
667  *** All automatically-generated data and functions have been defined.
668  ***
669  *** Add new functions here, or at the top of the file.
670  ***/
671
672 /*** DTB_USER_CODE_END
673  ***
674  *** End of user code section
675  ***
676  **************************************************************************/
677
678