/*
** 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 "uisuites.h"

suites_form_p suites_form = (suites_form_p) NULL;



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

	if ( !widget_name )
		widget_name = "suites_form";

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

	tools_ = XmCreateRowColumn ( form2, "tools_", al, ac );
	apply_ = XmCreatePushButton ( tools_, "Apply", al, ac );
	rowcol2 = XmCreateRowColumn ( form2, "rowcol2", al, ac );
	button1 = XmCreatePushButton ( rowcol2, "all_on", al, ac );
	button2 = XmCreatePushButton ( rowcol2, "all_off", 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, rowcol2); ac++;
	XtSetValues ( scrolledList1,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;

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

	XtManageChild(list_);
	XtAddCallback (apply_, XmNactivateCallback,&suites_form_c:: tellCB, (XtPointer) this);
	children[ac++] = apply_;
	XtManageChildren(children, ac);
	ac = 0;
	XtAddCallback (button1, XmNactivateCallback,&suites_form_c:: onCB, (XtPointer) this);
	XtAddCallback (button2, XmNactivateCallback,&suites_form_c:: offCB, (XtPointer) this);
	children[ac++] = button1;
	children[ac++] = button2;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = tools_;
	children[ac++] = rowcol2;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = form2;
	XtManageChildren(children, ac);
}

void suites_form_c::tellCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	suites_form_p instance = (suites_form_p) client_data;
	instance->tellCB ( widget, call_data );
}

void suites_form_c::offCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	suites_form_p instance = (suites_form_p) client_data;
	instance->offCB ( widget, call_data );
}

void suites_form_c::onCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	suites_form_p instance = (suites_form_p) client_data;
	instance->onCB ( widget, call_data );
}

