/////////////////////////////////////////////////////////////
// CINEMA 4D SDK                                           //
/////////////////////////////////////////////////////////////
// (c) MAXON Computer GmbH, all rights reserved            //
/////////////////////////////////////////////////////////////

#ifndef __C4D_OPERATORPLUGIN_H
#define __C4D_OPERATORPLUGIN_H

////////////////////////////////

#include "ge_math.h"
#include "c4d_operatordata.h"
#include "c4d_nodeplugin.h"

////////////////////////////////

struct OPERATORPLUGIN : public NODEPLUGIN
{
	VLONG					op_group;
	VLONG					op_class;
	VLONG					op_owner;

	Bool			(*iCreateOperator			)(GvOperatorData *this_ptr,GvNode *bn);
	const String	(*GetDetailedText			)(GvOperatorData *this_ptr,GvNode *bn);
	const String	(*GetText					)(GvOperatorData *this_ptr,GvNode *bn);
	const String	(*GetTitle					)(GvOperatorData *this_ptr,GvNode *bn);
	BaseBitmap*		(*GetPortIcon				)(GvOperatorData *this_ptr,GvNode *bn, LONG id, GvLayoutType layout_type);
	void			(*GetBodySize				)(GvOperatorData *this_ptr,GvNode *bn, LONG *width, LONG *height);
	const Vector	(*GetBodyColor				)(GvOperatorData *this_ptr,GvNode *bn);
	void			(*EditorDraw				)(GvOperatorData *this_ptr,GvNode *bn, GvNodeGUI* gui, GeUserArea *da, LONG x1, LONG y1, LONG x2, LONG y2);
	void			(*iGetPortList				)(GvOperatorData *this_ptr,GvNode *bn, GvPortIO port, GvPortList &portlist);
	Bool			(*iGetPortDescription		)(GvOperatorData *this_ptr,GvNode *bn, GvPortIO port, LONG id, GvPortDescription *pd);
	Bool			(*GetOperatorDescription	)(GvOperatorData *this_ptr,GvNode *bn, GvOperatorDescription *od);
	Bool			(*QueryCalculation			)(GvOperatorData *this_ptr,GvNode *bn, GvQuery *query);
	Bool			(*InitCalculation			)(GvOperatorData *this_ptr,GvNode *bn, GvCalc *calc, GvRun *run);
	void			(*FreeCalculation			)(GvOperatorData *this_ptr,GvNode *bn, GvCalc *calc);
	Bool			(*Calculate					)(GvOperatorData *this_ptr,GvNode *bn, GvPort *port, GvRun *run, GvCalc *calc);
	Bool			(*AddToCalculationTable		)(GvOperatorData *this_ptr,GvNode *bn, GvRun *run); 
	Bool			(*SetRecalculate			)(GvOperatorData *this_ptr,GvNode *bn, GvPort *port, GvRun *run, Bool force_set);
	Bool			(*SetData					)(GvOperatorData *this_ptr,GvNode *bn, GvDataType type, void *data, GvOpSetDataMode mode);
	Bool			(*IsSetDataAllowed			)(GvOperatorData *this_ptr,GvNode *bn, GvDataType type, void *data, GvOpSetDataMode mode);
	LONG			(*FillPortMenu				)(GvOperatorData *this_ptr,GvNode *bn, BaseContainer &menu, LONG port_id, LONG first_menu_id);
	Bool			(*PortMenuCommand			)(GvOperatorData *this_ptr,GvNode *bn, LONG menu_id, LONG port_id, LONG mx, LONG my);
	LONG			(*FillOperatorMenu			)(GvOperatorData *this_ptr,GvNode *bn, BaseContainer &menu, LONG first_menu_id);
	Bool			(*OperatorMenuCommand		)(GvOperatorData *this_ptr,GvNode *bn, LONG menu_id, LONG mx, LONG my);
	LONG			(*FillPortsMenu				)(GvOperatorData *this_ptr,GvNode *bn, BaseContainer &names, BaseContainer &ids, GvValueID value_type, GvPortIO port, LONG first_menu_id);
	Bool			(*BodyMessage				)(GvOperatorData *this_ptr,GvNode *bn, GvNodeGUI *gui, LONG x, LONG y, LONG chn, LONG qua, const BaseContainer &msg);
	Bool			(*EditSettings				)(GvOperatorData *this_ptr,GvNode *bn, GvNodeGUI *gui);
	const String    (*GetErrorString			)(GvOperatorData *this_ptr,GvNode *bn, LONG error);
	Bool			(*SceneDraw					)(GvOperatorData *this_ptr,GvNode *bn, BaseDraw *bd, BaseDrawHelp *bh, BaseThread *bt, LONG flags, void *data, ULONG counter);
	LONG			(*GetMainID					)(GvOperatorData *this_ptr,GvNode *bn, GvPortIO io, const DescID &desc_id);
	const DescID	(*GetDescID					)(GvOperatorData *this_ptr,GvNode *bn, GvPortIO io, LONG main_id);
	Bool			(*CreatePortDescriptionCache)(GvOperatorData *this_ptr,GvNode *bn, Bool lock_only);
	void			(*FreePortDescriptionCache	)(GvOperatorData *this_ptr,GvNode *bn);

	void*	reserved[(64-32)*C4DPL_MEMBERMULTIPLIER-3];
};

////////////////////////////////

#endif //__C4D_OPERATORPLUGIN_H

////////////////////////////////