/*
 * name_attribute_ui.c - User interface object initialization functions.
 * This file was generated by `gxv' from `name_attribute.G'.
 * DO NOT EDIT BY HAND.
 */

#include <stdio.h>
#include <sys/param.h>
#include <sys/types.h>
#include <xview/xview.h>
#include <xview/canvas.h>
#include <xview/panel.h>
#include <xview/scrollbar.h>
#include <xview/svrimage.h>
#include <xview/termsw.h>
#include <xview/text.h>
#include <xview/tty.h>
#include <xview/xv_xrect.h>
#include "name_attribute_ui.h"

/*
 * Initialize an instance of object `pop'.
 */
name_attribute_pop_objects *
name_attribute_pop_objects_initialize(ip, owner)
	name_attribute_pop_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (name_attribute_pop_objects *) calloc(1, sizeof (name_attribute_pop_objects))))
		return (name_attribute_pop_objects *) NULL;
	if (!ip->pop)
		ip->pop = name_attribute_pop_pop_create(ip, owner);
	if (!ip->controls1)
		ip->controls1 = name_attribute_pop_controls1_create(ip, ip->pop);
	if (!ip->name_field)
		ip->name_field = name_attribute_pop_name_field_create(ip, ip->controls1);
	if (!ip->message1)
		ip->message1 = name_attribute_pop_message1_create(ip, ip->controls1);
	return ip;
}

/*
 * Create object `pop' in the specified instance.
 */
Xv_opaque
name_attribute_pop_pop_create(ip, owner)
	name_attribute_pop_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME_CMD,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 400,
		XV_HEIGHT, 85,
		XV_LABEL, "Name the new attribute",
		FRAME_SHOW_FOOTER, TRUE,
		FRAME_SHOW_RESIZE_CORNER, FALSE,
		FRAME_CMD_PUSHPIN_IN, FALSE,
		NULL);
	xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
	return obj;
}

/*
 * Create object `controls1' in the specified instance.
 */
Xv_opaque
name_attribute_pop_controls1_create(ip, owner)
	name_attribute_pop_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 0,
		XV_Y, 6,
		XV_WIDTH, 396,
		XV_HEIGHT, WIN_EXTEND_TO_EDGE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `name_field' in the specified instance.
 */
Xv_opaque
name_attribute_pop_name_field_create(ip, owner)
	name_attribute_pop_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	give_attribute_name_proc();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 8,
		XV_Y, 12,
		PANEL_VALUE_DISPLAY_LENGTH, 16,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Attribute name:",
		PANEL_LAYOUT, PANEL_VERTICAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, give_attribute_name_proc,
		NULL);
	return obj;
}

/*
 * Create object `message1' in the specified instance.
 */
Xv_opaque
name_attribute_pop_message1_create(ip, owner)
	name_attribute_pop_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 168,
		XV_Y, 32,
		PANEL_LABEL_STRING, "Type a regular attribute name!",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

