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

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

#ifndef RVRTFPropsHPP
#define RVRTFPropsHPP

#pragma delphiheader begin
#pragma option push -w-
#include <RVClasses.hpp>	// Pascal unit
#include <RVMapWht.hpp>	// Pascal unit
#include <RVItem.hpp>	// Pascal unit
#include <RVUni.hpp>	// Pascal unit
#include <RVRTFErr.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <CRVFData.hpp>	// Pascal unit
#include <CRVData.hpp>	// Pascal unit
#include <RVScroll.hpp>	// Pascal unit
#include <RVRTF.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Rvrtfprops
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TRVBorderGlueMode { rvbgVisibleBorders, rvbgNegativeSpacing };
#pragma option pop

class DELPHICLASS TRVRTFReaderProperties;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TRVRTFReaderProperties : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	int FEmptyPara;
	Rvstyle::TRVReaderUnicode FUnicodeMode;
	Rvstyle::TRVReaderStyleMode FTextStyleMode;
	Rvstyle::TRVReaderStyleMode FParaStyleMode;
	bool FIgnorePictures;
	bool FUseHypertextStyles;
	int FParaNo;
	int FStyleNo;
	TRVBorderGlueMode FTableBorderGlueMode;
	bool FExplicitTableWidth;
	bool FSkipHiddenText;
	bool FHideTableGridLines;
	Crvdata::TCustomRVData* RVData;
	Crvdata::TCustomRVData* CurrentRVData;
	Rvstyle::TRVStyle* RVStyle;
	bool PageBreak;
	double PixelsPerTwips;
	Rvrtf::TRVRTFReader* Reader;
	bool FirstTime;
	int Index;
	int CurrentRow;
	int CurrentCol;
	Rvclasses::TRVList* Tables;
	void __fastcall InitReader(void);
	void __fastcall DoneReader(void);
	int __fastcall ReturnParaNo(Rvrtf::TRVRTFPosition Position);
	Rvitem::TRVTextItemInfo* __fastcall CreateTextItem(const AnsiString Text, const WideString WideText
		, int StyleNo, int ParaNo, bool UseUnicode, AnsiString &ResText);
	void __fastcall InsertItem(const AnsiString Text, Rvitem::TCustomRVItemInfo* item, Rvrtf::TRVRTFPosition 
		Position);
	void __fastcall CurrentBorder(Rvstyle::TRVBorderStyle &RVBorderStyle, int &RVBorderWidth, int &RVBorderIntWidth
		, Graphics::TColor &BorderColor);
	int __fastcall FindParaNo(Rvstyle::TRVBorderStyle RVBorderStyle, int RVBorderWidth, int RVBorderIntWidth
		, Graphics::TColor BorderColor);
	int __fastcall GetEmptyParaNo(Rvstyle::TRVAlignment Alignment);
	int __fastcall GetEmptyStyleNo(void);
	int __fastcall FindBestParaNo(void);
	int __fastcall FindStyleNo(bool AUnicode, bool AHypertext);
	int __fastcall FindBestStyleNo(bool AUnicode, bool AHypertext);
	void __fastcall AddPara(Rvstyle::TRVBorderStyle RVBorderStyle, int RVBorderWidth, int RVBorderIntWidth
		, Graphics::TColor BorderColor);
	void __fastcall AddStyle(bool AUnicode, bool AHypertext);
	int __fastcall ReturnParaNo_(void);
	int __fastcall ReturnStyleNo(bool AUnicode);
	bool __fastcall IsHypertext_(void);
	bool __fastcall IsHypertext(AnsiString &Target, AnsiString &Extras);
	void __fastcall SetParaNo(const int Value);
	void __fastcall SetStyleNo(const int Value);
	
protected:
	void __fastcall NewReaderText(Rvrtf::TRVRTFReader* Sender, const AnsiString Text, Rvrtf::TRVRTFPosition 
		Position);
	void __fastcall NewReaderUnicodeText(Rvrtf::TRVRTFReader* Sender, const WideString Text, Rvrtf::TRVRTFPosition 
		Position);
	void __fastcall NewReaderPicture(Rvrtf::TRVRTFReader* Sender, Rvrtf::TRVRTFPicture* RTFPicture, Graphics::TGraphic* 
		Graphic, Rvrtf::TRVRTFPosition Position);
	void __fastcall AssignRowProperties(void);
	void __fastcall ReaderTable(Rvrtf::TRVRTFReader* Sender, Rvrtf::TRVRTFTableEventKind WhatHappens);
	void __fastcall ReaderPageBreak(System::TObject* Sender);
	
public:
	bool EditFlag;
	Rvrtferr::TRVRTFErrorCode ErrorCode;
	bool FailedBecauseOfProtect;
	bool FullReformat;
	int NonFirstItemsAdded;
	bool AllowNewPara;
	__fastcall TRVRTFReaderProperties(void);
	__fastcall virtual ~TRVRTFReaderProperties(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	Rvrtferr::TRVRTFErrorCode __fastcall ReadFromFile(const AnsiString AFileName, Crvdata::TCustomRVData* 
		ARVData);
	Rvrtferr::TRVRTFErrorCode __fastcall ReadFromStream(Classes::TStream* AStream, Crvdata::TCustomRVData* 
		ARVData);
	Rvrtferr::TRVRTFErrorCode __fastcall InsertFromStreamEd(Classes::TStream* AStream, Crvdata::TCustomRVData* 
		ARVData, int AIndex);
	__property TRVBorderGlueMode TableBorderGlueMode = {read=FTableBorderGlueMode, write=FTableBorderGlueMode
		, nodefault};
	__property bool ExplicitTableWidth = {read=FExplicitTableWidth, write=FExplicitTableWidth, default=0
		};
	
__published:
	__property Rvstyle::TRVReaderUnicode UnicodeMode = {read=FUnicodeMode, write=FUnicodeMode, default=1
		};
	__property Rvstyle::TRVReaderStyleMode TextStyleMode = {read=FTextStyleMode, write=FTextStyleMode, 
		default=1};
	__property Rvstyle::TRVReaderStyleMode ParaStyleMode = {read=FParaStyleMode, write=FParaStyleMode, 
		default=1};
	__property bool IgnorePictures = {read=FIgnorePictures, write=FIgnorePictures, default=0};
	__property bool UseHypertextStyles = {read=FUseHypertextStyles, write=FUseHypertextStyles, default=0
		};
	__property int TextStyleNo = {read=FStyleNo, write=SetStyleNo, default=0};
	__property int ParaStyleNo = {read=FParaNo, write=SetParaNo, default=0};
	__property bool SkipHiddenText = {read=FSkipHiddenText, write=FSkipHiddenText, default=1};
	__property bool AutoHideTableGridLines = {read=FHideTableGridLines, write=FHideTableGridLines, default=1
		};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE int RV_TableGridEps;

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

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