/*------------------------------------------------------------------------*
  Filename....: frame.h


		 COPYRIGHT (C) 2001.  All Rights Reserved.
		 auto*des*sys, Inc., Columbus, Ohio, USA.
 *------------------------------------------------------------------------*/

#ifndef _FRAME_H
#define _FRAME_H 1

#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>

#include "fzrt_api.h"
#include "fz_api.h"

#include "fz_math_api.h"
#include "fz_objt_api.h"
#include "fz_otyp_api.h"
#include "fz_type_api.h"
#include "fz_iost_api.h"
#include "formz_vendor.h"
#include "fz_notf_api.h"
#include "fz_syst_api.h"

#include "fzpl_plugin.h"


/*************************************************************************
						OBJECT TYPE STUFF
**************************************************************************/

/* Frame Object Type Plugin Identification */
/* UUID : {f1792cb3-22f4-476f-af08-b1eeec9135a6} */
	
#define FRAME_OTYP_PLUGIN_ID			"\xf1\x79\x2c\xb3\x22\xf4\x47\x6f\xaf\x08\xb1\xee\xec\x91\x35\xa6"
#define FRAME_OTYP_PLUGIN_VERSION		FZPL_VERS_MAKE(8,0,0,0)
#define FRAME_OTYP_PLUGIN_NAME			"Frame Object Type Plugin"
#define FRAME_OTYP_PLUGIN_VENDOR		FORMZ_VENDOR
#define FRAME_OTYP_PLUGIN_ATTR_STR		"FFMT=OTYP;FVERS=1.0"
#define FRAME_OTYP_PLUGIN_URL			FORMZ_VENDOR_URL

#define FRAME_STRINGS		11									/* TAH 01/23/04 */

#define	FRAME_OTYP_PLUGIN_NAME_STR	1							/* TAH 01/23/04 */
#define FRAME_TOOL_PLUGIN_NAME_STR	2							/* TAH 01/23/04 */

/* Object Type Identification */
/* UUID :  {d70b8536-a65a-491b-9183-90b128987183} */

#define FRAME_OTYP_ID		"\xd7\x0b\x85\x36\xa6\x5a\x49\x1b\x91\x83\x90\xb1\x28\x98\x71\x83"

/* FRAME PARMATERS */
#define FRAME_PARM_RADIUS_UUID		"\xeb\xec\xff\x1d\xff\xfc\x41\x7a\xae\x05\x99\x2e\x1d\x69\x44\x34"
typedef struct	frame_otyp_parms_td
{
	double			radius;				/* FRAME RADIUS 	*/
	fz_objt_ptr	base_obj;				/* BASE OBJECT 		*/
}  frame_otyp_parms_td;

fzrt_error_td frame_otyp_get_callback_fset ( const fzpl_fset_def_ptr fset_def, fzpl_fset_td * const fset );

/*************************************************************************
						TOOL STUFF
**************************************************************************/
/* Frame Tool Plugin Identification */
/* UUID : {bd8428ab-9bfc-4209-95a8-8030b7561aa8} */
	
#define FRAME_TOOL_PLUGIN_ID			"\xbd\x84\x28\xab\x9b\xfc\x42\x09\x95\xa8\x80\x30\xb7\x56\x1a\xa8"
#define FRAME_TOOL_PLUGIN_VERSION		FZPL_VERS_MAKE(8,0,0,0)
#define FRAME_TOOL_PLUGIN_NAME			"Frame Tool Plugin"
#define FRAME_TOOL_PLUGIN_VENDOR		FORMZ_VENDOR
#define FRAME_TOOL_PLUGIN_ATTR_STR		"FFMT=OTYP;FVERS=1.0"
#define FRAME_TOOL_PLUGIN_URL			FORMZ_VENDOR_URL

/* Frame Tool Id */
/* UUID : {2a7287be-d8aa-492b-adaa-c3c7e88a035b} */
#define FRAME_TOOL_ID	"\x2a\x72\x87\xbe\xd8\xaa\x49\x2b\xad\xaa\xc3\xc7\xe8\x8a\x03\x5b"

/* Frame Tool Options Id */
/* UUID : {55f1cdbc-50be-4193-8040-bb1dc3e98ad8} */
#define FRAME_TOOL_OPTS_ID	"\x55\xf1\xcd\xbc\x50\xbe\x41\x93\x80\x40\xbb\x1d\xc3\xe9\x8a\xd8"

/* HOLDS THE TOOL OPTION PARAMETER VALUES */
extern frame_otyp_parms_td		*_frame_tool_opts;

fzrt_error_td frame_tool_get_callback_fset ( 
	const fzpl_fset_def_ptr fset_def, 
	fzpl_fset_td * const fset 
	);
fzrt_error_td frame_notf_get_callback_fset ( 
	const fzpl_fset_def_ptr fset_def, 
	fzpl_fset_td * const fset 
	);
fzrt_boolean frame_otyp_check_radius(
	fzrt_int					windex,
	fz_objt_ptr				base_obj,
	double					radius,
	double					*max_radius
	);

/*************************************************************************
						PLUGIN STUFF
**************************************************************************/
#define FRAME_STR_ID			1

enum
{
	FRAME_STR_OTYP_NAME = 1,
	FRAME_STR_TOOL_NAME,
	FRAME_STR_EDIT_TITLE,
	FRAME_STR_OPTS_TITLE,
	FRAME_STR_BASE_TYPE,
	FRAME_STR_RADIUS,
	FRAME_STR_RAY_RATIO,
	FRAME_STR_PRE_PICK_PROMPT,
	FRAME_STR_POST_PICK_PROMPT,
	FRAME_STR_UPDATE,
	FRAME_STR_OPTIONS,
	FRAME_STR_RADIUS_TOO_LARGE,
	FRAME_STR_EXEC_ERR,
	FRAME_STR_NVALID_PICK,
	FRAME_STR_DESC,
	FRAME_STR_PICK,
	FRAME_STR_CLICK,
	FRAME_STR_MAX
};

typedef struct
{
	const fzpl_fset_glue_fset *fsf;

	/* application provided function sets to hold on to */
	
	fz_math_fset			math_funcs;
	fz_model_fset			model_funcs;
	fz_type_fset			type_funcs;
	fz_fuim_fset			fuim_funcs;
	fz_iost_fset			iost_funcs;
	fz_objt_attr_fset		attr_funcs;
	fz_syst_fset			syst_funcs;

	fz_fzrt_base_fset		fzrt_base_funcs;
	fz_fzrt_mem_fset		fzrt_mem_funcs;
	fz_fzrt_file_fset		fzrt_file_funcs;
	fz_fzrt_graf_fset		fzrt_graf_funcs;
	fz_fzrt_ui_fset			fzrt_ui_funcs;

	fzrt_unsigned_int			frame_otyp_plugin_runtime_id;
	fzrt_unsigned_int			frame_tool_plugin_runtime_id;
	fzrt_fzr_ref_td			fz_rsrc_ref_func;
	fzrt_floc_ptr			floc;
		
}  frame_plugin_stuff;

extern frame_plugin_stuff		plugin_stuff;

#endif /* _FRAME_H */
