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

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

#ifndef CodetemplateapiHPP
#define CodetemplateapiHPP

#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 <Sysutils.hpp>	// Pascal unit
#include <Toolsapi.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit

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

namespace Codetemplateapi
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TOTATemplateInvokeKind { ikNone, ikManual, ikAuto };
#pragma option pop

#pragma option push -b-
enum TOTATemplateKind { skNone, skMethodBody, skMethodDecl, skMemberDecl, skDecl, skTypeDecl, skComment, skStringLiteral, skPage, skFile, skAny };
#pragma option pop

#pragma option push -b-
enum TOTATemplateTypes { stRefactoring, stSurroundsWith, stExpansion };
#pragma option pop

typedef Set<TOTATemplateTypes, stRefactoring, stExpansion>  TOTATemplateType;

#pragma option push -b-
enum TOTATemplateScriptExecutions { sseOnValidate, sseOnEnter, sseOnLeave, sseOnExit };
#pragma option pop

typedef Set<TOTATemplateScriptExecutions, sseOnValidate, sseOnExit>  TOTATemplateScriptExecution;

__interface IOTACodeTemplateScript;
typedef System::DelphiInterface<IOTACodeTemplateScript> _di_IOTACodeTemplateScript;
__interface  INTERFACE_UUID("{A9385BEA-6CE9-457D-B36E-5914E34E918F}") IOTACodeTemplateScript  : public IInterface 
{
	
public:
	virtual void __fastcall SetScriptLanguage(const WideString Value) = 0 ;
	virtual WideString __fastcall GetScriptLanguage(void) = 0 ;
	virtual TOTATemplateScriptExecution __fastcall GetExecution(void) = 0 ;
	virtual void __fastcall SetExecution(TOTATemplateScriptExecution Value) = 0 ;
	virtual WideString __fastcall GetScript(void) = 0 ;
	virtual void __fastcall SetScript(const WideString Value) = 0 ;
	__property TOTATemplateScriptExecution Execution = {read=GetExecution, write=SetExecution};
	__property WideString Script = {read=GetScript, write=SetScript};
	__property WideString ScriptLanguage = {read=GetScriptLanguage, write=SetScriptLanguage};
};

__interface IOTACodeTemplatePoint;
typedef System::DelphiInterface<IOTACodeTemplatePoint> _di_IOTACodeTemplatePoint;
__interface  INTERFACE_UUID("{F94D1BBD-7ABD-4EA5-8B4C-EB302B594D98}") IOTACodeTemplatePoint  : public IInterface 
{
	
public:
	virtual bool __fastcall GetEditable(void) = 0 ;
	virtual void __fastcall SetEditable(bool Value) = 0 ;
	virtual WideString __fastcall GetValue(void) = 0 ;
	virtual void __fastcall SetValue(const WideString Value) = 0 ;
	virtual WideString __fastcall GetID(void) = 0 ;
	virtual void __fastcall SetID(const WideString Value) = 0 ;
	virtual WideString __fastcall GetToolTip(void) = 0 ;
	virtual void __fastcall SetToolTip(const WideString Value) = 0 ;
	virtual void __fastcall SetIsDefault(bool Value) = 0 ;
	virtual bool __fastcall GetIsDefault(void) = 0 ;
	virtual _di_IOTACodeTemplateScript __fastcall GetScripts(int Index) = 0 ;
	virtual void __fastcall AddScript(const _di_IOTACodeTemplateScript Script) = 0 ;
	virtual int __fastcall GetScriptCount(void) = 0 ;
	__property int ScriptCount = {read=GetScriptCount};
	__property _di_IOTACodeTemplateScript Scripts[int Index] = {read=GetScripts};
	__property bool Editable = {read=GetEditable, write=SetEditable};
	__property WideString Value = {read=GetValue, write=SetValue};
	__property bool IsDefault = {read=GetIsDefault, write=SetIsDefault};
	__property WideString ID = {read=GetID, write=SetID};
	__property WideString ToolTip = {read=GetToolTip, write=SetToolTip};
};

__interface IOTATemplateCodeReference;
typedef System::DelphiInterface<IOTATemplateCodeReference> _di_IOTATemplateCodeReference;
__interface  INTERFACE_UUID("{4949AB6F-2659-44A4-89D7-6692069E2FC2}") IOTATemplateCodeReference  : public IInterface 
{
	
public:
	virtual WideString __fastcall GetReference(void) = 0 ;
	virtual void __fastcall SetReference(const WideString Value) = 0 ;
	virtual WideString __fastcall GetUrl(void) = 0 ;
	virtual void __fastcall SetUrl(const WideString Value) = 0 ;
	__property WideString Reference = {read=GetReference, write=SetReference};
	__property WideString Url = {read=GetUrl, write=SetUrl};
};

__interface IOTACodeTemplateObject;
typedef System::DelphiInterface<IOTACodeTemplateObject> _di_IOTACodeTemplateObject;
__interface  INTERFACE_UUID("{FB3B4C8C-5757-4E5A-9091-54FF986D6D8D}") IOTACodeTemplateObject  : public IOTACodeTemplatePoint 
{
	
public:
	virtual WideString __fastcall GetType(void) = 0 ;
	virtual void __fastcall SetType(const WideString Value) = 0 ;
	__property WideString _Type = {read=GetType, write=SetType};
};

__interface IOTACodeTemplate;
typedef System::DelphiInterface<IOTACodeTemplate> _di_IOTACodeTemplate;
__interface  INTERFACE_UUID("{ED1EBB0B-DDD8-4157-BBFE-DDAC107BD619}") IOTACodeTemplate  : public IInterface 
{
	
public:
	virtual void __fastcall Clear(void) = 0 ;
	virtual WideString __fastcall GetDelimiter(void) = 0 ;
	virtual void __fastcall SetDelimiter(const WideString Value) = 0 ;
	virtual TOTATemplateKind __fastcall GetKind(void) = 0 ;
	virtual void __fastcall SetKind(TOTATemplateKind Value) = 0 ;
	virtual WideString __fastcall GetLanguage(void) = 0 ;
	virtual void __fastcall SetLanguage(const WideString Value) = 0 ;
	virtual WideString __fastcall GetEditorOpts(void) = 0 ;
	virtual void __fastcall SetEditorOpts(const WideString Value) = 0 ;
	virtual WideString __fastcall GetCode(void) = 0 ;
	virtual void __fastcall SetCode(const WideString Value) = 0 ;
	virtual WideString __fastcall GetDescription(void) = 0 ;
	virtual void __fastcall SetDescription(const WideString Value) = 0 ;
	virtual int __fastcall GetReferencesCount(void) = 0 ;
	virtual WideString __fastcall GetImportedNamespaces(int I) = 0 ;
	virtual void __fastcall SetImportedNamespaces(int I, const WideString Value) = 0 ;
	virtual _di_IOTATemplateCodeReference __fastcall GetReferences(int I) = 0 ;
	virtual void __fastcall SetReferences(int I, const _di_IOTATemplateCodeReference Value) = 0 ;
	virtual WideString __fastcall GetAuthor(void) = 0 ;
	virtual void __fastcall SetAuthor(const WideString Value) = 0 ;
	virtual _di_IOTACodeTemplatePoint __fastcall FindPoint(const WideString AName) = 0 ;
	virtual _di_IOTACodeTemplatePoint __fastcall GetPoints(int I) = 0 ;
	virtual WideString __fastcall GetKeywords(int I) = 0 ;
	virtual void __fastcall SetKeywords(int I, const WideString Value) = 0 ;
	virtual WideString __fastcall GetShortcut(void) = 0 ;
	virtual void __fastcall SetShortcut(const WideString Value) = 0 ;
	virtual TOTATemplateType __fastcall GetTemplateType(void) = 0 ;
	virtual void __fastcall SetTemplateType(TOTATemplateType Value) = 0 ;
	virtual bool __fastcall GetIsDirty(void) = 0 ;
	virtual void __fastcall SetIsDirty(bool Value) = 0 ;
	virtual void __fastcall SetFileName(const WideString Value) = 0 ;
	virtual WideString __fastcall GetFileName(void) = 0 ;
	virtual WideString __fastcall GetHelpUrl(void) = 0 ;
	virtual WideString __fastcall GetTitle(void) = 0 ;
	virtual int __fastcall GetNamespaceCount(void) = 0 ;
	virtual int __fastcall GetPointsCount(void) = 0 ;
	virtual int __fastcall GetKeywordsCount(void) = 0 ;
	virtual WideString __fastcall GetTemplateFormat(void) = 0 ;
	virtual void __fastcall SetTemplateFormat(const WideString Value) = 0 ;
	virtual void __fastcall SetTitle(const WideString Value) = 0 ;
	virtual void __fastcall SetUrl(const WideString Value) = 0 ;
	virtual void __fastcall AddNamespace(const WideString Value) = 0 ;
	virtual void __fastcall AddReference(const _di_IOTATemplateCodeReference Value) = 0 ;
	virtual void __fastcall AddPoint(const _di_IOTACodeTemplatePoint Value) = 0 ;
	virtual void __fastcall AddKeyword(const WideString Value) = 0 ;
	virtual void __fastcall AddScript(const _di_IOTACodeTemplateScript Value) = 0 ;
	virtual int __fastcall GetScriptCount(void) = 0 ;
	virtual _di_IOTACodeTemplateScript __fastcall GetScript(int I) = 0 ;
	virtual void __fastcall SetInvokeKind(TOTATemplateInvokeKind Value) = 0 ;
	virtual TOTATemplateInvokeKind __fastcall GetInvokeKind(void) = 0 ;
	__property int ScriptCount = {read=GetScriptCount};
	__property _di_IOTACodeTemplateScript Script[int I] = {read=GetScript};
	__property WideString Format = {read=GetTemplateFormat, write=SetTemplateFormat};
	__property WideString Title = {read=GetTitle, write=SetTitle};
	__property WideString HelpUrl = {read=GetHelpUrl, write=SetUrl};
	__property WideString Delimiter = {read=GetDelimiter, write=SetDelimiter};
	__property TOTATemplateKind Kind = {read=GetKind, write=SetKind};
	__property WideString Language = {read=GetLanguage, write=SetLanguage};
	__property WideString EditorOpts = {read=GetEditorOpts, write=SetEditorOpts};
	__property WideString Code = {read=GetCode, write=SetCode};
	__property WideString Description = {read=GetDescription, write=SetDescription};
	__property int ReferencesCount = {read=GetReferencesCount};
	__property int NamespaceCount = {read=GetNamespaceCount};
	__property WideString ImportedNamespaces[int I] = {read=GetImportedNamespaces, write=SetImportedNamespaces};
	__property _di_IOTATemplateCodeReference References[int I] = {read=GetReferences, write=SetReferences};
	__property WideString Author = {read=GetAuthor, write=SetAuthor};
	__property int PointsCount = {read=GetPointsCount};
	__property _di_IOTACodeTemplatePoint Points[int I] = {read=GetPoints};
	__property int KeywordsCount = {read=GetKeywordsCount};
	__property WideString Keywords[int I] = {read=GetKeywords, write=SetKeywords};
	__property WideString Shortcut = {read=GetShortcut, write=SetShortcut};
	__property TOTATemplateType TemplateType = {read=GetTemplateType, write=SetTemplateType};
	__property bool IsDirty = {read=GetIsDirty, write=SetIsDirty};
	__property TOTATemplateInvokeKind InvokeKind = {read=GetInvokeKind, write=SetInvokeKind};
	__property WideString FileName = {read=GetFileName, write=SetFileName};
};

__interface IOTATemplateReader;
typedef System::DelphiInterface<IOTATemplateReader> _di_IOTATemplateReader;
__interface  INTERFACE_UUID("{31F52EEB-290E-46D5-9496-49F216380BB0}") IOTATemplateReader  : public IInterface 
{
	
public:
	virtual _di_IOTACodeTemplate __fastcall GetTemplate(void) = 0 ;
	virtual void __fastcall SetTemplate(const _di_IOTACodeTemplate Value) = 0 ;
	virtual void __fastcall Load(const WideString AFileName, const _di_IOTACodeTemplate ATemplate) = 0 ;
	__property _di_IOTACodeTemplate Template = {read=GetTemplate, write=SetTemplate};
};

__interface IOTATemplateWriter;
typedef System::DelphiInterface<IOTATemplateWriter> _di_IOTATemplateWriter;
__interface  INTERFACE_UUID("{3EBA335E-61AB-4A75-BF60-B8FE552BD4EB}") IOTATemplateWriter  : public IInterface 
{
	
public:
	virtual _di_IOTACodeTemplate __fastcall GetTemplate(void) = 0 ;
	virtual void __fastcall SetTemplate(const _di_IOTACodeTemplate Value) = 0 ;
	virtual void __fastcall Save(const _di_IOTACodeTemplate ATemplate) = 0 ;
	__property _di_IOTACodeTemplate Template = {read=GetTemplate, write=SetTemplate};
};

__interface IOTATemplateFactory;
typedef System::DelphiInterface<IOTATemplateFactory> _di_IOTATemplateFactory;
__interface  INTERFACE_UUID("{A1F52E3E-FD9F-4BC4-BE80-284889F94275}") IOTATemplateFactory  : public IInterface 
{
	
};

__interface IOTATemplateReaderFactory;
typedef System::DelphiInterface<IOTATemplateReaderFactory> _di_IOTATemplateReaderFactory;
__interface  INTERFACE_UUID("{6EF4BEBB-32DB-4074-9BA9-050E4CA0939A}") IOTATemplateReaderFactory  : public IOTATemplateFactory 
{
	
public:
	virtual _di_IOTATemplateReader __fastcall CreateReader(void) = 0 ;
	virtual bool __fastcall HandlesFile(const WideString AFileName) = 0 ;
};

__interface IOTATemplateWriterFactory;
typedef System::DelphiInterface<IOTATemplateWriterFactory> _di_IOTATemplateWriterFactory;
__interface  INTERFACE_UUID("{6EF4BEBB-32DB-4074-9BA9-050E4CA0939A}") IOTATemplateWriterFactory  : public IOTATemplateFactory 
{
	
public:
	virtual _di_IOTATemplateWriter __fastcall CreateWriter(void) = 0 ;
};

__interface IOTACodeTemplateScriptEngine;
typedef System::DelphiInterface<IOTACodeTemplateScriptEngine> _di_IOTACodeTemplateScriptEngine;
__interface  INTERFACE_UUID("{49A9DED0-9B1B-425B-9752-06E85ED9AE78}") IOTACodeTemplateScriptEngine  : public IInterface 
{
	
public:
	virtual WideString __fastcall GetIDString(void) = 0 ;
	virtual WideString __fastcall GetLanguage(void) = 0 ;
	virtual void __fastcall Execute(const _di_IOTACodeTemplate ATemplate, const _di_IOTACodeTemplatePoint APoint, const Toolsapi::_di_IOTASyncEditPoints ASyncPoints, const _di_IOTACodeTemplateScript AScript, bool &Cancel) = 0 ;
	__property WideString Language = {read=GetLanguage};
};

__interface IOTATemplateArgs;
typedef System::DelphiInterface<IOTATemplateArgs> _di_IOTATemplateArgs;
__interface  INTERFACE_UUID("{94A1859F-79E7-4FBF-A286-1315209F890C}") IOTATemplateArgs  : public IInterface 
{
	
public:
	WideString operator[](WideString Name) { return Value[Name]; }
	
public:
	virtual void __fastcall SetValue(WideString Name, WideString AValue) = 0 ;
	virtual WideString __fastcall GetValue(WideString Name) = 0 ;
	__property WideString Value[WideString Name] = {read=GetValue, write=SetValue/*, default*/};
};

typedef DynamicArray<int >  TTemplateIndexArray;

#pragma option push -b-
enum TOTATemplateNotificationType { ntAdded, ntRemoved, ntModified };
#pragma option pop

__interface IOTATemplateChangeNotifier;
typedef System::DelphiInterface<IOTATemplateChangeNotifier> _di_IOTATemplateChangeNotifier;
__interface  INTERFACE_UUID("{7F316770-186E-41E5-9C91-87D7801B2D40}") IOTATemplateChangeNotifier  : public IInterface 
{
	
public:
	virtual void __fastcall ChangeNotification(TOTATemplateNotificationType AType, const _di_IOTACodeTemplate ATemplate) = 0 ;
};

__interface IOTACodeTemplateServices;
typedef System::DelphiInterface<IOTACodeTemplateServices> _di_IOTACodeTemplateServices;
__interface  INTERFACE_UUID("{AF5A5EDA-DF66-4E07-8CAF-19BBDCF92D82}") IOTACodeTemplateServices  : public IInterface 
{
	
public:
	_di_IOTACodeTemplate operator[](int I) { return CodeObjects[I]; }
	
public:
	virtual int __fastcall GetCodeObjectCount(void) = 0 ;
	virtual _di_IOTACodeTemplate __fastcall GetCodeObjects(int I) = 0 ;
	virtual Sysutils::TSysCharSet __fastcall GetTemplateCharSet(AnsiString EdOpts) = 0 ;
	virtual void __fastcall RegisterExtension(WideString AExt, WideString AFormat) = 0 ;
	virtual void __fastcall RegisterReader(_di_IOTATemplateReaderFactory AReader, WideString AFormat) = 0 ;
	virtual void __fastcall RegisterWriter(_di_IOTATemplateWriterFactory AWriter, WideString AFormat) = 0 ;
	virtual int __fastcall AddNotifier(const _di_IOTATemplateChangeNotifier ANotifier) = 0 ;
	virtual void __fastcall RemoveNotifier(int AIndex) = 0 ;
	virtual void __fastcall RegisterScriptEngine(const _di_IOTACodeTemplateScriptEngine AEngine) = 0 ;
	virtual _di_IOTACodeTemplateScriptEngine __fastcall FindEngine(const WideString ALanguage) = 0 ;
	virtual bool __fastcall ValidTemplates(AnsiString EdOpts) = 0 ;
	virtual void __fastcall ValidateTemplates(void) = 0 ;
	virtual bool __fastcall InsertCodeByShortcut(const WideString AShortcut, const WideString AEditorOpts, const Toolsapi::_di_IOTAEditView AEditor, bool Remove, const _di_IOTATemplateArgs Args = (void *)(0x0)) = 0 ;
	virtual bool __fastcall InsertCode(int Index, const Toolsapi::_di_IOTAEditView AEditor, bool Remove, _di_IOTATemplateArgs Args = (void *)(0x0)) = 0 ;
	virtual bool __fastcall AutoComplete(const Toolsapi::_di_IOTAEditView View, WideChar Key) = 0 ;
	virtual void __fastcall LoadTemplates(const WideString Dir) = 0 ;
	virtual void __fastcall RemoveTemplate(const _di_IOTACodeTemplate Template) = 0 ;
	virtual int __fastcall FindByID(const WideString AShortcut, const WideString AEditorOpts) = 0 ;
	virtual void __fastcall ReloadTemplate(const _di_IOTACodeTemplate Template) = 0 ;
	virtual void __fastcall SaveTemplate(const _di_IOTACodeTemplate Template) = 0 ;
	virtual void __fastcall MatchTemplates(const WideString Token, AnsiString EdOpts, /* out */ TTemplateIndexArray &Indecies) = 0 ;
	virtual void __fastcall ReloadTemplates(void) = 0 ;
	virtual void __fastcall SaveTemplates(void) = 0 ;
	virtual void __fastcall RegisterLanguage(const WideString ALang, WideString AOptionID) = 0 ;
	virtual void __fastcall UnregisterLanguage(const WideString ALang) = 0 ;
	virtual WideString __fastcall LanguageToOptionID(const WideString ALang) = 0 ;
	virtual WideChar __fastcall GetAutoCompleteKey(void) = 0 ;
	virtual void __fastcall SetAutoCompleteKey(WideChar Value) = 0 ;
	virtual WideChar __fastcall GetManualCompleteKey(void) = 0 ;
	virtual void __fastcall SetManualCompleteKey(WideChar Value) = 0 ;
	__property WideChar AutoCompleteKey = {read=GetAutoCompleteKey, write=SetAutoCompleteKey};
	__property WideChar ManualCompleteKey = {read=GetManualCompleteKey, write=SetManualCompleteKey};
	__property int CodeObjectCount = {read=GetCodeObjectCount};
	__property _di_IOTACodeTemplate CodeObjects[int I] = {read=GetCodeObjects/*, default*/};
};

//-- var, const, procedure ---------------------------------------------------
static const char sDefaultDelimiter = '\x24';
#define sTemplateLanguageCSharp "CSharp"
#define sTemplateLanguageVB "VB"
#define sTemplateLanguageJsharp "Jsharp"
#define sTemplateLanguageHTML "HTML"
#define sTemplateLanguageXML "XML"
#define sTemplateLanguageDelphi "Delphi"
static const char sTemplateLanguageC = '\x43';
#define sTemplateLanguageIDE "IDE"
#define sTemplateLanguageSQL "SQL"
#define sTemplateLanguageIDL "IDL"
#define sTemplateLanguageJavaScript "JavaScript"
#define sTemplateLanguageCSS "CSS"
#define sTemplateLanguageINI "INI"
#define sTemplateLanguagePHP "PHP"

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

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