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


#include "uivariables.h"

variables_p variables_form = (variables_p) NULL;



void variables_form_c::create (Widget parent, char *widget_name)
{
	Widget children[7];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget form1 = (Widget)NULL;
	Widget scrolledList20 = (Widget)NULL;
	Widget label1 = (Widget)NULL;
	Widget label2 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "variables_form";

	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	variables_form = XmCreateForm ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = variables_form;
	form1 = XmCreateForm ( variables_form, "form1", al, ac );
	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
	list_ = XmCreateScrolledList ( form1, "list_", al, ac );
	ac = 0;
	scrolledList20 = XtParent ( list_ );

	edit_ = XmCreateForm ( form1, "edit_", al, ac );
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	set_ = XmCreatePushButton ( edit_, "set_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	delete_ = XmCreatePushButton ( edit_, "delete_", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNsensitive, TRUE); ac++;
	find_ = XmCreatePushButton ( edit_, "find_", al, ac );
	ac = 0;
	label1 = XmCreateLabel ( edit_, "vvalue", al, ac );
	label2 = XmCreateLabel ( edit_, "vname", al, ac );
	name_ = XmCreateTextField ( edit_, "name_", al, ac );
	value_ = XmCreateTextField ( edit_, "value_", 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 ( form1,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNbottomWidget, edit_); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( scrolledList20,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( edit_,al, ac );
	ac = 0;
	XtAddCallback (list_, XmNbrowseSelectionCallback,&variables_form_c:: browseCB, (XtPointer) this);
	XtManageChild(list_);

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNtopPosition, 55); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNbottomPosition, 95); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNrightPosition, 20); ac++;
	XtSetValues ( set_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNtopPosition, 5); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNbottomPosition, 45); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNrightPosition, 20); ac++;
	XtSetValues ( delete_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNtopPosition, 5); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNbottomPosition, 45); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNleftPosition, 20); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNrightPosition, 30); ac++;
	XtSetValues ( find_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNtopPosition, 50); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNleftPosition, 30); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNrightPosition, 50); ac++;
	XtSetValues ( label1,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNbottomPosition, 50); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNleftPosition, 30); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNrightPosition, 50); ac++;
	XtSetValues ( label2,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNbottomPosition, 50); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNleftPosition, 50); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( name_,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNtopPosition, 50); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
	XtSetArg(al[ac], XmNleftPosition, 50); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( value_,al, ac );
	ac = 0;
	XtAddCallback (set_, XmNactivateCallback,&variables_form_c:: setCB, (XtPointer) this);
	XtAddCallback (delete_, XmNactivateCallback,&variables_form_c:: deleteCB, (XtPointer) this);
	XtAddCallback (find_, XmNactivateCallback,&variables_form_c:: findCB, (XtPointer) this);
	XtAddCallback (name_, XmNvalueChangedCallback,&variables_form_c:: nameCB, (XtPointer) this);
	XtAddCallback (value_, XmNvalueChangedCallback,&variables_form_c:: valueCB, (XtPointer) this);
	children[ac++] = set_;
	children[ac++] = delete_;
	children[ac++] = label1;
	children[ac++] = label2;
	children[ac++] = name_;
	children[ac++] = value_;
	children[ac++] = find_;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = edit_;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = form1;
	XtManageChildren(children, ac);
}

void variables_form_c::valueCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	variables_form_p instance = (variables_form_p) client_data;
	instance->valueCB ( widget, call_data );
}

void variables_form_c::nameCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	variables_form_p instance = (variables_form_p) client_data;
	instance->nameCB ( widget, call_data );
}

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

void variables_form_c::findCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	variables_form_p instance = (variables_form_p) client_data;
	instance->findCB ( widget, call_data );
}

void variables_form_c::setCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	variables_form_p instance = (variables_form_p) client_data;
	instance->setCB ( widget, call_data );
}

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

