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


#include "uiedit_limit.h"

edit_limit_p edit_limit_form = (edit_limit_p) NULL;



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

	if ( !widget_name )
		widget_name = "edit_limit_form";

	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	edit_limit_form = XmCreateForm ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = edit_limit_form;
	XtSetArg(al[ac], XmNnumColumns, 2); ac++;
	XtSetArg(al[ac], XmNpacking, XmPACK_COLUMN); ac++;
	rowcol1 = XmCreateRowColumn ( edit_limit_form, "rowcol1", al, ac );
	ac = 0;
	label3 = XmCreateLabel ( rowcol1, "Maximum", al, ac );
	max_ = XmCreateTextField ( rowcol1, "max_", al, ac );
	tools_ = XmCreateRowColumn ( edit_limit_form, "tools_", al, ac );
	button1 = XmCreatePushButton ( tools_, "Apply", al, ac );
	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
	list_ = XmCreateScrolledList ( edit_limit_form, "list_", al, ac );
	ac = 0;
	scrolledList1 = XtParent ( list_ );

	rowcol2 = XmCreateRowColumn ( edit_limit_form, "rowcol2", al, ac );
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	remove_ = XmCreatePushButton ( rowcol2, "Remove", al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopWidget, tools_); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( rowcol1,al, ac );
	ac = 0;

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

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopWidget, rowcol1); 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, rowcol2); ac++;
	XtSetValues ( scrolledList1,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopWidget, rowcol1); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( rowcol2,al, ac );
	ac = 0;
	XtAddCallback (max_, XmNvalueChangedCallback,&edit_limit_form_c:: changedCB, (XtPointer) this);
	children[ac++] = label3;
	children[ac++] = max_;
	XtManageChildren(children, ac);
	ac = 0;
	XtAddCallback (button1, XmNactivateCallback,&edit_limit_form_c:: applyCB, (XtPointer) this);
	children[ac++] = button1;
	XtManageChildren(children, ac);
	ac = 0;
	XtAddCallback (list_, XmNbrowseSelectionCallback,&edit_limit_form_c:: browseCB, (XtPointer) this);
	XtManageChild(list_);
	XtAddCallback (remove_, XmNactivateCallback,&edit_limit_form_c:: removeCB, (XtPointer) this);
	children[ac++] = remove_;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = rowcol1;
	children[ac++] = tools_;
	children[ac++] = rowcol2;
	XtManageChildren(children, ac);
}

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

void edit_limit_form_c::removeCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	edit_limit_form_p instance = (edit_limit_form_p) client_data;
	instance->removeCB ( widget, call_data );
}

void edit_limit_form_c::changedCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	edit_limit_form_p instance = (edit_limit_form_p) client_data;
	instance->changedCB ( widget, call_data );
}

void edit_limit_form_c::applyCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	edit_limit_form_p instance = (edit_limit_form_p) client_data;
	instance->applyCB ( widget, call_data );
}

