//----------------------------------------------------------------------------
// RVOfficeCnv.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: RVOfficeCnv.pas
//----------------------------------------------------------------------------
#ifndef RVOfficeCnvHPP
#define RVOfficeCnvHPP
//----------------------------------------------------------------------------
#include <RichView.hpp>
#include <Forms.hpp>
#include <RVClasses.hpp>
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <System.hpp>
namespace Rvofficecnv
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) TRVOfficeConverterInfo;
class __declspec(pascalimplementation) TRVOfficeConverterInfo : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	System::AnsiString Name;
	System::AnsiString Path;
	System::AnsiString Filter;
public:
	/* TObject.Create */ __fastcall TRVOfficeConverterInfo(void) : System::TObject() { }
	/* TObject.Destroy */ __fastcall virtual ~TRVOfficeConverterInfo(void) { }
	
};

typedef int __stdcall (*TInitConverter32)(HWND hwndWord, char * szModule);

typedef void __stdcall (*TUninitConverter)(void);

typedef int __stdcall (*TForeignToRtf32Callback)(int cchBuff, int nPercent);

typedef int __stdcall (*TRtfToForeign32Callback)(int rgfOptions, int nReserved);

typedef short __stdcall (*TForeignToRtf32)(int ghszFile, void * pstgForeign, int ghBuff, int ghszClass
	, int ghszSubset, TForeignToRtf32Callback lpfnOut);

typedef short __stdcall (*TRtfToForeign32)(int ghszFile, void * pstgForeign, int ghBuff, int ghszClass
	, TRtfToForeign32Callback lpfnIn);

typedef int __stdcall (*TRegisterApp)(int lFlags, void * lpRegApp);

typedef void __fastcall (__closure *TConvertingEvent)(System::TObject* Sender, int Percent);

class __declspec(delphiclass) TRVOfficeCnvList;
class __declspec(pascalimplementation) TRVOfficeCnvList : public Rvclasses::TRVList
{
	typedef Rvclasses::TRVList inherited;
	
private:
	Classes::TComponent* FOwner;
	int hBuffer;
	TConvertingEvent FOnConverting;
	Classes::TMemoryStream* FStream;
	int FStep;
	int FStart;
	int FSize;
	HIDESBASE void __fastcall Put(int Index, TRVOfficeConverterInfo* Value);
	HIDESBASE TRVOfficeConverterInfo* __fastcall Get(int Index);
	void __fastcall LoadList(const System::AnsiString RegPath);
	
public:
	__fastcall TRVOfficeCnvList(const System::AnsiString RegPath, Classes::TComponent* Owner);
	System::AnsiString __fastcall GetFilter(void);
	void __fastcall ImportRTF(const System::AnsiString FileName, int Index);
	void __fastcall ExportRTF(const System::AnsiString FileName, int Index);
	__property TRVOfficeConverterInfo* Items[int Index] = {read=Get, write=Put/*, default*/};
public:
	/* TRVList.Destroy */ __fastcall virtual ~TRVOfficeCnvList(void) { }
	
};

class __declspec(delphiclass) TRVOfficeConverter;
class __declspec(pascalimplementation) TRVOfficeConverter : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	TRVOfficeCnvList* FImportConverters;
	TRVOfficeCnvList* FExportConverters;
	TConvertingEvent FOnConverting;
	Classes::TMemoryStream* FStream;
	TRVOfficeCnvList* __fastcall GetExportConverters(void);
	TRVOfficeCnvList* __fastcall GetImportConverters(void);
	
public:
	__fastcall virtual TRVOfficeConverter(Classes::TComponent* AOwner);
	__fastcall virtual ~TRVOfficeConverter(void);
	bool __fastcall ImportRTF(const System::AnsiString FileName, int ConverterIndex);
	bool __fastcall ExportRTF(const System::AnsiString FileName, int ConverterIndex);
	bool __fastcall ImportRV(const System::AnsiString FileName, Richview::TCustomRichView* rv, int ConverterIndex
		);
	bool __fastcall ExportRV(const System::AnsiString FileName, Richview::TCustomRichView* rv, int ConverterIndex
		);
	System::AnsiString __fastcall GetImportFilter(void);
	System::AnsiString __fastcall GetExportFilter(void);
	__property TRVOfficeCnvList* ImportConverters = {read=GetImportConverters, nodefault};
	__property TRVOfficeCnvList* ExportConverters = {read=GetExportConverters, nodefault};
	__property Classes::TMemoryStream* Stream = {read=FStream, nodefault};
	
__published:
	__property TConvertingEvent OnConverting = {read=FOnConverting, write=FOnConverting};
};

//-- var, const, procedure ---------------------------------------------------

}	/* namespace Rvofficecnv */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvofficecnv;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// RVOfficeCnv
