/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   Copyright 1989-2018 by AutoDesSys, Inc.                                                 *
 *                                                                                           *
 *   This software and its associated documentation contains proprietary,                    *
 *   confidential, and trade secret information of AutoDesSys Inc. and may not be            *
 *   disclosed, copied in any form, or used for any purpose except as specifically           *
 *   permitted in writing by AutoDesSys, Inc.                                                *
 *                                                                                           *
 *   AutoDesSys, Inc. grants permission to use the software to those who purchase            *
 *   a license.  Such a usage will be made according to the terms and conditions             *
 *   specified in the license agreement to which a licensee agrees before installing         *
 *   and commencing usage of the software.  The license agreement can be found               *
 *   on the envelop that contains the software CD.                                           *
 *                                                                                           *
 *   AutoDesSys, Inc. also grants permission to licensees to develop extensions to           *
 *   the software, which can be in the form of scripts or plugins.  The permission           *
 *   includes calling the API and call back functions provided by AutoDesSys, Inc.           *
 *   and accessing information relevant to these functions and the general workings          *
 *   of form.Z, but only up to the point to which AutoDesSys, Inc. has chosen to             *
 *   expose, through its form.Z SDK Manual.  All extensions developed by third               *
 *   parties will include a copy of this copyright note in an easily accessible place or     *
 *   a clear instruction to read this original note by AutoDesSys, Inc.                      *
 *                                                                                           *
 *   All the software distributed under a license, either for the purpose of using it or     *
 *   for the purpose of developing extensions, is distributed AS IS, WITHOUT                 *
 *   WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND                                    *
 *   AutoDesSys, Inc. HEREBY DISCLAIMS ALL SUCH WARRANTIES,                                  *
 *   INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF                                         *
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.                                    *
 *                                                                                           *
 *   formZ, RenderZone, and RadioZity are registered trademarks of AutoDesSys, Inc.          *
 *                                                                                           *
 *   form.Z SDK, Version 8.6.3, Dec 03, 2018                                                 *
 *                                                                                           *
 *                                                                                           *
 *********************************************************************************************/


#ifndef _FORMZ_MODEL_REFO_API_H
#define _FORMZ_MODEL_REFO_API_H

#ifdef __cplusplus
extern "C" {
#endif



/****************************************************************

	Reference Object


	Description
		formZ Model refo objects. This module contains functions to construct and edit 
		refo objects.
 ****************************************************************/

#include "fz_model_core_api.h"

/****************************************************************

	FZ_OBJT_TYPE_REFO


	Description
		Unique identifier for the refo object type.
 ****************************************************************/
#define FZ_OBJT_TYPE_REFO		"\xb8\x67\xa3\x0c\x9f\xee\x11\xda\x8e\x35\x00\x03\x93\x63\x5d\xbc"





/****************************************************************

	fz_objt_cnstr_refo



	Description
		Creates a reference object. The object will have no 
		data in it. Additional objects need to be added using 
		fz_objt_edit_refo_add_objt

	Parameters
		windex  [Input]
			project window index
		obj  [Result]
			new object

	Returns
		Error codes


	Availability	7.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_cnstr_refo.fsl

	See Also
		fz_objt_edit_refo_add_objt

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_refo_func) (
	fzrt_int 				windex,
	fz_objt_ptr			*obj
	);

/****************************************************************

	fz_objt_edit_refo_add_objt



	Description
		Appends one or more obejcts to an existing reference object. 
		The refo_obj must have previoulsy been created with fz_objt_cnstr_refo. 
		The objects to be appended as passed in an array of 
		objects pointers.

	Parameters
		windex  [Input]
			project window index
		refo_obj  [Input]
			the reference object
		objs  [Input]
			an array of object pointers. Each object will be appended to the reference object
		nobjs  [Input]
			The number of items in the objs array

	Returns
		Error codes


	Availability	7.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_cnstr_refo.fsl

	See Also
		fz_objt_cnstr_refo

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_refo_add_objt_func) (
	fzrt_int 				windex,
	fz_objt_ptr			refo_obj,
	fz_objt_ptr			*objs,
	fzrt_int				nobjs
	);


/****************************************************************

	fz_objt_edit_refo_set_file_info



	Description
		Sets the file info for a reference object. This contains the information 
		where the objects originally came from, such as a DWG drawing file or 
		another formZ file. It also indicates whether all entities in the 
		file were used or only entities from a given layer. 
		This information may be used in the future to reload the data 
		from the file, in case the file has changed.

	Parameters
		windex  [Input]
			project window index
		refo_obj  [Input]
			the reference object
		floc  [Input]
			the location of the file where the data originated from
		from_layer  [Input]
			TRUE, if only objects from a given layer in the file are used. FALSE otherwise
		layer_name  [Input]
			If from_layer is TRUE, this is the name of the layer in the file.

	Returns
		Error codes


	Availability	7.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_cnstr_refo.fsl
 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_refo_set_file_info_func) (
	fzrt_int 				windex,
	fz_objt_ptr			refo_obj,
	fzrt_floc_ptr		floc,
	fzrt_boolean		from_layer,
	fz_string_td		layer_name
	);

#ifdef __cplusplus
}
#endif

#endif
