 /*
  * Khoros: $Id: form_init.c,v 1.3 1992/03/20 22:44:14 dkhoros Exp $
  */

#if !defined(lint) && !defined(SABER)
static char rcsid[] = "Khoros: $Id: form_init.c,v 1.3 1992/03/20 22:44:14 dkhoros Exp $";
#endif

 /*
  * $Log: form_init.c,v $
 * Revision 1.3  1992/03/20  22:44:14  dkhoros
 * VirtualPatch5
 *
  */

/*
 *---------------------------------------------------------------------
 *            Copyright 1990 University of New Mexico
 * 
 * Permission to copy and modify this software and its documen- 
 * tation only for internal use in your organization is hereby 
 * granted, provided that this notice is retained thereon and 
 * on all copies.  UNM makes no representations as too the sui- 
 * tability and operability of this software for any purpose. 
 * It is provided 'as is' without express or implied warranty. 
 *  
 * UNM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- 
 * NESS.  IN NO EVENT SHALL UNM BE LIABLE FOR ANY SPECIAL, 
 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHAT- 
 * SOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER- 
 * FORMANCE OF THIS SOFTWARE. 
 *  
 * No other rights, including for example, the right to redis- 
 * tribute this software and its documentation or the right to 
 * prepare derivative works, are granted unless specifically 
 * provided in a separate license agreement. 
 * 
 *---------------------------------------------------------------------
 */
#include "unmcopyright.h"
#include "xvforms.h"
#include "form_info.h"


/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 >>>>
 >>>>         File Name:  form_init.c
 >>>>
 >>>>      Program Desc:  code to initialize fields
 >>>>                      in the structure found in form_info.h
 >>>>
 >>>>            Author:  automatically generated by conductor
 >>>>
 >>>> Date Last Updated:  Fri Mar 13 14:24:02 1992
 >>>>
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/


_xvf_init_animate_form(formptr,forminfo)

xvf_form *formptr; 
animate_form *forminfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);
	database = formptr->db;

	/***** initializing 'animate_form' Form Information structure *****/

	forminfo->previous = false;
	forminfo->reverse = false;
	forminfo->stop = false;
	forminfo->forward = false;
	forminfo->next = false;
	forminfo->workspace_index = 9;
	forminfo->quit = false;
	forminfo->file_subform = (animate_form_file_subform *) 
			  malloc(sizeof(animate_form_file_subform));


	index = 14;

	xvf_parse_startsubform_line(database[index], &line_info);
	forminfo->file_subform_selected = line_info.selected;
	forminfo->file_subform_index = 14;
	forminfo->file_subform_sfb_index = 2;

	/*** initializing 'forminfo->file_subform'
	      Subform Information structure ***/

	forminfo->file_subform->file = (file_subform_file *) 
			  malloc(sizeof(file_subform_file));


	index = 15;

	xvf_parse_startpane_line(database[index], &line_info);
	forminfo->file_subform->file_selected = line_info.selected;
	forminfo->file_subform->file_index = 15;
	forminfo->file_subform->file_gb_index = 0;
	index++;


	/* initializing 'forminfo->file_subform->file'
	       Pane Information structure */

	index++;

	xvf_parse_input_line(database[index], &line_info);
	if (line_info.file_def != NULL) {
	   forminfo->file_subform->file->i = 
		xvf_strcpy(line_info.file_def);
	}
	else  forminfo->file_subform->file->i = NULL;

	xvf_deparse_input_line(&line_info, database, index);
	forminfo->file_subform->file->i_index = index;
forminfo->file_subform->file->i_selected = false;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->file_subform->file->base = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->file_subform->file->base = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->file_subform->file->base_index = index;
forminfo->file_subform->file->base_selected = false;
	index++;

	index++;

	xvf_parse_input_line(database[index], &line_info);
	if (line_info.file_def != NULL) {
	   forminfo->file_subform->file->c = 
		xvf_strcpy(line_info.file_def);
	}
	else  forminfo->file_subform->file->c = NULL;

	xvf_deparse_input_line(&line_info, database, index);
	forminfo->file_subform->file->c_index = index;
forminfo->file_subform->file->c_selected = false;
	index++;

	index++;

	xvf_parse_input_line(database[index], &line_info);
	if (line_info.file_def != NULL) {
	   forminfo->file_subform->file->s = 
		xvf_strcpy(line_info.file_def);
	}
	else  forminfo->file_subform->file->s = NULL;

	xvf_deparse_input_line(&line_info, database, index);
	forminfo->file_subform->file->s_index = index;
forminfo->file_subform->file->s_selected = false;
	index++;

	index++;

	forminfo->file_subform->file->quit = false;
	index++;

	forminfo->options_subform = (animate_form_options_subform *) 
			  malloc(sizeof(animate_form_options_subform));


	index = 27;

	xvf_parse_startsubform_line(database[index], &line_info);
	forminfo->options_subform_selected = line_info.selected;
	forminfo->options_subform_index = 27;
	forminfo->options_subform_sfb_index = 3;

	/*** initializing 'forminfo->options_subform'
	      Subform Information structure ***/

	forminfo->options_subform->options = (options_subform_options *) 
			  malloc(sizeof(options_subform_options));


	index = 28;

	xvf_parse_startpane_line(database[index], &line_info);
	forminfo->options_subform->options_selected = line_info.selected;
	forminfo->options_subform->options_index = 28;
	forminfo->options_subform->options_gb_index = 0;
	index++;


	/* initializing 'forminfo->options_subform->options'
	       Pane Information structure */

	xvf_parse_toggle_line(database[index], &line_info);
	forminfo->options_subform->options->control_val = line_info.toggle_def;
	line_info.toggle_val = line_info.toggle_def;
	xvf_deparse_toggle_line(&line_info, database,index);
	forminfo->options_subform->options->control_index = index;
forminfo->options_subform->options->control_selected = false;
	index++;

	index = 34;
	xvf_parse_logic_line(database[index], &line_info);
	forminfo->options_subform->options->show_band = line_info.logical_def;
	line_info.logical_val = line_info.logical_def;
	xvf_deparse_logic_line(&line_info, database,index);
	forminfo->options_subform->options->show_band_index = index;
forminfo->options_subform->options->show_band_selected = false;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	forminfo->options_subform->options->use_root = line_info.logical_def;
	line_info.logical_val = line_info.logical_def;
	xvf_deparse_logic_line(&line_info, database,index);
	forminfo->options_subform->options->use_root_index = index;
forminfo->options_subform->options->use_root_selected = false;
	index++;

	xvf_parse_float_line(database[index], &line_info);
	forminfo->options_subform->options->speed = line_info.float_def;
	line_info.float_val = line_info.float_def;
	xvf_deparse_float_line(&line_info, database,index);
	forminfo->options_subform->options->speed_index = index;
forminfo->options_subform->options->speed_selected = false;
	index++;

	index++;

	forminfo->options_subform->options->quit = false;
	index++;

	_xvf_get_animate_form(formptr, forminfo);
	return(true);

}

