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

/*
 * Create object `file_menu' in the specified instance.
 */
Xv_opaque
rplaytool_file_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	rplaytool_file_menu_item0_callback();
	extern Menu_item	do_quit();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Sounds...",
			MENU_GEN_PROC, rplaytool_file_menu_item0_callback,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Quit",
			MENU_GEN_PROC, do_quit,
			NULL,
		NULL);
	return obj;
}

/*
 * Create object `cont_menu' in the specified instance.
 */
Xv_opaque
rplaytool_cont_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	do_cont_selected();
	extern Menu_item	do_cont_all();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Selected sounds",
			MENU_GEN_PROC, do_cont_selected,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "All sounds",
			MENU_GEN_PROC, do_cont_all,
			NULL,
		MENU_DEFAULT, 1,
		NULL);
	return obj;
}

/*
 * Create object `pause_menu' in the specified instance.
 */
Xv_opaque
rplaytool_pause_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	do_pause_selected();
	extern Menu_item	do_pause_all();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Selected sounds",
			MENU_GEN_PROC, do_pause_selected,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "All sounds",
			MENU_GEN_PROC, do_pause_all,
			NULL,
		MENU_DEFAULT, 1,
		NULL);
	return obj;
}

/*
 * Create object `stop_menu' in the specified instance.
 */
Xv_opaque
rplaytool_stop_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	do_stop_selected();
	extern Menu_item	do_stop_all();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Selected sounds",
			MENU_GEN_PROC, do_stop_selected,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "All sounds",
			MENU_GEN_PROC, do_stop_all,
			NULL,
		MENU_DEFAULT, 1,
		NULL);
	return obj;
}

/*
 * Create object `delete_menu' in the specified instance.
 */
Xv_opaque
rplaytool_delete_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	playlist_delete();
	extern Menu_item	playlist_delete_all();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Selected sounds",
			MENU_GEN_PROC, playlist_delete,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "All sounds",
			MENU_GEN_PROC, playlist_delete_all,
			NULL,
		NULL);
	return obj;
}

/*
 * Create object `add_menu' in the specified instance.
 */
Xv_opaque
rplaytool_add_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	add_sounds();
	extern Menu_item	add_all_sounds();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Select sound",
			MENU_GEN_PROC, add_sounds,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "All sounds",
			MENU_GEN_PROC, add_all_sounds,
			NULL,
		NULL);
	return obj;
}

/*
 * Create object `playlistfile_menu' in the specified instance.
 */
Xv_opaque
rplaytool_playlistfile_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	playlistfile_load();
	extern Menu_item	playlistfile_save();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Load...",
			MENU_GEN_PROC, playlistfile_load,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Save...",
			MENU_GEN_PROC, playlistfile_save,
			NULL,
		NULL);
	return obj;
}

/*
 * Create object `move_menu' in the specified instance.
 */
Xv_opaque
rplaytool_move_menu_create(ip, owner)
	caddr_t		ip;
	Xv_opaque	owner;
{
	extern Menu_item	move_up();
	extern Menu_item	move_down();
	extern Menu_item	move_top();
	extern Menu_item	move_bottom();
	Xv_opaque	obj;
	
	obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
		XV_KEY_DATA, INSTANCE, ip,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Up",
			MENU_GEN_PROC, move_up,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Down",
			MENU_GEN_PROC, move_down,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Top",
			MENU_GEN_PROC, move_top,
			NULL,
		MENU_ITEM,
			XV_KEY_DATA, INSTANCE, ip,
			MENU_STRING, "Bottom",
			MENU_GEN_PROC, move_bottom,
			NULL,
		NULL);
	return obj;
}

/*
 * Initialize an instance of object `w'.
 */
rplaytool_w_objects *
rplaytool_w_objects_initialize(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (rplaytool_w_objects *) calloc(1, sizeof (rplaytool_w_objects))))
		return (rplaytool_w_objects *) NULL;
	if (!ip->w)
		ip->w = rplaytool_w_w_create(ip, owner);
	if (!ip->c)
		ip->c = rplaytool_w_c_create(ip, ip->w);
	if (!ip->file)
		ip->file = rplaytool_w_file_create(ip, ip->c);
	if (!ip->host)
		ip->host = rplaytool_w_host_create(ip, ip->c);
	if (!ip->volume)
		ip->volume = rplaytool_w_volume_create(ip, ip->c);
	if (!ip->spool)
		ip->spool = rplaytool_w_spool_create(ip, ip->c);
	if (!ip->cont)
		ip->cont = rplaytool_w_cont_create(ip, ip->c);
	if (!ip->pause)
		ip->pause = rplaytool_w_pause_create(ip, ip->c);
	if (!ip->stop)
		ip->stop = rplaytool_w_stop_create(ip, ip->c);
	return ip;
}

/*
 * Create object `w' in the specified instance.
 */
Xv_opaque
rplaytool_w_w_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	Xv_opaque		w_image;
	static unsigned short	w_bits[] = {
#include "icons/rplaytool.icon"
	};
	Xv_opaque		w_image_mask;
	static unsigned short	w_mask_bits[] = {
#include "icons/rplaytool_mask.icon"
	};
	
	w_image = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, w_bits,
		XV_WIDTH, 64,
		XV_HEIGHT, 64,
		NULL);
	w_image_mask = xv_create(XV_NULL, SERVER_IMAGE,
		SERVER_IMAGE_DEPTH, 1,
		SERVER_IMAGE_BITS, w_mask_bits,
		XV_WIDTH, 64,
		XV_HEIGHT, 64,
		NULL);
	obj = xv_create(owner, FRAME,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 358,
		XV_HEIGHT, 341,
		XV_LABEL, "rplaytool",
		FRAME_SHOW_FOOTER, TRUE,
		FRAME_SHOW_RESIZE_CORNER, FALSE,
		FRAME_ICON, xv_create(XV_NULL, ICON,
			ICON_IMAGE, w_image,
			ICON_MASK_IMAGE, w_image_mask,
			NULL),
		NULL);
	return obj;
}

/*
 * Create object `c' in the specified instance.
 */
Xv_opaque
rplaytool_w_c_create(ip, owner)
	rplaytool_w_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 `file' in the specified instance.
 */
Xv_opaque
rplaytool_w_file_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 16,
		XV_Y, 8,
		PANEL_LABEL_STRING, "File",
		PANEL_ITEM_MENU, rplaytool_file_menu_create((caddr_t) ip, ip->w),
		NULL);
	return obj;
}

/*
 * Create object `host' in the specified instance.
 */
Xv_opaque
rplaytool_w_host_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	do_host();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 136,
		XV_Y, 16,
		PANEL_VALUE_DISPLAY_LENGTH, 16,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Hostname: ",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, do_host,
		NULL);
	return obj;
}

/*
 * Create object `volume' in the specified instance.
 */
Xv_opaque
rplaytool_w_volume_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_volume();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_SLIDER,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 152,
		XV_Y, 48,
		PANEL_SLIDER_WIDTH, 100,
		PANEL_TICKS, 7,
		PANEL_LABEL_STRING, "Volume:",
		PANEL_DIRECTION, PANEL_HORIZONTAL,
		PANEL_SLIDER_END_BOXES, TRUE,
		PANEL_SHOW_RANGE, FALSE,
		PANEL_SHOW_VALUE, FALSE,
		PANEL_MIN_VALUE, 0,
		PANEL_MAX_VALUE, 255,
		PANEL_MIN_TICK_STRING, "0%",
		PANEL_MAX_TICK_STRING, "100%",
		PANEL_VALUE, 0,
		PANEL_NOTIFY_PROC, do_volume,
		NULL);
	return obj;
}

/*
 * Create object `spool' in the specified instance.
 */
Xv_opaque
rplaytool_w_spool_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 16,
		XV_Y, 96,
		PANEL_LIST_WIDTH, 300,
		PANEL_LIST_DISPLAY_ROWS, 8,
		PANEL_LIST_TITLE, "Spool",
		PANEL_LAYOUT, PANEL_VERTICAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, FALSE,
		PANEL_CHOOSE_NONE, TRUE,
		NULL);
	return obj;
}

/*
 * Create object `cont' in the specified instance.
 */
Xv_opaque
rplaytool_w_cont_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 70,
		XV_Y, 296,
		PANEL_LABEL_STRING, "Continue",
		PANEL_ITEM_MENU, rplaytool_cont_menu_create((caddr_t) ip, ip->w),
		NULL);
	return obj;
}

/*
 * Create object `pause' in the specified instance.
 */
Xv_opaque
rplaytool_w_pause_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 160,
		XV_Y, 296,
		PANEL_LABEL_STRING, "Pause",
		PANEL_ITEM_MENU, rplaytool_pause_menu_create((caddr_t) ip, ip->w),
		NULL);
	return obj;
}

/*
 * Create object `stop' in the specified instance.
 */
Xv_opaque
rplaytool_w_stop_create(ip, owner)
	rplaytool_w_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 230,
		XV_Y, 296,
		PANEL_LABEL_STRING, "Stop",
		PANEL_ITEM_MENU, rplaytool_stop_menu_create((caddr_t) ip, ip->w),
		NULL);
	return obj;
}

/*
 * Initialize an instance of object `s'.
 */
rplaytool_s_objects *
rplaytool_s_objects_initialize(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (rplaytool_s_objects *) calloc(1, sizeof (rplaytool_s_objects))))
		return (rplaytool_s_objects *) NULL;
	if (!ip->s)
		ip->s = rplaytool_s_s_create(ip, owner);
	if (!ip->controls7)
		ip->controls7 = rplaytool_s_controls7_create(ip, ip->s);
	if (!ip->directory)
		ip->directory = rplaytool_s_directory_create(ip, ip->controls7);
	if (!ip->disklist)
		ip->disklist = rplaytool_s_disklist_create(ip, ip->controls7);
	if (!ip->controls9)
		ip->controls9 = rplaytool_s_controls9_create(ip, ip->s);
	if (!ip->soundlist)
		ip->soundlist = rplaytool_s_soundlist_create(ip, ip->controls9);
	if (!ip->controls1)
		ip->controls1 = rplaytool_s_controls1_create(ip, ip->s);
	if (!ip->add)
		ip->add = rplaytool_s_add_create(ip, ip->controls1);
	if (!ip->close)
		ip->close = rplaytool_s_close_create(ip, ip->controls1);
	if (!ip->controls4)
		ip->controls4 = rplaytool_s_controls4_create(ip, ip->s);
	if (!ip->playlist3)
		ip->playlist3 = rplaytool_s_playlist3_create(ip, ip->controls4);
	if (!ip->controls5)
		ip->controls5 = rplaytool_s_controls5_create(ip, ip->s);
	if (!ip->playlist4)
		ip->playlist4 = rplaytool_s_playlist4_create(ip, ip->controls5);
	if (!ip->controls2)
		ip->controls2 = rplaytool_s_controls2_create(ip, ip->s);
	if (!ip->playlist1)
		ip->playlist1 = rplaytool_s_playlist1_create(ip, ip->controls2);
	if (!ip->controls3)
		ip->controls3 = rplaytool_s_controls3_create(ip, ip->s);
	if (!ip->playlist2)
		ip->playlist2 = rplaytool_s_playlist2_create(ip, ip->controls3);
	if (!ip->controls6)
		ip->controls6 = rplaytool_s_controls6_create(ip, ip->s);
	if (!ip->move)
		ip->move = rplaytool_s_move_create(ip, ip->controls6);
	if (!ip->delete)
		ip->delete = rplaytool_s_delete_create(ip, ip->controls6);
	if (!ip->file)
		ip->file = rplaytool_s_file_create(ip, ip->controls6);
	if (!ip->playit)
		ip->playit = rplaytool_s_playit_create(ip, ip->controls6);
	if (!ip->next)
		ip->next = rplaytool_s_next_create(ip, ip->controls6);
	if (!ip->prev)
		ip->prev = rplaytool_s_prev_create(ip, ip->controls6);
	if (!ip->stopit)
		ip->stopit = rplaytool_s_stopit_create(ip, ip->controls6);
	if (!ip->whichlist)
		ip->whichlist = rplaytool_s_whichlist_create(ip, ip->controls6);
	if (!ip->controls8)
		ip->controls8 = rplaytool_s_controls8_create(ip, ip->s);
	if (!ip->sort)
		ip->sort = rplaytool_s_sort_create(ip, ip->controls8);
	if (!ip->reload)
		ip->reload = rplaytool_s_reload_create(ip, ip->controls8);
	if (!ip->soundsource)
		ip->soundsource = rplaytool_s_soundsource_create(ip, ip->controls8);
	return ip;
}

/*
 * Create object `s' in the specified instance.
 */
Xv_opaque
rplaytool_s_s_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME_CMD,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 580,
		XV_HEIGHT, 391,
		XV_LABEL, "Sounds",
		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 `controls7' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls7_create(ip, owner)
	rplaytool_s_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, 247,
		XV_HEIGHT, 281,
		XV_SHOW, FALSE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `directory' in the specified instance.
 */
Xv_opaque
rplaytool_s_directory_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	do_cd();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 8,
		XV_Y, 24,
		PANEL_VALUE_DISPLAY_LENGTH, 20,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Directory:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, do_cd,
		NULL);
	return obj;
}

/*
 * Create object `disklist' in the specified instance.
 */
Xv_opaque
rplaytool_s_disklist_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern int		do_disklist();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 16,
		XV_Y, 48,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LIST_TITLE, "Disk Sounds",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, do_disklist,
		NULL);
	return obj;
}

/*
 * Create object `controls9' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls9_create(ip, owner)
	rplaytool_s_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, 247,
		XV_HEIGHT, 281,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `soundlist' in the specified instance.
 */
Xv_opaque
rplaytool_s_soundlist_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern int		do_soundlist();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 14,
		XV_Y, 24,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LIST_TITLE, "Server Sounds",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, do_soundlist,
		NULL);
	return obj;
}

/*
 * Create object `controls1' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls1_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, (int)xv_get(ip->controls7, XV_X) +
		      (int)xv_get(ip->controls7, XV_WIDTH),
		XV_Y, 0,
		XV_WIDTH, 62,
		XV_HEIGHT, WIN_EXTEND_TO_EDGE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `add' in the specified instance.
 */
Xv_opaque
rplaytool_s_add_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 3,
		XV_Y, 112,
		PANEL_LABEL_STRING, "Add",
		PANEL_INACTIVE, TRUE,
		PANEL_ITEM_MENU, rplaytool_add_menu_create((caddr_t) ip, ip->s),
		NULL);
	return obj;
}

/*
 * Create object `close' in the specified instance.
 */
Xv_opaque
rplaytool_s_close_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		rplaytool_s_close_notify_callback();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 4,
		XV_Y, 368,
		PANEL_LABEL_STRING, "Close",
		PANEL_NOTIFY_PROC, rplaytool_s_close_notify_callback,
		NULL);
	return obj;
}

/*
 * Create object `controls4' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls4_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, (int)xv_get(ip->controls1, XV_X) +
		      (int)xv_get(ip->controls1, XV_WIDTH),
		XV_Y, 0,
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, 257,
		XV_SHOW, FALSE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `playlist3' in the specified instance.
 */
Xv_opaque
rplaytool_s_playlist3_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern int		do_playlist3();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 18,
		XV_Y, 24,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LIST_TITLE, "User Play List 3",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, do_playlist3,
		NULL);
	return obj;
}

/*
 * Create object `controls5' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls5_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, (int)xv_get(ip->controls1, XV_X) +
		      (int)xv_get(ip->controls1, XV_WIDTH),
		XV_Y, 0,
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, 257,
		XV_SHOW, FALSE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `playlist4' in the specified instance.
 */
Xv_opaque
rplaytool_s_playlist4_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern int		do_playlist4();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 18,
		XV_Y, 24,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LIST_TITLE, "User Play List 4",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, do_playlist4,
		NULL);
	return obj;
}

/*
 * Create object `controls2' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls2_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, (int)xv_get(ip->controls1, XV_X) +
		      (int)xv_get(ip->controls1, XV_WIDTH),
		XV_Y, 0,
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, 257,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `playlist1' in the specified instance.
 */
Xv_opaque
rplaytool_s_playlist1_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern int		do_playlist1();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 18,
		XV_Y, 24,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LIST_TITLE, "User Play List 1",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, do_playlist1,
		NULL);
	return obj;
}

/*
 * Create object `controls3' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls3_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, (int)xv_get(ip->controls1, XV_X) +
		      (int)xv_get(ip->controls1, XV_WIDTH),
		XV_Y, 0,
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, 257,
		XV_SHOW, FALSE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `playlist2' in the specified instance.
 */
Xv_opaque
rplaytool_s_playlist2_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern int		do_playlist2();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 18,
		XV_Y, 24,
		PANEL_LIST_WIDTH, 200,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LIST_TITLE, "User Play List 2",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, do_playlist2,
		NULL);
	return obj;
}

/*
 * Create object `controls6' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls6_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, (int)xv_get(ip->controls1, XV_X) +
		      (int)xv_get(ip->controls1, XV_WIDTH),
		XV_Y, (int)xv_get(ip->controls4, XV_Y) +
		      (int)xv_get(ip->controls4, XV_HEIGHT),
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, WIN_EXTEND_TO_EDGE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `move' in the specified instance.
 */
Xv_opaque
rplaytool_s_move_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 31,
		XV_Y, 16,
		PANEL_LABEL_STRING, "Move",
		PANEL_INACTIVE, TRUE,
		PANEL_ITEM_MENU, rplaytool_move_menu_create((caddr_t) ip, ip->s),
		NULL);
	return obj;
}

/*
 * Create object `delete' in the specified instance.
 */
Xv_opaque
rplaytool_s_delete_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 107,
		XV_Y, 16,
		PANEL_LABEL_STRING, "Delete",
		PANEL_INACTIVE, TRUE,
		PANEL_ITEM_MENU, rplaytool_delete_menu_create((caddr_t) ip, ip->s),
		NULL);
	return obj;
}

/*
 * Create object `file' in the specified instance.
 */
Xv_opaque
rplaytool_s_file_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 186,
		XV_Y, 16,
		PANEL_LABEL_STRING, "File",
		PANEL_ITEM_MENU, rplaytool_playlistfile_menu_create((caddr_t) ip, ip->s),
		NULL);
	return obj;
}

/*
 * Create object `playit' in the specified instance.
 */
Xv_opaque
rplaytool_s_playit_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_playit();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 32,
		XV_Y, 48,
		PANEL_LABEL_STRING, "Play",
		PANEL_NOTIFY_PROC, do_playit,
		NULL);
	return obj;
}

/*
 * Create object `next' in the specified instance.
 */
Xv_opaque
rplaytool_s_next_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_next();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 87,
		XV_Y, 48,
		PANEL_LABEL_STRING, "Next",
		PANEL_NOTIFY_PROC, do_next,
		NULL);
	return obj;
}

/*
 * Create object `prev' in the specified instance.
 */
Xv_opaque
rplaytool_s_prev_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_prev();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 141,
		XV_Y, 48,
		PANEL_LABEL_STRING, "Prev",
		PANEL_NOTIFY_PROC, do_prev,
		NULL);
	return obj;
}

/*
 * Create object `stopit' in the specified instance.
 */
Xv_opaque
rplaytool_s_stopit_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_stopit();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 194,
		XV_Y, 48,
		PANEL_LABEL_STRING, "Stop",
		PANEL_NOTIFY_PROC, do_stopit,
		NULL);
	return obj;
}

/*
 * Create object `whichlist' in the specified instance.
 */
Xv_opaque
rplaytool_s_whichlist_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		switch_playlist();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_CHOICE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 25,
		XV_Y, 80,
		PANEL_CHOICE_NROWS, 1,
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_CHOOSE_NONE, FALSE,
		PANEL_LABEL_STRING, "Select play list:",
		PANEL_NOTIFY_PROC, switch_playlist,
		PANEL_CHOICE_STRINGS,
			"1",
			"2",
			"3",
			"4",
			NULL,
		NULL);
	return obj;
}

/*
 * Create object `controls8' in the specified instance.
 */
Xv_opaque
rplaytool_s_controls8_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 0,
		XV_Y, (int)xv_get(ip->controls7, XV_Y) +
		      (int)xv_get(ip->controls7, XV_HEIGHT),
		XV_WIDTH, 247,
		XV_HEIGHT, WIN_EXTEND_TO_EDGE,
		WIN_BORDER, FALSE,
		NULL);
	return obj;
}

/*
 * Create object `sort' in the specified instance.
 */
Xv_opaque
rplaytool_s_sort_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_soundsort();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 69,
		XV_Y, 16,
		PANEL_LABEL_STRING, "Sort",
		PANEL_NOTIFY_PROC, do_soundsort,
		NULL);
	return obj;
}

/*
 * Create object `reload' in the specified instance.
 */
Xv_opaque
rplaytool_s_reload_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		do_reload();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 119,
		XV_Y, 16,
		PANEL_LABEL_STRING, "Reload",
		PANEL_NOTIFY_PROC, do_reload,
		NULL);
	return obj;
}

/*
 * Create object `soundsource' in the specified instance.
 */
Xv_opaque
rplaytool_s_soundsource_create(ip, owner)
	rplaytool_s_objects	*ip;
	Xv_opaque	owner;
{
	extern void		rplaytool_s_soundsource_notify_callback();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_CHOICE,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 8,
		XV_Y, 48,
		PANEL_CHOICE_NROWS, 1,
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_CHOOSE_NONE, FALSE,
		PANEL_LABEL_STRING, "List sounds from:",
		PANEL_NOTIFY_PROC, rplaytool_s_soundsource_notify_callback,
		PANEL_CHOICE_STRINGS,
			"Server",
			"Disk",
			NULL,
		PANEL_VALUE, 0,
		NULL);
	return obj;
}

/*
 * Initialize an instance of object `f'.
 */
rplaytool_f_objects *
rplaytool_f_objects_initialize(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	if (!ip && !(ip = (rplaytool_f_objects *) calloc(1, sizeof (rplaytool_f_objects))))
		return (rplaytool_f_objects *) NULL;
	if (!ip->f)
		ip->f = rplaytool_f_f_create(ip, owner);
	if (!ip->controls10)
		ip->controls10 = rplaytool_f_controls10_create(ip, ip->f);
	if (!ip->filedir)
		ip->filedir = rplaytool_f_filedir_create(ip, ip->controls10);
	if (!ip->filelist)
		ip->filelist = rplaytool_f_filelist_create(ip, ip->controls10);
	if (!ip->filename)
		ip->filename = rplaytool_f_filename_create(ip, ip->controls10);
	if (!ip->filedoit)
		ip->filedoit = rplaytool_f_filedoit_create(ip, ip->controls10);
	if (!ip->fileclose)
		ip->fileclose = rplaytool_f_fileclose_create(ip, ip->controls10);
	return ip;
}

/*
 * Create object `f' in the specified instance.
 */
Xv_opaque
rplaytool_f_f_create(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME_CMD,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 344,
		XV_HEIGHT, 351,
		XV_SHOW, FALSE,
		FRAME_SHOW_FOOTER, FALSE,
		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 `controls10' in the specified instance.
 */
Xv_opaque
rplaytool_f_controls10_create(ip, owner)
	rplaytool_f_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 `filedir' in the specified instance.
 */
Xv_opaque
rplaytool_f_filedir_create(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	filedir_notify();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 7,
		XV_Y, 16,
		PANEL_VALUE_DISPLAY_LENGTH, 32,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "Directory:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, filedir_notify,
		NULL);
	return obj;
}

/*
 * Create object `filelist' in the specified instance.
 */
Xv_opaque
rplaytool_f_filelist_create(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	extern int		filelist_notify();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_LIST,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 13,
		XV_Y, 48,
		PANEL_LIST_WIDTH, 300,
		PANEL_LIST_DISPLAY_ROWS, 10,
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, TRUE,
		PANEL_CHOOSE_ONE, TRUE,
		PANEL_CHOOSE_NONE, TRUE,
		PANEL_NOTIFY_PROC, filelist_notify,
		NULL);
	return obj;
}

/*
 * Create object `filename' in the specified instance.
 */
Xv_opaque
rplaytool_f_filename_create(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	extern Panel_setting	filename_notify();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_TEXT,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 26,
		XV_Y, 264,
		PANEL_VALUE_DISPLAY_LENGTH, 32,
		PANEL_VALUE_STORED_LENGTH, 80,
		PANEL_LABEL_STRING, "File:",
		PANEL_LAYOUT, PANEL_HORIZONTAL,
		PANEL_READ_ONLY, FALSE,
		PANEL_NOTIFY_PROC, filename_notify,
		NULL);
	return obj;
}

/*
 * Create object `filedoit' in the specified instance.
 */
Xv_opaque
rplaytool_f_filedoit_create(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	extern void		filedoit_notify();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 147,
		XV_Y, 296,
		PANEL_LABEL_STRING, "Load",
		PANEL_NOTIFY_PROC, filedoit_notify,
		NULL);
	return obj;
}

/*
 * Create object `fileclose' in the specified instance.
 */
Xv_opaque
rplaytool_f_fileclose_create(ip, owner)
	rplaytool_f_objects	*ip;
	Xv_opaque	owner;
{
	extern void		rplaytool_f_fileclose_notify_callback();
	Xv_opaque	obj;
	
	obj = xv_create(owner, PANEL_BUTTON,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 145,
		XV_Y, 323,
		PANEL_LABEL_STRING, "Close",
		PANEL_NOTIFY_PROC, rplaytool_f_fileclose_notify_callback,
		NULL);
	return obj;
}

