/*
 * This file was generated by genc.
 * Be aware that modifications of this file will be lost,
 * when genc is executed!

Creation: Sun Jun  5 18:42:18 GMT 1994 on mohegan
Author: genc
Version: 0.96999999999999997335


 */

#define CALLBACK_C

#include "wafe.h"
#include <X11/IntrinsicP.h>

#ifdef ATHENA
#include <X11/Xaw/Box.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Clock.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Command.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Dialog.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Form.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Grip.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Label.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/List.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Logo.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Mailbox.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/MenuButton.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Paned.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Scrollbar.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/SimpleMenu.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Sme.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/SmeBSB.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/SmeLine.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/StripChart.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/AsciiText.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Toggle.h>
#endif
#ifdef ATHENA
#include <X11/Xaw/Viewport.h>
#endif
#ifdef HTML
#include <HTML.h>
#endif
#ifdef MOTIF11
#include <Xm/ArrowB.h>
#endif
#ifdef MOTIF11
#include <Xm/ArrowBG.h>
#endif
#ifdef MOTIF11
#include <Xm/BulletinB.h>
#endif
#ifdef MOTIF11
#include <Xm/CascadeB.h>
#endif
#ifdef MOTIF11
#include <Xm/CascadeBG.h>
#endif
#ifdef MOTIF11
#include <Xm/Command.h>
#endif
#ifdef MOTIF11
#include <Xm/DialogS.h>
#endif
#ifdef MOTIF11
#include <Xm/DrawingA.h>
#endif
#ifdef MOTIF11
#include <Xm/DrawnB.h>
#endif
#ifdef MOTIF11
#include <Xm/FileSB.h>
#endif
#ifdef MOTIF11
#include <Xm/Form.h>
#endif
#ifdef MOTIF11
#include <Xm/Frame.h>
#endif
#ifdef MOTIF11
#include <Xm/Label.h>
#endif
#ifdef MOTIF11
#include <Xm/LabelG.h>
#endif
#ifdef MOTIF11
#include <Xm/List.h>
#endif
#ifdef MOTIF11
#include <Xm/MainW.h>
#endif
#ifdef MOTIF11
#include <Xm/MenuShell.h>
#endif
#ifdef MOTIF11
#include <Xm/MessageB.h>
#endif
#ifdef MOTIF11
#include <Xm/PanedW.h>
#endif
#ifdef MOTIF11
#include <Xm/PushB.h>
#endif
#ifdef MOTIF11
#include <Xm/PushBG.h>
#endif
#ifdef MOTIF11
#include <Xm/RowColumn.h>
#endif
#ifdef MOTIF11
#include <Xm/Scale.h>
#endif
#ifdef MOTIF11
#include <Xm/ScrollBar.h>
#endif
#ifdef MOTIF11
#include <Xm/ScrolledW.h>
#endif
#ifdef MOTIF11
#include <Xm/SelectioB.h>
#endif
#ifdef MOTIF11
#include <Xm/Separator.h>
#endif
#ifdef MOTIF11
#include <Xm/SeparatoG.h>
#endif
#ifdef MOTIF11
#include <Xm/Text.h>
#endif
#ifdef MOTIF11
#include <Xm/TextF.h>
#endif
#ifdef MOTIF11
#include <Xm/ToggleB.h>
#endif
#ifdef MOTIF11
#include <Xm/ToggleBG.h>
#endif
#ifdef MOTIF12
#include <Xm/DragDrop.h>
#endif
#ifdef PLOTTER
#include <Plotter.h>
#endif
#ifdef XMGRAPH
#include <Arc.h>
#endif
#ifdef XMGRAPH
#include <Graph.h>
#endif
#ifdef XT
#ifdef LAYOUT
#include "Layout.h"
#endif
#endif


#ifdef HTML
void wafeHTMLfreeImageData();
#endif
#ifdef MOTIF11
void wafeFreeStringTable();
#endif


XrmQuark qsubmitFormCallback;
XrmQuark qmotionVerifyCallback;
XrmQuark qvalueChangedCallback;
XrmQuark qconvertProc;
XrmQuark qpageIncrementCallback;
XrmQuark qbrowseSelectionCallback;
XrmQuark qjumpProc;
XrmQuark qinputCallback;
XrmQuark qscrollProc;
XrmQuark qnoMatchCallback;
XrmQuark qtoBottomCallback;
XrmQuark qdragProc;
XrmQuark qanchorCallback;
XrmQuark qdragCallback;
XrmQuark qtransferProc;
XrmQuark qexposeCallback;
XrmQuark qnewNodeCallback;
XrmQuark qcallback;
XrmQuark qslideCallback;
XrmQuark qnewArcCallback;
XrmQuark qmotionCallback;
XrmQuark qarcMovedCallback;
XrmQuark qcommandChangedCallback;
XrmQuark qselectSubgraphCallback;
XrmQuark qclickCallback;
XrmQuark qnodeMovedCallback;
XrmQuark qmodifyVerifyCallback;
XrmQuark qmultipleSelectionCallback;
XrmQuark qpageDecrementCallback;
XrmQuark qdeselectCallback;
XrmQuark qselectArcCallback;
XrmQuark qarcEditedCallback;
XrmQuark qselectNodeCallback;
XrmQuark qactivateCallback;
XrmQuark qokCallback;
XrmQuark qdecrementCallback;
XrmQuark qdefaultActionCallback;
XrmQuark qdropProc;
XrmQuark qincrementCallback;
XrmQuark qlosingFocusCallback;
XrmQuark qapplyCallback;
XrmQuark qextendedSelectionCallback;
XrmQuark qtoTopCallback;
XrmQuark qcommandEnteredCallback;
XrmQuark qresizeCallback;
XrmQuark qsingleSelectionCallback;


void
wafeCallbackQuarkInitialize()
     {
     qsubmitFormCallback = WafePermStringToQuark("submitFormCallback");
     qmotionVerifyCallback = WafePermStringToQuark("motionVerifyCallback");
     qvalueChangedCallback = WafePermStringToQuark("valueChangedCallback");
     qconvertProc = WafePermStringToQuark("convertProc");
     qpageIncrementCallback = WafePermStringToQuark("pageIncrementCallback");
     qbrowseSelectionCallback = WafePermStringToQuark("browseSelectionCallback");
     qjumpProc = WafePermStringToQuark("jumpProc");
     qinputCallback = WafePermStringToQuark("inputCallback");
     qscrollProc = WafePermStringToQuark("scrollProc");
     qnoMatchCallback = WafePermStringToQuark("noMatchCallback");
     qtoBottomCallback = WafePermStringToQuark("toBottomCallback");
     qdragProc = WafePermStringToQuark("dragProc");
     qanchorCallback = WafePermStringToQuark("anchorCallback");
     qdragCallback = WafePermStringToQuark("dragCallback");
     qtransferProc = WafePermStringToQuark("transferProc");
     qexposeCallback = WafePermStringToQuark("exposeCallback");
     qnewNodeCallback = WafePermStringToQuark("newNodeCallback");
     qcallback = WafePermStringToQuark("callback");
     qslideCallback = WafePermStringToQuark("slideCallback");
     qnewArcCallback = WafePermStringToQuark("newArcCallback");
     qmotionCallback = WafePermStringToQuark("motionCallback");
     qarcMovedCallback = WafePermStringToQuark("arcMovedCallback");
     qcommandChangedCallback = WafePermStringToQuark("commandChangedCallback");
     qselectSubgraphCallback = WafePermStringToQuark("selectSubgraphCallback");
     qclickCallback = WafePermStringToQuark("clickCallback");
     qnodeMovedCallback = WafePermStringToQuark("nodeMovedCallback");
     qmodifyVerifyCallback = WafePermStringToQuark("modifyVerifyCallback");
     qmultipleSelectionCallback = WafePermStringToQuark("multipleSelectionCallback");
     qpageDecrementCallback = WafePermStringToQuark("pageDecrementCallback");
     qdeselectCallback = WafePermStringToQuark("deselectCallback");
     qselectArcCallback = WafePermStringToQuark("selectArcCallback");
     qarcEditedCallback = WafePermStringToQuark("arcEditedCallback");
     qselectNodeCallback = WafePermStringToQuark("selectNodeCallback");
     qactivateCallback = WafePermStringToQuark("activateCallback");
     qokCallback = WafePermStringToQuark("okCallback");
     qdecrementCallback = WafePermStringToQuark("decrementCallback");
     qdefaultActionCallback = WafePermStringToQuark("defaultActionCallback");
     qdropProc = WafePermStringToQuark("dropProc");
     qincrementCallback = WafePermStringToQuark("incrementCallback");
     qlosingFocusCallback = WafePermStringToQuark("losingFocusCallback");
     qapplyCallback = WafePermStringToQuark("applyCallback");
     qextendedSelectionCallback = WafePermStringToQuark("extendedSelectionCallback");
     qtoTopCallback = WafePermStringToQuark("toTopCallback");
     qcommandEnteredCallback = WafePermStringToQuark("commandEnteredCallback");
     qresizeCallback = WafePermStringToQuark("resizeCallback");
     qsingleSelectionCallback = WafePermStringToQuark("singleSelectionCallback");
     }



addResInfo *
wafeGetAdditionalResources(wClass,num)
WidgetClass wClass;
Cardinal    *num;
      {
#ifdef MOTIF11
      if (wClass == xmDialogShellWidgetClass)
           {
           static addResInfo xmDialogShellWidgetClass_addResList[] = {
               {"deleteResponse", "DeleteResponse"},
               {NULL,NULL}
           };
           *num = 1;
           return xmDialogShellWidgetClass_addResList;
           }
#endif
#ifdef MOTIF11
      if (wClass == xmTextWidgetClass)
           {
           static addResInfo xmTextWidgetClass_addResList[] = {
               {"pendingDelete", "Boolean"},
               {"selectionArray", "Pointer"},
               {"selectionArrayCount", "Int"},
               {"selectThreshold", "Int"},
               {"blinkRate", "Int"},
               {"columns", "Short"},
               {"cursorPositionVisible", "Boolean"},
               {"fontList", "FontList"},
               {"rows", "Short"},
               {"resizeHeight", "Boolean"},
               {"resizeWidth", "Boolean"},
               {"wordWrap", "Boolean"},
               {"scrollHorizontal", "Boolean"},
               {"scrollLeftSide", "Boolean"},
               {"scrollTopSide", "Boolean"},
               {"scrollVertical", "Boolean"},
               {NULL,NULL}
           };
           *num = 16;
           return xmTextWidgetClass_addResList;
           }
#endif
#ifdef MOTIF12
      if (wClass == xmDragContextWidgetClass)
           {
           static addResInfo xmDragContextWidgetClass_addResList[] = {
               {"convertProc", "ConvertSelectionIncrProc"},
               {"dragOperations", "DragOperations"},
               {NULL,NULL}
           };
           *num = 2;
           return xmDragContextWidgetClass_addResList;
           }
#endif
#ifdef MOTIF12
      if (wClass == xmDropSiteManagerObjectClass)
           {
           static addResInfo xmDropSiteManagerObjectClass_addResList[] = {
               {"animationPixmap", "Pixmap"},
               {"animationPixmapDepth", "Int"},
               {"animationStyle", "AnimationStyle"},
               {"dragProc", "CallbackProc"},
               {"dropProc", "CallbackProc"},
               {"dropRectangles", "RectangleList"},
               {"dropSiteActivity", "DropSiteActivity"},
               {"dropSiteOperations", "DropSiteOperations"},
               {"dropSiteType", "DropSiteType"},
               {"importTargets", "AtomList"},
               {"numDropRectangles", "Cardinal"},
               {"numImportTargets", "Cardinal"},
               {NULL,NULL}
           };
           *num = 12;
           return xmDropSiteManagerObjectClass_addResList;
           }
#endif
#ifdef MOTIF12
      if (wClass == xmDropTransferObjectClass)
           {
           static addResInfo xmDropTransferObjectClass_addResList[] = {
               {"transferProc", "SelectionCallbackProc"},
               {NULL,NULL}
           };
           *num = 1;
           return xmDropTransferObjectClass_addResList;
           }
#endif

      *num = 0;
      return (NULL);
      }


freeProc
wafeGetFreeProc(attribute)
XrmQuark attribute;
     {
#ifdef HTML
     {extern XrmQuark qimageList;
     if (attribute == qimageList)
          return (freeProc)wafeHTMLfreeImageData;
     }
#endif
#ifdef MOTIF11
     {extern XrmQuark qXmString;
     if (attribute == qXmString)
          return (freeProc)XmStringFree;
     }
#endif
#ifdef MOTIF11
     {extern XrmQuark qXmStringTable;
     if (attribute == qXmStringTable)
          return (freeProc)wafeFreeStringTable;
     }
#endif
#ifdef XT
     {extern XrmQuark qbusyWindow;
     if (attribute == qbusyWindow)
          return (freeProc)NULL;
     }
#endif

     return XtFree;
     }


void
wafeExecCallbackProc(w, clientData, callData)
Widget     w;
XtPointer  clientData, callData;
     {
     char     command[MESSAGE_COMMAND_LENGTH];       
     XrmQuark attrib = *(XrmQuark *) clientData;
     char    *input = ((char *)clientData + sizeof(XrmQuark));
     char    *output = command;
     WidgetClass wClass = XtClass(w);



     DBUG_ENTER("execCallbackProc");
     DBUG_PRINT("callback", ("client data %p <%s>", input,input));

     while (*input != '\0')
          {
          if (*input == '%')
               {
               char chi = *++input;
               if (chi == 'w')
                    {
#ifndef PRER6
		    strcpy(output, XtName(
                        (strcmp(wClass->core_class.class_name,"Hook")) ?
			w : ((XtDestroyHookDataRec *)callData)->widget));
#else
		    strcpy(output, XtName(w));
#endif
                    output += strlen(output);
                    }
	       else
               if (chi == 'W')
                    {
#ifndef PRER6
                    sprintf(output, "%ld", (long)
                        (strcmp(wClass->core_class.class_name,"Hook")) ?
			    w : ((XtDestroyHookDataRec *)callData)->widget);
#else
                    sprintf(output, "%ld", (long)w);
#endif
                    output += strlen(output);
                    }

#ifdef ATHENA
               else if (chi == 'i' &&
                        wClass == listWidgetClass &&
                        attrib == qcallback)
                    {
                    sprintf(output, "%d",  ((XawListReturnStruct *)callData)->list_index);
                    output += strlen(output);
                    }
#endif
#ifdef ATHENA
               else if (chi == 's' &&
                        wClass == listWidgetClass &&
                        attrib == qcallback)
                    {
                    wafeEscapedStrcpy(output, ((XawListReturnStruct *)callData)->string);
                    output += strlen(output);
                    }
#endif
#ifdef ATHENA
               else if (chi == 'p' &&
                        wClass == scrollbarWidgetClass &&
                        attrib == qjumpProc)
                    {
                    sprintf(output, "%f",  *(float *)callData);
                    output += strlen(output);
                    }
#endif
#ifdef ATHENA
               else if (chi == 'p' &&
                        wClass == scrollbarWidgetClass &&
                        attrib == qscrollProc)
                    {
                    sprintf(output, "%d",  (int)callData);
                    output += strlen(output);
                    }
#endif
#ifdef HTML
               else if (chi == 'h' &&
                        wClass == htmlWidgetClass &&
                        attrib == qanchorCallback)
                    {
                    wafeEscapedStrcpy(output, ((WbAnchorCallbackData *)callData)->href);
                    output += strlen(output);
                    }
#endif
#ifdef HTML
               else if (chi == 'i' &&
                        wClass == htmlWidgetClass &&
                        attrib == qanchorCallback)
                    {
                    sprintf(output, "%d",  ((WbAnchorCallbackData *)callData)->element_id);
                    output += strlen(output);
                    }
#endif
#ifdef HTML
               else if (chi == 't' &&
                        wClass == htmlWidgetClass &&
                        attrib == qanchorCallback)
                    {
                    wafeEscapedStrcpy(output, ((WbAnchorCallbackData *)callData)->text);
                    output += strlen(output);
                    }
#endif
#ifdef HTML
               else if (chi == 'h' &&
                        wClass == htmlWidgetClass &&
                        attrib == qsubmitFormCallback)
                    {
                    wafeEscapedStrcpy(output, ((WbFormCallbackData *)callData)->href);
                    output += strlen(output);
                    }
#endif
#ifdef HTML
               else if (chi == 'n' &&
                        wClass == htmlWidgetClass &&
                        attrib == qsubmitFormCallback)
                    {
                    char *p = (char *)Tcl_Merge( ((WbFormCallbackData *)callData)->attribute_count, ((WbFormCallbackData *)callData)->attribute_names);strcpy(output,p);
                    output += strlen(output);
                    XtFree(p);
                    }
#endif
#ifdef HTML
               else if (chi == 'v' &&
                        wClass == htmlWidgetClass &&
                        attrib == qsubmitFormCallback)
                    {
                    char *p = (char *)Tcl_Merge( ((WbFormCallbackData *)callData)->attribute_count, ((WbFormCallbackData *)callData)->attribute_values);strcpy(output,p);
                    output += strlen(output);
                    XtFree(p);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'c' &&
                        wClass == xmArrowButtonWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_ACTIVATE))
                    {
                    sprintf(output, "%d",  ((XmArrowButtonCallbackStruct *)callData)->click_count);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'c' &&
                        wClass == xmArrowButtonGadgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_ACTIVATE))
                    {
                    sprintf(output, "%d",  ((XmArrowButtonCallbackStruct *)callData)->click_count);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmCommandWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_COMMAND_CHANGED))
                    {
                    wafeEscapedXmString2String(output, ((XmCommandCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmCommandWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_COMMAND_ENTERED))
                    {
                    wafeEscapedXmString2String(output, ((XmCommandCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'w' &&
                        wClass == xmDrawingAreaWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_EXPOSE))
                    {
                    sprintf(output, "%p",  (XtPointer)((XmDrawingAreaCallbackStruct *)callData)->window);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'w' &&
                        wClass == xmDrawingAreaWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_INPUT))
                    {
                    sprintf(output, "%p",  (XtPointer)((XmDrawingAreaCallbackStruct *)callData)->window);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'w' &&
                        wClass == xmDrawingAreaWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_RESIZE))
                    {
                    sprintf(output, "%p",  (XtPointer)((XmDrawingAreaCallbackStruct *)callData)->window);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'c' &&
                        wClass == xmDrawnButtonWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_ACTIVATE))
                    {
                    sprintf(output, "%d",  ((XmDrawnButtonCallbackStruct *)callData)->click_count);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'w' &&
                        wClass == xmDrawnButtonWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_EXPOSE))
                    {
                    sprintf(output, "%p",  (XtPointer)((XmDrawnButtonCallbackStruct *)callData)->window);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'w' &&
                        wClass == xmDrawnButtonWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_RESIZE))
                    {
                    sprintf(output, "%p",  (XtPointer)((XmDrawnButtonCallbackStruct *)callData)->window);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'd' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_APPLY))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->dir);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'm' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_APPLY))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->mask);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_APPLY))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->pattern);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_APPLY))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'd' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NO_MATCH))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->dir);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'm' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NO_MATCH))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->mask);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NO_MATCH))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->pattern);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NO_MATCH))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'd' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_OK))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->dir);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'm' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_OK))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->mask);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_OK))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->pattern);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmFileSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_OK))
                    {
                    wafeEscapedXmString2String(output, ((XmFileSelectionBoxCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_BROWSE_SELECT))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->item_position);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_BROWSE_SELECT))
                    {
                    wafeEscapedXmString2String(output, ((XmListCallbackStruct *)callData)->item);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_BROWSE_SELECT))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->selection_type);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NODE_DOUBLE_CLICK || ((XmAnyCallbackStruct *)callData)->reason == XmCR_ARC_DOUBLE_CLICK || ((XmAnyCallbackStruct *)callData)->reason == XmCR_DOUBLE_CLICK))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->item_position);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NODE_DOUBLE_CLICK || ((XmAnyCallbackStruct *)callData)->reason == XmCR_ARC_DOUBLE_CLICK || ((XmAnyCallbackStruct *)callData)->reason == XmCR_DOUBLE_CLICK))
                    {
                    wafeEscapedXmString2String(output, ((XmListCallbackStruct *)callData)->item);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NODE_DOUBLE_CLICK || ((XmAnyCallbackStruct *)callData)->reason == XmCR_ARC_DOUBLE_CLICK || ((XmAnyCallbackStruct *)callData)->reason == XmCR_DOUBLE_CLICK))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->selection_type);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'P' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_EXTENDED_SELECT))
                    {
                    wafeCvtIntsToTcl(output, ((XmListCallbackStruct *)callData)->selected_item_count, ((XmListCallbackStruct *)callData)->selected_item_positions);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'S' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_EXTENDED_SELECT))
                    {
                    char *p = (char *)wafeCvtXmStringTable2String( ((XmListCallbackStruct *)callData)->selected_item_count, ((XmListCallbackStruct *)callData)->selected_items);strcpy(output,p);
                    output += strlen(output);
                    XtFree(p);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_EXTENDED_SELECT))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->selection_type);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'P' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MULTIPLE_SELECT))
                    {
                    wafeCvtIntsToTcl(output, ((XmListCallbackStruct *)callData)->selected_item_count, ((XmListCallbackStruct *)callData)->selected_item_positions);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'S' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MULTIPLE_SELECT))
                    {
                    char *p = (char *)wafeCvtXmStringTable2String( ((XmListCallbackStruct *)callData)->selected_item_count, ((XmListCallbackStruct *)callData)->selected_items);strcpy(output,p);
                    output += strlen(output);
                    XtFree(p);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MULTIPLE_SELECT))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->selection_type);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_SINGLE_SELECT))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->item_position);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_SINGLE_SELECT))
                    {
                    wafeEscapedXmString2String(output, ((XmListCallbackStruct *)callData)->item);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmListWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_SINGLE_SELECT))
                    {
                    sprintf(output, "%d",  ((XmListCallbackStruct *)callData)->selection_type);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'c' &&
                        wClass == xmPushButtonWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_ACTIVATE))
                    {
                    sprintf(output, "%d",  ((XmPushButtonCallbackStruct*)callData)->click_count);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'c' &&
                        wClass == xmPushButtonGadgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_ACTIVATE))
                    {
                    sprintf(output, "%d",  ((XmPushButtonCallbackStruct*)callData)->click_count);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScaleWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_DRAG))
                    {
                    sprintf(output, "%d",  ((XmScaleCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScaleWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_VALUE_CHANGED))
                    {
                    sprintf(output, "%d",  ((XmScaleCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_DECREMENT))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_DRAG))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_INCREMENT))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_PAGE_DECREMENT))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_PAGE_INCREMENT))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_TO_BOTTOM))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->pixel);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_TO_BOTTOM))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'p' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_TO_TOP))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->pixel);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_TO_TOP))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'v' &&
                        wClass == xmScrollBarWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_VALUE_CHANGED))
                    {
                    sprintf(output, "%d",  ((XmScrollBarCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_APPLY))
                    {
                    wafeEscapedXmString2String(output, ((XmSelectionBoxCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_NO_MATCH))
                    {
                    wafeEscapedXmString2String(output, ((XmSelectionBoxCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmSelectionBoxWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_OK))
                    {
                    wafeEscapedXmString2String(output, ((XmSelectionBoxCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'f' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_LOSING_FOCUS))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->startPos);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'i' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_LOSING_FOCUS))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->currInsert);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'n' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_LOSING_FOCUS))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->newInsert);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_LOSING_FOCUS))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)-> endPos);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'f' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MODIFYING_TEXT_VALUE))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->startPos);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'i' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MODIFYING_TEXT_VALUE))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->currInsert);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'n' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MODIFYING_TEXT_VALUE))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->newInsert);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MODIFYING_TEXT_VALUE))
                    {
                    wafeEscapedStrcpy(output, ((XmTextVerifyCallbackStruct *)callData)->text->ptr);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 't' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MODIFYING_TEXT_VALUE))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)-> endPos);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'i' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MOVING_INSERT_CURSOR))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->currInsert);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 'n' &&
                        wClass == xmTextWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_MOVING_INSERT_CURSOR))
                    {
                    sprintf(output, "%ld",  ((XmTextVerifyCallbackStruct *)callData)->newInsert);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmToggleButtonWidgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_VALUE_CHANGED))
                    {
                    sprintf(output, "%d",  ((XmToggleButtonCallbackStruct *)callData)->set);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF11
               else if (chi == 's' &&
                        wClass == xmToggleButtonGadgetClass &&
                        (((XmAnyCallbackStruct *)callData)->reason == XmCR_VALUE_CHANGED))
                    {
                    sprintf(output, "%d",  ((XmToggleButtonCallbackStruct *)callData)->set);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 't' &&
                        wClass == xmDragContextWidgetClass &&
                        attrib == qconvertProc)
                    {
                    sprintf(output, "%s",  (String)callData);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'O' &&
                        wClass == xmDragContextWidgetClass &&
                        attrib == qdropProc)
                    {
                    sprintf(output, "%d",  ((XmDropProcCallbackStruct *)callData)->operations);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'c' &&
                        wClass == xmDragContextWidgetClass &&
                        attrib == qdropProc)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmDropProcCallbackStruct *)callData)->dragContext);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'o' &&
                        wClass == xmDragContextWidgetClass &&
                        attrib == qdropProc)
                    {
                    sprintf(output, "%d",  ((XmDropProcCallbackStruct *)callData)->operation);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'x' &&
                        wClass == xmDragContextWidgetClass &&
                        attrib == qdropProc)
                    {
                    sprintf(output, "%hd",  ((XmDropProcCallbackStruct *)callData)->x);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'y' &&
                        wClass == xmDragContextWidgetClass &&
                        attrib == qdropProc)
                    {
                    sprintf(output, "%hd",  ((XmDropProcCallbackStruct *)callData)->y);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'O' &&
                        wClass == xmDropSiteManagerObjectClass &&
                        attrib == qdragProc)
                    {
                    sprintf(output, "%d",  ((XmDragProcCallbackStruct *)callData)->operations);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'c' &&
                        wClass == xmDropSiteManagerObjectClass &&
                        attrib == qdragProc)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmDragProcCallbackStruct *)callData)->dragContext);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'o' &&
                        wClass == xmDropSiteManagerObjectClass &&
                        attrib == qdragProc)
                    {
                    sprintf(output, "%d",  ((XmDragProcCallbackStruct *)callData)->operation);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'x' &&
                        wClass == xmDropSiteManagerObjectClass &&
                        attrib == qdragProc)
                    {
                    sprintf(output, "%hd",  ((XmDragProcCallbackStruct *)callData)->x);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'y' &&
                        wClass == xmDropSiteManagerObjectClass &&
                        attrib == qdragProc)
                    {
                    sprintf(output, "%hd",  ((XmDragProcCallbackStruct *)callData)->y);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'd' &&
                        wClass == xmDropTransferObjectClass &&
                        attrib == qtransferProc)
                    {
                    sprintf(output, "%ld",  (WidgetID)((dropTransferCallbackStruct *)callData)->dest);
                    output += strlen(output);
                    }
#endif
#ifdef MOTIF12
               else if (chi == 'v' &&
                        wClass == xmDropTransferObjectClass &&
                        attrib == qtransferProc)
                    {
                    sprintf(output, "%s",  (String)((dropTransferCallbackStruct *)callData)->value);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'a' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qclickCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->x1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'b' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qclickCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->y1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'c' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qclickCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->x2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'd' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qclickCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->y2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'x' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qclickCallback)
                    {
                    sprintf(output, "%hd",  ((AtPointCallbackData *)callData)->pixelx);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'y' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qclickCallback)
                    {
                    sprintf(output, "%hd",  ((AtPointCallbackData *)callData)->pixely);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'A' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x12);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'B' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y12);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'C' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x22);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'D' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y22);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'X' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixelx2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'Y' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixely2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'a' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x11);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'b' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y11);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'c' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x21);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'd' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y21);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'x' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixelx1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'y' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qdragCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixely1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'a' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qmotionCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->x1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'b' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qmotionCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->y1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'c' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qmotionCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->x2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'd' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qmotionCallback)
                    {
                    sprintf(output, "%f",  ((AtPointCallbackData *)callData)->y2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'x' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qmotionCallback)
                    {
                    sprintf(output, "%hd",  ((AtPointCallbackData *)callData)->pixelx);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'y' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qmotionCallback)
                    {
                    sprintf(output, "%hd",  ((AtPointCallbackData *)callData)->pixely);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'A' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x12);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'B' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y12);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'C' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x22);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'D' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y22);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'X' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixelx2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'Y' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixely2);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'a' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x11);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'b' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y11);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'c' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->x21);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'd' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%f",  ((AtRectangleCallbackData *)callData)->y21);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'x' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixelx1);
                    output += strlen(output);
                    }
#endif
#ifdef PLOTTER
               else if (chi == 'y' &&
                        wClass == atPlotterWidgetClass &&
                        attrib == qslideCallback)
                    {
                    sprintf(output, "%hd",  ((AtRectangleCallbackData *)callData)->pixely1);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'F' &&
                        wClass == xmArcWidgetClass &&
                        attrib == qarcEditedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->new_from);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'T' &&
                        wClass == xmArcWidgetClass &&
                        attrib == qarcEditedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->new_to);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'f' &&
                        wClass == xmArcWidgetClass &&
                        attrib == qarcEditedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->old_from);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 't' &&
                        wClass == xmArcWidgetClass &&
                        attrib == qarcEditedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->old_to);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'F' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->new_from);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'T' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->new_to);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'f' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->old_from);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 't' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qarcMovedCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->old_to);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qdefaultActionCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qdefaultActionCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qdefaultActionCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qdeselectCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qdeselectCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qdeselectCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnewArcCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnewArcCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnewArcCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnewNodeCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnewNodeCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnewNodeCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnodeMovedCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qnodeMovedCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectArcCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectArcCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectArcCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectNodeCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectNodeCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectNodeCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'A' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectSubgraphCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_arcs, ((XmGraphCallbackStruct *)callData)->selected_arcs);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'I' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectSubgraphCallback)
                    {
                    sprintf(output, "%ld",  (WidgetID)((XmGraphCallbackStruct *)callData)->widget);
                    output += strlen(output);
                    }
#endif
#ifdef XMGRAPH
               else if (chi == 'N' &&
                        wClass == xmGraphWidgetClass &&
                        attrib == qselectSubgraphCallback)
                    {
                    wafeCvtWidgetListToList(output, ((XmGraphCallbackStruct *)callData)->num_selected_widgets, ((XmGraphCallbackStruct *)callData)->selected_widgets);
                    output += strlen(output);
                    }
#endif


#ifndef PRER6
               else 
	       if (chi == 't' &&  
                   (!strcmp(wClass->core_class.class_name,"Hook"))
		  )
                    {
		    strcpy(output, ((XtDestroyHookDataRec *)callData)->type);
                    output += strlen(output);
		    }
#endif
               else
		    {
                    *output = '%';
                    output++;
                    input--;
	            }
               }
          else 
               {
               *output = *input;
               output++;
               }
          input++;
          }

     *output = '\0';
     (void)wafeEval(wafeInterpreter, command, "execCallbackProc");
     DBUG_VOID_RETURN;
     }
