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

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

#include <Xm/Xm.h>
#include <Xm/DialogS.h>
#include <Xm/Form.h>
#include <Xm/List.h>
#include <Xm/PushB.h>
#include <Xm/RowColumn.h>
#include <Xm/ScrollBar.h>

#include "uizombies.h"

zombies_form_p zombies_form = (zombies_form_p) NULL;

void zombies_form_c::create (Widget parent, char *widget_name)
{
	Widget children[5];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget form2 = (Widget)NULL;
	Widget scrolledList1 = (Widget)NULL;
	Widget button2 = (Widget)NULL;
	Widget button3 = (Widget)NULL;
	Widget button1 = (Widget)NULL;
	Widget button4 = (Widget)NULL;
	Widget button5 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "zombies_form";

	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	zombies_form = XmCreateForm ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = zombies_form;
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
       form2 = XmCreateForm ( zombies_form, "form2", al, ac );
       ac = 0;
       XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
       XtSetArg(al[ac], XmNselectionPolicy, XmMULTIPLE_SELECT); ac++;
       list_ = XmCreateScrolledList ( form2, "list_", al, ac );
       ac = 0;
       scrolledList1 = XtParent ( list_ );

	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
	buttons_ = XmCreateRowColumn ( form2, "buttons_", al, ac );
	ac = 0;
	button2 = XmCreatePushButton ( buttons_, "Terminate", al, ac );
	button3 = XmCreatePushButton ( buttons_, "Rescue", al, ac );
	button1 = XmCreatePushButton ( buttons_, "Fob off", al, ac );
	button4 = XmCreatePushButton ( buttons_, "Delete", al, ac );
	button5 = XmCreatePushButton ( buttons_, "Kill", al, ac );

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

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

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( buttons_,al, ac );
	ac = 0;

	XtAddCallback (list_, XmNbrowseSelectionCallback,&zombies_form_c:: browseCB, (XtPointer) this);
	XtAddCallback (list_, XmNmultipleSelectionCallback,&zombies_form_c:: browseCB, (XtPointer) this);
	XtManageChild(list_);
	XtAddCallback (button2, XmNactivateCallback,&zombies_form_c:: terminateCB, (XtPointer) this);
	XtAddCallback (button3, XmNactivateCallback,&zombies_form_c:: rescueCB, (XtPointer) this);
	XtAddCallback (button1, XmNactivateCallback,&zombies_form_c:: acceptCB, (XtPointer) this);
	XtAddCallback (button4, XmNactivateCallback,&zombies_form_c:: deleteCB, (XtPointer) this);
	XtAddCallback (button5, XmNactivateCallback,&zombies_form_c:: killCB, (XtPointer) this);
	children[ac++] = button2;
	children[ac++] = button3;
	children[ac++] = button1;
	children[ac++] = button4;
	children[ac++] = button5;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = buttons_;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = form2;
	XtManageChildren(children, ac);
}

void zombies_form_c::browseCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	zombies_form_p instance = (zombies_form_p) client_data;
	instance->browseCB ( widget, call_data );
}

void zombies_form_c::deleteCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	zombies_form_p instance = (zombies_form_p) client_data;
	instance->deleteCB ( widget, call_data );
}

void zombies_form_c::acceptCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	zombies_form_p instance = (zombies_form_p) client_data;
	instance->acceptCB ( widget, call_data );
}

void zombies_form_c::rescueCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	zombies_form_p instance = (zombies_form_p) client_data;
	instance->rescueCB ( widget, call_data );
}

void zombies_form_c::terminateCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	zombies_form_p instance = (zombies_form_p) client_data;
	instance->terminateCB ( widget, call_data );
}

void zombies_form_c::killCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	zombies_form_p instance = (zombies_form_p) client_data;
	instance->killCB ( widget, call_data );
}

