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

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

#ifndef CrvdataHPP
#define CrvdataHPP

#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 <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Jpeg.hpp>	// Pascal unit
#include <Rvseqitem.hpp>	// Pascal unit
#include <Rvmarker.hpp>	// Pascal unit
#include <Imglist.hpp>	// Pascal unit
#include <Rvdocparams.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvback.hpp>	// Pascal unit
#include <Rvfuncs.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Rvuni.hpp>	// Pascal unit
#include <Rvclasses.hpp>	// Pascal unit
#include <Rvrtferr.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit

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

namespace Crvdata
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TRVState { rvstMakingSelection, rvstLineSelection, rvstDrawHover, rvstSkipFormatting, rvstFormattingPart, rvstIgnoreNextMouseDown, rvstChangingBkPalette, rvstCompletelySelected, rvstClearing, rvstDoNotMoveChildren, rvstForceStyleChangeEvent, rvstIgnoreNextChar, rvstDoNotTab, rvstDeselecting, rvstUnAssigningChosen, rvstNoScroll, rvstFinalizingUndo, rvstRTFSkipPar, rvstLoadingAsPartOfItem, rvstNoKillFocusEvents, rvstEditorUnformatted, rvstNameSet, rvstFirstParaAborted, rvstLastParaAborted, rvstInvalidSelection, rvstDoNotClearCurTag, rvstStartingDragDrop, rvstCanDragDropDeleteSelection, rvstKeyPress, rvstDoNotSaveContent, rvstPreserveSoftPageBreaks, rvstNoDBExitUpdate, rvstSavingPage, rvstCreatingInplace };
#pragma option pop

typedef Set<TRVState, rvstMakingSelection, rvstCreatingInplace>  TRVStates;

#pragma option push -b-
enum TRVFlag { rvflUseJumps, rvflTrim, rvflShareContents, rvflUseExternalLeading, rvflMouseXYAlwaysCorrect, rvflAllowCustomDrawItems, rvflPrinting, rvflRootEditor, rvflRoot, rvflDBRichViewEdit, rvflCanUseCustomPPI, rvflCanProcessGetText };
#pragma option pop

typedef Set<TRVFlag, rvflUseJumps, rvflCanProcessGetText>  TRVFlags;

#pragma option push -b-
enum TRVFSaveScope { rvfss_Full, rvfss_Selection, rvfss_Page, rvfss_FullInPage };
#pragma option pop

typedef Rvclasses::TRVIntegerList* *PRVIntegerList;

class DELPHICLASS TCustomRVData;
typedef void __fastcall (__closure *TRVEnumItemsProc)(TCustomRVData* RVData, int ItemNo, int &UserData1, const AnsiString UserData2, bool &ContinueEnum);

class DELPHICLASS TRVLayoutInfo;
class PASCALIMPLEMENTATION TRVLayoutInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	bool Loaded;
	int LeftMargin;
	int RightMargin;
	int TopMargin;
	int BottomMargin;
	int MinTextWidth;
	int MaxTextWidth;
	Rvscroll::TRVBiDiMode BiDiMode;
	int LastParaAborted;
	int FirstParaAborted;
	int FirstMarkerListNo;
	int FirstMarkerLevel;
	__fastcall TRVLayoutInfo(void);
	void __fastcall SaveToStream(Classes::TStream* Stream, bool IncludeSize, bool OnlyPageInfo);
	void __fastcall LoadFromStream(Classes::TStream* Stream, bool IncludeSize);
	void __fastcall SaveTextToStream(Classes::TStream* Stream, bool OnlyPageInfo);
	void __fastcall LoadText(const AnsiString s);
	void __fastcall LoadBinary(const AnsiString s);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVLayoutInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVHTMLBulletInfo;
class PASCALIMPLEMENTATION TRVHTMLBulletInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	AnsiString FileName;
	Imglist::TCustomImageList* ImageList;
	int ImageIndex;
	Graphics::TColor BackColor;
	Graphics::TGraphic* Graphic;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVHTMLBulletInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVHTMLBulletInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVRTFFontTableItem;
class PASCALIMPLEMENTATION TRVRTFFontTableItem : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	AnsiString FontName;
	Graphics::TFontCharset Charset;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVRTFFontTableItem(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVRTFFontTableItem(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVRTFFontTable;
class PASCALIMPLEMENTATION TRVRTFFontTable : public Rvclasses::TRVList 
{
	typedef Rvclasses::TRVList inherited;
	
public:
	TRVRTFFontTableItem* operator[](int Index) { return Items[Index]; }
	
private:
	HIDESBASE TRVRTFFontTableItem* __fastcall Get(int Index);
	HIDESBASE void __fastcall Put(int Index, const TRVRTFFontTableItem* Value);
	
public:
	HIDESBASE int __fastcall Find(const AnsiString FontName, Graphics::TFontCharset Charset);
	int __fastcall AddUnique(const AnsiString FontName, Graphics::TFontCharset Charset);
	__property TRVRTFFontTableItem* Items[int Index] = {read=Get, write=Put/*, default*/};
public:
	#pragma option push -w-inl
	/* TRVList.Destroy */ inline __fastcall virtual ~TRVRTFFontTable(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVRTFFontTable(void) : Rvclasses::TRVList() { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TCustomRVData : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	int FFirstJumpNo;
	Rvitem::TRVItemList* FItems;
	void __fastcall CheckItemIndex(int i);
	bool __fastcall GetPageBreaksBeforeItems(int Index);
	void __fastcall SetPageBreaksBeforeItems(int Index, bool Value);
	bool __fastcall GetClearLeft(int Index);
	bool __fastcall GetClearRight(int Index);
	void __fastcall SetClearLeft(int Index, const bool Value);
	void __fastcall SetClearRight(int Index, const bool Value);
	int __fastcall GetItemCount(void);
	bool __fastcall ShouldSaveTextToHTML(int StyleNo);
	AnsiString __fastcall GetHTMLATag(int ItemNo, AnsiString CSS);
	bool __fastcall ShouldSaveTextToRTF(int StyleNo);
	void __fastcall AddNLRTag_(const AnsiString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLATag_(const AnsiString s, int StyleNo, int ParaNo, int Tag);
	bool __fastcall AddTextUniversal(const AnsiString text, int StyleNo, int FirstParaNo, int OtherParaNo, bool AsSingleParagraph, bool CheckUnicode, int Tag);
	
protected:
	bool FAllowNewPara;
	Rvitem::TRVCPInfo* FirstCP;
	Rvitem::TRVCPInfo* LastCP;
	Rvitem::TRVCPInfo* NotAddedCP;
	virtual bool __fastcall IsWordWrapAllowed(void);
	int __fastcall NextCharStr(const AnsiString str, int ItemNo, int Index);
	int __fastcall PrevCharStr(const AnsiString str, int ItemNo, int Index);
	int __fastcall NextChar(int ItemNo, int Index);
	int __fastcall PrevChar(int ItemNo, int Index);
	void __fastcall CheckItemClass(int ItemNo, TMetaClass* RequiredClass);
	DYNAMIC bool __fastcall ShareItems(void);
	DYNAMIC bool __fastcall CanLoadLayout(void);
	DYNAMIC AnsiString __fastcall GetURL(int id) = 0 ;
	virtual Rvscroll::TRVOptions __fastcall GetOptions(void);
	virtual void __fastcall SetOptions(const Rvscroll::TRVOptions Value);
	virtual Rvstyle::TRVFOptions __fastcall GetRVFOptions(void);
	virtual void __fastcall SetRVFOptions(const Rvstyle::TRVFOptions Value);
	virtual Rvstyle::TRVRTFOptions __fastcall GetRTFOptions(void);
	virtual void __fastcall SetRTFOptions(const Rvstyle::TRVRTFOptions Value);
	virtual Rvstyle::TRVFWarnings __fastcall GetRVFWarnings(void);
	virtual void __fastcall SetRVFWarnings(const Rvstyle::TRVFWarnings Value);
	DYNAMIC AnsiString __fastcall GetDelimiters();
	virtual Rvstyle::TRVFReaderStyleMode __fastcall GetRVFTextStylesReadMode(void);
	virtual Rvstyle::TRVFReaderStyleMode __fastcall GetRVFParaStylesReadMode(void);
	DYNAMIC void __fastcall RVFGetLimits(TRVFSaveScope SaveScope, int &StartItem, int &EndItem, int &StartOffs, int &EndOffs, Rvitem::TRVMultiDrawItemPart* &StartPart, Rvitem::TRVMultiDrawItemPart* &EndPart, Rvitem::TCustomRVItemInfo* &SelectedItem);
	DYNAMIC Classes::TStrings* __fastcall GetExtraDocuments(void);
	DYNAMIC Classes::TPersistent* __fastcall GetRTFProperties(void);
	void __fastcall DoOnStyleReaderError(Classes::TReader* Reader, const AnsiString Message, bool &Handled);
	bool __fastcall InsertRVFFromStream_(Classes::TStream* Stream, int &Index, int AParaNo, bool AllowReplaceStyles, bool AppendMode, bool EditFlag, Graphics::TColor &Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout, int &NonFirstItemsAdded, bool &Protect, bool &FullReformat, bool LoadAsSubDoc);
	DYNAMIC void __fastcall DataWriter(Classes::TStream* Stream);
	void __fastcall DataReader(Classes::TStream* Stream);
	void __fastcall ApplyLayoutInfo(TRVLayoutInfo* Layout);
	void __fastcall NormalizeParas(int StartItemNo);
	void __fastcall InsertCheckpoint(int ItemNo, int Tag, const AnsiString Name, bool RaiseEvent);
	void __fastcall UnlinkCheckpoint(Rvitem::TRVCPInfo* cp, bool DecCPCount);
	Rvitem::TRVCPInfo* __fastcall FindCPBeforeItem(int ItemNo);
	void __fastcall UpdateCPItemNo(void);
	virtual void __fastcall InternalFreeItem(Rvitem::TCustomRVItemInfo* item, bool Clearing);
	bool __fastcall IsDelimiter(const AnsiString s, int Index, Rvitem::TRVItemOptions ItemOptions, Rvstyle::TRVCodePage CodePage);
	void __fastcall Replace0(AnsiString &s);
	bool __fastcall RV_CanConcateItems(int FirstItemNo, Rvitem::TCustomRVItemInfo* item1, Rvitem::TCustomRVItemInfo* item2, bool IgnorePara);
	void __fastcall SimpleConcate(int FirstItemNo, Rvitem::TCustomRVItemInfo* item1, Rvitem::TCustomRVItemInfo* item2);
	void __fastcall MassSimpleConcate(int FirstItemNo, int LastItemNo);
	void __fastcall SimpleConcateSubitems(int ItemNo);
	DYNAMIC bool __fastcall SupportsPageBreaks(void);
	void __fastcall SaveHTMLCheckpoint(Classes::TStream* Stream, Rvitem::TRVCPInfo* Checkpoint, int &cpno, const AnsiString Prefix, bool FromNewLine, Rvstyle::TRVSaveOptions Options);
	AnsiString __fastcall GetTextForHTML(const AnsiString Path, int ItemNo, bool CSSVersion, Rvstyle::TRVSaveOptions SaveOptions);
	void __fastcall SaveHTMLNotes(const AnsiString Path, const AnsiString ImagesPrefix, const AnsiString CPPrefix, Classes::TStream* Stream, bool CSSVersion, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, int &imgSaveNo, Rvclasses::TRVList* Bullets, TMetaClass* NoteClass);
	int __fastcall GetFirstParaItem(int ItemNo);
	int __fastcall GetFirstParaSectionItem(int ItemNo);
	Rvitem::TCustomRVItemInfo* __fastcall FindPreviousItem(int ItemNo, TMetaClass* ItemClass);
	int __fastcall FindItemLocalLocationFrom(int StartItemNo, Rvitem::TCustomRVItemInfo* ItemToFind);
	Rvseqitem::TRVSeqItemInfo* __fastcall FindPreviousSeq(int ItemNo);
	DYNAMIC void __fastcall DestroySeqList(void);
	int __fastcall FindLastSeqIndex(int StartAfterMeIndex, Classes::TStringList* SeqNames);
	DYNAMIC void __fastcall DestroyMarkers(void);
	Rvmarker::TRVMarkerItemInfo* __fastcall FindPreviousMarker(int ItemNo);
	int __fastcall FindLastMarkerIndex(int StartAfterMeIndex, Rvclasses::TRVIntegerList* ListStyles);
	virtual TRVFlags __fastcall GetFlags(void) = 0 ;
	virtual void __fastcall SetFlags(const TRVFlags Value) = 0 ;
	void __fastcall AddStringFromFile(const AnsiString s, int StyleNo, int ParaNo, bool FromNewLine, bool AsSingleParagraph, bool &FirstTime, bool &PageBreak);
	DYNAMIC void __fastcall AfterDeleteStyles(Rvitem::TRVDeleteUnusedStylesData* Data);
	virtual int __fastcall GetMaxLength(void);
	
public:
	TRVStates State;
	int FFirstParaListNo;
	int FFirstParaLevel;
	int CPCount;
	__fastcall TCustomRVData(void);
	__fastcall virtual ~TCustomRVData(void);
	virtual TCustomRVData* __fastcall GetRVData(void);
	virtual TCustomRVData* __fastcall GetSourceRVData(void);
	Rvstyle::TRVCodePage __fastcall GetStyleCodePage(int StyleNo);
	Rvstyle::TRVCodePage __fastcall GetItemCodePage(int ItemNo);
	Rvstyle::TRVCodePage __fastcall GetItemCodePage2(Rvitem::TCustomRVItemInfo* Item);
	unsigned __fastcall GetStyleLocale(int StyleNo);
	Rvstyle::TRVCodePage __fastcall GetDefaultCodePage(void);
	virtual Rvstyle::TRVStyle* __fastcall GetRVStyle(void);
	DYNAMIC Controls::TWinControl* __fastcall GetParentControl(void);
	DYNAMIC void __fastcall GetParentInfo(int &ParentItemNo, Rvitem::TRVStoreSubRVData* &Location);
	DYNAMIC TCustomRVData* __fastcall GetChosenRVData(void);
	DYNAMIC Rvitem::TCustomRVItemInfo* __fastcall GetChosenItem(void);
	virtual TCustomRVData* __fastcall GetParentData(void);
	virtual TCustomRVData* __fastcall GetRootData(void);
	virtual TCustomRVData* __fastcall GetAbsoluteParentData(void);
	virtual TCustomRVData* __fastcall GetAbsoluteRootData(void);
	DYNAMIC AnsiString __fastcall GetNoteText();
	virtual HPALETTE __fastcall GetRVPalette(void);
	virtual Windows::PLogPalette __fastcall GetRVLogPalette(void);
	virtual Rvscroll::TRVPaletteAction __fastcall GetDoInPaletteMode(void);
	void __fastcall UpdateItemsPaletteInfo(void);
	Rvitem::TRVItemOptions __fastcall GetItemOptions(int ItemNo);
	int __fastcall GetItemNo(Rvitem::TCustomRVItemInfo* Item);
	Rvitem::TCustomRVItemInfo* __fastcall GetItem(int ItemNo);
	bool __fastcall SetItemExtraIntProperty(int ItemNo, Rvitem::TRVExtraItemProperty Prop, int Value);
	bool __fastcall GetItemExtraIntProperty(int ItemNo, Rvitem::TRVExtraItemProperty Prop, int &Value);
	bool __fastcall SetItemExtraStrProperty(int ItemNo, Rvitem::TRVExtraItemStrProperty Prop, const AnsiString Value);
	bool __fastcall GetItemExtraStrProperty(int ItemNo, Rvitem::TRVExtraItemStrProperty Prop, AnsiString &Value);
	int __fastcall GetItemTag(int ItemNo);
	Rvstyle::TRVVAlign __fastcall GetItemVAlign(int ItemNo);
	bool __fastcall IsParaStart(int ItemNo);
	int __fastcall GetItemPara(int ItemNo);
	bool __fastcall IsFromNewLine(int ItemNo);
	int __fastcall GetOffsAfterItem(int ItemNo);
	int __fastcall GetOffsBeforeItem(int ItemNo);
	int __fastcall ItemLength(int ItemNo);
	void __fastcall SetItemTag(int ItemNo, int ATag);
	void __fastcall SetItemVAlign(int ItemNo, Rvstyle::TRVVAlign AVAlign);
	int __fastcall GetItemStyle(int ItemNo);
	int __fastcall GetActualStyle(Rvitem::TCustomRVItemInfo* Item);
	int __fastcall GetActualStyle2(int StyleNo, int ParaNo);
	AnsiString __fastcall GetItemTextR(int ItemNo);
	void __fastcall SetItemTextR(int ItemNo, const AnsiString s);
	void __fastcall SetItemTextA(int ItemNo, const AnsiString s);
	void __fastcall SetItemText(int ItemNo, const AnsiString s);
	AnsiString __fastcall GetItemTextA(int ItemNo);
	AnsiString __fastcall GetItemText(int ItemNo);
	AnsiString __fastcall GetTextInItemFormatW(int ItemNo, const WideString s);
	WideString __fastcall GetItemTextW(int ItemNo);
	void __fastcall SetItemTextW(int ItemNo, const WideString s);
	AnsiString __fastcall GetTextInItemFormatA(int ItemNo, const AnsiString s);
	int __fastcall FindControlItemNo(Controls::TControl* actrl);
	Rvscroll::TRVBiDiMode __fastcall GetItemBiDiMode(int ItemNo);
	Rvscroll::TRVBiDiMode __fastcall GetParaBiDiMode(int ParaNo);
	virtual Rvscroll::TRVBiDiMode __fastcall GetBiDiMode(void);
	void __fastcall FreeItem(int ItemNo, bool Clearing);
	DYNAMIC void __fastcall Clear(void);
	DYNAMIC void __fastcall DeleteItems(int FirstItemNo, int Count);
	void __fastcall DeleteSection(const AnsiString CpName);
	DYNAMIC bool __fastcall IsAssignedOnProgress(void);
	DYNAMIC void __fastcall DoProgress(Rvstyle::TRVLongOperation Operation, Rvstyle::TRVProgressStage Stage, Byte PercentDone);
	DYNAMIC AnsiString __fastcall GetExtraRTFCode(Rvstyle::TRVRTFSaveArea Area, System::TObject* Obj, int Index1, int Index2, bool InStyleSheet);
	DYNAMIC AnsiString __fastcall GetExtraHTMLCode(Rvstyle::TRVHTMLSaveArea Area, bool CSSVersion);
	DYNAMIC AnsiString __fastcall GetParaHTMLCode(TCustomRVData* RVData, int ItemNo, bool ParaStart, bool CSSVersion);
	AnsiString __fastcall GetParaHTMLCode2(TCustomRVData* RVData, int ItemNo, bool ParaStart, bool CSSVersion, Rvstyle::TRVSaveOptions Options, Rvstyle::TRVStyle* RVStyle);
	DYNAMIC void __fastcall ReadHyperlink(const AnsiString Target, const AnsiString Extras, Rvstyle::TRVLoadFormat DocFormat, int &StyleNo, int &ItemTag, AnsiString &ItemName);
	DYNAMIC void __fastcall WriteHyperlink(int id, TCustomRVData* RVData, int ItemNo, Rvstyle::TRVSaveFormat SaveFormat, AnsiString &Target, AnsiString &Extras);
	virtual bool __fastcall SaveItemToFile(const AnsiString Path, TCustomRVData* RVData, int ItemNo, Rvstyle::TRVSaveFormat SaveFormat, bool Unicode, AnsiString &Text);
	DYNAMIC Graphics::TGraphic* __fastcall ImportPicture(const AnsiString Location, int Width, int Height, bool &Invalid);
	DYNAMIC AnsiString __fastcall GetItemHint(TCustomRVData* RVData, int ItemNo, const AnsiString UpperRVDataHint);
	virtual AnsiString __fastcall DoSavePicture(Rvstyle::TRVSaveFormat DocumentSaveFormat, const AnsiString imgSavePrefix, const AnsiString Path, int &imgSaveNo, bool OverrideFiles, Graphics::TColor CurrentFileColor, Graphics::TGraphic* gr);
	AnsiString __fastcall SavePicture(Rvstyle::TRVSaveFormat DocumentSaveFormat, const AnsiString imgSavePrefix, const AnsiString Path, int &imgSaveNo, bool OverrideFiles, Graphics::TColor CurrentFileColor, Graphics::TGraphic* gr);
	DYNAMIC Graphics::TGraphic* __fastcall RVFPictureNeeded(const AnsiString ItemName, int ItemTag);
	DYNAMIC void __fastcall ControlAction(TCustomRVData* RVData, Rvstyle::TRVControlAction ControlAction, int ItemNo, Rvitem::TCustomRVItemInfo* Item);
	virtual void __fastcall ItemAction(Rvstyle::TRVItemAction ItemAction, Rvitem::TCustomRVItemInfo* Item, AnsiString &Text, TCustomRVData* RVData);
	DYNAMIC void __fastcall ControlAction2(TCustomRVData* RVData, Rvstyle::TRVControlAction ControlAction, int ItemNo, Controls::TControl* &Control) = 0 ;
	DYNAMIC Controls::TControl* __fastcall RVFControlNeeded(const AnsiString ItemName, int ItemTag);
	DYNAMIC Imglist::TCustomImageList* __fastcall RVFImageListNeeded(int ImageListTag);
	DYNAMIC void __fastcall HTMLSaveImage(TCustomRVData* RVData, int ItemNo, const AnsiString Path, Graphics::TColor BackgroundColor, AnsiString &Location, bool &DoDefault);
	DYNAMIC void __fastcall SaveImage2(Graphics::TGraphic* Graphic, Rvstyle::TRVSaveFormat SaveFormat, const AnsiString Path, const AnsiString ImagePrefix, int &ImageSaveNo, AnsiString &Location, bool &DoDefault);
	virtual AnsiString __fastcall SaveComponentToFile(const AnsiString Path, Classes::TComponent* SaveMe, Rvstyle::TRVSaveFormat SaveFormat);
	bool __fastcall LoadTextFromStreamW(Classes::TStream* Stream, int StyleNo, int ParaNo, bool DefAsSingleParagraph);
	bool __fastcall LoadTextW(const AnsiString FileName, int StyleNo, int ParaNo, bool DefAsSingleParagraph);
	bool __fastcall SaveTextToStream(const AnsiString Path, Classes::TStream* Stream, int LineWidth, bool SelectionOnly, bool TextOnly, bool Unicode, bool UnicodeWriteSignature);
	bool __fastcall SaveText(const AnsiString FileName, int LineWidth, bool Unicode);
	bool __fastcall LoadText(const AnsiString FileName, int StyleNo, int ParaNo, bool AsSingleParagraph);
	bool __fastcall LoadTextFromStream(Classes::TStream* Stream, int StyleNo, int ParaNo, bool AsSingleParagraph);
	AnsiString __fastcall SaveBackgroundToHTML(Graphics::TBitmap* bmp, Graphics::TColor Color, const AnsiString Path, const AnsiString ImagesPrefix, int &imgSaveNo, Rvstyle::TRVSaveOptions SaveOptions);
	DYNAMIC bool __fastcall SaveHTMLToStreamEx(Classes::TStream* Stream, const AnsiString Path, const AnsiString Title, const AnsiString ImagesPrefix, const AnsiString ExtraStyles, const AnsiString ExternalCSS, const AnsiString CPPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, Graphics::TColor &CurrentFileColor, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background, Rvclasses::TRVList* Bullets);
	DYNAMIC bool __fastcall SaveHTMLToStream(Classes::TStream* Stream, const AnsiString Path, const AnsiString Title, const AnsiString ImagesPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background, Rvclasses::TRVList* Bullets);
	bool __fastcall SaveHTMLEx(const AnsiString FileName, const AnsiString Title, const AnsiString ImagesPrefix, const AnsiString ExtraStyles, const AnsiString ExternalCSS, const AnsiString CPPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, Graphics::TColor &CurrentFileColor, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background);
	bool __fastcall SaveHTML(const AnsiString FileName, const AnsiString Title, const AnsiString ImagesPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background);
	DYNAMIC AnsiString __fastcall GetNextFileName(const AnsiString ImagesPrefix, const AnsiString Path, const AnsiString Ext, int &imgSaveNo, bool OverrideFiles);
	void __fastcall DoOnCtrlReaderError(Classes::TReader* Reader, const AnsiString Message, bool &Handled);
	bool __fastcall LoadRVFFromStream(Classes::TStream* Stream, Graphics::TColor &Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout);
	bool __fastcall InsertRVFFromStream(Classes::TStream* Stream, int Index, Graphics::TColor &Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout, bool AllowReplaceStyles);
	bool __fastcall AppendRVFFromStream(Classes::TStream* Stream, int ParaNo, Graphics::TColor &Color, Rvback::TRVBackground* Background);
	bool __fastcall LoadRVF(const AnsiString FileName, Graphics::TColor &Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout);
	bool __fastcall SaveRVFToStream(Classes::TStream* Stream, bool SelectionOnly, Graphics::TColor Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout);
	bool __fastcall SaveRVFToStreamEx(Classes::TStream* Stream, TRVFSaveScope SaveScope, Graphics::TColor Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout);
	bool __fastcall SaveRVF(const AnsiString FileName, bool SelectionOnly, Graphics::TColor Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout);
	DYNAMIC void __fastcall InitStyleMappings(PRVIntegerList &PTextStylesMapping, PRVIntegerList &PParaStylesMapping, PRVIntegerList &PListStylesMapping);
	DYNAMIC void __fastcall DoneStyleMappings(PRVIntegerList PTextStylesMapping, PRVIntegerList PParaStylesMapping, PRVIntegerList PListStylesMapping, bool AsSubDoc);
	DYNAMIC bool __fastcall InsertFirstRVFItem(int &Index, AnsiString &s, Rvitem::TCustomRVItemInfo* &item, bool EditFlag, bool &FullReformat, int &NewListNo);
	TRVFSaveScope __fastcall GetRVFSaveScope(bool SelectionOnly);
	void __fastcall SaveRTFListTable97(Classes::TStream* Stream, Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* ListOverrideOffsetsList, TRVRTFFontTable* FontTable, double tpp, TCustomRVData* Header, TCustomRVData* Footer);
	DYNAMIC bool __fastcall SaveRTFToStream(Classes::TStream* Stream, const AnsiString Path, bool SelectionOnly, int Level, Graphics::TColor Color, Rvback::TRVBackground* Background, Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* StyleToFont, Rvclasses::TRVIntegerList* ListOverrideOffsetsList1, Rvclasses::TRVIntegerList* ListOverrideOffsetsList2, TRVRTFFontTable* FontTable, double tpp, bool CompleteDocument, TCustomRVData* Header, TCustomRVData* Footer);
	bool __fastcall SaveRTF(const AnsiString FileName, bool SelectionOnly, Graphics::TColor Color, Rvback::TRVBackground* Background);
	Rvrtferr::TRVRTFErrorCode __fastcall LoadRTFFromStream(Classes::TStream* Stream);
	Rvrtferr::TRVRTFErrorCode __fastcall LoadRTF(const AnsiString FileName);
	void __fastcall MakeRTFTables(Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* ListOverrideCountList, bool TopLevel);
	void __fastcall AddItemR(const AnsiString Text, Rvitem::TCustomRVItemInfo* Item);
	void __fastcall AddItem(const AnsiString Text, Rvitem::TCustomRVItemInfo* Item);
	void __fastcall AddItemAsIsR(const AnsiString Text, Rvitem::TCustomRVItemInfo* Item);
	void __fastcall AddFmt(const AnsiString FormatStr, System::TVarRec const * Args, const int Args_Size, int StyleNo, int ParaNo);
	void __fastcall AddNLR(const AnsiString s, int StyleNo, int ParaNo);
	void __fastcall AddNL(const AnsiString s, int StyleNo, int ParaNo);
	void __fastcall AddNLRTag(const AnsiString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLTag(const AnsiString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddTextNLR(const AnsiString s, int StyleNo, int FirstParaNo, int OtherParaNo, int Tag = 0x0);
	void __fastcall AddTextNL(const AnsiString s, int StyleNo, int FirstParaNo, int OtherParaNo, int Tag = 0x0);
	void __fastcall AddTextNLA(const AnsiString s, int StyleNo, int FirstParaNo, int OtherParaNo, int Tag = 0x0);
	void __fastcall AddTextBlockNLA(const AnsiString s, int StyleNo, int ParaNo, int Tag = 0x0);
	void __fastcall AddNLATag(const AnsiString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLWTag(const WideString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLWTagRaw(const AnsiString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddTextNLWRaw(const AnsiString s, int StyleNo, int FirstParaNo, int OtherParaNo, bool DefAsSingleParagraph);
	void __fastcall AddTextNLW(const WideString s, int StyleNo, int FirstParaNo, int OtherParaNo, bool DefAsSingleParagraph);
	void __fastcall AddTab(int TextStyleNo, int ParaNo);
	void __fastcall AddBreakExTag(Byte Width, Rvstyle::TRVBreakStyle Style, Graphics::TColor Color, int Tag);
	void __fastcall AddBreak(void);
	void __fastcall AddBreakEx(Byte Width, Rvstyle::TRVBreakStyle Style, Graphics::TColor Color);
	void __fastcall AddBreakTag(int Tag);
	void __fastcall AddBulletEx(const AnsiString Name, int ImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo);
	void __fastcall AddBulletExTag(const AnsiString Name, int ImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo, int Tag);
	void __fastcall AddHotspotEx(const AnsiString Name, int ImageIndex, int HotImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo);
	void __fastcall AddHotspotExTag(const AnsiString Name, int ImageIndex, int HotImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo, int Tag);
	void __fastcall AddPictureExTag(const AnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign, int Tag);
	void __fastcall AddControlExTag(const AnsiString Name, Controls::TControl* ctrl, int ParaNo, Rvstyle::TRVVAlign VAlign, int Tag);
	void __fastcall AddPictureEx(const AnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall AddControlEx(const AnsiString Name, Controls::TControl* ctrl, int ParaNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall AddHotPicture(const AnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall AddHotPictureTag(const AnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign, int Tag);
	void __fastcall FreeCheckpoint(Rvitem::TRVCPInfo* &cp, bool AdjustLinks, bool DecCPCount);
	void __fastcall SetCP(Rvitem::TCustomRVItemInfo* Item, Rvitem::TRVCPInfo* &PrevCP, Rvitem::TRVCPInfo* &CP);
	void __fastcall UpdateCPPos(Rvitem::TRVCPInfo* cp, int ItemNo);
	int __fastcall AddNamedCheckpointExTag(const AnsiString CpName, bool RaiseEvent, int Tag);
	void __fastcall SetCheckpointInfo(int ItemNo, int ATag, const AnsiString AName, bool ARaiseEvent);
	bool __fastcall RemoveCheckpoint(int ItemNo);
	Rvstyle::TCheckpointData __fastcall GetFirstCheckpoint(void);
	Rvstyle::TCheckpointData __fastcall GetNextCheckpoint(Rvstyle::TCheckpointData CheckpointData);
	Rvstyle::TCheckpointData __fastcall GetLastCheckpoint(void);
	Rvstyle::TCheckpointData __fastcall GetPrevCheckpoint(Rvstyle::TCheckpointData CheckpointData);
	Rvstyle::TCheckpointData __fastcall GetItemCheckpoint(int ItemNo);
	Rvstyle::TCheckpointData __fastcall FindCheckpointByName(const AnsiString Name);
	Rvstyle::TCheckpointData __fastcall FindCheckpointByTag(int Tag);
	Rvstyle::TCheckpointData __fastcall GetCheckpointByNo(int No);
	int __fastcall GetCheckpointItemNo(Rvstyle::TCheckpointData CheckpointData);
	int __fastcall GetCheckpointNo(Rvstyle::TCheckpointData CheckpointData);
	void __fastcall GetCheckpointInfo(Rvstyle::TCheckpointData CheckpointData, int &Tag, AnsiString &Name, bool &RaiseEvent);
	void __fastcall GetBreakInfo(int ItemNo, Byte &AWidth, Rvstyle::TRVBreakStyle &AStyle, Graphics::TColor &AColor, int &ATag);
	void __fastcall GetBulletInfo(int ItemNo, AnsiString &AName, int &AImageIndex, Imglist::TCustomImageList* &AImageList, int &ATag);
	void __fastcall GetHotspotInfo(int ItemNo, AnsiString &AName, int &AImageIndex, int &AHotImageIndex, Imglist::TCustomImageList* &AImageList, int &ATag);
	void __fastcall GetPictureInfo(int ItemNo, AnsiString &AName, Graphics::TGraphic* &Agr, Rvstyle::TRVVAlign &AVAlign, int &ATag);
	void __fastcall GetControlInfo(int ItemNo, AnsiString &AName, Controls::TControl* &Actrl, Rvstyle::TRVVAlign &AVAlign, int &ATag);
	void __fastcall GetTextInfo(int ItemNo, AnsiString &AText, int &ATag);
	void __fastcall SetGrouped(int ItemNo, bool Grouped);
	void __fastcall SetBreakInfo(int ItemNo, Byte AWidth, Rvstyle::TRVBreakStyle AStyle, Graphics::TColor AColor, int ATag);
	void __fastcall SetBulletInfo(int ItemNo, const AnsiString AName, int AImageIndex, Imglist::TCustomImageList* AImageList, int ATag);
	void __fastcall SetHotspotInfo(int ItemNo, const AnsiString AName, int AImageIndex, int AHotImageIndex, Imglist::TCustomImageList* AImageList, int ATag);
	bool __fastcall SetPictureInfo(int ItemNo, const AnsiString AName, Graphics::TGraphic* Agr, Rvstyle::TRVVAlign AVAlign, int ATag);
	bool __fastcall SetControlInfo(int ItemNo, const AnsiString AName, Rvstyle::TRVVAlign AVAlign, int ATag);
	void __fastcall DoMarkStylesInUse(Rvitem::TRVDeleteUnusedStylesData* Data);
	void __fastcall DoUpdateStyles(Rvitem::TRVDeleteUnusedStylesData* Data);
	DYNAMIC void __fastcall MarkStylesInUse(Rvitem::TRVDeleteUnusedStylesData* Data);
	void __fastcall DeleteMarkedStyles(Rvitem::TRVDeleteUnusedStylesData* Data);
	void __fastcall DeleteUnusedStyles(bool TextStyles, bool ParaStyles, bool ListStyles);
	DYNAMIC void __fastcall AfterAddStyle(Rvstyle::TCustomRVInfo* StyleInfo);
	DYNAMIC Rvseqitem::TRVSeqList* __fastcall GetSeqList(bool AllowCreate);
	void __fastcall AddSeqInList(int ItemNo);
	void __fastcall DeleteSeqFromList(Rvitem::TCustomRVItemInfo* Item, bool Clearing);
	DYNAMIC Rvmarker::TRVMarkerList* __fastcall GetMarkers(bool AllowCreate);
	DYNAMIC Rvmarker::TRVMarkerList* __fastcall GetPrevMarkers(void);
	int __fastcall SetListMarkerInfo(int AItemNo, int AListNo, int AListLevel, int AStartFrom, int AParaNo, bool AUseStartFrom);
	void __fastcall RecalcMarker(int AItemNo, bool AllowCreateList);
	void __fastcall RemoveListMarker(int ItemNo);
	int __fastcall GetListMarkerInfo(int AItemNo, int &AListNo, int &AListLevel, int &AStartFrom, bool &AUseStartFrom);
	void __fastcall AddMarkerInList(int ItemNo);
	void __fastcall DeleteMarkerFromList(Rvitem::TCustomRVItemInfo* Item, bool Clearing);
	bool __fastcall IsDelimiterA(char ch, Rvstyle::TRVCodePage CodePage);
	bool __fastcall IsDelimiterW(WideChar ch);
	bool __fastcall EnumItems(TRVEnumItemsProc Proc, int &UserData1, const AnsiString UserData2);
	void __fastcall ShareItemsFrom(TCustomRVData* Source);
	void __fastcall AssignItemsFrom(TCustomRVData* Source);
	void __fastcall DrainFrom(TCustomRVData* Victim);
	void __fastcall SetParagraphStyleToAll(int ParaNo);
	void __fastcall SetAddParagraphMode(bool AllowNewPara);
	void __fastcall AppendFrom(TCustomRVData* Source);
	void __fastcall Inserting(TCustomRVData* RVData, bool Safe);
	DYNAMIC TCustomRVData* __fastcall Edit(void);
	void __fastcall Beep(void);
	void __fastcall ExpandToParaSection(int ItemNo1, int ItemNo2, int &FirstItemNo, int &LastItemNo);
	void __fastcall ExpandToPara(int ItemNo1, int ItemNo2, int &FirstItemNo, int &LastItemNo);
	AnsiString __fastcall ReplaceTabs(const AnsiString s, int StyleNo, bool UnicodeDef);
	void __fastcall AdjustInItemsRange(int &ItemNo);
	virtual Graphics::TColor __fastcall GetColor(void);
	DYNAMIC Rvdocparams::TRVDocParameters* __fastcall GetDocParameters(bool AllowCreate);
	DYNAMIC Classes::TStringList* __fastcall GetDocProperties(void);
	__property TRVFlags Flags = {read=GetFlags, write=SetFlags, nodefault};
	__property Rvitem::TRVItemList* Items = {read=FItems};
	__property int ItemCount = {read=GetItemCount, nodefault};
	__property Rvscroll::TRVOptions Options = {read=GetOptions, write=SetOptions, nodefault};
	__property Rvstyle::TRVFOptions RVFOptions = {read=GetRVFOptions, write=SetRVFOptions, nodefault};
	__property Rvstyle::TRVRTFOptions RTFOptions = {read=GetRTFOptions, write=SetRTFOptions, nodefault};
	__property Rvstyle::TRVFWarnings RVFWarnings = {read=GetRVFWarnings, write=SetRVFWarnings, nodefault};
	__property int FirstJumpNo = {read=FFirstJumpNo, write=FFirstJumpNo, nodefault};
	__property bool PageBreaksBeforeItems[int Index] = {read=GetPageBreaksBeforeItems, write=SetPageBreaksBeforeItems};
	__property bool ClearLeft[int Index] = {read=GetClearLeft, write=SetClearLeft};
	__property bool ClearRight[int Index] = {read=GetClearRight, write=SetClearRight};
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE bool RichViewSavePInHTML;
extern PACKAGE bool RichViewSaveDivInHTMLEx;
extern PACKAGE bool RichViewSavePageBreaksInText;
extern PACKAGE bool RichViewDoNotCheckRVFStyleRefs;
extern PACKAGE bool RichViewAllowCopyTableCells;
#define cssBKAttStrFixed "fixed"
#define cssBKAttStrScroll "scroll"
#define cssBKRepStrRepeat "repeat"
#define cssBKRepStrNoRepeat "no-repeat"
extern PACKAGE char *rv_cssBkAttachment[9];
extern PACKAGE char *rv_cssBkRepeat[9];
extern PACKAGE TMetaClass* RVPngGraphiClass;
extern PACKAGE void __fastcall RVCheckUni(int Length);
extern PACKAGE void __fastcall RV_RegisterHTMLGraphicFormat(TMetaClass* ClassType);
extern PACKAGE bool __fastcall RV_IsHTMLGraphicFormat(Graphics::TGraphic* gr);
extern PACKAGE void __fastcall RV_RegisterPngGraphic(TMetaClass* ClassType);
extern PACKAGE AnsiString __fastcall StringToHTMLString(const AnsiString s, Rvstyle::TRVSaveOptions Options, Rvstyle::TRVStyle* RVStyle);
extern PACKAGE AnsiString __fastcall StringToHTMLString2(const AnsiString s, Rvstyle::TRVSaveOptions Options, Rvstyle::TRVCodePage CodePage);
extern PACKAGE AnsiString __fastcall StringToHTMLString3(const AnsiString s, bool UTF8, Rvstyle::TRVCodePage CodePage);
extern PACKAGE void __fastcall RVSaveFontToRTF(Classes::TStream* Stream, Graphics::TFont* Font, Rvclasses::TRVColorList* ColorList, TRVRTFFontTable* FontTable, Rvstyle::TRVStyle* RVStyle);
extern PACKAGE int __fastcall RVCompareLocations(TCustomRVData* RVData1, int ItemNo1, TCustomRVData* RVData2, int ItemNo2);

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

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