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

/*
 * Initialize an instance of object `popup1'.
 */
insert_popup1_objects *
insert_popup1_objects_initialize(ip, owner)
	insert_popup1_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (insert_popup1_objects *) calloc(1, sizeof (insert_popup1_objects))))
		return (insert_popup1_objects *) NULL;
	if (!ip->popup1)
		ip->popup1 = insert_popup1_popup1_create(ip, owner);
	if (!ip->controls1)
		ip->controls1 = insert_popup1_controls1_create(ip, ip->popup1);
	if (!ip->textfield1)
		ip->textfield1 = insert_popup1_textfield1_create(ip, ip->controls1);
	if (!ip->textfield2)
		ip->textfield2 = insert_popup1_textfield2_create(ip, ip->controls1);
	return ip;
}

/*
 * Create object `popup1' in the specified instance.
 */
Xv_opaque
insert_popup1_popup1_create(ip, owner)
	insert_popup1_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME_CMD,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 402,
		XV_HEIGHT, 129,
		XV_LABEL, "Insert text file",
		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
insert_popup1_controls1_create(ip, owner)
	insert_popup1_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 21,
		XV_Y, 15,
		XV_WIDTH, 359,
		XV_HEIGHT, 110,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `textfield1' in the specified instance.
 */
Xv_opaque
insert_popup1_textfield1_create(ip, owner)
	insert_popup1_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 4,
		XV_Y, 20,
		PANEL_VALUE_DISPLAY_LENGTH, 34,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Directory:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `textfield2' in the specified instance.
 */
Xv_opaque
insert_popup1_textfield2_create(ip, owner)
	insert_popup1_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	insert_file_proc();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 4,
		XV_Y, 60,
		PANEL_VALUE_DISPLAY_LENGTH, 34,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Filename:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, insert_file_proc,
		NULL);
	return obj;
}

