// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'RVOfficeCnv.pas' rev: 4.00

#ifndef RVOfficeCnvHPP
#define RVOfficeCnvHPP

#pragma delphiheader begin
#pragma option push -w-
#include <RichView.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <RVClasses.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Rvofficecnv
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TRVOfficeConverterInfo;
#pragma pack(push, 1)
class PASCALIMPLEMENTATION TRVOfficeConverterInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	AnsiString Name;
	AnsiString Path;
	AnsiString Filter;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVOfficeConverterInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVOfficeConverterInfo(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

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)(unsigned ghszFile, void * pstgForeign, unsigned ghBuff, unsigned 
	ghszClass, unsigned ghszSubset, TForeignToRtf32Callback lpfnOut);

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

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

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

class DELPHICLASS TRVOfficeCnvList;
#pragma pack(push, 1)
class PASCALIMPLEMENTATION TRVOfficeCnvList : public Rvclasses::TRVList 
{
	typedef Rvclasses::TRVList inherited;
	
private:
	Classes::TComponent* FOwner;
	unsigned 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 AnsiString RegPath);
	
public:
	__fastcall TRVOfficeCnvList(const AnsiString RegPath, Classes::TComponent* Owner);
	AnsiString __fastcall GetFilter(void);
	void __fastcall ImportRTF(const AnsiString FileName, int Index);
	void __fastcall ExportRTF(const AnsiString FileName, int Index);
	__property TRVOfficeConverterInfo* Items[int Index] = {read=Get, write=Put/*, default*/};
public:
	#pragma option push -w-inl
	/* TRVList.Destroy */ inline __fastcall virtual ~TRVOfficeCnvList(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

class DELPHICLASS TRVOfficeConverter;
#pragma pack(push, 1)
class 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 AnsiString FileName, int ConverterIndex);
	bool __fastcall ExportRTF(const AnsiString FileName, int ConverterIndex);
	bool __fastcall ImportRV(const AnsiString FileName, Richview::TCustomRichView* rv, int ConverterIndex
		);
	bool __fastcall ExportRV(const AnsiString FileName, Richview::TCustomRichView* rv, int ConverterIndex
		);
	AnsiString __fastcall GetImportFilter(void);
	AnsiString __fastcall GetExportFilter(void);
	__property TRVOfficeCnvList* ImportConverters = {read=GetImportConverters};
	__property TRVOfficeCnvList* ExportConverters = {read=GetExportConverters};
	__property Classes::TMemoryStream* Stream = {read=FStream};
	
__published:
	__property TConvertingEvent OnConverting = {read=FOnConverting, write=FOnConverting};
};

#pragma pack(pop)

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

}	/* namespace Rvofficecnv */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvofficecnv;
#endif
#pragma option pop	// -w-

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