/*
** 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/DrawingA.h>
#include <Xm/Form.h>
#include <Xm/Label.h>
#include <Xm/List.h>
#include <Xm/PushB.h>
#include <Xm/ScrollBar.h>


#include "uinode_alert.h"

node_alert_shell_p node_alert_shell = (node_alert_shell_p) NULL;



void node_alert_shell_c::create (Widget parent, char *widget_name)
{
	Widget children[6];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget scrolledList1 = (Widget)NULL;
	Widget button1 = (Widget)NULL;
	Widget drawingArea1 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "node_alert_shell";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	node_alert_shell = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = node_alert_shell;
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	form_ = XmCreateForm ( node_alert_shell, "form_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNvisibleItemCount, 12); ac++;
	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
	list_ = XmCreateScrolledList ( form_, "list_", al, ac );
	ac = 0;
	scrolledList1 = XtParent ( list_ );

	button1 = XmCreatePushButton ( form_, "Collect all nodes", al, ac );
	close_ = XmCreatePushButton ( form_, "Close", al, ac );
	clear_ = XmCreatePushButton ( form_, "Clear & Close", al, ac );
	drawingArea1 = XmCreateDrawingArea ( form_, "drawingArea1", al, ac );
	label_ = XmCreateLabel ( form_, "label_", al, ac );
	XtSetArg(al[ac], XmNcancelButton, close_); ac++;
	XtSetArg(al[ac], XmNdefaultButton, clear_); ac++;
	XtSetValues ( form_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
	XtSetArg(al[ac], XmNtopWidget, label_); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
	XtSetArg(al[ac], XmNbottomWidget, clear_); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( scrolledList1,al, ac );
	ac = 0;

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

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
	XtSetArg(al[ac], XmNtopWidget, scrolledList1); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
	XtSetArg(al[ac], XmNrightWidget, clear_); ac++;
	XtSetValues ( close_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomOffset, 2); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
	XtSetValues ( clear_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
	XtSetArg(al[ac], XmNtopWidget, scrolledList1); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
	XtSetArg(al[ac], XmNleftWidget, button1); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
	XtSetArg(al[ac], XmNrightWidget, close_); ac++;
	XtSetValues ( drawingArea1,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNtopOffset, 2); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftOffset, 2); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 2); ac++;
	XtSetValues ( label_,al, ac );
	ac = 0;
	XtAddCallback (list_, XmNbrowseSelectionCallback,&node_alert_shell_c:: browseCB, (XtPointer) this);
	XtManageChild(list_);
	XtAddCallback (button1, XmNactivateCallback,&node_alert_shell_c:: collectCB, (XtPointer) this);
	XtAddCallback (close_, XmNactivateCallback,&node_alert_shell_c:: closeCB, (XtPointer) this);
	XtAddCallback (clear_, XmNactivateCallback,&node_alert_shell_c:: clearCloseCB, (XtPointer) this);
	children[ac++] = button1;
	children[ac++] = close_;
	children[ac++] = clear_;
	children[ac++] = drawingArea1;
	children[ac++] = label_;
	XtManageChildren(children, ac);
}

void node_alert_shell_c::collectCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	node_alert_shell_p instance = (node_alert_shell_p) client_data;
	instance->collectCB ( widget, call_data );
}

void node_alert_shell_c::clearCloseCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	node_alert_shell_p instance = (node_alert_shell_p) client_data;
	instance->clearCloseCB ( widget, call_data );
}

void node_alert_shell_c::closeCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	node_alert_shell_p instance = (node_alert_shell_p) client_data;
	instance->closeCB ( widget, call_data );
}

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

