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

/*
 * Initialize an instance of object `win'.
 */
gcc_win_objects *
gcc_win_objects_initialize(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (gcc_win_objects *) calloc(1, sizeof (gcc_win_objects))))
		return (gcc_win_objects *) NULL;
	if (!ip->win)
		ip->win = gcc_win_win_create(ip, owner);
	if (!ip->controls)
		ip->controls = gcc_win_controls_create(ip, ip->win);
	if (!ip->color_list)
		ip->color_list = gcc_win_color_list_create(ip, ip->controls);
	if (!ip->color_blot)
		ip->color_blot = gcc_win_color_blot_create(ip, ip->controls);
	if (!ip->color_name)
		ip->color_name = gcc_win_color_name_create(ip, ip->controls);
	if (!ip->apply)
		ip->apply = gcc_win_apply_create(ip, ip->controls);
	if (!ip->reset)
		ip->reset = gcc_win_reset_create(ip, ip->controls);
	return ip;
}

/*
 * Create object `win' in the specified instance.
 */
Xv_opaque
gcc_win_win_create(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque		owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME_CMD,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 287,
		XV_HEIGHT, 344,
		XV_SHOW, FALSE,
		FRAME_SHOW_FOOTER, TRUE,
		FRAME_SHOW_RESIZE_CORNER, FALSE,
		FRAME_CMD_PUSHPIN_IN, TRUE,
		NULL);
	xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
	return obj;
}

/*
 * Create object `controls' in the specified instance.
 */
Xv_opaque
gcc_win_controls_create(ip, owner)
	gcc_win_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 `color_list' in the specified instance.
 */
Xv_opaque
gcc_win_color_list_create(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque		owner;
{
	extern int		gcc_list_proc();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_HELP_DATA, "gcc:color_list",
		XV_X, 24,
		XV_Y, 8,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 12,
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, FALSE,
		PANEL_NOTIFY_PROC, gcc_list_proc,
		NULL);
	return obj;
}

/*
 * Create object `color_blot' in the specified instance.
 */
Xv_opaque
gcc_win_color_blot_create(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque		owner;
{
	Xv_opaque	obj;
	Xv_opaque		color_blot_image;
	static unsigned short	color_blot_bits[] = {
#include "black.pr"
	};
	
	color_blot_image = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, color_blot_bits,
		XV_WIDTH, 32,
		XV_HEIGHT, 32,
		NULL);
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 236,
		XV_Y, 249,
		PANEL_LABEL_IMAGE, color_blot_image,
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `color_name' in the specified instance.
 */
Xv_opaque
gcc_win_color_name_create(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque		owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_HELP_DATA, "gcc:color_name",
		XV_X, 12,
		XV_Y, 265,
		PANEL_VALUE_DISPLAY_LENGTH, 20,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Color:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `apply' in the specified instance.
 */
Xv_opaque
gcc_win_apply_create(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque		owner;
{
	extern void		gcc_apply();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_HELP_DATA, "gcc:apply",
		XV_X, 88,
		XV_Y, 305,
		PANEL_LABEL_STRING, "Apply",
		PANEL_NOTIFY_PROC, gcc_apply,
		NULL);
	return obj;
}

/*
 * Create object `reset' in the specified instance.
 */
Xv_opaque
gcc_win_reset_create(ip, owner)
	gcc_win_objects	*ip;
	Xv_opaque		owner;
{
	extern void		gcc_reset();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_HELP_DATA, "gcc:reset",
		XV_X, 152,
		XV_Y, 305,
		PANEL_LABEL_STRING, "Reset",
		PANEL_NOTIFY_PROC, gcc_reset,
		NULL);
	return obj;
}

