/*** DTB_USER_CODE_START vvv Add file header below vvv ***/ //%% (c) Copyright 1993, 1994 Hewlett-Packard Company //%% (c) Copyright 1993, 1994 International Business Machines Corp. //%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. //%% (c) Copyright 1993, 1994 Novell, Inc. //%% $XConsortium: callbackChooser_stubs.C.src /main/3 1995/11/06 17:12:25 rswiston $ /*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/ /* * File: callbackChooser_stubs.c * Contains: Module callbacks and connection functions * * This file was generated by dtcodegen, from module callbackChooser * * Any text may be added between the DTB_USER_CODE_START and * DTB_USER_CODE_END comments (even non-C code). Descriptive comments * are provided only as an aid. * * ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. ** * ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR ** * ** DELETE THE GENERATED COMMENTS! ** */ #include #include #include #include "dtb_utils.h" #include "callbackChooser_ui.h" /* * Header files for cross-module connections */ #include "ttsnoop_ui.h" /************************************************************************** *** DTB_USER_CODE_START *** *** All necessary header files have been included. *** *** Add include files, types, macros, externs, and user functions here. ***/ #include #include #include "DtTt.h" extern std::ofstream snoopStream; typedef enum { DoJustPrint, DoReply, DoFail, DoReject, DoAccept, DoAbstain, DoOpen } What2Do; static void _DtTtMsgCbChooserSet( void *entity, int isMessage, const char *title ) { DtbCallbackChooserCallbackChooserInfo instance = &dtb_callback_chooser_callback_chooser; if (! instance->initialized) { dtb_callback_chooser_callback_chooser_initialize( instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin ); } XtVaSetValues( instance->callbackChooser, XmNtitle, title, NULL ); XtPointer xtPtr = (XtPointer) (intptr_t) isMessage; XtVaSetValues( instance->callbackAddButton, XmNuserData, xtPtr, NULL ); XtVaSetValues( instance->callbackAddCancelButton, XmNuserData, entity, NULL ); XtManageChild( instance->callbackChooser_shellform ); } void _DtTtMsgCbChooserSet( Tt_pattern pat ) { _DtTtMsgCbChooserSet( pat, 0, "tt_pattern_callback_add" ); } void _DtTtMsgCbChooserSet( Tt_message msg ) { _DtTtMsgCbChooserSet( msg, 1, "tt_message_callback_add" ); } static Tt_callback_action openIt( Tt_message msg, Tt_pattern pat ) { DtTtCreated( DTTT_MESSAGE, msg ); snoopIt( "Tt_message_callback", (void *) openIt, msg, pat, True ); Widget newWidget = DtTtMessageWidgetCreate( dtb_ttsnoop_ttsnoop_win.ttsnoopWin, msg, DtTtMessageWidgetUpdate ); if (! tt_is_err( tt_ptr_error( newWidget ) )) { XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget )); } return TT_CALLBACK_PROCESSED; } static Tt_callback_action ucb( Tt_message msg, Tt_pattern pat, Tt_message_callback func, What2Do action, Boolean destroy, Boolean cont ) { DtTtCreated( DTTT_MESSAGE, msg ); if (snoopStream.bad()) { return TT_CALLBACK_CONTINUE; } snoopStream << "(Tt_message_callback)" << func << "( "; snoopStream << "(Tt_message)" << (void *)msg << ", "; snoopStream << "(Tt_pattern)" << (void *)pat << " ): "; char *msgString = tt_message_print( msg ); Tt_status status = tt_ptr_error( msgString ); if (status == TT_OK) { snoopStream << endl << msgString << endl; } else { snoopStream << status << endl; } tt_free( msgString ); Tt_status (*actionFunc)(Tt_message) = 0; char *actionFuncName = 0; switch (action) { default: case DoJustPrint: break; case DoReply: actionFunc = tt_message_reply; actionFuncName = "tt_message_reply"; break; case DoFail: actionFunc = tt_message_fail; actionFuncName = "tt_message_fail"; break; case DoReject: actionFunc = tt_message_reject; actionFuncName = "tt_message_reject"; break; case DoAccept: actionFunc = tt_message_accept; actionFuncName = "tt_message_accept"; break; case DoAbstain: destroy = 1; break; } if (actionFunc != 0) { snoopStream << func << "(): " << actionFuncName << "(" << msg << ") = " << (*actionFunc)( msg ) << endl; } if (destroy) { status = tttk_message_destroy( msg ); snoopStream << func << "(): tttk_message_destroy(" << msg << ") = " << status << endl; if (status == TT_OK) { DtTtDestroyed( DTTT_MESSAGE, msg ); } } Tt_callback_action val = TT_CALLBACK_PROCESSED; if (cont) { val = TT_CALLBACK_CONTINUE; } snoopStream << func << "(): return " << val << endl; return val; } static Tt_callback_action mcbJustPrint_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbJustPrint_Cont, DoJustPrint, 0, 0 ); } static Tt_callback_action mcbJustPrint_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbJustPrint_Done, DoJustPrint, 0, 1 ); } static Tt_callback_action mcbJustPrint_Destroy_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbJustPrint_Destroy_Cont, DoJustPrint, 1, 0 ); } static Tt_callback_action mcbJustPrint_Destroy_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbJustPrint_Destroy_Done, DoJustPrint, 1, 1 ); } static Tt_callback_action mcbReply_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReply_Cont, DoReply, 0, 0 ); } static Tt_callback_action mcbReply_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReply_Done, DoReply, 0, 1 ); } static Tt_callback_action mcbReply_Destroy_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReply_Destroy_Cont, DoReply, 1, 0 ); } static Tt_callback_action mcbReply_Destroy_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReply_Destroy_Done, DoReply, 1, 1 ); } static Tt_callback_action mcbFail_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbFail_Cont, DoFail, 0, 0 ); } static Tt_callback_action mcbFail_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbFail_Done, DoFail, 0, 1 ); } static Tt_callback_action mcbFail_Destroy_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbFail_Destroy_Cont, DoFail, 1, 0 ); } static Tt_callback_action mcbFail_Destroy_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbFail_Destroy_Done, DoFail, 1, 1 ); } static Tt_callback_action mcbReject_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReject_Cont, DoReject, 0, 0 ); } static Tt_callback_action mcbReject_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReject_Done, DoReject, 0, 1 ); } static Tt_callback_action mcbReject_Destroy_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReject_Destroy_Cont, DoReject, 1, 0 ); } static Tt_callback_action mcbReject_Destroy_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbReject_Destroy_Done, DoReject, 1, 1 ); } static Tt_callback_action mcbAccept_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAccept_Cont, DoAccept, 0, 0 ); } static Tt_callback_action mcbAccept_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAccept_Done, DoAccept, 0, 1 ); } static Tt_callback_action mcbAccept_Destroy_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAccept_Destroy_Cont, DoAccept, 1, 0 ); } static Tt_callback_action mcbAccept_Destroy_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAccept_Destroy_Done, DoAccept, 1, 1 ); } static Tt_callback_action mcbAbstain_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAbstain_Cont, DoAbstain, 0, 0 ); } static Tt_callback_action mcbAbstain_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAbstain_Done, DoAbstain, 0, 1 ); } static Tt_callback_action mcbAbstain_Destroy_Cont( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAbstain_Destroy_Cont, DoAbstain, 1, 0 ); } static Tt_callback_action mcbAbstain_Destroy_Done( Tt_message m, Tt_pattern p ) { return ucb( m, p, mcbAbstain_Destroy_Done, DoAbstain, 1, 1 ); } Tt_message_callback callbacks[] = { mcbJustPrint_Cont, mcbJustPrint_Done, mcbJustPrint_Destroy_Cont, mcbJustPrint_Destroy_Done, mcbReply_Cont, mcbReply_Done, mcbReply_Destroy_Cont, mcbReply_Destroy_Done, mcbFail_Cont, mcbFail_Done, mcbFail_Destroy_Cont, mcbFail_Destroy_Done, mcbReject_Cont, mcbReject_Done, mcbReject_Destroy_Cont, mcbReject_Destroy_Done, mcbAccept_Cont, mcbAccept_Done, mcbAccept_Destroy_Cont, mcbAccept_Destroy_Done, mcbAbstain_Cont, mcbAbstain_Done, mcbAbstain_Destroy_Cont, mcbAbstain_Destroy_Done }; /*** DTB_USER_CODE_END *** *** End of user code section *** **************************************************************************/ void callbackChooser_callbackAddCancelButton_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtUnmanageChild(instance->callbackChooser_shellform); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Open_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, False); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Open_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, False); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Print_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Accept_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Accept_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Print_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Abstain_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Abstain_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Reply_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Reply_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Reject_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Reject_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Fail_item_CB1( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgDestroyChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackChooser_msgActionChoice_Fail_item_CB2( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; if (!(instance->initialized)) { dtb_callback_chooser_callback_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin); } XtSetSensitive(instance->msgReturnChoice, True); /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackOkayed( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; Tt_message msg = 0; Tt_pattern pat = 0; XtPointer xtPtr = 0; int isMessage = 0; XtVaGetValues( instance->callbackAddButton, XmNuserData, &xtPtr, NULL ); isMessage = (int) (long) xtPtr; XtVaGetValues( instance->callbackAddCancelButton, XmNuserData, &xtPtr, NULL ); msg = (Tt_message)xtPtr; pat = (Tt_pattern)xtPtr; What2Do action = DoOpen; Widget actionWidget; XtVaGetValues( instance->msgActionChoice, XmNmenuHistory, &actionWidget, NULL ); if (actionWidget == instance->msgActionChoice_items.Open_item) { action = DoOpen; } else if (actionWidget == instance->msgActionChoice_items.Print_item) { action = DoJustPrint; } else if (actionWidget == instance->msgActionChoice_items.Accept_item) { action = DoAccept; } else if (actionWidget == instance->msgActionChoice_items.Abstain_item) { action = DoAbstain; } else if (actionWidget == instance->msgActionChoice_items.Reply_item) { action = DoReply; } else if (actionWidget == instance->msgActionChoice_items.Reject_item) { action = DoReject; } else if (actionWidget == instance->msgActionChoice_items.Fail_item) { action = DoFail; } int destroy = 0; Boolean destroyBool; XtVaGetValues( instance->msgDestroyChoice_items.Destroy_item, XmNset, &destroyBool, NULL ); if (destroyBool) { destroy = 1; } Tt_callback_action returnVal = TT_CALLBACK_CONTINUE; Widget returnWidget; XtVaGetValues( instance->msgReturnChoice, XmNmenuHistory, &returnWidget, NULL ); if (returnWidget == instance->msgReturnChoice_items.PROCESSED_item) { returnVal = TT_CALLBACK_PROCESSED; } Tt_message_callback func; switch (action) { case DoOpen: func = openIt; break; case DoJustPrint: case DoReply: case DoFail: case DoReject: case DoAccept: case DoAbstain: func = callbacks[ ((int)action)*4 + destroy*2 + (int)returnVal ]; break; } if (isMessage) { _DtTtMessageUpdate( msg, func ); } else { _DtTtPatternUpdate( pat, func ); } XtUnmanageChild( instance->callbackChooser_shellform ); /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } void callbackHelp( Widget widget, XtPointer clientData, XtPointer callData ) { /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/ /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ DtbCallbackChooserCallbackChooserInfo instance = (DtbCallbackChooserCallbackChooserInfo)clientData; XtPointer xtPtr = 0; int isMessage = 0; XtVaGetValues( instance->callbackAddButton, XmNuserData, &xtPtr, NULL ); isMessage = (int) (long) xtPtr; Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label; if (isMessage) { _DtMan( label, "tt_message_callback_add" ); } else { _DtMan( label, "tt_pattern_callback_add" ); } /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/ } /************************************************************************** *** DTB_USER_CODE_START *** *** All automatically-generated data and functions have been defined. *** *** Add new functions here, or at the top of the file. ***/ /*** DTB_USER_CODE_END *** *** End of user code section *** **************************************************************************/