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

#ifndef __C4D_COMMANDDATA_H
#define __C4D_COMMANDDATA_H

#include "c4d_basedata.h"

class String;
class BaseContainer;
class BaseDocument;
class BaseBitmap;

struct RestoreLayoutSecret
{
	LONG subid;	
};

#define PLUGINFLAG_COMMAND_HOTKEY						(1<<27)
#define PLUGINFLAG_COMMAND_OPTION_DIALOG		(1<<26)
#define PLUGINFLAG_COMMAND_STICKY						(1<<25)
#define PLUGINFLAG_COMMAND_ICONGADGET				(1<<24)

#define MSG_COMMANDINFORMATION	300001001	
	#define TOOLHOTKEY_RECEIVER			200000290		// special tool overwrite for plugins
#define MSG_BODYPAINTEXCHANGE		300001002

struct CommandInformationData
{
	LONG command_id;	// read

	LONG managergroup; // write
	LONG parentid;
};

class CommandData : public BaseData
{
	public:
		virtual Bool Execute(BaseDocument *doc);
		virtual Bool ExecuteSubID(BaseDocument *doc, LONG subid);
		virtual Bool ExecuteOptionID(BaseDocument *doc, LONG plugid, LONG subid);

		virtual LONG GetState(BaseDocument *doc);
		virtual Bool GetSubContainer(BaseDocument *doc, BaseContainer &submenu);

		virtual Bool RestoreLayout(void *secret);
		virtual String GetScriptName(void); 

		virtual Bool Message(LONG type, void *data);
};

#ifndef _API_INTERN
	Bool RegisterCommandPlugin(LONG id, const String &str, LONG info, BaseBitmap *icon, const String &help, CommandData *dat);
#endif

Bool RegisterManagerInformation(LONG id, const String &str, LONG info);

#endif
