/***************************** LICENSE START ***********************************

 Copyright 2012 ECMWF and INPE. This software is distributed under the terms
 of the Apache License version 2.0. In applying this license, ECMWF does not
 waive the privileges and immunities granted to it by virtue of its status as
 an Intergovernmental Organization or submit itself to any jurisdiction.

 ***************************** LICENSE END *************************************/

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

#include <xdclass.h>

class UIFamilyEditor_c: public xd_XmForm_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget UIFamilyEditor;
	Widget tab_;
public:
	static void familyCB( Widget, XtPointer, XtPointer );
	virtual void familyCB( Widget, XtPointer ) = 0;
};

typedef UIFamilyEditor_c *UIFamilyEditor_p;

UIFamilyEditor_p UIFamilyEditor = (UIFamilyEditor_p) NULL;



void UIFamilyEditor_c::create (Widget parent, char *widget_name)
{
	Widget children[1];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */

	if ( !widget_name )
		widget_name = "UIFamilyEditor";

	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	UIFamilyEditor = XmCreateForm ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = UIFamilyEditor;
	tab_ = XtCreateWidget("tab_", tabWidgetClass, UIFamilyEditor, 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 ( tab_,al, ac );
	ac = 0;
	XtAddCallback (tab_, XmNvalueChangedCallback, familyCB, (XtPointer) this);
	children[ac++] = tab_;
	XtManageChildren(children, ac);
	ac = 0;
}

void UIFamilyEditor_c::familyCB( Widget widget, XtPointer client_data, XtPointer call_data )
{
	UIFamilyEditor_p instance = (UIFamilyEditor_p) client_data;
	instance->familyCB ( widget, call_data );
}

