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

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

#ifndef CrvfdataHPP
#define CrvfdataHPP

#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 <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Clipbrd.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Rvfuncs.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Crvdata.hpp>	// Pascal unit
#include <Dlines.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Rvback.hpp>	// Pascal unit
#include <Rvuni.hpp>	// Pascal unit
#include <Activex.hpp>	// Pascal unit
#include <Rvdragdrop.hpp>	// Pascal unit
#include <Rvclasses.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit

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

namespace Crvfdata
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TRVJumpInfo;
class DELPHICLASS TCustomRVFormattedData;
class DELPHICLASS TRVSelectingInfo;
#pragma option push -b-
enum TRVSelectingState { rvsesInWord, rvsesOutsideWord, rvsesFreeMode, rvsesParaMode };
#pragma option pop

class PASCALIMPLEMENTATION TRVSelectingInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	int DrawItemSOffs;
	int DrawItemEOffs;
	int DrawItemSWordOffs1;
	int DrawItemSWordOffs2;
	int DrawItemEWordOffs1;
	int DrawItemEWordOffs2;
	int DrawItemSNo;
	int DrawItemENo;
	TRVSelectingState SWordState;
	TRVSelectingState EWordState;
	void __fastcall InitE(TRVSelectingState ASWordState);
	bool __fastcall IsAboveSWord(int ADrawItemNo, int ADrawItemOffs);
	bool __fastcall IsBelowSWord(int ADrawItemNo, int ADrawItemOffs);
	bool __fastcall IsInSWord(int ADrawItemNo, int ADrawItemOffs);
	bool __fastcall AreWordsEqual(void);
	bool __fastcall IsEWord(int ADrawItemNo, int ADrawItemWordOffs1, int ADrawItemWordOffs2);
	bool __fastcall IsEFreeStateNeeded(int ADrawItemNo, int ADrawItemOffs);
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVSelectingInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVSelectingInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVSoftPageBreakList;
class PASCALIMPLEMENTATION TRVSoftPageBreakList : public Rvclasses::TRVList 
{
	typedef Rvclasses::TRVList inherited;
	
public:
	#pragma option push -w-inl
	/* TRVList.Destroy */ inline __fastcall virtual ~TRVSoftPageBreakList(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVSoftPageBreakList(void) : Rvclasses::TRVList() { }
	#pragma option pop
	
};


#pragma option push -b-
enum TRVRepaintOperation { rvrrInvalidate, rvrrUpdate };
#pragma option pop

typedef void __fastcall (__closure *TRVRepaintEvent)(Controls::TControl* Sender, TRVRepaintOperation Operation, Types::PRect Rect);

struct TRVFormatParams;
class DELPHICLASS TRVFontInfoCache;
class DELPHICLASS TRVDragDropCaretInfo;
class PASCALIMPLEMENTATION TCustomRVFormattedData : public Crvdata::TCustomRVData 
{
	typedef Crvdata::TCustomRVData inherited;
	
private:
	Rvitem::TRVCPInfo* LastRaisedCP;
	Controls::TMouseMoveEvent FXORDrawing;
	Rvitem::TCustomRVItemInfo* FCaptureMouseItem;
	TRVSelectingInfo* FSelectingInfo;
	int __fastcall FindDrawItemAtPos(int X, int Y);
	void __fastcall CopyTextA_(void);
	void __fastcall CopyTextW_(void);
	void __fastcall CopyImage_(void);
	void __fastcall CopyRVF_(Graphics::TColor Color, Rvback::TRVBackground* Background);
	void __fastcall CopyRTF_(Graphics::TColor Color, Rvback::TRVBackground* Background);
	void __fastcall StartFormatting(void);
	void __fastcall EndFormatting(void);
	void __fastcall SearchHotItem(int X, int Y, int HOffs, int VOffs);
	void __fastcall AdjustSelection(void);
	
protected:
	bool XorImageDrawn;
	int MouseX;
	int MouseY;
	Classes::TList* Jumps;
	int nJmps;
	int LastItemFormatted;
	int LastJumpMovedAbove;
	int LastDIMovedAbove;
	TCustomRVFormattedData* LastRVDataMovedAbove;
	int LastJumpDowned;
	Rvitem::TCustomRVItemInfo* FPartialSelectedItem;
	bool AlreadyFormatted;
	TRVSoftPageBreakList* FSoftPageBreaks;
	int FClickedDrawItemNo;
	TRVRepaintEvent FOnRepaint;
	virtual TRVSoftPageBreakList* __fastcall GetSoftPageBreaks(void);
	DYNAMIC Controls::TControl* __fastcall GetInplaceEditor(void);
	DYNAMIC void __fastcall DestroyInplaceEditor(void);
	void __fastcall ClearLastJump(void);
	bool __fastcall IsDrawItemParaStart(int DrawItemNo);
	bool __fastcall IsDrawItemItemStart(int DrawItemNo);
	bool __fastcall IsDrawItemParaSectionStart(int DrawItemNo);
	bool __fastcall IsDrawItemParaEnd(int DrawItemNo);
	bool __fastcall IsDrawItemFromNewLine(int DrawItemNo);
	bool __fastcall IsDrawItemLastOnWrappedLine(int DrawItemNo);
	int __fastcall GetDrawItemStyle(int DrawItemNo);
	bool __fastcall IsSpaceBetweenDrawItems(int DrawItemNo);
	virtual void __fastcall PostPaintTo(Graphics::TCanvas* Canvas, int HOffs, int VOffs, int FirstDrawItemNo, int LastDrawItemNo, bool PrintMode, bool StrictTop, bool StrictBottom);
	void __fastcall FindDrawItemForSel(int X, int Y, int &No, int &Offs, bool Strict, bool IgnoreFloating);
	int __fastcall FindFloatingAt(int DItemNo, int X, int Y);
	bool __fastcall AdjustSelectionByMode(int X, int Y);
	bool __fastcall AdjustLineSelection(int X, int Y);
	bool __fastcall ExpandSelectionToParagraph(bool OnlyIfMultiple);
	void __fastcall ExpandSelectionToLines(bool OneLine);
	DYNAMIC void __fastcall DeselectPartiallySelectedItem(Rvitem::TCustomRVItemInfo* NewPartiallySelected);
	virtual void __fastcall SetPartialSelectedItem(Rvitem::TCustomRVItemInfo* Item);
	bool __fastcall IsSelectionTopDown(void);
	bool __fastcall DItem_InsideSelection(int DItemNo, int DItemOffs, bool IncludeBorders);
	Types::TRect __fastcall GetClientSelectionRect();
	void __fastcall DrawDragDropCaret(Graphics::TCanvas* Canvas, bool OnlyForSelf);
	DYNAMIC bool __fastcall CanStartDragging(void);
	DYNAMIC bool __fastcall InitDragging(Rvdragdrop::TRVDropSource* &DropSource, int &OKEffect);
	DYNAMIC void __fastcall DoneDragging(bool FDeleteSelection);
	DYNAMIC void __fastcall SetClickCoords(int X, int Y);
	DYNAMIC bool __fastcall CanStartDragBecauseMouseMoved(int X, int Y);
	Graphics::TCanvas* __fastcall GetFormatCanvas(void);
	virtual Graphics::TCanvas* __fastcall GetFormatCanvasEx(Graphics::TCanvas* DefCanvas);
	void __fastcall FinishScreenLine(const Rvstyle::TRVScreenAndDevice &sad, bool parafinished, int &ExtraSpace, TRVFormatParams &Params);
	void __fastcall UpdateLastTab(TRVFormatParams &Params);
	void __fastcall FormatAddFloating(TRVFormatParams &Params, const Rvstyle::TRVScreenAndDevice &sad, int DrawItemNo, int &Y);
	void __fastcall FormatLine(const AnsiString Text, const AnsiString OrigText, int StartOffs, int Len, int ItemNo, Graphics::TCanvas* Canvas, Rvstyle::TRVScreenAndDevice &sad, TRVFormatParams &Params);
	void __fastcall FormatWords(int ItemNo, Graphics::TCanvas* Canvas, Rvstyle::TRVScreenAndDevice &sad, TRVFormatParams &Params);
	virtual void __fastcall GetSADForFormatting(Graphics::TCanvas* Canvas, Rvstyle::TRVScreenAndDevice &sad);
	DYNAMIC void __fastcall Formatted(int FirstItemNo, int LastItemNo, bool Partial);
	DYNAMIC void __fastcall DoAfterFormat(void);
	void __fastcall ConcateItems(int FirstItemNo);
	bool __fastcall InsideWord(int DrawItemNo, int DrawItemOffs);
	void __fastcall GetWordBounds(int DrawItemNo, int DrawItemOffs, int &DrawItemWordOffs1, int &DrawItemWordOffs2);
	void __fastcall GetScreenLineBounds(int DrawItemNo, int &First, int &Last);
	DYNAMIC void __fastcall AfterDeleteStyles(Rvitem::TRVDeleteUnusedStylesData* Data);
	virtual void __fastcall InternalFreeItem(Rvitem::TCustomRVItemInfo* item, bool Clearing);
	void __fastcall ApplyZoom(Graphics::TCanvas* Canvas);
	void __fastcall ZoomRectDown(Types::TRect &r);
	void __fastcall ZoomInt(int &v);
	void __fastcall RestoreZoom(Graphics::TCanvas* Canvas);
	virtual bool __fastcall GetFirstItemMarker(int &ListNo, int &Level);
	void __fastcall GetIndents(int ItemNo, bool IsParaStart, int &FirstParaItemNo, int &LeftIndent, int &RightIndent, int &FirstIndent);
	virtual int __fastcall GetRVDataExtraVOffs(void);
	Rvstyle::TRVListLevel* __fastcall GetListLevelForItem(int ItemNo);
	int __fastcall GetMaxIndent(int ItemNo, int &FirstParaItemNo);
	DYNAMIC void __fastcall RVFGetLimits(Crvdata::TRVFSaveScope SaveScope, int &StartItem, int &EndItem, int &StartOffs, int &EndOffs, Rvitem::TRVMultiDrawItemPart* &StartPart, Rvitem::TRVMultiDrawItemPart* &EndPart, Rvitem::TCustomRVItemInfo* &SelectedItem);
	DYNAMIC void __fastcall GetMouseClientCoords(Controls::TWinControl* Control, int &X, int &Y);
	DYNAMIC void __fastcall LiveSpellingCheckCurrentItem(void);
	
public:
	Rvitem::TCustomRVItemInfo* FActiveItem;
	int DocumentWidth;
	int DocumentHeight;
	int TextWidth;
	int FocusedItemNo;
	Dlines::TRVDrawLines* DrawItems;
	int FSelStartNo;
	int FSelEndNo;
	int FSelStartOffs;
	int FSelEndOffs;
	DYNAMIC void __fastcall CreateFontInfoCache(Graphics::TCanvas* ACanvas, Graphics::TCanvas* AFormatCanvas);
	DYNAMIC void __fastcall DestroyFontInfoCache(TRVFontInfoCache* &Cache);
	DYNAMIC TRVFontInfoCache* __fastcall GetFontInfoCache(Graphics::TCanvas* ACanvas, Graphics::TCanvas* AFormatCanvas, TCustomRVFormattedData* RVData);
	__fastcall TCustomRVFormattedData(void);
	__fastcall virtual ~TCustomRVFormattedData(void);
	virtual void __fastcall ClearTemporal(void);
	DYNAMIC void __fastcall Clear(void);
	void __fastcall AssignSoftPageBreaks(Classes::TComponent* RVPrint);
	void __fastcall AssignSoftPageBreak(TCustomRVFormattedData* CustomMultiPagePtblRVData, int PageNo);
	bool __fastcall ClearSoftPageBreaks(void);
	int __fastcall GetNextFocusedItem(int ItemNo, bool GoForward, TCustomRVFormattedData* &TopLevelRVData, int &TopLevelItemNo);
	void __fastcall ClearFocus(void);
	DYNAMIC void __fastcall AdjustFocus(int NewFocusedItemNo, Classes::TPersistent* TopLevelRVData, int TopLevelItemNo);
	DYNAMIC bool __fastcall AllowAnimation(void);
	DYNAMIC void __fastcall InsertAnimator(System::TObject* &Animator);
	DYNAMIC void __fastcall ResetAniBackground(void);
	virtual void __fastcall GetOrigin(int &ALeft, int &ATop);
	DYNAMIC void __fastcall GetOriginEx(int &ALeft, int &ATop);
	void __fastcall ConvertCoordToAbsRootData(int &X, int &Y);
	virtual int __fastcall GetAreaWidth(void) = 0 ;
	virtual int __fastcall GetAreaHeight(void) = 0 ;
	virtual int __fastcall GetLeftMargin(void) = 0 ;
	virtual int __fastcall GetRightMargin(void) = 0 ;
	virtual int __fastcall GetTopMargin(void) = 0 ;
	virtual int __fastcall GetBottomMargin(void) = 0 ;
	virtual int __fastcall GetMinTextWidth(void) = 0 ;
	virtual int __fastcall GetMaxTextWidth(void) = 0 ;
	virtual int __fastcall GetWidth(void) = 0 ;
	virtual int __fastcall GetHeight(void) = 0 ;
	virtual void __fastcall SetDocumentAreaSize(int Width, int Height, bool UpdateH) = 0 ;
	int __fastcall CalculateEmptyParaSectionWidth(int ItemNo, int &FirstParaItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas);
	int __fastcall CalculateParaSectionMinWidth(int StartItemNo, int &FirstParaItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas);
	int __fastcall CalculateMinItemsWidthNoWrap(int StartItemNo, int EndItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas, bool IgnoreFloating);
	int __fastcall CalculateParaSectionMinWidthDef(int StartItemNo);
	int __fastcall CalculateParaSectionsMinWidth(int StartItemNo, int EndItemNo, int &FirstParaItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas);
	int __fastcall CalculateParaSectionsMinWidthDef(int StartItemNo, int EndItemNo);
	int __fastcall CalculateMinItemWidthWrap(int ItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas, bool IgnoreFloating);
	int __fastcall CalculateMinItemsWidthPlusWrap(int StartItemNo, int EndItemNo, int &FirstParaItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas);
	int __fastcall CalculateMinItemWidthPlusEx(int ItemNo);
	int __fastcall CalculateMinItemsWidthPlusEx(int StartItemNo, int EndItemNo);
	int __fastcall CalculateMinDocWidthPlus(int FirstItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas);
	int __fastcall CalculateMinWidthAfterInsert(Rvitem::TCustomRVItemInfo* item, int InsertItemNo);
	int __fastcall CalculateMinLineWidth(int FirstItemNo, Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas);
	DYNAMIC void __fastcall ResetSubCoords(void);
	int __fastcall GetDrawItemNo(int BoundLine, int Option);
	bool __fastcall GetItemCoords(int ItemNo, int &Left, int &Top);
	bool __fastcall GetItemClientCoords(int ItemNo, int &Left, int &Top);
	DYNAMIC Types::TPoint __fastcall ClientToScreen(const Types::TPoint &p);
	DYNAMIC Types::TPoint __fastcall ScreenToClient(const Types::TPoint &p);
	DYNAMIC void __fastcall AdjustSpecialControlsCoords(TCustomRVFormattedData* RVData);
	void __fastcall AdjustChildrenCoords(void);
	void __fastcall GetWordAtR(int X, int Y, TCustomRVFormattedData* &RVData, int &ItemNo, AnsiString &Word);
	bool __fastcall FindWordAtR(AnsiString &Word, int X, int Y, int &StyleNo, int &ItemNo, int &Offs, TCustomRVFormattedData* &RVData, bool ClientCoords);
	void __fastcall GetItemAt(int X, int Y, int &ItemNo, int &OffsetInItem);
	void __fastcall GetItemAtEx(int X, int Y, TCustomRVFormattedData* &RVData, int &ItemNo, int &OffsetInItem, bool Strict, bool &InSubRVDataOwnerItem);
	DYNAMIC void __fastcall ShowRectangle(int Left, int Top, int Width, int Height);
	virtual void __fastcall AdjustVScrollUnits(void) = 0 ;
	virtual int __fastcall GetHOffs(void);
	virtual int __fastcall GetVOffs(void);
	int __fastcall GetZHOffs(void);
	int __fastcall GetZVOffs(void);
	virtual void __fastcall ScrollTo(int Y, bool Redraw) = 0 ;
	virtual void __fastcall HScrollTo(int X) = 0 ;
	virtual int __fastcall GetVSmallStep(void) = 0 ;
	void __fastcall AfterVScroll(void);
	void __fastcall OnTimerScroll(void);
	DYNAMIC void __fastcall DoCopy(void);
	DYNAMIC bool __fastcall IsAssignedCopy(void);
	DYNAMIC bool __fastcall IsAssignedRVMouseUp(void) = 0 ;
	DYNAMIC bool __fastcall IsAssignedRVMouseDown(void) = 0 ;
	DYNAMIC bool __fastcall IsAssignedRVRightClick(void);
	DYNAMIC bool __fastcall IsAssignedJump(void) = 0 ;
	DYNAMIC bool __fastcall IsAssignedRVDblClick(void);
	DYNAMIC bool __fastcall IsAssignedCheckpointVisible(void) = 0 ;
	DYNAMIC void __fastcall DoRVMouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int ItemNo, int X, int Y) = 0 ;
	DYNAMIC void __fastcall DoRVMouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int ItemNo, int X, int Y) = 0 ;
	DYNAMIC void __fastcall DoRVRightClick(const AnsiString ClickedWord, int StyleNo, int X, int Y);
	DYNAMIC void __fastcall DoJump(int id) = 0 ;
	DYNAMIC void __fastcall DoGetItemCursor(Crvdata::TCustomRVData* RVData, int ItemNo, Controls::TCursor &Cursor);
	DYNAMIC void __fastcall DoRVMouseMove(int id) = 0 ;
	DYNAMIC void __fastcall DoRVDblClick(const AnsiString ClickedWord, int StyleNo);
	DYNAMIC void __fastcall DoSelect(void);
	DYNAMIC void __fastcall DoCheckpointVisible(Rvstyle::TCheckpointData CheckpointData) = 0 ;
	DYNAMIC void __fastcall DoCurrentTextStyleConversion(int &StyleNo, int ParaStyleNo, int ItemNo, int UserData, bool ToWholeParagraphs);
	DYNAMIC void __fastcall DoDrawHyperlink(Crvdata::TCustomRVData* RVData, int ItemNo, const Types::TRect &R);
	DYNAMIC Controls::TCursor __fastcall GetNormalCursor(void) = 0 ;
	DYNAMIC Rvscroll::TCPEventKind __fastcall GetCPEventKind(void);
	virtual Rvback::TRVBackground* __fastcall GetBackground(void) = 0 ;
	virtual Graphics::TCanvas* __fastcall GetCanvas(void);
	DYNAMIC void __fastcall SetCursor(Controls::TCursor Cursor);
	DYNAMIC Controls::TWinControl* __fastcall GetEditor(void);
	void __fastcall MouseLeave(void);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	void __fastcall DblClick(void);
	void __fastcall DblClickAt(const Types::TPoint &p);
	DYNAMIC void __fastcall AdjustMouseUpSelection(void);
	void __fastcall SetMouseCapture(Rvitem::TCustomRVItemInfo* Item, int &Left, int &Top);
	void __fastcall ReleaseMouseCapture(Rvitem::TCustomRVItemInfo* Item);
	DYNAMIC TRVDragDropCaretInfo* __fastcall GetDragDropCaretInfo(void);
	void __fastcall SetDragDropCaretTo(int X, int Y);
	void __fastcall RemoveDragDropCaret(void);
	void __fastcall SetDragDropCaret(int ItemNo, int Offs);
	void __fastcall DoDrag(void);
	DYNAMIC bool __fastcall IsDragging(void);
	bool __fastcall CanInsertHere(int ItemNo, int Offs);
	bool __fastcall IsProtected(int ItemNo, Rvstyle::TRVProtectOption Option);
	bool __fastcall IsParaProtected(int ParaNo, Rvstyle::TRVParaOption Option);
	bool __fastcall IsItemParaProtected(int ItemNo);
	bool __fastcall IsSticking(int FirstItemNo, bool NoSound);
	virtual void __fastcall DrawBackground(Graphics::TCanvas* Canvas, const Types::TRect &r);
	void __fastcall PaintTo(Graphics::TCanvas* Canvas, const Types::TRect &AClipRect, bool StrictTop, bool StrictBottom, bool InplaceOnMainCanvas, bool PrintMode, int ExtraXOffs, int ExtraYOffs);
	virtual void __fastcall GetItemBackground(int ItemNo, const Types::TRect &r, bool MakeImageRect, Graphics::TColor &Color, Graphics::TBitmap* &bmp, bool &UseBitmap);
	void __fastcall InvalidateJumpRect(int id);
	void __fastcall Refresh(void);
	void __fastcall UpdateView(void);
	void __fastcall Invalidate(void);
	void __fastcall InvalidateRect(const Types::TRect &r);
	void __fastcall UpdateBackgroundPaletteInfo(Rvback::TRVBackground* Background);
	bool __fastcall UpdatingBackgroundPalette(void);
	virtual void __fastcall XorDrawing(void);
	void __fastcall XorDrawingEx(int X, int Y);
	bool __fastcall ClearXorDrawing(void);
	void __fastcall AssignXorDrawing(Controls::TMouseMoveEvent P);
	bool __fastcall UsingThisXorDrawing(Controls::TMouseMoveEvent P);
	void __fastcall UnAssignXorDrawing(Controls::TMouseMoveEvent P);
	TMetaClass* __fastcall GetStandardDrawLineInfoClass(Rvitem::TCustomRVItemInfo* item, Rvstyle::TParaInfo* para);
	void __fastcall AdjustDrawItemsForFormatParas(int &StartDrawItemNo, int &EndDrawItemNo, int ItemsInserted);
	void __fastcall FormatParas(int StartDrawItemNo, int EndDrawItemNo, int ItemsInserted, bool UpdateParentControl);
	void __fastcall FormatParasExact(int StartDrawItemNo, int EndDrawItemNo, int ItemsInserted, bool NoCaching, bool UpdateParentControl = true);
	virtual void __fastcall Format_(bool OnlyResized, bool ForceFormat, bool NoScroll, int depth, Graphics::TCanvas* Canvas, bool OnlyTail, bool NoCaching, bool Reformatting);
	void __fastcall Format(bool NoCaching);
	void __fastcall ChangeDItemWidth(int DItemNo, int NewWidth);
	void __fastcall DoSetSelectionBounds(int StartItemNo, int StartItemOffs, int EndItemNo, int EndItemOffs);
	void __fastcall SetSelectionBounds(int StartItemNo, int StartItemOffs, int EndItemNo, int EndItemOffs);
	bool __fastcall SearchTextR(bool Down, bool MatchCase, bool WholeWord, bool FromStart, bool Unicode, bool MultiItem, AnsiString s);
	void __fastcall SelectWordAt(int X, int Y);
	bool __fastcall SelectControl(Controls::TControl* AControl);
	DYNAMIC void __fastcall Deselect(Rvitem::TCustomRVItemInfo* NewPartiallySelected, bool MakeEvent);
	void __fastcall SelectAll(void);
	void __fastcall SelectLine(int ItemNo, int Offs);
	void __fastcall RestoreSelBounds(int StartNo, int EndNo, int StartOffs, int EndOffs);
	DYNAMIC void __fastcall SrchSelectIt(int StartItemNo, int StartOffs, int EndItemNo, int EndOffs, bool Invert);
	DYNAMIC void __fastcall SrchStart(bool Down, bool FromStart, int &strt, int &offs);
	DYNAMIC void __fastcall AssignChosenRVData(TCustomRVFormattedData* RVData, Rvitem::TCustomRVItemInfo* Item);
	DYNAMIC void __fastcall SilentReplaceChosenRVData(TCustomRVFormattedData* RVData);
	DYNAMIC void __fastcall UnassignChosenRVData(Crvdata::TCustomRVData* RVData);
	void __fastcall ChooseMe(void);
	bool __fastcall SelectionExists(bool AllowReset, bool UsePartialSelected);
	void __fastcall GetSelectionBounds(int &StartItemNo, int &StartItemOffs, int &EndItemNo, int &EndItemOffs, bool Normalize);
	DYNAMIC void __fastcall GetSelBounds(int &StartNo, int &EndNo, int &StartOffs, int &EndOffs, bool Normalize);
	void __fastcall StoreSelBounds(int &StartNo, int &EndNo, int &StartOffs, int &EndOffs, bool Normalize);
	DYNAMIC void __fastcall GetSelectionBoundsEx(int &StartItemNo, int &StartItemOffs, int &EndItemNo, int &EndItemOffs, bool Normalize);
	DYNAMIC void __fastcall GetSelStart(int &DINo, int &DIOffs);
	AnsiString __fastcall GetSelTextR(bool Unicode);
	Graphics::TGraphic* __fastcall GetSelectedImage(void);
	Types::TRect __fastcall GetSelectionRect();
	DYNAMIC void __fastcall DoOnSelection(bool AllowScrolling);
	bool __fastcall Item_InsideSelection(int ItemNo, int ItemOffs, bool IncludeBorders);
	void __fastcall GetCheckpointXY(Rvstyle::TCheckpointData CheckpointData, int &X, int &Y);
	int __fastcall GetCheckpointYEx(Rvstyle::TCheckpointData CheckpointData);
	void __fastcall BuildJumpsCoords(int &StartJumpNo, Classes::TList* jumps);
	void __fastcall ClearJumps(void);
	void __fastcall AdjustJumpsCoords(void);
	int __fastcall GetJumpPointY(int id);
	int __fastcall GetJumpPointItemNo(int id);
	void __fastcall GetJumpPointLocation(int id, TCustomRVFormattedData* &RVData, int &ItemNo);
	void __fastcall CopyRVF(Graphics::TColor Color, Rvback::TRVBackground* Background);
	void __fastcall CopyRTF(Graphics::TColor Color, Rvback::TRVBackground* Background);
	void __fastcall CopyTextA(void);
	void __fastcall CopyTextW(void);
	void __fastcall CopyText(void);
	void __fastcall CopyImage(void);
	void __fastcall Copy(Graphics::TColor Color, Rvback::TRVBackground* Background);
	bool __fastcall CopyDef(Graphics::TColor Color, Rvback::TRVBackground* Background);
	int __fastcall GetLineNo(int ItemNo, int ItemOffs);
	void __fastcall GetParaBounds(int DINo1, int DINo2, int &ParaStart, int &ParaEnd);
	int __fastcall GetFirstVisible(int TopLine);
	DYNAMIC int __fastcall GetFirstItemVisible(void);
	DYNAMIC int __fastcall GetLastItemVisible(void);
	int __fastcall GetOffsBeforeDrawItem(int DrawItemNo);
	int __fastcall GetOffsAfterDrawItem(int DrawItemNo);
	void __fastcall DrawItem2Item(int DrawItemNo, int DrawItemOffs, int &ItemNo, int &ItemOffs);
	void __fastcall Item2DrawItem(int ItemNo, int ItemOffs, int &DrawItemNo, int &DrawItemOffs);
	void __fastcall Item2FirstDrawItem(int ItemNo, int &DrawItemNo);
	void __fastcall Item2LastDrawItem(int ItemNo, int &DrawItemNo);
	int __fastcall FindDrawItemByItem(int ItemNo);
	void __fastcall InvalidateDrawItem(int DrawItemNo, int Spacing);
	DYNAMIC void __fastcall DeleteItems(int FirstItemNo, int Count);
	void __fastcall DeleteParas(int FirstItemNo, int LastItemNo);
	void __fastcall Normalize(void);
	DYNAMIC void __fastcall SetControlHint(const AnsiString Hint);
	__property Rvitem::TCustomRVItemInfo* PartialSelectedItem = {read=FPartialSelectedItem, write=SetPartialSelectedItem};
	__property Rvitem::TCustomRVItemInfo* CaptureMouseItem = {read=FCaptureMouseItem};
	__property TRVSoftPageBreakList* SoftPageBreaks = {read=GetSoftPageBreaks};
	bool __fastcall IsMultiParagraphSelection(void);
	__property TRVRepaintEvent OnRepaint = {read=FOnRepaint, write=FOnRepaint};
};


class PASCALIMPLEMENTATION TRVJumpInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TCustomRVFormattedData* RVData;
	int l;
	int t;
	int w;
	int h;
	int id;
	int DrawItemNo;
	Controls::TCursor Cursor;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVJumpInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVJumpInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVSoftPageBreakInfo;
class PASCALIMPLEMENTATION TRVSoftPageBreakInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	int ItemNo;
	int Offset;
	int ExtraData;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVSoftPageBreakInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVSoftPageBreakInfo(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TRVDataDrawHyperlinkEvent)(Crvdata::TCustomRVData* RVData, int ItemNo, const Types::TRect &R);

class PASCALIMPLEMENTATION TRVDragDropCaretInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	int X;
	int Y;
	int Height;
	int ItemNo;
	int ItemOffs;
	Crvdata::TCustomRVData* RVData;
	int RefCount;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVDragDropCaretInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVDragDropCaretInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVFontInfoCacheItem;
class PASCALIMPLEMENTATION TRVFontInfoCacheItem : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	Rvscroll::TRVBiDiMode LastBiDiMode;
	Graphics::TCanvas* Canvas;
	tagTEXTMETRICA TextMetric;
	Rvstyle::TRVExtraFontInfo ExtraFontInfo;
	Rvstyle::TFontInfo* FontInfo;
	int VerticalOffset;
	int EmptyLineHeight;
	int HyphenWidth;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TRVFontInfoCacheItem(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRVFontInfoCacheItem(void) { }
	#pragma option pop
	
};


typedef TRVFontInfoCacheItem* *PRVFontInfoCacheItem;

class PASCALIMPLEMENTATION TRVFontInfoCache : public Rvclasses::TRVList 
{
	typedef Rvclasses::TRVList inherited;
	
public:
	TRVFontInfoCacheItem* operator[](int Index) { return Items[Index]; }
	
protected:
	Graphics::TCanvas* FCanvas;
	Graphics::TCanvas* FDrawCanvas;
	Rvstyle::TRVStyle* FRVStyle;
	bool FCanUseCustomPPI;
	System::TObject* FOwner;
	TRVFontInfoCacheItem* FInvalidItem;
	virtual TRVFontInfoCacheItem* __fastcall GetItems(int Index) = 0 ;
	
public:
	Rvscroll::TRVBiDiMode CurParaBiDiMode;
	bool IgnoreParaBiDiMode;
	int LastTextStyle;
	__fastcall virtual TRVFontInfoCache(const TCustomRVFormattedData* AData, const Rvstyle::TRVStyle* ARVStyle, const Graphics::TCanvas* ACanvas, const Graphics::TCanvas* ADrawCanvas, bool ACanUseCustomPPI);
	virtual void __fastcall Clear(void);
	__property TRVFontInfoCacheItem* Items[int Index] = {read=GetItems/*, default*/};
	__property System::TObject* Owner = {read=FOwner};
public:
	#pragma option push -w-inl
	/* TRVList.Destroy */ inline __fastcall virtual ~TRVFontInfoCache(void) { }
	#pragma option pop
	
};


struct TRVFormatParams
{
	
public:
	int x;
	int baseline;
	int prevdesc;
	int prevabove;
	bool IsParaStart;
	int LineWidth;
	int LineStartX;
	int LineStartY;
	int LastDrawItem;
	int VerticalOffs;
	int LeftIndent;
	int RightIndent;
	int FirstIndent;
	int LastTextStyle;
	int UnadjustedLeftIndent;
	int UnadjustedRightSide;
	int FirstParaItemNo;
	int LineHeightAbove;
	int LineHeightBelow;
	int TextLength;
	int MaxLength;
	bool NoCaching;
	bool Reformatting;
	bool DontFSL;
	bool NeedRecalcY;
	bool LineHasFloating;
	int LastTabDrawItemNo;
	Rvstyle::TRVTabAlign LastTabAlign;
	int LastTabPosition;
	bool SpaceEaten;
	TRVFontInfoCache* FontInfoCache;
	Graphics::TCanvas* FormatCanvas;
	HDC FormatCanvasHandle;
	tagTEXTMETRICA TextMetric;
	bool AllowWordWrap;
	Dlines::TRVFloatingDrawItems* FloatingDrawItems;
	Classes::TList* FloatingDrawItemsInThisParaSection;
	bool CanBeFloatingAtTheBeginning;
	bool MovedDownBecauseOfFloating;
	bool UseFormatCanvas;
} ;

//-- var, const, procedure ---------------------------------------------------
static const Shortint MINEXACTLINESPACING = 0x4;
extern PACKAGE bool RichViewSafeFormatting;
extern PACKAGE bool RichViewShowGhostSpaces;
extern PACKAGE bool RichViewWrapAnywhere;

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

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