// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Editorviewsupport.pas' rev: 10.00

#ifndef EditorviewsupportHPP
#define EditorviewsupportHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Designintf.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Contnrs.hpp>	// Pascal unit
#include <Componentdesigner.hpp>	// Pascal unit
#include <Structureviewapi.hpp>	// Pascal unit
#include <Toolsapi.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Editorviewsupport
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TEditorViewStyles { evsRuntime, evsDesigntime };
#pragma option pop

typedef Set<TEditorViewStyles, evsRuntime, evsDesigntime>  TEditorViewStyle;

__interface ICustomEditorView;
typedef System::DelphiInterface<ICustomEditorView> _di_ICustomEditorView;
__interface  INTERFACE_UUID("{4FABB9DC-C1B4-40EE-A729-7BBE51701794}") ICustomEditorView  : public IInterface 
{
	
public:
	virtual TEditorViewStyle __fastcall GetStyle(void) = 0 ;
	virtual bool __fastcall GetCanCloneView(void) = 0 ;
	virtual AnsiString __fastcall GetCaption(void) = 0 ;
	virtual int __fastcall GetPriority(void) = 0 ;
	virtual AnsiString __fastcall GetViewIdentifier(void) = 0 ;
	virtual void __fastcall Display(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
	virtual bool __fastcall EditAction(const System::_di_IInterface AContext, Designintf::TEditAction Action, System::TObject* AViewObject) = 0 ;
	virtual Designintf::TEditState __fastcall GetEditState(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
	virtual bool __fastcall Handles(const System::_di_IInterface AContext) = 0 ;
	virtual void __fastcall Hide(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
	virtual void __fastcall ViewClosed(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
	__property bool CanCloneView = {read=GetCanCloneView};
	__property AnsiString Caption = {read=GetCaption};
	__property int Priority = {read=GetPriority};
	__property AnsiString ViewIdentifier = {read=GetViewIdentifier};
};

__interface ICustomEditorViewStructure;
typedef System::DelphiInterface<ICustomEditorViewStructure> _di_ICustomEditorViewStructure;
__interface  INTERFACE_UUID("{84A98CDB-31E0-446A-9CB6-D5CF05630EC8}") ICustomEditorViewStructure  : public IInterface 
{
	
public:
	virtual Structureviewapi::_di_IOTAStructureContext __fastcall GetStructureContext(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
	virtual WideString __fastcall GetStructureType(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
};

__interface IFileCustomEditorView;
typedef System::DelphiInterface<IFileCustomEditorView> _di_IFileCustomEditorView;
__interface  INTERFACE_UUID("{1C8C3831-0A95-458F-A259-3669209DE629}") IFileCustomEditorView  : public ICustomEditorView 
{
	
public:
	virtual AnsiString __fastcall GetViewFilename(const System::_di_IInterface AContext) = 0 ;
	virtual void __fastcall Load(const System::_di_IInterface AContext, bool Existing, const System::_di_IInterface ACreator = (void *)(0x0)) = 0 ;
	virtual void __fastcall Save(const System::_di_IInterface AContext) = 0 ;
	virtual void __fastcall LoadFromStream(const System::_di_IInterface AContext, const Componentdesigner::_di_IDatedStream AStream) = 0 ;
	virtual void __fastcall SaveToStream(const System::_di_IInterface AContext, /* out */ Componentdesigner::_di_IDatedStream &AFile) = 0 ;
};

__interface ICustomEditorFrameView;
typedef System::DelphiInterface<ICustomEditorFrameView> _di_ICustomEditorFrameView;
__interface  INTERFACE_UUID("{4A4E4F3D-14FC-46A9-BF1B-7497EA1EA71B}") ICustomEditorFrameView  : public ICustomEditorView 
{
	
public:
	virtual TMetaClass* __fastcall GetFrameClass(void) = 0 ;
	__property TMetaClass* FrameClass = {read=GetFrameClass};
};

__interface ICustomEditorEditView;
typedef System::DelphiInterface<ICustomEditorEditView> _di_ICustomEditorEditView;
__interface  INTERFACE_UUID("{5688862C-1AAF-4273-A027-0E8105050AB8}") ICustomEditorEditView  : public ICustomEditorView 
{
	
public:
	virtual System::TObject* __fastcall GetEditView(const System::_di_IInterface AContext, System::TObject* AViewObject) = 0 ;
	virtual bool __fastcall GetIsReadOnly(void) = 0 ;
	__property bool IsReadOnly = {read=GetIsReadOnly};
};

__interface IEditorViewRegisterNotification;
typedef System::DelphiInterface<IEditorViewRegisterNotification> _di_IEditorViewRegisterNotification;
__interface  INTERFACE_UUID("{B006DE47-7B88-4109-B05F-F4EE7B72172D}") IEditorViewRegisterNotification  : public IInterface 
{
	
public:
	virtual void __fastcall RegisterEditorView(TMetaClass* AFrame) = 0 ;
	virtual void __fastcall UnregisterEditorView(TMetaClass* AFrame) = 0 ;
};

class DELPHICLASS TCustomEditorViewInfo;
class PASCALIMPLEMENTATION TCustomEditorViewInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TMetaClass* FViewClass;
	_di_ICustomEditorView FCustomEditorView;
	int FGroup;
	bool __fastcall GetHasViewClass(void);
	TMetaClass* __fastcall GetViewClass(void);
	
public:
	__fastcall TCustomEditorViewInfo(TMetaClass* AViewClass, const _di_ICustomEditorView ACustomEditorView);
	__property _di_ICustomEditorView CustomEditorView = {read=FCustomEditorView};
	__property bool HasViewClass = {read=GetHasViewClass, nodefault};
	__property TMetaClass* ViewClass = {read=GetViewClass};
	__property int Group = {read=FGroup, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TCustomEditorViewInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TCustomEditorViewList;
class PASCALIMPLEMENTATION TCustomEditorViewList : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TMetaClass* operator[](int Index) { return ViewClasses[Index]; }
	
private:
	Contnrs::TObjectList* FList;
	_di_IFileCustomEditorView __fastcall GetFileCustomEditorView(int Index);
	
protected:
	TMetaClass* __fastcall GetViewClass(int Index);
	_di_ICustomEditorView __fastcall GetCustomEditorView(int Index);
	
public:
	__fastcall TCustomEditorViewList(void);
	__fastcall virtual ~TCustomEditorViewList(void);
	void __fastcall FreeEditorGroup(int AGroup);
	int __fastcall Count(void);
	void __fastcall Add(TMetaClass* AFrame)/* overload */;
	void __fastcall Remove(TMetaClass* AFrame)/* overload */;
	void * __fastcall Add(const _di_ICustomEditorView ACustomEditView)/* overload */;
	void __fastcall Remove(void * AView)/* overload */;
	__property TMetaClass* ViewClasses[int Index] = {read=GetViewClass/*, default*/};
	__property _di_ICustomEditorView CustomEditorViews[int Index] = {read=GetCustomEditorView};
	__property _di_IFileCustomEditorView FileEditorViews[int Index] = {read=GetFileCustomEditorView};
};


class DELPHICLASS ERequiredInterfaceError;
class PASCALIMPLEMENTATION ERequiredInterfaceError : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall ERequiredInterfaceError(const AnsiString Msg) : Sysutils::Exception(Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall ERequiredInterfaceError(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall ERequiredInterfaceError(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall ERequiredInterfaceError(int Ident, System::TVarRec const * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall ERequiredInterfaceError(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall ERequiredInterfaceError(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall ERequiredInterfaceError(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall ERequiredInterfaceError(System::PResStringRec ResStringRec, System::TVarRec const * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~ERequiredInterfaceError(void) { }
	#pragma option pop
	
};


class DELPHICLASS TCustomEditorView;
class PASCALIMPLEMENTATION TCustomEditorView : public System::TInterfacedObject 
{
	typedef System::TInterfacedObject inherited;
	
protected:
	TEditorViewStyle __fastcall GetStyle(void);
	bool __fastcall Handles(const System::_di_IInterface AContext);
	bool __fastcall GetCanCloneView(void);
	AnsiString __fastcall GetCaption();
	int __fastcall GetPriority(void);
	void __fastcall Display(const System::_di_IInterface AContext, System::TObject* AViewObject);
	Designintf::TEditState __fastcall GetEditState(const System::_di_IInterface AContext, System::TObject* AViewObject);
	bool __fastcall EditAction(const System::_di_IInterface AContext, Designintf::TEditAction Action, System::TObject* AViewObject);
	virtual void __fastcall Hide(const System::_di_IInterface AContext, System::TObject* AViewObject);
	virtual void __fastcall ViewClosed(const System::_di_IInterface AContext, System::TObject* AViewObject);
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TCustomEditorView(void) : System::TInterfacedObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TCustomEditorView(void) { }
	#pragma option pop
	
};


struct TEditorViewData
{
	
public:
	AnsiString ViewIdentifier;
	AnsiString DataFileName;
	Componentdesigner::_di_IDatedStream DataStream;
} ;

typedef DynamicArray<TEditorViewData >  TEditorViewDataArray;

typedef void __fastcall (*TCustomEditorViewNotify)(const _di_ICustomEditorView ACustomEditorView);

//-- var, const, procedure ---------------------------------------------------
static const int HighestViewPriority = -2147483648;
static const short HighViewPriority = -255;
static const Shortint NormalViewPriority = 0x0;
static const Byte LowViewPriority = 0xff;
static const int LowestViewPriority = 2147483647;
extern PACKAGE TCustomEditorViewNotify RegisterCustomEditorViewProc;
extern PACKAGE TCustomEditorViewNotify UnregisterCustomEditorViewProc;
extern PACKAGE void * __fastcall RegisterEditorView(const _di_ICustomEditorView ACustomEditorView);
extern PACKAGE void __fastcall UnregisterEditorView(void * AView);
extern PACKAGE TCustomEditorViewList* __fastcall RegisteredEditorViews(void);
extern PACKAGE bool __fastcall ContextToRootComponent(const System::_di_IInterface AContext, /* out */ Classes::TComponent* &ARootComponent);
extern PACKAGE bool __fastcall ContextToDesigner(const System::_di_IInterface AContext, /* out */ Designintf::_di_IDesigner &ADesigner);
extern PACKAGE bool __fastcall ContextToFormEditor(const System::_di_IInterface AContext, /* out */ Toolsapi::_di_IOTAFormEditor &AFormEditor);
extern PACKAGE bool __fastcall ContextToFilename(const System::_di_IInterface AContext, /* out */ AnsiString &AFilename);
extern PACKAGE bool __fastcall ContextToModule(const System::_di_IInterface AContext, /* out */ Toolsapi::_di_IOTAModule &AModule);
extern PACKAGE bool __fastcall ContextResurrect(const System::_di_IInterface AContext);

}	/* namespace Editorviewsupport */
using namespace Editorviewsupport;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Editorviewsupport
