/*
** Generated by X-Designer
*/
/*
**LIBS: -lXm -lXt -lX11
*/

#include <stdio.h>
#include <stdlib.h>
#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>

#include <Xm/Xm.h>
#include <Xm/RepType.h>
#include <Xm/CascadeB.h>
#include <Xm/DialogS.h>
#include <Xm/DrawingA.h>
#include <Xm/Form.h>
#include <Xm/Label.h>
#include <Xm/PushB.h>
#include <Xm/RowColumn.h>
#include <Xm/ScrollBar.h>
#include <Xm/ScrolledW.h>
#include <Xm/Separator.h>
#include <Xm/ToggleB.h>
#include <Xm/PushBG.h>

#define XDESIGNER
#include "ecflowview.h"
#include "SimpleTree.h"
#include "show.h"
#include "top.h"
#include <Xm/Protocols.h>
#define main xmain
#include "Version.hpp"

#include "uitop.h"

XmStringCharSet char_set=XmSTRING_DEFAULT_CHARSET;

void add_accelerator(Widget w,char * acc_text,char * key)
/* adds an accelerator to a menu option. */
{
    int ac;
    Arg al[10];
 
    ac=0;
    XtSetArg(al[ac],XmNacceleratorText,
        XmStringCreate(acc_text,XmSTRING_DEFAULT_CHARSET)); ac++;
    XtSetArg(al[ac],XmNaccelerator,key); ac++;
    XtSetValues(w,al,ac);
}
/* */

void XDmanage_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtManageChild ( *(Widget *)client_data );
}

void XDunmanage_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtUnmanageChild ( *(Widget *)client_data );
}

void XDpopup_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtPopup ( *(Widget *)client_data, XtGrabNone );
}

void XDpopdown_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtPopdown ( *(Widget *)client_data );
}

void XDmap_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtMapWidget (*(Widget *)client_data);
}

void XDunmap_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtUnmapWidget (*(Widget *)client_data);
}

void XDenable_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtSetSensitive (*(Widget *)client_data, TRUE);
}

void XDdisable_link ( Widget, XtPointer client_data, XtPointer )
{
	if ( client_data && *(Widget *)client_data )
		XtSetSensitive (*(Widget *)client_data, FALSE);
}


top_p top_shell = (top_p) NULL;



void top_shell_c::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
{
	Widget children[17];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	XmString xmstrings[16];    /* temporary storage for XmStrings */
	Widget form2 = (Widget)NULL;
        Widget button184 = (Widget)NULL;
        Widget button5 = (Widget)NULL;
        Widget button10 = (Widget)NULL;
        Widget button99 = (Widget)NULL;
        Widget button4 = (Widget)NULL;
        Widget button11 = (Widget)NULL;
        Widget button9 = (Widget)NULL;
	Widget button16 = (Widget)NULL;
	Widget button13 = (Widget)NULL;
	Widget button7 = (Widget)NULL;
	Widget button14 = (Widget)NULL;
	Widget button6 = (Widget)NULL;
	Widget drawingArea1 = (Widget)NULL;
	/* Widget button8 = (Widget)NULL; */
	Widget button177 = (Widget)NULL;
	Widget drawingArea2 = (Widget)NULL;
	Widget button189 = (Widget)NULL;
        Widget scrolledWin1 = (Widget)NULL;
        Widget scrollbar61 = (Widget)NULL;
        Widget scrollbar62 = (Widget)NULL;
        Widget cascade55 = (Widget)NULL;
        Widget menu52 = (Widget)NULL;
        Widget button15 = (Widget)NULL;
        Widget button1 = (Widget)NULL;
	Widget separator3 = (Widget)NULL;
	Widget button194 = (Widget)NULL;
	Widget cascade1 = (Widget)NULL;
	Widget menu1 = (Widget)NULL;
	Widget button2 = (Widget)NULL;
	Widget button3 = (Widget)NULL;
	Widget separator7 = (Widget)NULL;
	Widget button12 = (Widget)NULL;
	Widget snapshot = (Widget)NULL;
	Widget cascade56 = (Widget)NULL;
	Widget separator64 = (Widget)NULL;
	Widget separator65 = (Widget)NULL;
	Widget cascade4 = (Widget)NULL;
	Widget toggle15 = (Widget)NULL;
	Widget toggle16 = (Widget)NULL;
	Widget toggle17 = (Widget)NULL;
	Widget toggle18 = (Widget)NULL;
	Widget toggle19 = (Widget)NULL;
	Widget toggle20 = (Widget)NULL;
	Widget cascade5 = (Widget)NULL;
	Widget toggle7 = (Widget)NULL;
	Widget toggle8 = (Widget)NULL;
	Widget toggle9 = (Widget)NULL;
	Widget toggle10 = (Widget)NULL;
	Widget toggle11 = (Widget)NULL;
	Widget toggle12 = (Widget)NULL;
	Widget toggle13 = (Widget)NULL;
	Widget toggle14 = (Widget)NULL;
        Widget toggle39 = (Widget)NULL;
        Widget toggle40 = (Widget)NULL;
        Widget toggle73 = (Widget)NULL;
        Widget toggle41 = (Widget)NULL;
        Widget cascade6 = (Widget)NULL;
        // Widget cascade7 = (Widget)NULL;
        Widget toggle66 = (Widget)NULL;
        Widget toggle67 = (Widget)NULL;
        Widget toggle68 = (Widget)NULL;
	Widget toggle69 = (Widget)NULL;
        Widget toggle70 = (Widget)NULL;
        Widget toggle71 = (Widget)NULL;
        Widget toggle72 = (Widget)NULL;
        // Widget toggle74 = (Widget)NULL; Widget toggle75 = (Widget)NULL; Widget toggle76 = (Widget)NULL; Widget toggle77 = (Widget)NULL;
        Widget toggle78 = (Widget)NULL;
        Widget toggle79 = (Widget)NULL;
        Widget cascade58 = (Widget)NULL;
        Widget cascade3 = (Widget)NULL;
        Widget menu53 = (Widget)NULL;
        Widget button197 = (Widget)NULL;
        Widget button198 = (Widget)NULL;
        Widget separator5 = (Widget)NULL;

        if ( !app_class_name )
                app_class_name = appName;

	std::string title = appName;
	if (getenv("ECFLOWVIEW_TITLE"))
	  title = getenv("ECFLOWVIEW_TITLE");

	title += " (" + ecf::Version::raw();
#ifdef DEBUG 
	title += "-debug";
#endif
	title += ")";

        XtSetArg(al[ac], XmNallowShellResize, FALSE); ac++;
        XtSetArg(al[ac], XmNtitle, title.c_str()); ac++;
        XtSetArg(al[ac], XmNiconName, appName); ac++;
        XtSetArg(al[ac], XmNargc, app_argc); ac++;
        XtSetArg(al[ac], XmNargv, app_argv); ac++;
        top_shell = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
	ac = 0;
	_xd_rootwidget = top_shell;
	XmAddWMProtocolCallback( top_shell, XmInternAtom(XtDisplay(top_shell), "WM_DELETE_WINDOW", False),&top_shell_c:: quitCB, (XtPointer) this);
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	form_ = XmCreateForm ( top_shell, "form_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	form2 = XmCreateForm ( form_, "form2", al, ac );
	ac = 0;
	xmstrings[0] = XmStringCreateLtoR ( "-\n", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
	message_ = XmCreateLabel ( form2, "message_", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNspacing, 0); ac++;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
	tools_ = XmCreateRowColumn ( form2, "tools_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;

	button184 = XmCreatePushButton ( tools_, "Info", al, ac );
	ac = 0;
        XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
        XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
        XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
XtSetArg(al[ac],XmNmnemonic,'i'); ac++;        /* mnemonic */


        button5 = XmCreatePushButton ( tools_, "Script", al, ac );
        ac = 0;
        XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
        XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
        XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
XtSetArg(al[ac],XmNmnemonic,'s'); ac++;        /* mnemonic */

        button10 = XmCreatePushButton ( tools_, "Manual", al, ac );
        ac = 0;
        XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
        XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
        XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
XtSetArg(al[ac],XmNmnemonic,'m'); ac++;        /* mnemonic */

        button99 = XmCreatePushButton ( tools_, "Jobstatus", al, ac );
        ac = 0;
        XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
        XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
        XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
        button4 = XmCreatePushButton ( tools_, "Output", al, ac );
        ac = 0;
        XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button11 = XmCreatePushButton ( tools_, "Triggers", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button9 = XmCreatePushButton ( tools_, "Why?", al, ac );
	ac = 0;
        XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
        XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
        XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
        button16 = XmCreatePushButton ( tools_, "Check", al, ac );
        ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button13 = XmCreatePushButton ( tools_, "Time line", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button7 = XmCreatePushButton ( tools_, "Variables", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button14 = XmCreatePushButton ( tools_, "Messages", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button6 = XmCreatePushButton ( tools_, "Edit", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNwidth, 10); ac++;
	XtSetArg(al[ac], XmNheight, 10); ac++;
	drawingArea1 = XmCreateDrawingArea ( tools_, "drawingArea1", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	/* button8 = XmCreatePushButton ( tools_, "Chat", al, ac ); */
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button177 = XmCreatePushButton ( tools_, "Search", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNwidth, 10); ac++;
	XtSetArg(al[ac], XmNheight, 10); ac++;
	drawingArea2 = XmCreateDrawingArea ( tools_, "drawingArea2", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
	XtSetArg(al[ac], XmNdefaultButtonShadowThickness, 0); ac++;
	button189 = XmCreatePushButton ( tools_, "Status", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNscrollingPolicy, XmAUTOMATIC); ac++;
	scrolledWin1 = XmCreateScrolledWindow ( form_, "scrolledWin1", al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar61 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar62 ); ac++;
	XtGetValues(scrolledWin1, al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNmarginWidth, 0); ac++;
	XtSetArg(al[ac], XmNmarginHeight, 0); ac++;
        trees_ = XmCreateRowColumn ( scrolledWin1, "trees_", al, ac );
        ac = 0;
        menu_bar = XmCreateMenuBar ( form_, "menu_bar", al, ac );

        cascade55 = XmCreateCascadeButton ( menu_bar, "File", al, ac );

        if (1) { 
	   XmString label_str = XmStringCreateLocalized ("File");
           XtSetArg(al[ac], XmNmnemonic, XStringToKeysym("F")); ac++;
           XtSetArg(al[ac], XmNlabelString, label_str); ac++;
           XtSetArg(al[ac], XmNaccelerator, "Ctrl<Key>F"); ac++;
           XtSetArg(al[ac], XmNacceleratorText, 
           XmStringCreateLocalized("Ctrl+F")); ac++;
	   // XmStringFree(label_str);
        }

        XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
        menu52 = XmCreatePulldownMenu ( menu_bar, "m_file", al, ac );
        ac = 0;
        button15 = XmCreatePushButton ( menu52, "Login", al, ac );
        add_accelerator(button15, "Ctrl+L", "Ctrl<Key>L");

	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
        button1 = XmCreatePushButton ( menu52, "Scan network...", al, ac );
        // add_accelerator(button1, "Ctrl+S", "Ctrl<Key>S");

        XtSetArg(al[ac], XmNheight, 2); ac++;
        XtSetArg(al[ac], XmNmargin, 0); ac++;
        separator3 = XmCreateSeparator ( menu52, "separator3", al, ac );
        ac = 0;
        if (1) {
	  XmString label_str = XmStringCreateLocalized ("Quit");
          XtSetArg(al[ac], XmNmnemonic, XStringToKeysym("Q")); ac++;
          XtSetArg(al[ac], XmNlabelString, label_str); ac++;
          XtSetArg(al[ac], XmNaccelerator, "Ctrl<Key>Q"); ac++;
          XtSetArg(al[ac], XmNacceleratorText,
          XmStringCreateLocalized("Ctrl+Q")); ac++;
	}
        button194 = XmCreatePushButtonGadget ( menu52, "Quit", al, ac );
	// add_accelerator(button194, "Ctrl+Q", "Ctrl<Key>Q");

        if (1) { ac = 0;
	  XmString  label_str = XmStringCreateLocalized ("Edit");
	  XtSetArg(al[ac], XmNmnemonic, XStringToKeysym("E")); ac++;
	  XtSetArg(al[ac], XmNlabelString, label_str); ac++;
	  XtSetArg(al[ac], XmNaccelerator, "Ctrl<Key>E"); ac++;
	  XtSetArg(al[ac], XmNacceleratorText, XmStringCreateLocalized("Ctrl+E")); ac++;
	}
        cascade1 = XmCreateCascadeButton ( menu_bar, "Edit", al, ac );
        // add_accelerator(cascade1, "Ctrl+E", "Ctrl<Key>E");

        XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
        menu1 = XmCreatePulldownMenu ( menu_bar, "menu1", al, ac );
        ac = 0;
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Servers menu...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	button2 = XmCreatePushButton ( menu1, "button2", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Command menu...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	button3 = XmCreatePushButton ( menu1, "button3", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	separator7 = XmCreateSeparator ( menu1, "separator7", al, ac );
	xmstrings[0] = XmStringCreateLtoR ( "Preferences...", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
        button12 = XmCreatePushButton ( menu1, "pref", al, ac );

	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	// separator7 = XmCreateSeparator ( menu1, "separator7", al, ac );
	xmstrings[0] = XmStringCreateLtoR ( "Snapshot", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
        snapshot = XmCreatePushButton ( menu1, "snap", al, ac );

        ac = 0;
        XmStringFree ( xmstrings [ 0 ] );

        cascade56 = XmCreateCascadeButton ( menu_bar, "Show", al, ac );
        // add_accelerator(cascade56, "Ctrl<Key>S", "Ctrl+S");

        XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
        show0_ = XmCreatePulldownMenu ( menu_bar, "show0_", al, ac );
        ac = 0;
	XtSetArg(al[ac], XmNuserData, new show(show::unknown)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Unknown", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_unknown = XmCreateToggleButton ( show0_, "unknown", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::suspended)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Suspended", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_suspended = XmCreateToggleButton ( show0_, "suspended", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::complete)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Complete", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_complete = XmCreateToggleButton ( show0_, "complete", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::queued)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Queued", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_queued = XmCreateToggleButton ( show0_, "queued", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::submitted)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Submitted", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_submitted = XmCreateToggleButton ( show0_, "submitted", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::active)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Active", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_active = XmCreateToggleButton ( show0_, "active", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::aborted)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Aborted", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_aborted = XmCreateToggleButton ( show0_, "aborted", al, ac );

	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	separator64 = XmCreateSeparator ( show0_, "separator64", al, ac );
	cascade4 = XmCreateCascadeButton ( show0_, "Special", al, ac );
	XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
	show2_ = XmCreatePulldownMenu ( show0_, "show2_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNuserData, new show(show::time_dependant)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Time dependent", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle15 = XmCreateToggleButton ( show2_, "toggle15", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::late_nodes)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Late nodes", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle16 = XmCreateToggleButton ( show2_, "toggle16", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::waiting_nodes)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Waiting nodes", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle17 = XmCreateToggleButton ( show2_, "toggle17", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::migrated_nodes)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Migrated nodes", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle18 = XmCreateToggleButton ( show2_, "toggle18", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::rerun_tasks)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Rerun tasks", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle19 = XmCreateToggleButton ( show2_, "toggle19", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::nodes_with_messages)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Nodes with messages", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle20 = XmCreateToggleButton ( show2_, "toggle20", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	cascade5 = XmCreateCascadeButton ( show0_, "Type", al, ac );
	XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
	show1_ = XmCreatePulldownMenu ( show0_, "show1_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNuserData, new show(show::label)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Labels", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle7 = XmCreateToggleButton ( show1_, "toggle7", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::meter)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Meters", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle8 = XmCreateToggleButton ( show1_, "toggle8", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::event)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Events", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle9 = XmCreateToggleButton ( show1_, "toggle9", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::repeat)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Repeats", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle10 = XmCreateToggleButton ( show1_, "toggle10", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::time)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Times", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle11 = XmCreateToggleButton ( show1_, "toggle11", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::date)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Dates", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle12 = XmCreateToggleButton ( show1_, "toggle12", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::trigger)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Triggers", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle13 = XmCreateToggleButton ( show1_, "toggle13", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::variable)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Variables", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle14 = XmCreateToggleButton ( show1_, "toggle14", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::genvar)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Generated variables", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle39 = XmCreateToggleButton ( show1_, "toggle39", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::late)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Late", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle40 = XmCreateToggleButton ( show1_, "toggle40", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::limit)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Limits", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle73 = XmCreateToggleButton ( show1_, "toggle73", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::inlimit)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Limiters", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
        XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
        toggle41 = XmCreateToggleButton ( show1_, "toggle41", al, ac );
        ac = 0;
        XmStringFree ( xmstrings [ 0 ] );
        cascade6 = XmCreateCascadeButton ( show0_, "Icons", al, ac );
        XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
        show3_ = XmCreatePulldownMenu ( show0_, "show3_", al, ac );
        ac = 0;
        XtSetArg(al[ac], XmNuserData, new show(show::time_icon)); ac++;
        xmstrings[0] = XmStringCreateLtoR ( "Time icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle66 = XmCreateToggleButton ( show3_, "time_icon", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::date_icon)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Date icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle67 = XmCreateToggleButton ( show3_, "date_icon", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::late_icon)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Late icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle68 = XmCreateToggleButton ( show3_, "late_icon", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::waiting_icon)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Waiting icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle69 = XmCreateToggleButton ( show3_, "waiting_icon", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::rerun_icon)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Rerun icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle70 = XmCreateToggleButton ( show3_, "rerun_icon", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::migrated_icon)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "Migrated icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	toggle71 = XmCreateToggleButton ( show3_, "migrated_icon", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::message_icon)); ac++;
        xmstrings[0] = XmStringCreateLtoR ( "Message icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
        XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
        toggle72 = XmCreateToggleButton ( show3_, "message_icon", al, ac );

        ac = 0;
        XmStringFree ( xmstrings [ 0 ] );
        XtSetArg(al[ac], XmNuserData, new show(show::defstatus_icon)); ac++;
        xmstrings[0] = XmStringCreateLtoR ( "Complete icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
        XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
        toggle78 = XmCreateToggleButton ( show3_, "defstatus_icon", al, ac );

        ac = 0;
        XmStringFree ( xmstrings [ 0 ] );
        XtSetArg(al[ac], XmNuserData, new show(show::zombie_icon)); ac++;
        xmstrings[0] = XmStringCreateLtoR ( "Zombie icons", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
        XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
        toggle79 = XmCreateToggleButton ( show3_, "zombie_icon", al, ac );

	/* 20110125 */
	separator65 = XmCreateSeparator ( show0_, "separator65", al, ac );
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::all)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "all", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_all = XmCreateToggleButton ( show0_, "all", al, ac );	
	// show_all = XmCreatePushButton ( show0_, "all", al, ac );	
        // XtAddCallback (show_all, XmNactivateCallback,&top_shell_c::show2CB, (XtPointer) this);
	ac = 0;
	XmStringFree ( xmstrings [ 0 ] );
	XtSetArg(al[ac], XmNuserData, new show(show::none)); ac++;
	xmstrings[0] = XmStringCreateLtoR ( "none", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	show_none = XmCreateToggleButton ( show0_, "none", al, ac );
	// show_none = XmCreatePushButton ( show0_, "none", al, ac );
    // XtAddCallback (show_none, XmNactivateCallback,&top_shell_c::show2CB, (XtPointer) this);

        /* ac = 0;
        XmStringFree ( xmstrings [ 0 ] );
        XtSetArg(al[ac], XmNsensitive, XCDP_COMPARE_ENABLED); ac++; 
        XtSetArg(al[ac], XmNsensitive, getenv("XCDP_COMPARE_ENABLED")); ac++;
        cascade7 = XmCreateCascadeButton ( show0_, "Compare", al, ac );
        XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
        show4_ = XmCreatePulldownMenu ( show0_, "show4_", al, ac );
        ac = 0;
         XtSetArg(al[ac], XmNuserData, new show(show::compare_variables)); ac++;
	   xmstrings[0] = XmStringCreateLtoR ( "Variables", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	   XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	   toggle75 = XmCreateToggleButton ( show4_, "compare_variables", al, ac );
	   ac = 0;
	   XtSetArg(al[ac], XmNuserData, new show(show::compare_scripts)); ac++;
	   xmstrings[0] = XmStringCreateLtoR ( "Scripts", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	   XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	   toggle74 = XmCreateToggleButton ( show4_, "compare_scripts", al, ac );
	   ac = 0;
	   XtSetArg(al[ac], XmNuserData, new show(show::compare_includes)); ac++;
	   xmstrings[0] = XmStringCreateLtoR ( "Includes", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	   XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	   toggle76 = XmCreateToggleButton ( show4_, "compare_includes", al, ac );
	   ac = 0;
	   XtSetArg(al[ac], XmNuserData, new show(show::compare_outputs)); ac++;
	   xmstrings[0] = XmStringCreateLtoR ( "Outputs", (XmStringCharSet)XmFONTLIST_DEFAULT_TAG );
	   XtSetArg(al[ac], XmNlabelString, xmstrings[0]); ac++;
	   toggle77 = XmCreateToggleButton ( show4_, "compare_outputs", al, ac );
	*/
	    ac = 0; 
        XmStringFree ( xmstrings [ 0 ] );
        cascade58 = XmCreateCascadeButton ( menu_bar, "Servers", al, ac );
	XtSetArg(al[ac], XmNnumColumns, 3); ac++;
	XtSetArg(al[ac], XmNpacking, XmPACK_COLUMN); ac++;
	XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
	XtSetArg(al[ac], XmNradioAlwaysOne, TRUE); ac++;
	XtSetArg(al[ac], XmNradioBehavior, FALSE); ac++;
	servers_menu_ = XmCreatePulldownMenu ( menu_bar, "servers_menu_", al, ac );
	ac = 0;
	cascade3 = XmCreateCascadeButton ( menu_bar, "Windows", al, ac );
	XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
	windows_menu_ = XmCreatePulldownMenu ( menu_bar, "windows_menu_", al, ac );
	ac = 0;
	help = XmCreateCascadeButton ( menu_bar, "Help", al, ac );
	XtSetArg(al[ac], XmNtearOffModel, XmTEAR_OFF_ENABLED); ac++;
	menu53 = XmCreatePulldownMenu ( menu_bar, "menu53", al, ac );
        ac = 0;
        button197 = XmCreatePushButton ( menu53, "Help", al, ac );
        XtSetArg(al[ac], XmNmenuHelpWidget, help); ac++;
        button198 = XmCreatePushButton ( menu53, "Version", al, ac );
        XtSetValues ( menu_bar,al, ac );

        ac = 0;
        separator5 = XmCreateSeparator ( form_, "separator5", al, ac );

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
	XtSetArg(al[ac], XmNtopWidget, menu_bar); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( form2,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopWidget, separator5); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( scrolledWin1,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
	XtSetValues ( menu_bar,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopWidget, form2); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( separator5,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNrightWidget, tools_); ac++;
	XtSetValues ( message_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( tools_,al, ac );
	ac = 0;
        XtAddCallback (button184, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
        XtAddCallback (button5, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
        XtAddCallback (button10, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
        XtAddCallback (button99, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
        XtAddCallback (button4, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
        XtAddCallback (button11, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
        XtAddCallback (button9, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
	XtAddCallback (button16, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
	XtAddCallback (button13, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
	XtAddCallback (button7, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
	XtAddCallback (button14, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
	XtAddCallback (button6, XmNactivateCallback,&top_shell_c:: windowCB, (XtPointer) this);
	// XtAddCallback (button8, XmNactivateCallback,&top_shell_c:: chatCB, (XtPointer) this);
	XtAddCallback (button177, XmNactivateCallback,&top_shell_c:: searchCB, (XtPointer) this);
	XtAddCallback (button189, XmNactivateCallback,&top_shell_c:: statusCB, (XtPointer) this);
        children[ac++] = button184;
        children[ac++] = button5;
        children[ac++] = button10;
        children[ac++] = button99;
        children[ac++] = button4;
        children[ac++] = button11;
        children[ac++] = button9;
	children[ac++] = button16;
	children[ac++] = button13;
	children[ac++] = button7;
	children[ac++] = button14;
	children[ac++] = button6;
	children[ac++] = drawingArea1;
	/* children[ac++] = button8; */
	children[ac++] = button177;
	children[ac++] = drawingArea2;
	children[ac++] = button189;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = message_;
	children[ac++] = tools_;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = trees_;
	XtManageChildren(children, ac);
	ac = 0;
	XmScrolledWindowSetAreas(scrolledWin1, scrollbar61, scrollbar62, trees_ );
	XtAddCallback (button15, XmNactivateCallback,&top_shell_c:: loginCB, (XtPointer) this);
	XtAddCallback (button1, XmNactivateCallback,&top_shell_c:: serverCB, (XtPointer) this);
	XtAddCallback (button194, XmNactivateCallback,&top_shell_c:: quitCB, (XtPointer) this);
	children[ac++] = button15;
	children[ac++] = button1;
	children[ac++] = separator3;
	children[ac++] = button194;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, menu52); ac++;
	XtSetValues ( cascade55, al, ac );
	ac = 0;
	XtAddCallback (button12, XmNactivateCallback,&top_shell_c:: prefCB, (XtPointer) this);
	XtAddCallback (snapshot, XmNactivateCallback,&top_shell_c:: snapshotCB, (XtPointer) this);
	children[ac++] = button2;
	children[ac++] = button3;
	children[ac++] = separator7;
	children[ac++] = button12;
	children[ac++] = snapshot;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, menu1); ac++;
	XtSetValues ( cascade1, al, ac );
	ac = 0;
	XtAddCallback (show0_, XmNentryCallback,&top_shell_c:: showCB, (XtPointer) this);
	XtAddCallback (show2_, XmNentryCallback,&top_shell_c:: showCB, (XtPointer) this);
	children[ac++] = toggle15;
	children[ac++] = toggle16;
	children[ac++] = toggle17;
	children[ac++] = toggle18;
	children[ac++] = toggle19;
	children[ac++] = toggle20;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, show2_); ac++;
	XtSetValues ( cascade4, al, ac );
	ac = 0;
	XtAddCallback (show1_, XmNentryCallback,&top_shell_c:: showCB, (XtPointer) this);
	children[ac++] = toggle7;
	children[ac++] = toggle8;
	children[ac++] = toggle9;
	children[ac++] = toggle10;
	children[ac++] = toggle11;
	children[ac++] = toggle12;
	children[ac++] = toggle13;
	children[ac++] = toggle14;
	children[ac++] = toggle39;
	children[ac++] = toggle40;
	children[ac++] = toggle73;
	children[ac++] = toggle41;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, show1_); ac++;
	XtSetValues ( cascade5, al, ac );
	ac = 0;
	XtAddCallback (show3_, XmNentryCallback,&top_shell_c:: showCB, (XtPointer) this);
	children[ac++] = toggle66;
	children[ac++] = toggle67;
	children[ac++] = toggle68;
	children[ac++] = toggle69;
        children[ac++] = toggle70;
        children[ac++] = toggle71;
        children[ac++] = toggle72;
        children[ac++] = toggle78;
        children[ac++] = toggle79;
        XtManageChildren(children, ac);
        ac = 0;
        XtSetArg(al[ac], XmNsubMenuId, show3_); ac++;
        XtSetValues ( cascade6, al, ac );

	/*        ac = 0;
        XtAddCallback (show4_, XmNentryCallback,&top_shell_c:: showCB, (XtPointer) this);
        children[ac++] = toggle74;
        children[ac++] = toggle75;
        children[ac++] = toggle76;
        children[ac++] = toggle77;
        XtManageChildren(children, ac); 
        ac = 0;
        XtSetArg(al[ac], XmNsubMenuId, show4_); ac++;
        XtSetValues ( cascade7, al, ac ); */
	
        ac = 0;
        children[ac++] = show_unknown;
        children[ac++] = show_suspended;
	children[ac++] = show_complete;
	children[ac++] = show_queued;
	children[ac++] = show_submitted;
	children[ac++] = show_active;
	children[ac++] = show_aborted;
	children[ac++] = separator64;
        children[ac++] = cascade4;
        children[ac++] = cascade5;
        children[ac++] = cascade6;

	children[ac++] = separator65;
	children[ac++] = show_all;
	children[ac++] = show_none;

        // children[ac++] = cascade7;
        XtManageChildren(children, ac);
        ac = 0;
        XtSetArg(al[ac], XmNsubMenuId, show0_); ac++;
	XtSetValues ( cascade56, al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, servers_menu_); ac++;
	XtSetValues ( cascade58, al, ac );
	ac = 0;
	XtAddCallback (windows_menu_, XmNentryCallback,&top_shell_c:: windowsCB, (XtPointer) this);
	XtSetArg(al[ac], XmNsubMenuId, windows_menu_); ac++;
        XtSetValues ( cascade3, al, ac );
        ac = 0;
        XtAddCallback (button197, XmNactivateCallback,&top_shell_c:: helpCB, (XtPointer) this);
        XtAddCallback (button198, XmNactivateCallback,&top_shell_c:: releaseCB, (XtPointer) this);
        children[ac++] = button197;
        children[ac++] = button198;
        XtManageChildren(children, ac);
        ac = 0;
        XtSetArg(al[ac], XmNsubMenuId, menu53); ac++;
	XtSetValues ( help, al, ac );
	ac = 0;
	children[ac++] = cascade55;
	children[ac++] = cascade1;
	children[ac++] = cascade56;
	children[ac++] = cascade58;
	children[ac++] = cascade3;
	children[ac++] = help;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = form2;
	children[ac++] = scrolledWin1;
	children[ac++] = menu_bar;
	children[ac++] = separator5;
	XtManageChildren(children, ac);
	XtManageChild ( form_);
}

void top_shell_c::loginCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->loginCB ( widget, call_data );
}

void top_shell_c::prefCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->prefCB ( widget, call_data );
}

void top_shell_c::helpCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
        instance->helpCB ( widget, call_data );
}

void top_shell_c::releaseCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
        top_shell_p instance = (top_shell_p) client_data;
        instance->releaseCB ( widget, call_data );
}

void top_shell_c::searchCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
        top_shell_p instance = (top_shell_p) client_data;
	instance->searchCB ( widget, call_data );
}

void top_shell_c::windowsCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->windowsCB ( widget, call_data );
}

void top_shell_c::chatCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->chatCB ( widget, call_data );
}

void top_shell_c::showCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->showCB ( widget, call_data );
}

void top_shell_c::serverCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->serverCB ( widget, call_data );
}

void top_shell_c::statusCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->statusCB ( widget, call_data );
}

void top_shell_c::snapshotCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
  top_shell_p instance = (top_shell_p) client_data;
  instance->snapshotCB ( widget, call_data );
}

void top_shell_c::windowCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->windowCB ( widget, call_data );
}

void top_shell_c::quitCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	top_shell_p instance = (top_shell_p) client_data;
	instance->quitCB ( widget, call_data );
}

XtAppContext app_context;
Display *display;
// sym_entry_type *rp = NULL;

int main(int argc, char **argv)
{
  XtSetLanguageProc ((XtAppContext) NULL, 
		     (XtLanguageProc) NULL, 
		     (XtPointer) NULL);
  XtToolkitInitialize ();
  app_context = XtCreateApplicationContext ();
  display = XtOpenDisplay (app_context, NULL, argv[0], appName,
			   NULL, 0, &argc, argv);
  if (!display) {
      printf("%s: can't open display, exiting...\n", argv[0]);
      exit (-1);
  }
  
  XmRepTypeInstallTearOffModelConverter();
  
  top_shell = new top;
  top_shell->create ( display, argv[0], argc, argv, appName );
  XtRealizeWidget (top_shell->xd_rootwidget());
  // UilDumpSymbolTable(rp);

  XtAppMainLoop (app_context);
  
  exit (0);
  
  return 0;

  /* 
     ./bin/gcc-4.5/debug/ecflowview -geometry=640x880+620+240
     -display -bg -fg
   */

}

