/*------------------------------------------------------------------------*
  Filename....: random_trans.h


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

#ifndef _RANDOM_TRANS_H
#define _RANDOM_TRANS_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"



#define RANDOM_TRANS_STRINGS		11

#define	RANDOM_TRANS_OTYP_PLUGIN_NAME_STR	1
#define RANDOM_TRANS_TOOL_PLUGIN_NAME_STR	2

/*************************************************************************
						TOOL STUFF
**************************************************************************/
/* Frame Tool Plugin Identification */
/* UUID : {16497ae6-c653-48bb-b2a3-ea9d91275386} */

#define RANDOM_TRANS_TOOL_PLUGIN_ID				"\x16\x49\x7a\xe6\xc6\x53\x48\xbb\xb2\xa3\xea\x9d\x91\x27\x53\x86"
#define RANDOM_TRANS_TOOL_PLUGIN_VERSION		FZPL_VERS_MAKE(8,0,0,0)
#define RANDOM_TRANS_TOOL_PLUGIN_NAME			"Random Transformation Tool Plugin"
#define RANDOM_TRANS_TOOL_PLUGIN_VENDOR			FORMZ_VENDOR
#define RANDOM_TRANS_TOOL_PLUGIN_ATTR_STR		"FFMT=OTYP;FVERS=1.0"
#define RANDOM_TRANS_TOOL_PLUGIN_URL			FORMZ_VENDOR_URL

/* Frame Tool Id */
/* UUID : {2a7287be-d8aa-492b-adaa-c3c7e88a035b} */
#define RANDOM_TRANS_TOOL_ID	"\xca\x8e\xe4\xfe\x84\x89\x11\xdb\x8d\x50\x00\x0d\x93\x33\x71\x2c"

/* Frame Tool Options Id */
/* UUID : {55f1cdbc-50be-4193-8040-bb1dc3e98ad8} */
#define RANDOM_TRANS_TOOL_OPTS_ID	"\xca\x8e\xe5\xa8\x84\x89\x11\xdb\x8d\x50\x00\x0d\x93\x33\x71\x2c"


fzrt_error_td random_trans_tool_get_callback_fset ( 
	const fzpl_fset_def_ptr fset_def, 
	fzpl_fset_td * const fset 
	);
fzrt_error_td random_trans_notf_get_callback_fset ( 
	const fzpl_fset_def_ptr fset_def, 
	fzpl_fset_td * const fset 
	);
fzrt_boolean random_trans_otyp_check_radius(
	fzrt_int					windex,
	fz_objt_ptr				base_obj,
	double					radius,
	double					*max_radius
	);

/*************************************************************************
						PLUGIN STUFF
**************************************************************************/
#define RANDOM_TRANS_STR_ID			1

enum
{
	RANDOM_TRANS_STR_OTYP_NAME = 1,
	RANDOM_TRANS_STR_TOOL_NAME,
	RANDOM_TRANS_STR_EDIT_TITLE,
	RANDOM_TRANS_STR_OPTS_TITLE,
	RANDOM_TRANS_STR_BASE_TYPE,
	RANDOM_TRANS_STR_RADIUS,
	RANDOM_TRANS_STR_RAY_RATIO,
	RANDOM_TRANS_STR_PRE_PICK_PROMPT,
	RANDOM_TRANS_STR_POST_PICK_PROMPT,
	RANDOM_TRANS_STR_UPDATE,
	RANDOM_TRANS_STR_OPTIONS,
	RANDOM_TRANS_STR_RADIUS_TOO_LARGE,
	RANDOM_TRANS_STR_EXEC_ERR,
	RANDOM_TRANS_STR_NVALID_PICK,
	RANDOM_TRANS_STR_DESC,
	RANDOM_TRANS_STR_PICK,
	RANDOM_TRANS_STR_CLICK,
	RANDOM_TRANS_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			random_trans_otyp_plugin_runtime_id;
	fzrt_unsigned_int			random_trans_tool_plugin_runtime_id;
	fzrt_fzr_ref_td			fz_rsrc_ref_func;
	fzrt_floc_ptr			floc;
		
}  random_trans_plugin_stuff;

extern random_trans_plugin_stuff		plugin_stuff;

#endif /* _RANDOM_TRANS_H */
