/*
 * delete_replace_instances_ui.c - User interface object initialization functions.
 * This file was generated by `gxv' from `delete_replace_instances.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 "delete_replace_instances_ui.h"

/*
 * Initialize an instance of object `pop'.
 */
delete_replace_instances_pop_objects *
delete_replace_instances_pop_objects_initialize(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (delete_replace_instances_pop_objects *) calloc(1, sizeof (delete_replace_instances_pop_objects))))
		return (delete_replace_instances_pop_objects *) NULL;
	if (!ip->pop)
		ip->pop = delete_replace_instances_pop_pop_create(ip, owner);
	if (!ip->controls1)
		ip->controls1 = delete_replace_instances_pop_controls1_create(ip, ip->pop);
	if (!ip->class_list)
		ip->class_list = delete_replace_instances_pop_class_list_create(ip, ip->controls1);
	if (!ip->instances_list)
		ip->instances_list = delete_replace_instances_pop_instances_list_create(ip, ip->controls1);
	if (!ip->assign_button)
		ip->assign_button = delete_replace_instances_pop_assign_button_create(ip, ip->controls1);
	if (!ip->instance_field)
		ip->instance_field = delete_replace_instances_pop_instance_field_create(ip, ip->controls1);
	return ip;
}

/*
 * Create object `pop' in the specified instance.
 */
Xv_opaque
delete_replace_instances_pop_pop_create(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME_CMD,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 483,
		XV_HEIGHT, 222,
		XV_LABEL, "Class/Class-instance Selection",
		FRAME_SHOW_FOOTER, TRUE,
		FRAME_SHOW_RESIZE_CORNER, TRUE,
		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
delete_replace_instances_pop_controls1_create(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 0,
		XV_Y, 0,
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, WIN_EXTEND_TO_EDGE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `class_list' in the specified instance.
 */
Xv_opaque
delete_replace_instances_pop_class_list_create(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	extern int		class_selection();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 8,
		XV_Y, 8,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 7,
		PANEL_LABEL_STRING, "classes",
		PANEL_LAYOUT, PANEL_VERTICAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, class_selection,
		NULL);
	return obj;
}

/*
 * Create object `instances_list' in the specified instance.
 */
Xv_opaque
delete_replace_instances_pop_instances_list_create(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	extern int		instance_select();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 248,
		XV_Y, 8,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 7,
		PANEL_LABEL_STRING, "Instances",
		PANEL_LAYOUT, PANEL_VERTICAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, instance_select,
		NULL);
	return obj;
}

/*
 * Create object `assign_button' in the specified instance.
 */
Xv_opaque
delete_replace_instances_pop_assign_button_create(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	extern void		assign_the_replace_command();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 80,
		XV_Y, 184,
		PANEL_LABEL_STRING, "Assign",
		PANEL_NOTIFY_PROC, assign_the_replace_command,
		NULL);
	return obj;
}

/*
 * Create object `instance_field' in the specified instance.
 */
Xv_opaque
delete_replace_instances_pop_instance_field_create(ip, owner)
	delete_replace_instances_pop_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	instance_typed();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 252,
		XV_Y, 184,
		PANEL_VALUE_DISPLAY_LENGTH, 16,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Instance:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, instance_typed,
		NULL);
	return obj;
}

