/*
 * DATlib   Copyright (c) 1995-1996 Marcus Meissner &
 *          Friedrich-Alexander Universitaet Erlangen-Nuernberg (FAU), IMMD4
 *          All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    This product includes software developed by Marcus Meissner
 *    at the Friedrich-Alexander Universitaet Erlangen-Nuernberg (FAU), IMMD4
 *
 * 4. The name of the University or the author may not be used
 *    to endorse or promote products derived from this software without
 *    specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE AUTHOR ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR THE AUTHOR BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

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

/*
 * Initialize an instance of object `window1'.
 */
ply_window1_objects *
ply_window1_objects_initialize(ply_window1_objects *ip, Xv_opaque owner)
{
	if (!ip && !(ip = (ply_window1_objects *) calloc(1, sizeof (ply_window1_objects))))
		return (ply_window1_objects *) NULL;
	if (!ip->window1)
		ip->window1 = ply_window1_window1_create(ip, owner);
	if (!ip->controls1)
		ip->controls1 = ply_window1_controls1_create(ip, ip->window1);
	if (!ip->quit)
		ip->quit = ply_window1_quit_create(ip, ip->controls1);
	if (!ip->mainpanel)
		ip->mainpanel = ply_window1_mainpanel_create(ip, ip->controls1);
	if (!ip->programnr_lbl)
		ip->programnr_lbl = ply_window1_programnr_lbl_create(ip, ip->controls1);
	if (!ip->prognrtxt)
		ip->prognrtxt = ply_window1_prognrtxt_create(ip, ip->controls1);
	if (!ip->abstime_lbl)
		ip->abstime_lbl = ply_window1_abstime_lbl_create(ip, ip->controls1);
	if (!ip->abstime)
		ip->abstime = ply_window1_abstime_create(ip, ip->controls1);
	if (!ip->progtime_lbl)
		ip->progtime_lbl = ply_window1_progtime_lbl_create(ip, ip->controls1);
	if (!ip->progtime)
		ip->progtime = ply_window1_progtime_create(ip, ip->controls1);
	if (!ip->runtime_lbl)
		ip->runtime_lbl = ply_window1_runtime_lbl_create(ip, ip->controls1);
	if (!ip->runtime)
		ip->runtime = ply_window1_runtime_create(ip, ip->controls1);
	if (!ip->recdate_lbl)
		ip->recdate_lbl = ply_window1_recdate_lbl_create(ip, ip->controls1);
	if (!ip->recorddate)
		ip->recorddate = ply_window1_recorddate_create(ip, ip->controls1);
	return ip;
}

/*
 * Create object `window1' in the specified instance.
 */
Xv_opaque
ply_window1_window1_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 247,
		XV_HEIGHT, 367,
		XV_LABEL, "Base Window",
		FRAME_SHOW_FOOTER, TRUE,
		FRAME_SHOW_RESIZE_CORNER, TRUE,
		NULL);
	xv_set(xv_get(obj, FRAME_ICON), XV_LABEL, "Player", NULL);
	return obj;
}

/*
 * Create object `controls1' in the specified instance.
 */
Xv_opaque
ply_window1_controls1_create(ply_window1_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 `quit' in the specified instance.
 */
Xv_opaque
ply_window1_quit_create(ply_window1_objects *ip, Xv_opaque owner)
{
	extern void		do_quit(Panel_item, Event *);
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 190,
		XV_Y, 10,
		PANEL_LABEL_STRING, "Quit",
		PANEL_NOTIFY_PROC, do_quit,
		NULL);
	return obj;
}

/*
 * Create object `mainpanel' in the specified instance.
 */
Xv_opaque
ply_window1_mainpanel_create(ply_window1_objects *ip, Xv_opaque owner)
{
	extern void		ply_window1_mainpanel_notify_callback(Panel_item, int, Event *);
	Xv_opaque	obj;
	Xv_opaque		mainpanel_image0;
	static unsigned short	mainpanel_bits0[] = {
#include "bitmaps/rew.button"
	};
	Xv_opaque		mainpanel_image1;
	static unsigned short	mainpanel_bits1[] = {
#include "bitmaps/play.button"
	};
	Xv_opaque		mainpanel_image2;
	static unsigned short	mainpanel_bits2[] = {
#include "bitmaps/ff.button"
	};
	Xv_opaque		mainpanel_image3;
	static unsigned short	mainpanel_bits3[] = {
#include "bitmaps/pause.button"
	};
	Xv_opaque		mainpanel_image4;
	static unsigned short	mainpanel_bits4[] = {
#include "bitmaps/stop.button"
	};
	Xv_opaque		mainpanel_image5;
	static unsigned short	mainpanel_bits5[] = {
#include "bitmaps/eject.button"
	};
	Xv_opaque		mainpanel_image6;
	static unsigned short	mainpanel_bits6[] = {
#include "bitmaps/rew_all.button"
	};
	Xv_opaque		mainpanel_image7;
	static unsigned short	mainpanel_bits7[] = {
#include "bitmaps/ff_all.button"
	};
	
	mainpanel_image0 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits0,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image1 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits1,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image2 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits2,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image3 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits3,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image4 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits4,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image5 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits5,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image6 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits6,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	mainpanel_image7 = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, mainpanel_bits7,
		XV_WIDTH, 32,
		XV_HEIGHT, 16,
		NULL);
	obj = xv_create(owner, PANEL_CHOICE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 53,
		XV_Y, 40,
		PANEL_CHOICE_NCOLS, 3,
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_CHOOSE_NONE, FALSE,
		PANEL_NOTIFY_PROC, ply_window1_mainpanel_notify_callback,
		PANEL_CHOICE_IMAGE,  0, mainpanel_image0,
		PANEL_CHOICE_IMAGE,  1, mainpanel_image1,
		PANEL_CHOICE_IMAGE,  2, mainpanel_image2,
		PANEL_CHOICE_IMAGE,  3, mainpanel_image3,
		PANEL_CHOICE_IMAGE,  4, mainpanel_image4,
		PANEL_CHOICE_IMAGE,  5, mainpanel_image5,
		PANEL_CHOICE_IMAGE,  6, mainpanel_image6,
		PANEL_CHOICE_STRING, 7, "",
		PANEL_CHOICE_IMAGE,  8, mainpanel_image7,
		PANEL_VALUE, 4,
		NULL);
	return obj;
}

/*
 * Create object `programnr_lbl' in the specified instance.
 */
Xv_opaque
ply_window1_programnr_lbl_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 80,
		XV_Y, 140,
		PANEL_LABEL_STRING, "Program Nr:",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `prognrtxt' in the specified instance.
 */
Xv_opaque
ply_window1_prognrtxt_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 110,
		XV_Y, 163,
		PANEL_LABEL_STRING, "",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `abstime_lbl' in the specified instance.
 */
Xv_opaque
ply_window1_abstime_lbl_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 72,
		XV_Y, 186,
		PANEL_LABEL_STRING, "Absolute Time:",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `abstime' in the specified instance.
 */
Xv_opaque
ply_window1_abstime_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 50,
		XV_Y, 209,
		PANEL_LABEL_STRING, "",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `progtime_lbl' in the specified instance.
 */
Xv_opaque
ply_window1_progtime_lbl_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 74,
		XV_Y, 232,
		PANEL_LABEL_STRING, "Program Time:",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `progtime' in the specified instance.
 */
Xv_opaque
ply_window1_progtime_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 50,
		XV_Y, 255,
		PANEL_LABEL_STRING, "",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `runtime_lbl' in the specified instance.
 */
Xv_opaque
ply_window1_runtime_lbl_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 89,
		XV_Y, 278,
		PANEL_LABEL_STRING, "Run Time:",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `runtime' in the specified instance.
 */
Xv_opaque
ply_window1_runtime_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 50,
		XV_Y, 301,
		PANEL_LABEL_STRING, "",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `recdate_lbl' in the specified instance.
 */
Xv_opaque
ply_window1_recdate_lbl_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 81,
		XV_Y, 324,
		PANEL_LABEL_STRING, "Record Date:",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `recorddate' in the specified instance.
 */
Xv_opaque
ply_window1_recorddate_create(ply_window1_objects *ip, Xv_opaque owner)
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_MESSAGE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 50,
		XV_Y, 347,
		PANEL_LABEL_STRING, "",
		PANEL_LABEL_BOLD, TRUE,
		NULL);
	return obj;
}

