// CodeGear C++Builder
// Copyright (c) 1995, 2008 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Crvdata.pas' rev: 20.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 <Ansistrings.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, 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, rvstNoSpecialCharacters };
#pragma option pop

typedef Set<TRVState, rvstMakingSelection, rvstNoSpecialCharacters>  TRVStates;

#pragma option push -b-
enum TRVFlag { rvflUseJumps, rvflIgnoreMouseLeave, 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 System::UnicodeString 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 Rvtypes::TRVAnsiString s);
	void __fastcall LoadBinary(const Rvtypes::TRVRawByteString s);
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TRVLayoutInfo(void) { }
	
};


class DELPHICLASS TRVHTMLBulletInfo;
class PASCALIMPLEMENTATION TRVHTMLBulletInfo : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	System::UnicodeString FileName;
	Imglist::TCustomImageList* ImageList;
	int ImageIndex;
	Graphics::TColor BackColor;
	Graphics::TGraphic* Graphic;
public:
	/* TObject.Create */ inline __fastcall TRVHTMLBulletInfo(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TRVHTMLBulletInfo(void) { }
	
};


class DELPHICLASS TRVRTFFontTableItem;
class PASCALIMPLEMENTATION TRVRTFFontTableItem : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	System::UnicodeString FontName;
	Graphics::TFontCharset Charset;
public:
	/* TObject.Create */ inline __fastcall TRVRTFFontTableItem(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TRVRTFFontTableItem(void) { }
	
};


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 System::UnicodeString FontName, Graphics::TFontCharset Charset);
	int __fastcall AddUnique(const System::UnicodeString FontName, Graphics::TFontCharset Charset);
	__property TRVRTFFontTableItem* Items[int Index] = {read=Get, write=Put/*, default*/};
public:
	/* TRVList.Destroy */ inline __fastcall virtual ~TRVRTFFontTable(void) { }
	
public:
	/* TObject.Create */ inline __fastcall TRVRTFFontTable(void) : Rvclasses::TRVList() { }
	
};


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);
	System::UnicodeString __fastcall GetHTMLATag(int ItemNo, Rvtypes::TRVRawByteString CSS);
	bool __fastcall ShouldSaveTextToRTF(int StyleNo);
	void __fastcall AddNLRTag_(const Rvtypes::TRVRawByteString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLATag_(const Rvtypes::TRVAnsiString s, int StyleNo, int ParaNo, int Tag);
	bool __fastcall AddTextUniversal(const Rvtypes::TRVRawByteString 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 Rvtypes::TRVRawByteString str, int ItemNo, int Index);
	int __fastcall PrevCharStr(const Rvtypes::TRVRawByteString str, int ItemNo, int Index);
	int __fastcall NextChar(int ItemNo, int Index);
	int __fastcall PrevChar(int ItemNo, int Index);
	void __fastcall CheckItemClass(int ItemNo, Rvitem::TCustomRVItemInfoClass RequiredClass);
	DYNAMIC bool __fastcall ShareItems(void);
	DYNAMIC bool __fastcall CanLoadLayout(void);
	DYNAMIC System::UnicodeString __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 System::UnicodeString __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 System::UnicodeString 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 System::UnicodeString 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 Rvtypes::TRVRawByteString s, int Index, Rvitem::TRVItemOptions ItemOptions, Rvstyle::TRVCodePage CodePage);
	void __fastcall Replace0(Rvtypes::TRVRawByteString &s);
	bool __fastcall RV_CanConcateItems(int FirstItemNo, Rvitem::TCustomRVItemInfo* item1, Rvitem::TCustomRVItemInfo* item2, bool IgnorePara, bool AllowConcateNonText);
	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 System::UnicodeString Prefix, bool FromNewLine, Rvstyle::TRVSaveOptions Options);
	Rvtypes::TRVRawByteString __fastcall GetTextForHTML(const System::UnicodeString Path, int ItemNo, bool CSSVersion, Rvstyle::TRVSaveOptions SaveOptions);
	void __fastcall SaveHTMLNotes(const System::UnicodeString Path, const System::UnicodeString ImagesPrefix, const System::UnicodeString CPPrefix, Classes::TStream* Stream, bool CSSVersion, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, int &imgSaveNo, Rvclasses::TRVList* Bullets, Rvitem::TCustomRVItemInfoClass NoteClass);
	int __fastcall GetFirstParaItem(int ItemNo);
	int __fastcall GetFirstParaSectionItem(int ItemNo);
	Rvitem::TCustomRVItemInfo* __fastcall FindPreviousItem(int ItemNo, Rvitem::TCustomRVItemInfoClass 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 Rvtypes::TRVAnsiString 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 System::UnicodeString __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 System::UnicodeString Value);
	bool __fastcall GetItemExtraStrProperty(int ItemNo, Rvitem::TRVExtraItemStrProperty Prop, System::UnicodeString &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);
	Rvtypes::TRVRawByteString __fastcall GetItemTextR(int ItemNo);
	void __fastcall SetItemTextR(int ItemNo, const Rvtypes::TRVRawByteString s);
	void __fastcall SetItemTextA(int ItemNo, const Rvtypes::TRVAnsiString s);
	void __fastcall SetItemText(int ItemNo, const System::UnicodeString s);
	Rvtypes::TRVAnsiString __fastcall GetItemTextA(int ItemNo);
	System::UnicodeString __fastcall GetItemText(int ItemNo);
	Rvtypes::TRVRawByteString __fastcall GetTextInItemFormatW(int ItemNo, const Rvtypes::TRVUnicodeString s);
	Rvtypes::TRVUnicodeString __fastcall GetItemTextW(int ItemNo);
	void __fastcall SetItemTextW(int ItemNo, const Rvtypes::TRVUnicodeString s);
	Rvtypes::TRVRawByteString __fastcall GetTextInItemFormatA(int ItemNo, const Rvtypes::TRVAnsiString s);
	int __fastcall FindControlItemNo(Controls::TControl* actrl);
	bool __fastcall IsHiddenItem(int ItemNo);
	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 System::UnicodeString CpName);
	void __fastcall MassSimpleConcateAll(void);
	DYNAMIC bool __fastcall IsAssignedOnProgress(void);
	DYNAMIC void __fastcall DoProgress(Rvstyle::TRVLongOperation Operation, Rvstyle::TRVProgressStage Stage, System::Byte PercentDone);
	DYNAMIC Rvtypes::TRVAnsiString __fastcall GetExtraRTFCode(Rvstyle::TRVRTFSaveArea Area, System::TObject* Obj, int Index1, int Index2, bool InStyleSheet);
	DYNAMIC System::UnicodeString __fastcall GetExtraHTMLCode(Rvstyle::TRVHTMLSaveArea Area, bool CSSVersion);
	DYNAMIC System::UnicodeString __fastcall GetParaHTMLCode(TCustomRVData* RVData, int ItemNo, bool ParaStart, bool CSSVersion);
	Rvtypes::TRVRawByteString __fastcall GetParaHTMLCode2(TCustomRVData* RVData, int ItemNo, bool ParaStart, bool CSSVersion, Rvstyle::TRVSaveOptions Options, Rvstyle::TRVStyle* RVStyle);
	DYNAMIC void __fastcall ReadHyperlink(const System::UnicodeString Target, const System::UnicodeString Extras, Rvstyle::TRVLoadFormat DocFormat, int &StyleNo, int &ItemTag, Rvtypes::TRVRawByteString &ItemName);
	DYNAMIC void __fastcall WriteHyperlink(int id, TCustomRVData* RVData, int ItemNo, Rvstyle::TRVSaveFormat SaveFormat, System::UnicodeString &Target, System::UnicodeString &Extras);
	virtual bool __fastcall SaveItemToFile(const System::UnicodeString Path, TCustomRVData* RVData, int ItemNo, Rvstyle::TRVSaveFormat SaveFormat, bool Unicode, Rvtypes::TRVRawByteString &Text);
	DYNAMIC Graphics::TGraphic* __fastcall ImportPicture(const System::UnicodeString Location, int Width, int Height, bool &Invalid);
	DYNAMIC System::UnicodeString __fastcall GetItemHint(TCustomRVData* RVData, int ItemNo, const System::UnicodeString UpperRVDataHint);
	virtual System::UnicodeString __fastcall DoSavePicture(Rvstyle::TRVSaveFormat DocumentSaveFormat, const System::UnicodeString imgSavePrefix, const System::UnicodeString Path, int &imgSaveNo, bool OverrideFiles, Graphics::TColor CurrentFileColor, Graphics::TGraphic* gr);
	System::UnicodeString __fastcall SavePicture(Rvstyle::TRVSaveFormat DocumentSaveFormat, const System::UnicodeString imgSavePrefix, const System::UnicodeString Path, int &imgSaveNo, bool OverrideFiles, Graphics::TColor CurrentFileColor, Graphics::TGraphic* gr);
	DYNAMIC Graphics::TGraphic* __fastcall RVFPictureNeeded(const System::UnicodeString ItemName, int ItemTag, bool PictureInsideRVF);
	DYNAMIC void __fastcall ControlAction(TCustomRVData* RVData, Rvstyle::TRVControlAction ControlAction, int ItemNo, Rvitem::TCustomRVItemInfo* Item);
	virtual void __fastcall ItemAction(Rvstyle::TRVItemAction ItemAction, Rvitem::TCustomRVItemInfo* Item, Rvtypes::TRVRawByteString &Text, TCustomRVData* RVData);
	DYNAMIC void __fastcall AfterReadNote(TCustomRVData* RVData, int ItemNo);
	DYNAMIC void __fastcall DoBeforeSaving(void);
	DYNAMIC void __fastcall ControlAction2(TCustomRVData* RVData, Rvstyle::TRVControlAction ControlAction, int ItemNo, Controls::TControl* &Control) = 0 ;
	DYNAMIC Controls::TControl* __fastcall RVFControlNeeded(const System::UnicodeString ItemName, int ItemTag);
	DYNAMIC Imglist::TCustomImageList* __fastcall RVFImageListNeeded(int ImageListTag);
	DYNAMIC void __fastcall HTMLSaveImage(TCustomRVData* RVData, int ItemNo, const System::UnicodeString Path, Graphics::TColor BackgroundColor, System::UnicodeString &Location, bool &DoDefault);
	DYNAMIC void __fastcall SaveImage2(Graphics::TGraphic* Graphic, Rvstyle::TRVSaveFormat SaveFormat, const System::UnicodeString Path, const System::UnicodeString ImagePrefix, int &ImageSaveNo, System::UnicodeString &Location, bool &DoDefault);
	virtual System::UnicodeString __fastcall SaveComponentToFile(const System::UnicodeString Path, Classes::TComponent* SaveMe, Rvstyle::TRVSaveFormat SaveFormat);
	bool __fastcall LoadTextFromStreamW(Classes::TStream* Stream, int StyleNo, int ParaNo, bool DefAsSingleParagraph);
	bool __fastcall LoadTextW(const System::UnicodeString FileName, int StyleNo, int ParaNo, bool DefAsSingleParagraph);
	bool __fastcall SaveTextToStream(const System::UnicodeString Path, Classes::TStream* Stream, int LineWidth, bool SelectionOnly, bool TextOnly, bool Unicode, bool UnicodeWriteSignature);
	bool __fastcall SaveText(const System::UnicodeString FileName, int LineWidth, bool Unicode);
	bool __fastcall LoadText(const System::UnicodeString FileName, int StyleNo, int ParaNo, bool AsSingleParagraph);
	bool __fastcall LoadTextFromStream(Classes::TStream* Stream, int StyleNo, int ParaNo, bool AsSingleParagraph);
	bool __fastcall NextItemFromSpace(int ItemNo);
	System::UnicodeString __fastcall SaveBackgroundToHTML(Graphics::TBitmap* bmp, Graphics::TColor Color, const System::UnicodeString Path, const System::UnicodeString ImagesPrefix, int &imgSaveNo, Rvstyle::TRVSaveOptions SaveOptions);
	DYNAMIC bool __fastcall SaveHTMLToStreamEx(Classes::TStream* Stream, const System::UnicodeString Path, const System::UnicodeString Title, const System::UnicodeString ImagesPrefix, const System::UnicodeString ExtraStyles, const System::UnicodeString ExternalCSS, const System::UnicodeString 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 System::UnicodeString Path, const System::UnicodeString Title, const System::UnicodeString 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 System::UnicodeString FileName, const System::UnicodeString Title, const System::UnicodeString ImagesPrefix, const System::UnicodeString ExtraStyles, const System::UnicodeString ExternalCSS, const System::UnicodeString 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 System::UnicodeString FileName, const System::UnicodeString Title, const System::UnicodeString ImagesPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background);
	DYNAMIC System::UnicodeString __fastcall GetNextFileName(const System::UnicodeString ImagesPrefix, const System::UnicodeString Path, const System::UnicodeString Ext, int &imgSaveNo, bool OverrideFiles);
	void __fastcall DoOnCtrlReaderError(Classes::TReader* Reader, const System::UnicodeString 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 System::UnicodeString 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 Root = true);
	bool __fastcall SaveRVFToStreamEx(Classes::TStream* Stream, TRVFSaveScope SaveScope, Graphics::TColor Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout, bool Root);
	bool __fastcall SaveRVF(const System::UnicodeString FileName, bool SelectionOnly, Graphics::TColor Color, Rvback::TRVBackground* Background, TRVLayoutInfo* Layout, bool Root);
	DYNAMIC void __fastcall InitStyleMappings(PRVIntegerList &PTextStylesMapping, PRVIntegerList &PParaStylesMapping, PRVIntegerList &PListStylesMapping, Rvstyle::PRVStyleUnits &PUnits);
	DYNAMIC void __fastcall DoneStyleMappings(bool AsSubDoc);
	DYNAMIC bool __fastcall InsertFirstRVFItem(int &Index, Rvtypes::TRVRawByteString &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 System::UnicodeString 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, bool HiddenParent, TCustomRVData* Header, TCustomRVData* Footer);
	bool __fastcall SaveRTF(const System::UnicodeString FileName, bool SelectionOnly, Graphics::TColor Color, Rvback::TRVBackground* Background);
	Rvrtferr::TRVRTFErrorCode __fastcall LoadRTFFromStream(Classes::TStream* Stream);
	Rvrtferr::TRVRTFErrorCode __fastcall LoadRTF(const System::UnicodeString FileName);
	void __fastcall MakeRTFTables(Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* ListOverrideCountList, bool TopLevel);
	void __fastcall AddItemR(const Rvtypes::TRVRawByteString Text, Rvitem::TCustomRVItemInfo* Item);
	void __fastcall AddItem(const System::UnicodeString Text, Rvitem::TCustomRVItemInfo* Item);
	void __fastcall AddItemAsIsR(const Rvtypes::TRVRawByteString Text, Rvitem::TCustomRVItemInfo* Item);
	void __fastcall AddFmt(const System::UnicodeString FormatStr, System::TVarRec const *Args, const int Args_Size, int StyleNo, int ParaNo);
	void __fastcall AddNLR(const Rvtypes::TRVRawByteString s, int StyleNo, int ParaNo);
	void __fastcall AddNL(const System::UnicodeString s, int StyleNo, int ParaNo);
	void __fastcall AddNLRTag(const Rvtypes::TRVRawByteString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLTag(const System::UnicodeString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddTextNLR(const Rvtypes::TRVRawByteString s, int StyleNo, int FirstParaNo, int OtherParaNo, int Tag = 0x0);
	void __fastcall AddTextNL(const System::UnicodeString s, int StyleNo, int FirstParaNo, int OtherParaNo, int Tag = 0x0);
	void __fastcall AddTextNLA(const Rvtypes::TRVAnsiString s, int StyleNo, int FirstParaNo, int OtherParaNo, int Tag = 0x0);
	void __fastcall AddTextBlockNLA(const Rvtypes::TRVAnsiString s, int StyleNo, int ParaNo, int Tag = 0x0);
	void __fastcall AddNLATag(const Rvtypes::TRVAnsiString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLWTag(const Rvtypes::TRVUnicodeString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddNLWTagRaw(const Rvtypes::TRVRawByteString s, int StyleNo, int ParaNo, int Tag);
	void __fastcall AddTextNLWRaw(const Rvtypes::TRVRawByteString s, int StyleNo, int FirstParaNo, int OtherParaNo, bool DefAsSingleParagraph);
	void __fastcall AddTextNLW(const Rvtypes::TRVUnicodeString s, int StyleNo, int FirstParaNo, int OtherParaNo, bool DefAsSingleParagraph);
	void __fastcall AddTab(int TextStyleNo, int ParaNo);
	void __fastcall AddBreakExTag(Rvstyle::TRVStyleLength Width, Rvstyle::TRVBreakStyle Style, Graphics::TColor Color, int Tag);
	void __fastcall AddBreak(void);
	void __fastcall AddBreakEx(Rvstyle::TRVStyleLength Width, Rvstyle::TRVBreakStyle Style, Graphics::TColor Color);
	void __fastcall AddBreakTag(int Tag);
	void __fastcall AddBulletEx(const Rvtypes::TRVAnsiString Name, int ImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo);
	void __fastcall AddBulletExTag(const Rvtypes::TRVAnsiString Name, int ImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo, int Tag);
	void __fastcall AddHotspotEx(const Rvtypes::TRVAnsiString Name, int ImageIndex, int HotImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo);
	void __fastcall AddHotspotExTag(const Rvtypes::TRVAnsiString Name, int ImageIndex, int HotImageIndex, Imglist::TCustomImageList* ImageList, int ParaNo, int Tag);
	void __fastcall AddPictureExTag(const Rvtypes::TRVAnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign, int Tag);
	void __fastcall AddControlExTag(const Rvtypes::TRVAnsiString Name, Controls::TControl* ctrl, int ParaNo, Rvstyle::TRVVAlign VAlign, int Tag);
	void __fastcall AddPictureEx(const Rvtypes::TRVAnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall AddControlEx(const Rvtypes::TRVAnsiString Name, Controls::TControl* ctrl, int ParaNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall AddHotPicture(const Rvtypes::TRVAnsiString Name, Graphics::TGraphic* gr, int ParaNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall AddHotPictureTag(const Rvtypes::TRVAnsiString 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 System::UnicodeString CpName, bool RaiseEvent, int Tag);
	void __fastcall SetCheckpointInfo(int ItemNo, int ATag, const System::UnicodeString 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 System::UnicodeString 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, System::UnicodeString &Name, bool &RaiseEvent);
	void __fastcall GetBreakInfo(int ItemNo, Rvstyle::TRVStyleLength &AWidth, Rvstyle::TRVBreakStyle &AStyle, Graphics::TColor &AColor, int &ATag);
	void __fastcall GetBulletInfo(int ItemNo, Rvtypes::TRVAnsiString &AName, int &AImageIndex, Imglist::TCustomImageList* &AImageList, int &ATag);
	void __fastcall GetHotspotInfo(int ItemNo, Rvtypes::TRVAnsiString &AName, int &AImageIndex, int &AHotImageIndex, Imglist::TCustomImageList* &AImageList, int &ATag);
	void __fastcall GetPictureInfo(int ItemNo, Rvtypes::TRVAnsiString &AName, Graphics::TGraphic* &Agr, Rvstyle::TRVVAlign &AVAlign, int &ATag);
	void __fastcall GetControlInfo(int ItemNo, Rvtypes::TRVAnsiString &AName, Controls::TControl* &Actrl, Rvstyle::TRVVAlign &AVAlign, int &ATag);
	void __fastcall GetTextInfo(int ItemNo, System::UnicodeString &AText, int &ATag);
	void __fastcall SetGrouped(int ItemNo, bool Grouped);
	void __fastcall SetBreakInfo(int ItemNo, Rvstyle::TRVStyleLength AWidth, Rvstyle::TRVBreakStyle AStyle, Graphics::TColor AColor, int ATag);
	void __fastcall SetBulletInfo(int ItemNo, const Rvtypes::TRVAnsiString AName, int AImageIndex, Imglist::TCustomImageList* AImageList, int ATag);
	void __fastcall SetHotspotInfo(int ItemNo, const Rvtypes::TRVAnsiString AName, int AImageIndex, int AHotImageIndex, Imglist::TCustomImageList* AImageList, int ATag);
	bool __fastcall SetPictureInfo(int ItemNo, const Rvtypes::TRVAnsiString AName, Graphics::TGraphic* Agr, Rvstyle::TRVVAlign AVAlign, int ATag);
	bool __fastcall SetControlInfo(int ItemNo, const Rvtypes::TRVAnsiString 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(System::WideChar ch);
	bool __fastcall EnumItems(TRVEnumItemsProc Proc, int &UserData1, const System::UnicodeString 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);
	Rvtypes::TRVRawByteString __fastcall ReplaceTabs(const Rvtypes::TRVRawByteString s, int StyleNo, bool UnicodeDef);
	void __fastcall AdjustInItemsRange(int &ItemNo);
	virtual Graphics::TColor __fastcall GetColor(void);
	DYNAMIC Rvdocparams::TRVDocParameters* __fastcall GetDocParameters(bool AllowCreate);
	DYNAMIC void __fastcall ConvertToDifferentUnits(Rvstyle::TRVStyleUnits NewUnits, Rvstyle::TRVStyle* RVStyle, bool ConvertItems);
	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 L"fixed"
#define cssBKAttStrScroll L"scroll"
#define cssBKRepStrRepeat L"repeat"
#define cssBKRepStrNoRepeat L"no-repeat"
extern PACKAGE StaticArray<char *, 9> rv_cssBkAttachment;
extern PACKAGE StaticArray<char *, 9> rv_cssBkRepeat;
extern PACKAGE Graphics::TGraphicClass RVPngGraphiClass;
extern PACKAGE void __fastcall RVCheckUni(int Length);
extern PACKAGE void __fastcall RV_RegisterHTMLGraphicFormat(Graphics::TGraphicClass ClassType);
extern PACKAGE bool __fastcall RV_IsHTMLGraphicFormat(Graphics::TGraphic* gr);
extern PACKAGE void __fastcall RV_RegisterPngGraphic(Graphics::TGraphicClass ClassType);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall StringToHTMLString(const System::UnicodeString s, Rvstyle::TRVSaveOptions Options, Rvstyle::TRVStyle* RVStyle);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall StringToHTMLString2(const System::UnicodeString s, Rvstyle::TRVSaveOptions Options, Rvstyle::TRVCodePage CodePage);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall StringToHTMLString3(const System::UnicodeString 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	// CrvdataHPP
