// CodeGear C++Builder
// Copyright (c) 1995, 2010 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'SclRView.pas' rev: 22.00

#ifndef SclrviewHPP
#define SclrviewHPP

#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 <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <ActiveX.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <ImgList.hpp>	// Pascal unit
#include <Imm.hpp>	// Pascal unit
#include <SRVControl.hpp>	// Pascal unit
#include <RichView.hpp>	// Pascal unit
#include <RVEdit.hpp>	// Pascal unit
#include <CRVData.hpp>	// Pascal unit
#include <Printers.hpp>	// Pascal unit
#include <CRVFData.hpp>	// Pascal unit
#include <RVTable.hpp>	// Pascal unit
#include <RVTInplace.hpp>	// Pascal unit
#include <RVERVData.hpp>	// Pascal unit
#include <RVRTFProps.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <RVItem.hpp>	// Pascal unit
#include <DLines.hpp>	// Pascal unit
#include <SRVSkinManager.hpp>	// Pascal unit
#include <SRVSBar.hpp>	// Pascal unit
#include <SRVTabSet.hpp>	// Pascal unit
#include <SRVToolBar.hpp>	// Pascal unit
#include <SRVCtrl.hpp>	// Pascal unit
#include <RVScroll.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <CRVPP.hpp>	// Pascal unit
#include <RVRVData.hpp>	// Pascal unit
#include <RVDocParams.hpp>	// Pascal unit
#include <RVStr.hpp>	// Pascal unit
#include <RVTypes.hpp>	// Pascal unit
#include <RVFuncs.hpp>	// Pascal unit
#include <RVResize.hpp>	// Pascal unit
#include <RVNote.hpp>	// Pascal unit
#include <RVClasses.hpp>	// Pascal unit
#include <RVDragDrop.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit

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

namespace Sclrview
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TSRVRichViewEditType { srvrveMain, srvrveHeader, srvrveFooter };
#pragma option pop

#pragma option push -b-
enum TSRVItemResizeMode { srvrsUnrestricted, srvrsTextArea, srvrsPageWidth };
#pragma option pop

struct DECLSPEC_DRECORD TSRVItemInfo
{
	
public:
	int DrawItemNo;
	int ItemNo;
	int MinTop;
	int Top;
	int MaxBottom;
	int MaxPageH;
	int ParaLine;
	bool IsKeepNext;
	int KeepParaCount;
	int ParaRow;
	int KeepParaRow;
	int TotalNoteHeight;
	Rvnote::TCustomRVNoteItemInfo* StartNote;
	Rvnote::TCustomRVNoteItemInfo* EndNote;
};


struct DECLSPEC_DRECORD TDataCaretPos
{
	
public:
	int ItemNo1;
	int OffsetItemNo1;
	int ItemNo2;
	int OffsetItemNo2;
	Crvfdata::TCustomRVFormattedData* RVData;
};


struct DECLSPEC_DRECORD TSRVZoomInfo
{
	
public:
	int MapMode;
	tagSIZE WindowOrg;
	tagSIZE WindowExt;
	tagSIZE ViewportOrg;
	tagSIZE ViewportExt;
};


#pragma option push -b-
enum TSRVFixMarginsMode { srvfmmAutoCorrect, srvfmmIgnore };
#pragma option pop

#pragma option push -b-
enum TSRVWorkArea { srvwaTextRect, srvwaPageRect };
#pragma option pop

#pragma option push -b-
enum TSRVAlignPageH { srvaphLeft, srvaphRight, srvaphCenter };
#pragma option pop

#pragma option push -b-
enum TSRVAlignPageV { srvapvTop, srvapvCenter };
#pragma option pop

#pragma option push -b-
enum Sclrview__1 { srvmbLeft, srvmbRight, srvmbTop, srvmbBottom };
#pragma option pop

typedef System::Set<Sclrview__1, Sclrview__1::srvmbLeft, Sclrview__1::srvmbBottom>  TSRVMarginBounds;

#pragma option push -b-
enum TSRVViewMode { srvvmEditMode, srvvmPreviewMode };
#pragma option pop

#pragma option push -b-
enum TSRVPageFormat { srvfmCustom, srvfm4A0, srvfm2A0, srvfmA0, srvfmA1, srvfmA2, srvfmA3, srvfmA4, srvfmA5, srvfmA6, srvfmA7, srvfmA8, srvfmA9, srvfmA10, srvfmB0, srvfmB1, srvfmB2, srvfmB3, srvfmB4, srvfmB5, srvfmB6, srvfmB7, srvfmB8, srvfmB9, srvfmB10, srvfmC0, srvfmC1, srvfmC2, srvfmC3, srvfmC4, srvfmC5, srvfmC6, srvfmC7, srvfmC8, srvfmC9, srvfmC10, srvfmLetter, srvfmLegal, srvfmLedger, srvfmTabloid, srvfmStatement, srvfmQuarto, srvfmFoolscap, srvfmFolio, srvfmExecutive, srvfmMonarch, srvfmGovernmentLetter, srvfmPost, srvfmCrown, srvfmLargePost, srvfmDemy, srvfmMedium, srvfmRoyal, srvfmElephant, srvfmDoubleDemy, srvfmQuadDemy, srvfmIndexCard3_5, srvfmIndexCard4_6, srvfmIndexCard5_8, srvfmInternationalBusinessCard, srvfmUSBusinessCard, srvfmEmperor, 
	srvfmAntiquarian, srvfmGrandEagle, srvfmDoubleElephant, srvfmAtlas, srvfmColombier, srvfmImperial, srvfmDoubleLargePost, srvfmPrincess, srvfmCartridge, srvfmSheet, srvfmHalfPost, srvfmDoublePost, srvfmSuperRoyal, srvfmCopyDraught, srvfmPinchedPost, srvfmSmallFoolscap, srvfmBrief, srvfmPott, srvfmPA0, srvfmPA1, srvfmPA2, srvfmPA3, srvfmPA4, srvfmPA5, srvfmPA6, srvfmPA7, srvfmPA8, srvfmPA9, srvfmPA10, srvfmF4, srvfmA0a, srvfmJISB0, srvfmJISB1, srvfmJISB2, srvfmJISB3, srvfmJISB4, srvfmJISB5, srvfmJISB6, srvfmJISB7, srvfmJISB8, srvfmJISB9, srvfmJISB10, srvfmJISB11, srvfmJISB12, srvfmANSI_A, srvfmANSI_B, srvfmANSI_C, srvfmANSI_D, srvfmANSI_E, srvfmArch_A, srvfmArch_B, srvfmArch_C, srvfmArch_D, srvfmArch_E, srvfmArch_E1 };
#pragma option pop

#pragma option push -b-
enum TSRVHAlign { srvhaLeft, srvhaCenter, srvhaRight };
#pragma option pop

#pragma option push -b-
enum TSRVVAlign { srvvaUp, srvvaDown };
#pragma option pop

#pragma option push -b-
enum TSRVTBAlignH { srvtbaLeft, srvtbaRight };
#pragma option pop

#pragma option push -b-
enum TSRVTBAlignV { srvtbaTop, srvtbaBottom };
#pragma option pop

#pragma option push -b-
enum TSRVFillType { srvtfFlat, srvtfGradientH, srvtfGradientV };
#pragma option pop

#pragma option push -b-
enum TSRVPicturePosition { srvtpNone, srvtpTopLeft, srvtpCenter, srvtpTile, srvtpStretch, srvtpScale };
#pragma option pop

struct DECLSPEC_DRECORD TSRVTableInfo
{
	
public:
	int PageNo;
	int ItemNo;
	Types::TRect RectTable;
	Rvtable::TRVTableItemInfo* Table;
	Crvfdata::TCustomRVFormattedData* Parent;
};


typedef void __fastcall (__closure *TSRVPaintPage)(System::TObject* Sender, int PageNo, const Types::TRect &PageRect, const Types::TRect &R, Graphics::TCanvas* Canvas, bool Prepaint, bool Printing);

typedef void __fastcall (__closure *TSRVPageChange)(System::TObject* Sender, int FromPageNo, int ToPageNo, int PageCount);

class DELPHICLASS TSRichViewEdit;
typedef void __fastcall (__closure *TSRVMessageControl)(TSRichViewEdit* Sender, Controls::TControl* AControl, Messages::TMessage &Message);

typedef void __fastcall (__closure *TSRVCheckControl)(TSRichViewEdit* Sender, Controls::TControl* AControl);

typedef void __fastcall (__closure *TSRVMouseEvent)(TSRichViewEdit* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y, int PageNo);

typedef void __fastcall (__closure *TSRVGetPagePosEvent)(TSRichViewEdit* Sender, int PageNo, int StartItemNo, int EndItemNo, int OffsetInStartItem, int StartTableRow, int EndTableRow, Types::TPoint &Position, float &ZoomPercent, int &ZOrder);

typedef void __fastcall (__closure *TSRVMarginsChanged)(TSRichViewEdit* Sender, int &NewLeft, int &NewTop, int &NewRight, int &NewBottom, int OldLeft, int OldTop, int OldRight, int OldBottom);

typedef void __fastcall (__closure *TSRVChangeActiveEditorEvent)(TSRichViewEdit* Sender, Rvedit::TRichViewEdit* ActiveEditor);

typedef void __fastcall (__closure *TSRVChangeViewModeEvent)(TSRichViewEdit* Sender, TSRVViewMode Value);

typedef void __fastcall (__closure *TSRVResizeTable)(TSRichViewEdit* Sender, Rvtable::TRVTableItemInfo* Table);

typedef void __fastcall (__closure *TSRVResizeCell)(TSRichViewEdit* Sender, Rvtable::TRVTableCellData* Cell);

typedef void __fastcall (__closure *TSRVPaintEvent)(TSRichViewEdit* Sender, Graphics::TCanvas* Canvas, bool Prepaint, const Types::TRect &PaintRect);

typedef void __fastcall (__closure *TSRVDrawPageBreak)(TSRichViewEdit* Sender, Graphics::TCanvas* Canvas, int X1, int X2, int Y, bool IsSoftPageBreak);

typedef void __fastcall (__closure *TSRVComponentEvent)(TSRichViewEdit* Sender, Controls::TControl* PaintMe, Graphics::TCanvas* Canvas, const Types::TRect &ComponentRect, bool &isPaint);

typedef void __fastcall (__closure *TSRVCheckpointVisibleEvent)(TSRichViewEdit* Sender, Crvdata::TCustomRVData* RVData, int ItemNo);

typedef void __fastcall (__closure *TSRVDataDrawHyperlinkEvent)(TSRichViewEdit* Sender, Graphics::TCanvas* Canvas, Crvdata::TCustomRVData* RVData, int PageNo, int ItemNo, const Types::TRect &RepaintRect, const Types::TRect &R);

class DELPHICLASS TSRVMainPen;
class PASCALIMPLEMENTATION TSRVMainPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Color = {default=13269067};
	__property Style = {default=5};
public:
	/* TPen.Create */ inline __fastcall TSRVMainPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVMainPen(void) { }
	
};


class DELPHICLASS TSRVHeaderFooterPen;
class PASCALIMPLEMENTATION TSRVHeaderFooterPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Color = {default=13269067};
	__property Style = {default=2};
public:
	/* TPen.Create */ inline __fastcall TSRVHeaderFooterPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVHeaderFooterPen(void) { }
	
};


class DELPHICLASS TSRVHeaderFooterFont;
class PASCALIMPLEMENTATION TSRVHeaderFooterFont : public Graphics::TFont
{
	typedef Graphics::TFont inherited;
	
__published:
	__property Color = {default=10110987};
public:
	/* TFont.Create */ inline __fastcall TSRVHeaderFooterFont(void) : Graphics::TFont() { }
	/* TFont.Destroy */ inline __fastcall virtual ~TSRVHeaderFooterFont(void) { }
	
};


class DELPHICLASS TSRVCaretPen;
class PASCALIMPLEMENTATION TSRVCaretPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Color = {default=0};
	__property Width = {default=2};
public:
	/* TPen.Create */ inline __fastcall TSRVCaretPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVCaretPen(void) { }
	
};


class DELPHICLASS TSRVBorderPen;
class PASCALIMPLEMENTATION TSRVBorderPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Color = {default=4079166};
	__property Width = {default=1};
public:
	/* TPen.Create */ inline __fastcall TSRVBorderPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVBorderPen(void) { }
	
};


class DELPHICLASS TSRVPageNoFont;
class PASCALIMPLEMENTATION TSRVPageNoFont : public Graphics::TFont
{
	typedef Graphics::TFont inherited;
	
__published:
	__property Size = {default=8};
public:
	/* TFont.Create */ inline __fastcall TSRVPageNoFont(void) : Graphics::TFont() { }
	/* TFont.Destroy */ inline __fastcall virtual ~TSRVPageNoFont(void) { }
	
};


class DELPHICLASS TSRVMarginsPen;
class PASCALIMPLEMENTATION TSRVMarginsPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Color = {default=12632256};
	__property Style = {default=2};
public:
	/* TPen.Create */ inline __fastcall TSRVMarginsPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVMarginsPen(void) { }
	
};


class DELPHICLASS TSRVPAPen;
class PASCALIMPLEMENTATION TSRVPAPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Style = {default=5};
	__property Color = {default=255};
public:
	/* TPen.Create */ inline __fastcall TSRVPAPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVPAPen(void) { }
	
};


class DELPHICLASS TSRVPageBreakPen;
class PASCALIMPLEMENTATION TSRVPageBreakPen : public Graphics::TPen
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Style = {default=1};
	__property Color = {default=-16777200};
public:
	/* TPen.Create */ inline __fastcall TSRVPageBreakPen(void) : Graphics::TPen() { }
	/* TPen.Destroy */ inline __fastcall virtual ~TSRVPageBreakPen(void) { }
	
};


class DELPHICLASS TSRVPageBreak;
class PASCALIMPLEMENTATION TSRVPageBreak : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	TSRVPageBreakPen* FPen;
	System::UnicodeString FText;
	Classes::TAlignment FAlignment;
	
public:
	__fastcall TSRVPageBreak(void);
	__fastcall virtual ~TSRVPageBreak(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property TSRVPageBreakPen* Pen = {read=FPen, write=FPen};
	__property System::UnicodeString Text = {read=FText, write=FText};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=FAlignment, default=1};
};


class DELPHICLASS TSRVBackgroundProperty;
class PASCALIMPLEMENTATION TSRVBackgroundProperty : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	TSRichViewEdit* SRV;
	Graphics::TColor FGlobalPageBackgroundColor;
	Graphics::TColor FColorBegin;
	Graphics::TColor FColorMiddle;
	Graphics::TColor FColorEnd;
	TSRVFillType FFillType;
	TSRVPicturePosition FPicturePosition;
	Graphics::TPicture* FPicture;
	bool FVisible;
	float FPercentMiddle;
	Graphics::TColor FTransparentColor;
	void __fastcall SetGlobalPageBackgroundColor(const Graphics::TColor Value);
	void __fastcall SetColorBegin(const Graphics::TColor Value);
	void __fastcall SetColorMiddle(const Graphics::TColor Value);
	void __fastcall SetColorEnd(const Graphics::TColor Value);
	void __fastcall SetFillType(const TSRVFillType Value);
	void __fastcall SetPicturePosition(const TSRVPicturePosition Value);
	void __fastcall SetPicture(const Graphics::TPicture* Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall SetPercentMiddle(const float Value);
	void __fastcall SetTransparentColor(const Graphics::TColor Value);
	
protected:
	void __fastcall updateBG(void);
	
public:
	Graphics::TBitmap* Background;
	__fastcall TSRVBackgroundProperty(TSRichViewEdit* AOwner);
	__fastcall virtual ~TSRVBackgroundProperty(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Graphics::TColor GlobalPageBackgroundColor = {read=FGlobalPageBackgroundColor, write=SetGlobalPageBackgroundColor, default=536870911};
	__property Graphics::TColor ColorBegin = {read=FColorBegin, write=SetColorBegin, default=15187615};
	__property Graphics::TColor ColorMiddle = {read=FColorMiddle, write=SetColorMiddle, default=12420701};
	__property Graphics::TColor ColorEnd = {read=FColorEnd, write=SetColorEnd, default=13472101};
	__property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, default=536870911};
	__property float PercentMiddle = {read=FPercentMiddle, write=SetPercentMiddle};
	__property TSRVFillType FillType = {read=FFillType, write=SetFillType, default=0};
	__property TSRVPicturePosition PicturePosition = {read=FPicturePosition, write=SetPicturePosition, default=0};
	__property Graphics::TPicture* Picture = {read=FPicture, write=SetPicture};
	__property bool Visible = {read=FVisible, write=SetVisible, default=0};
};


class DELPHICLASS TSRVPropertyTBH;
class PASCALIMPLEMENTATION TSRVPropertyTBH : public Srvtoolbar::TSRVCustomPropertyTB
{
	typedef Srvtoolbar::TSRVCustomPropertyTB inherited;
	
private:
	bool FVisible;
	TSRVTBAlignH FAlign;
	void __fastcall setVisible(const bool Value);
	void __fastcall setAlign(const TSRVTBAlignH Value);
	
public:
	__fastcall TSRVPropertyTBH(Srvtoolbar::TSRVToolBar* SRVToolBar);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property Buttons;
	
__published:
	__property PenFrame;
	__property BorderWidth = {default=1};
	__property Color = {default=16777215};
	__property ColorSelect = {default=14857624};
	__property ColorDown = {default=15651521};
	__property ColorDisable = {default=12632256};
	__property Spacer = {default=0};
	__property ButtonWidth = {default=26};
	__property ImageList = {default=0};
	__property bool Visible = {read=FVisible, write=setVisible, default=0};
	__property TSRVTBAlignH Align = {read=FAlign, write=setAlign, default=0};
public:
	/* TSRVCustomPropertyTB.Destroy */ inline __fastcall virtual ~TSRVPropertyTBH(void) { }
	
};


class DELPHICLASS TSRVPropertyTBV;
class PASCALIMPLEMENTATION TSRVPropertyTBV : public Srvtoolbar::TSRVCustomPropertyTB
{
	typedef Srvtoolbar::TSRVCustomPropertyTB inherited;
	
private:
	bool FVisible;
	TSRVTBAlignV FAlign;
	void __fastcall setVisible(const bool Value);
	void __fastcall setAlign(const TSRVTBAlignV Value);
	
public:
	__fastcall TSRVPropertyTBV(Srvtoolbar::TSRVToolBar* SRVToolBar);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property Buttons;
	
__published:
	__property PenFrame;
	__property BorderWidth = {default=1};
	__property Color = {default=16777215};
	__property ColorSelect = {default=14857624};
	__property ColorDown = {default=15651521};
	__property ColorDisable = {default=12632256};
	__property Spacer = {default=0};
	__property ButtonHeight = {default=26};
	__property ImageList = {default=0};
	__property bool Visible = {read=FVisible, write=setVisible, default=0};
	__property TSRVTBAlignV Align = {read=FAlign, write=setAlign, default=0};
public:
	/* TSRVCustomPropertyTB.Destroy */ inline __fastcall virtual ~TSRVPropertyTBV(void) { }
	
};


class DELPHICLASS TSRVPageProperty;
class PASCALIMPLEMENTATION TSRVPageProperty : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	int deltaX;
	int deltaY;
	TSRVPageFormat OldPageFormat;
	Rvscroll::TRVZoomMode OldZoomMode;
	TSRVCaretPen* FCaretPen;
	TSRVBorderPen* FBorderPen;
	TSRVPAPen* FPrintableAreaPen;
	bool FAutoWidth;
	bool FPageViewMode;
	bool FShowPageBreaks;
	Rvstyle::TRVLength FPageWidth;
	Rvstyle::TRVLength FPageHeight;
	TSRVPageFormat FPageFormat;
	Printers::TPrinterOrientation FOrientation;
	int FPageBreakHeight;
	int FMinPageBreakHeight;
	int FMaxPageBreakHeight;
	int FBoundLeftRight;
	Rvstyle::TRVLength FLeftMargin;
	Rvstyle::TRVLength FRightMargin;
	Rvstyle::TRVLength FTopMargin;
	Rvstyle::TRVLength FBottomMargin;
	bool FPageNoVisible;
	int FPageNoFirst;
	int FPageNoFromNumber;
	TSRVHAlign FPageNoHAlign;
	TSRVVAlign FPageNoVAlign;
	TSRVPageNoFont* FPageNoFont;
	bool FUsePageOrders;
	TSRVPageBreak* FSoftPageBreak;
	TSRVPageBreak* FPageBreak;
	Rvstyle::TRVLength FHeaderY;
	bool FHeaderVisible;
	Rvstyle::TRVLength FFooterY;
	bool FFooterVisible;
	
protected:
	TSRichViewEdit* SRV;
	void __fastcall SetViewPageWidth(void);
	void __fastcall SetViewPageHeight(void);
	void __fastcall SetPrintableAreaPen(const TSRVPAPen* Value);
	void __fastcall SetCaretPen(const TSRVCaretPen* Value);
	void __fastcall SetBorderPen(const TSRVBorderPen* Value);
	void __fastcall SetAutoWidth(const bool Value);
	void __fastcall SetPageViewMode(const bool Value);
	void __fastcall SetShowPageBreaks(const bool Value);
	void __fastcall SetPageWidth(const Rvstyle::TRVLength Value);
	void __fastcall SetPageHeight(const Rvstyle::TRVLength Value);
	void __fastcall SetPageFormat(const TSRVPageFormat Value);
	void __fastcall SetOrientation(Printers::TPrinterOrientation Value);
	void __fastcall SetPageBreakHeight(const int Value);
	void __fastcall SetMinPageBreakHeight(const int Value);
	void __fastcall SetMaxPageBreakHeight(const int Value);
	void __fastcall SetBoundLeftRight(const int Value);
	void __fastcall SetLeftMargin(Rvstyle::TRVLength Value);
	void __fastcall SetRightMargin(Rvstyle::TRVLength Value);
	void __fastcall SetTopMargin(Rvstyle::TRVLength Value);
	void __fastcall SetBottomMargin(Rvstyle::TRVLength Value);
	void __fastcall SetPageNoVisible(const bool Value);
	void __fastcall SetPageNoFirst(const int Value);
	void __fastcall SetPageNoFromNumber(const int Value);
	void __fastcall SetPageNoHAlign(const TSRVHAlign Value);
	void __fastcall SetPageNoVAlign(const TSRVVAlign Value);
	void __fastcall SetPageNoFont(const TSRVPageNoFont* Value);
	void __fastcall SetUsePageOrders(const bool Value);
	void __fastcall SetSoftPageBreak(const TSRVPageBreak* Value);
	void __fastcall SetPageBreak(const TSRVPageBreak* Value);
	void __fastcall SetHeaderY(Rvstyle::TRVLength Value);
	void __fastcall SetHeaderVisible(const bool Value);
	void __fastcall SetFooterY(Rvstyle::TRVLength Value);
	void __fastcall SetFooterVisible(const bool Value);
	
public:
	__fastcall TSRVPageProperty(TSRichViewEdit* AOwner);
	__fastcall virtual ~TSRVPageProperty(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall ConvertPageFormatToPageSize(TSRVPageFormat PageFormat, Rvstyle::TRVUnits UnitsPaper, Rvstyle::TRVLength &PaperWidth, Rvstyle::TRVLength &PaperHeight);
	TSRVPageFormat __fastcall ConvertPageSizeToPageFormat(Rvstyle::TRVUnits UnitsPaper, Rvstyle::TRVLength PaperWidth, Rvstyle::TRVLength PaperHeight);
	__property TSRichViewEdit* SRichViewEdit = {read=SRV};
	
__published:
	__property TSRVPAPen* PrintableAreaPen = {read=FPrintableAreaPen, write=SetPrintableAreaPen};
	__property TSRVCaretPen* CaretPen = {read=FCaretPen, write=SetCaretPen};
	__property TSRVBorderPen* BorderPen = {read=FBorderPen, write=SetBorderPen};
	__property bool AutoWidth = {read=FAutoWidth, write=SetAutoWidth, default=0};
	__property bool PageViewMode = {read=FPageViewMode, write=SetPageViewMode, default=1};
	__property bool ShowPageBreaks = {read=FShowPageBreaks, write=SetShowPageBreaks, default=0};
	__property Rvstyle::TRVLength PageWidth = {read=FPageWidth, write=SetPageWidth};
	__property Rvstyle::TRVLength PageHeight = {read=FPageHeight, write=SetPageHeight};
	__property TSRVPageFormat PageFormat = {read=FPageFormat, write=SetPageFormat, default=7};
	__property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=SetOrientation, default=0};
	__property int PageBreakHeight = {read=FPageBreakHeight, write=SetPageBreakHeight, default=20};
	__property int MinPageBreakHeight = {read=FMinPageBreakHeight, write=SetMinPageBreakHeight, default=5};
	__property int MaxPageBreakHeight = {read=FMaxPageBreakHeight, write=SetMaxPageBreakHeight, default=25};
	__property int BoundLeftRight = {read=FBoundLeftRight, write=SetBoundLeftRight, default=20};
	__property Rvstyle::TRVLength LeftMargin = {read=FLeftMargin, write=SetLeftMargin};
	__property Rvstyle::TRVLength RightMargin = {read=FRightMargin, write=SetRightMargin};
	__property Rvstyle::TRVLength TopMargin = {read=FTopMargin, write=SetTopMargin};
	__property Rvstyle::TRVLength BottomMargin = {read=FBottomMargin, write=SetBottomMargin};
	__property bool PageNoVisible = {read=FPageNoVisible, write=SetPageNoVisible, default=1};
	__property int PageNoFirst = {read=FPageNoFirst, write=SetPageNoFirst, default=1};
	__property int PageNoFromNumber = {read=FPageNoFromNumber, write=SetPageNoFromNumber, default=1};
	__property TSRVHAlign PageNoHAlign = {read=FPageNoHAlign, write=SetPageNoHAlign, default=1};
	__property TSRVVAlign PageNoVAlign = {read=FPageNoVAlign, write=SetPageNoVAlign, default=1};
	__property TSRVPageNoFont* PageNoFont = {read=FPageNoFont, write=SetPageNoFont};
	__property bool UsePageOrders = {read=FUsePageOrders, write=SetUsePageOrders, default=0};
	__property TSRVPageBreak* SoftPageBreak = {read=FSoftPageBreak, write=SetSoftPageBreak};
	__property TSRVPageBreak* PageBreak = {read=FPageBreak, write=SetPageBreak};
	__property Rvstyle::TRVLength HeaderY = {read=FHeaderY, write=SetHeaderY};
	__property bool HeaderVisible = {read=FHeaderVisible, write=SetHeaderVisible, default=1};
	__property Rvstyle::TRVLength FooterY = {read=FFooterY, write=SetFooterY};
	__property bool FooterVisible = {read=FFooterVisible, write=SetFooterVisible, default=1};
};


class DELPHICLASS TSRVViewProperty;
class PASCALIMPLEMENTATION TSRVViewProperty : public Classes::TPersistent
{
	typedef Classes::TPersistent inherited;
	
private:
	int TrialX;
	int TrialY;
	Graphics::TColor TrialColor;
	bool FAutoVScrollBarPosition;
	TSRVWorkArea FWorkArea;
	bool FMouseWheelZoom;
	TSRVAlignPageH FAlignPageH;
	TSRVAlignPageV FAlignPageV;
	Rvstyle::TRVLength FPageWidth;
	Rvstyle::TRVLength FPageHeight;
	TSRVMarginBounds FMarginBounds;
	int FWheelStep;
	bool FShowScrollHint;
	Graphics::TFont* FHintFont;
	System::UnicodeString FHintPrefixText;
	bool FUseTableIcons;
	Menus::TPopupMenu* FTableIconPopupMenu;
	unsigned FTableIconDelay;
	TSRVViewMode FViewMode;
	bool FMarginsRectVisible;
	TSRVMarginsPen* FMarginsPen;
	float FZoomPercent;
	Rvscroll::TRVZoomMode FZoomMode;
	float FZoomPercentEdit;
	Rvscroll::TRVZoomMode FZoomModeEdit;
	float FZoomPercentIN;
	Rvscroll::TRVZoomMode FZoomModeIN;
	float FZoomPercentOUT;
	Rvscroll::TRVZoomMode FZoomModeOUT;
	System::UnicodeString FMainTitle;
	TSRVHeaderFooterFont* FMainTitleFont;
	TSRVMainPen* FMainPen;
	Graphics::TColor FMainTitleColor;
	System::UnicodeString FHeaderTitle;
	TSRVHeaderFooterFont* FHeaderTitleFont;
	TSRVHeaderFooterPen* FHeaderPen;
	Graphics::TColor FHeaderTitleColor;
	System::UnicodeString FFooterTitle;
	TSRVHeaderFooterFont* FFooterTitleFont;
	TSRVHeaderFooterPen* FFooterPen;
	Graphics::TColor FFooterTitleColor;
	bool FMainDocumentShade;
	bool FHeaderFooterShade;
	bool FFreePosPage;
	
protected:
	TSRichViewEdit* SRV;
	void __fastcall SetAutoVScrollBarPosition(const bool Value);
	void __fastcall SetWorkArea(const TSRVWorkArea Value);
	void __fastcall SetAlignPageH(const TSRVAlignPageH Value);
	void __fastcall SetAlignPageV(const TSRVAlignPageV Value);
	void __fastcall SetMarginBounds(const TSRVMarginBounds Value);
	void __fastcall SetMarginsRectVisible(const bool Value);
	void __fastcall SetMarginsPen(const TSRVMarginsPen* Value);
	void __fastcall SetWheelStep(int Value);
	void __fastcall SetShowScrollHint(const bool Value);
	void __fastcall SetHintFont(const Graphics::TFont* Value);
	void __fastcall SetHintPrefixText(const System::UnicodeString Value);
	void __fastcall SetUseTableIcons(bool Value);
	void __fastcall SetTableIconPopupMenu(Menus::TPopupMenu* Value);
	void __fastcall SetTableIconDelay(unsigned Value);
	void __fastcall setViewMode(TSRVViewMode Value);
	void __fastcall SetZoomPercent(float Value);
	void __fastcall SetZoomMode(const Rvscroll::TRVZoomMode Value);
	void __fastcall SetZoomPercentEdit(float Value);
	void __fastcall SetZoomModeEdit(const Rvscroll::TRVZoomMode Value);
	void __fastcall SetZoomPercentIN(float Value);
	void __fastcall SetZoomModeIN(const Rvscroll::TRVZoomMode Value);
	void __fastcall SetZoomPercentOUT(float Value);
	void __fastcall SetZoomModeOUT(const Rvscroll::TRVZoomMode Value);
	void __fastcall SetFreePosPage(const bool Value);
	void __fastcall SetMainTitle(const System::UnicodeString Value);
	void __fastcall SetMainTitleFont(const TSRVHeaderFooterFont* Value);
	void __fastcall SetMainPen(const TSRVMainPen* Value);
	void __fastcall SetHeaderTitle(const System::UnicodeString Value);
	void __fastcall SetHeaderTitleFont(const TSRVHeaderFooterFont* Value);
	void __fastcall SetHeaderPen(const TSRVHeaderFooterPen* Value);
	void __fastcall SetFooterTitle(const System::UnicodeString Value);
	void __fastcall SetFooterTitleFont(const TSRVHeaderFooterFont* Value);
	void __fastcall SetFooterPen(const TSRVHeaderFooterPen* Value);
	void __fastcall SetMainDocumentShade(const bool Value);
	void __fastcall SetHeaderFooterShade(const bool Value);
	void __fastcall SetMainTitleColor(const Graphics::TColor Value);
	void __fastcall SetHeaderTitleColor(const Graphics::TColor Value);
	void __fastcall SetFooterTitleColor(const Graphics::TColor Value);
	
public:
	__fastcall TSRVViewProperty(TSRichViewEdit* AOwner);
	__fastcall virtual ~TSRVViewProperty(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property TSRichViewEdit* SRichViewEdit = {read=SRV};
	
__published:
	__property bool AutoVScrollBarPosition = {read=FAutoVScrollBarPosition, write=SetAutoVScrollBarPosition, default=1};
	__property TSRVWorkArea WorkArea = {read=FWorkArea, write=SetWorkArea, default=1};
	__property bool MouseWheelZoom = {read=FMouseWheelZoom, write=FMouseWheelZoom, default=1};
	__property TSRVAlignPageH AlignPageH = {read=FAlignPageH, write=SetAlignPageH, default=2};
	__property TSRVAlignPageV AlignPageV = {read=FAlignPageV, write=SetAlignPageV, default=1};
	__property TSRVMarginBounds MarginBounds = {read=FMarginBounds, write=SetMarginBounds, nodefault};
	__property bool MarginsRectVisible = {read=FMarginsRectVisible, write=SetMarginsRectVisible, default=0};
	__property TSRVMarginsPen* MarginsPen = {read=FMarginsPen, write=SetMarginsPen};
	__property Rvstyle::TRVLength PageWidth = {read=FPageWidth};
	__property Rvstyle::TRVLength PageHeight = {read=FPageHeight};
	__property int WheelStep = {read=FWheelStep, write=SetWheelStep, default=3};
	__property bool ShowScrollHint = {read=FShowScrollHint, write=SetShowScrollHint, default=1};
	__property Graphics::TFont* HintFont = {read=FHintFont, write=SetHintFont};
	__property System::UnicodeString HintPrefixText = {read=FHintPrefixText, write=SetHintPrefixText};
	__property bool UseTableIcons = {read=FUseTableIcons, write=SetUseTableIcons, default=1};
	__property Menus::TPopupMenu* TableIconPopupMenu = {read=FTableIconPopupMenu, write=SetTableIconPopupMenu, default=0};
	__property unsigned TableIconDelay = {read=FTableIconDelay, write=SetTableIconDelay, default=3000};
	__property TSRVViewMode ViewMode = {read=FViewMode, write=setViewMode, default=0};
	__property bool FreePosPage = {read=FFreePosPage, write=SetFreePosPage, default=0};
	__property float ZoomPercent = {read=FZoomPercent, write=SetZoomPercent};
	__property float ZoomPercentEdit = {read=FZoomPercentEdit, write=SetZoomPercentEdit};
	__property Rvscroll::TRVZoomMode ZoomMode = {read=FZoomMode, write=SetZoomMode, default=1};
	__property Rvscroll::TRVZoomMode ZoomModeEdit = {read=FZoomModeEdit, write=SetZoomModeEdit, default=1};
	__property float ZoomPercentIN = {read=FZoomPercentIN, write=SetZoomPercentIN};
	__property Rvscroll::TRVZoomMode ZoomModeIN = {read=FZoomModeIN, write=SetZoomModeIN, default=0};
	__property float ZoomPercentOUT = {read=FZoomPercentOUT, write=SetZoomPercentOUT};
	__property Rvscroll::TRVZoomMode ZoomModeOUT = {read=FZoomModeOUT, write=SetZoomModeOUT, default=2};
	__property System::UnicodeString MainTitle = {read=FMainTitle, write=SetMainTitle};
	__property TSRVHeaderFooterFont* MainTitleFont = {read=FMainTitleFont, write=SetMainTitleFont};
	__property TSRVMainPen* MainPen = {read=FMainPen, write=SetMainPen};
	__property System::UnicodeString HeaderTitle = {read=FHeaderTitle, write=SetHeaderTitle};
	__property TSRVHeaderFooterFont* HeaderTitleFont = {read=FHeaderTitleFont, write=SetHeaderTitleFont};
	__property TSRVHeaderFooterPen* HeaderPen = {read=FHeaderPen, write=SetHeaderPen};
	__property System::UnicodeString FooterTitle = {read=FFooterTitle, write=SetFooterTitle};
	__property TSRVHeaderFooterFont* FooterTitleFont = {read=FFooterTitleFont, write=SetFooterTitleFont};
	__property TSRVHeaderFooterPen* FooterPen = {read=FFooterPen, write=SetFooterPen};
	__property Graphics::TColor MainTitleColor = {read=FMainTitleColor, write=SetMainTitleColor, default=15983317};
	__property Graphics::TColor HeaderTitleColor = {read=FHeaderTitleColor, write=SetHeaderTitleColor, default=15983317};
	__property Graphics::TColor FooterTitleColor = {read=FFooterTitleColor, write=SetFooterTitleColor, default=15983317};
	__property bool MainDocumentShade = {read=FMainDocumentShade, write=SetMainDocumentShade, default=1};
	__property bool HeaderFooterShade = {read=FHeaderFooterShade, write=SetHeaderFooterShade, default=0};
};


class DELPHICLASS TSRVDropTarget;
class PASCALIMPLEMENTATION TSRVDropTarget : public Rvdragdrop::TRVDropTarget
{
	typedef Rvdragdrop::TRVDropTarget inherited;
	
private:
	TSRichViewEdit* FSRichViewEdit;
	
protected:
	DYNAMIC Types::TPoint __fastcall ScreenToRichView(const Types::TPoint &pt);
	DYNAMIC void __fastcall DoDragDropCaretChanged(void);
	virtual void __fastcall OwnerReleaseDropTargetObject(void);
	
public:
	__fastcall TSRVDropTarget(TSRichViewEdit* ASRichViewEdit);
	virtual HRESULT __stdcall DragEnter(const _di_IDataObject DataObj, int KeyState, const Types::TPoint pt, int &Effect);
	DYNAMIC bool __fastcall RegisterDragDropWindow(void);
	DYNAMIC void __fastcall UnRegisterDragDropWindow(void);
	void __fastcall UpdateOwner(void);
public:
	/* TRVDropTarget.Destroy */ inline __fastcall virtual ~TSRVDropTarget(void) { }
	
private:
	void *__IDropTarget;	/* IDropTarget */
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	operator _di_IDropTarget()
	{
		_di_IDropTarget intf;
		GetInterface(intf);
		return intf;
	}
	#else
	operator IDropTarget*(void) { return (IDropTarget*)&__IDropTarget; }
	#endif
	
};


class PASCALIMPLEMENTATION TSRichViewEdit : public Controls::TCustomControl
{
	typedef Controls::TCustomControl inherited;
	
private:
	typedef System::DynamicArray<Types::TRect> _TSRichViewEdit__1;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__2;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__3;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__4;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__5;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__6;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__7;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__8;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__9;
	
	typedef System::DynamicArray<TSRVItemInfo> _TSRichViewEdit__01;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__11;
	
	typedef System::DynamicArray<Rvnote::TCustomRVNoteItemInfo*> _TSRichViewEdit__21;
	
	typedef System::DynamicArray<Rvnote::TCustomRVNoteItemInfo*> _TSRichViewEdit__31;
	
	typedef System::DynamicArray<Rvnote::TCustomRVNoteItemInfo*> _TSRichViewEdit__41;
	
	typedef System::DynamicArray<Rvnote::TCustomRVNoteItemInfo*> _TSRichViewEdit__51;
	
	typedef System::DynamicArray<Types::TPoint> _TSRichViewEdit__61;
	
	typedef System::DynamicArray<float> _TSRichViewEdit__71;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__81;
	
	typedef System::DynamicArray<int> _TSRichViewEdit__91;
	
	typedef System::DynamicArray<TSRVTableInfo> _TSRichViewEdit__02;
	
	typedef System::DynamicArray<Controls::TControl*> _TSRichViewEdit__12;
	
	typedef System::DynamicArray<Srvcontrol::TSRVRenderControl*> _TSRichViewEdit__22;
	
	
private:
	TSRVDropTarget* FDropTarget;
	TSRVPageProperty* FPageProperty;
	TSRVViewProperty* FViewProperty;
	TSRVBackgroundProperty* FBackgroundProperty;
	Types::TRect RefreshRect;
	bool isFullRedraw;
	bool isInLeft;
	Types::TPoint CoordInLeft;
	Crvfdata::TCustomRVFormattedData* rvdInLeft;
	int InLeftItemNoB;
	int InLeftOffsB;
	int InLeftItemNoE;
	int InLeftOffsE;
	Classes::TNotifyEvent FRVCopy;
	Classes::TNotifyEvent FOleDragLeave;
	Rvedit::TRVOnCaretGetOutEvent FRVCaretGetOut;
	Rvedit::TRVChangingEvent FRVChanging;
	Richview::TRVControlActionEvent FRVControlAction;
	Rvedit::TRVDropFilesEvent FRVDropFiles;
	Richview::TRVHTMLSaveImageEvent FRVHTMLSaveImage;
	Richview::TRVImportPictureEvent FRVImportPicture;
	Richview::TRVItemActionEvent FRVItemAction;
	Richview::TRVItemHintEvent FRVItemHint;
	Rvedit::TRVItemResizeEvent FRVItemResize;
	Rvedit::TRVItemTextEditEvent FRVItemTextEdit;
	Rvedit::TRVOleDragEnterEvent FOleDragEnter;
	Rvedit::TRVOleDragOverEvent FOleDragOver;
	Rvedit::TRVOleDropEvent FOleDrop;
	Rvedit::TRVPasteEvent FRVPaste;
	Richview::TRVProgressEvent FRVProgress;
	Richview::TRVDblClickEvent FRVDblClick;
	Richview::TRVFControlNeededEvent FRVFControlNeeded;
	Richview::TRVFImageListNeededEvent FRVFImageListNeeded;
	Richview::TRVFPictureNeededEvent FRVFPictureNeeded;
	Richview::TRVMouseEvent FRVMouseDown;
	Richview::TRVMouseMoveEvent FRVMouseMove;
	Richview::TRVMouseEvent FRVMouseUp;
	Richview::TRVRightClickEvent FRVRightClick;
	Richview::TRVSaveComponentToFileEvent FSaveComponentToFile;
	Richview::TRVSaveHTMLExtraEvent FSaveHTMLExtra;
	Richview::TRVSaveImageEvent2 FSaveImage2;
	Richview::TRVSaveItemToFileEvent FSaveItemToFile;
	Richview::TRVSaveRTFExtraEvent FSaveRTFExtra;
	Richview::TRVSpellingCheckEvent FRVSpellingCheck;
	Richview::TRVURLNeededEvent FURLNeeded;
	Controls::TStartDragEvent FStartDrag;
	TSRVFixMarginsMode FFixMarginsMode;
	unsigned FTableDelay;
	unsigned FTableBeginTime;
	bool FTableIconPerCursor;
	int FTableIconPageNo;
	Types::TPoint FTableIconPos;
	Types::TPoint FTableIconRVPos;
	Types::TRect TableIconRealRect;
	Rvtable::TRVTableItemInfo* FTableIconItem;
	Crvfdata::TCustomRVFormattedData* FTableIconRVData;
	Types::TPoint newSizeObject;
	int paddSizeObject;
	bool fMouseDownSize;
	Types::TPoint MouseDownPos;
	int MouseDownTypeObj;
	int CursorZOOM;
	int MinX;
	int MinY;
	int ZeroChangeX;
	int ZeroChangeY;
	Types::TPoint CoordObject;
	Types::TPoint SCoordObject;
	Types::TRect OldObjectRect;
	bool RepaintOldRect;
	int MouseDownItemNo;
	Dlines::TRVDrawLineInfo* rvdiMouseDown;
	Types::TPoint CellPerMouse;
	bool BoundObjectMouse;
	bool BoundObjectMouseIn;
	bool BoundObjectMouseLeft;
	bool BoundObjectMouseRight;
	bool BoundObjectMouseTop;
	bool BoundObjectMouseBottom;
	bool FCanZoomMode;
	bool FCanUpdateMargin;
	bool FCanCalculatePage;
	bool FCanRefreshData;
	bool fUpdatePosition;
	bool isMouseDown;
	bool ForbidChangeHeight;
	bool fHintScroll;
	int fHintTime;
	int fHintScrollOffset;
	int fHintScrollWidth;
	int fHintScrollPos;
	int fHintScrollPageNo;
	Crvfdata::TCustomRVFormattedData* rvdMouseDown;
	Types::TPoint posMouseDown;
	bool rvCanFocus;
	bool fShowCaret;
	Types::TPoint FCaretPos;
	int FCaretHeight;
	int FRealCaretHeight;
	int OldDocHeight;
	Types::TPoint RealCaretPos;
	unsigned FCaretBlinkTime;
	Types::TPoint FMaxPosPage;
	HWND FWindowHandle;
	bool FUseDrawHyperlinksEvent;
	float HlScaleX;
	float HlScaleY;
	int HlOffsetX;
	int HlOffsetY;
	Types::TRect HlRVRect;
	Types::TRect HlPaintRect;
	Graphics::TCanvas* HlCanvas;
	TSRVDataDrawHyperlinkEvent FOnDrawHyperlink;
	TSRVPageChange FOnPageChange;
	TSRVChangeActiveEditorEvent FOnChangeActiveEditor;
	TSRVPaintPage FOnPaintPage;
	TSRVDrawPageBreak FOnDrawPageBreak;
	TSRVGetPagePosEvent FOnGetPagePosEvent;
	TSRVMouseEvent FOnClickPage;
	Rvedit::TRVStyleConversionEvent FOnStyleConversion;
	Rvedit::TRVStyleConversionEvent FOnParaStyleConversion;
	TSRVCheckpointVisibleEvent FOnCheckpointVisible;
	Classes::TNotifyEvent FOnCurParaStyleChanged;
	Classes::TNotifyEvent FOnCurTextStyleChanged;
	Richview::TRVControlActionEvent FStoredControlActionEvent;
	Rvedit::TRVStyleConversionEvent FStoredStyleConversionEvent;
	Rvedit::TRVStyleConversionEvent FStoredParaStyleConversion;
	Classes::TNotifyEvent FStoredCurParaStyleChanged;
	Classes::TNotifyEvent FStoredCurTextStyleChanged;
	Richview::TJumpEvent FStoredOnJump;
	Richview::TRVReadHyperlink FStoredOnReadHyperlink;
	Richview::TRVWriteHyperlink FStoredOnWriteHyperlink;
	Richview::TRVPaintEvent FStoredOnPaint;
	Classes::TNotifyEvent FStoredOnCaretMove;
	Controls::TKeyEvent FStoredOnKeyDown;
	Controls::TKeyEvent FStoredOnKeyUp;
	Classes::TNotifyEvent FStoredOnHScrolled;
	Classes::TNotifyEvent FStoredOnVScrolled;
	Classes::TNotifyEvent FStoredOnChange;
	Classes::TNotifyEvent FStoredOnSelect;
	Classes::TNotifyEvent FStoredOnExit;
	Classes::TNotifyEvent FStoredOnResize;
	Controls::TMouseWheelEvent FStoredMouseWheelEvent;
	Richview::TRVGetFormatCanvasEvent FStoredOnGetFormatCanvas;
	Rvedit::TRVGetSRichViewEditEvent FStoredOnGetSRichViewEdit;
	Rvrvdata::TRVGetMouseClientCoords FStoredOnGetMouseClientCoords;
	Classes::TNotifyEvent FStoredOnBiDiModeChange;
	Controls::TKeyPressEvent FStoredOnKeyPress;
	Richview::TRVSpellingCheckEvent FStoredOnSpellingCheck;
	Classes::TNotifyEvent FStoredOnClick;
	Classes::TNotifyEvent FStoredOnDblClick;
	Controls::TDragDropEvent FStoredOnDragDrop;
	Controls::TDragOverEvent FStoredOnDragOver;
	Controls::TEndDragEvent FStoredOnEndDrag;
	Controls::TMouseMoveEvent FStoredOnMouseMove;
	Rvedit::TRVPasteEvent FStoredOnPaste;
	Classes::TNotifyEvent FStoredOnCopy;
	Classes::TNotifyEvent FStoredOnOleDragLeave;
	Rvedit::TRVOleDragEnterEvent FStoredOnOleDragEnter;
	Rvedit::TRVOleDragOverEvent FStoredOnOleDragOver;
	Rvedit::TRVOleDropEvent FStoredOnOleDrop;
	Rvedit::TRVOnCaretGetOutEvent FStoredOnCaretGetOut;
	Rvedit::TRVChangingEvent FStoredOnChanging;
	Controls::TContextPopupEvent FStoredOnContextPopup;
	Rvedit::TRVDropFilesEvent FStoredOnDropFiles;
	Richview::TRVHTMLSaveImageEvent FStoredOnHTMLSaveImage;
	Richview::TRVImportPictureEvent FStoredOnImportPicture;
	Richview::TRVItemActionEvent FStoredOnItemAction;
	Richview::TRVItemHintEvent FStoredOnItemHint;
	Rvedit::TRVItemResizeEvent FStoredOnItemResize;
	Rvedit::TRVItemTextEditEvent FStoredOnItemTextEdit;
	Richview::TRVProgressEvent FStoredOnProgress;
	Richview::TRVDblClickEvent FStoredOnRVDblClick;
	Richview::TRVFControlNeededEvent FStoredOnRVFControlNeeded;
	Richview::TRVFImageListNeededEvent FStoredOnRVFImageListNeeded;
	Richview::TRVFPictureNeededEvent FStoredOnRVFPictureNeeded;
	Richview::TRVMouseEvent FStoredOnRVMouseDown;
	Richview::TRVMouseMoveEvent FStoredOnRVMouseMove;
	Richview::TRVMouseEvent FStoredOnRVMouseUp;
	Richview::TRVRightClickEvent FStoredOnRVRightClick;
	Richview::TRVSaveComponentToFileEvent FStoredOnSaveComponentToFile;
	Richview::TRVSaveHTMLExtraEvent FStoredOnSaveHTMLExtra;
	Richview::TRVSaveImageEvent2 FStoredOnSaveImage2;
	Richview::TRVSaveItemToFileEvent FStoredOnSaveItemToFile;
	Richview::TRVSaveRTFExtraEvent FStoredOnSaveRTFExtra;
	Controls::TStartDragEvent FStoredOnStartDrag;
	Richview::TRVURLNeededEvent FStoredOnURLNeeded;
	Classes::TNotifyEvent FFormatChanged;
	Classes::TNotifyEvent FZoomChanged;
	Classes::TNotifyEvent FZoomViewChanged;
	Classes::TNotifyEvent FOnHScrolled;
	Classes::TNotifyEvent FOnVScrolled;
	Classes::TNotifyEvent FOnResize;
	Classes::TNotifyEvent FOnResizeDoc;
	Richview::TJumpEvent FOnJump;
	Richview::TRVReadHyperlink FOnReadHyperlink;
	Richview::TRVWriteHyperlink FOnWriteHyperlink;
	TSRVPaintEvent FOnPaint;
	Classes::TNotifyEvent FOnCaretMove;
	Controls::TKeyEvent FOnKeyDown;
	Controls::TKeyEvent FOnKeyUp;
	Classes::TNotifyEvent FOnChange;
	Classes::TNotifyEvent FOnSelect;
	Classes::TNotifyEvent FOnExit;
	Classes::TNotifyEvent FOnFullRedraw;
	int FCurrentPage;
	int FPageNoEditor;
	int FPageNoMouseMove;
	int FPageNoMouseDown;
	bool FCanUpdate;
	int FPageCount;
	int FMinPrintedItemNo;
	int FMaxPrintedItemNo;
	bool NoteChange;
	int FPageCountEndNote;
	int OldPageCount;
	int FLeftMarginPix;
	int FRightMarginPix;
	int FTopMarginPix;
	int FBottomMarginPix;
	int FLeftMargin100Pix;
	int FRightMargin100Pix;
	int FTopMargin100Pix;
	int FBottomMargin100Pix;
	_TSRichViewEdit__1 LTopMarginHeight;
	_TSRichViewEdit__2 PageStartItemNo;
	_TSRichViewEdit__3 PageEndItemNo;
	_TSRichViewEdit__4 PageStartDrawItemNo;
	_TSRichViewEdit__5 PageStartTableItem;
	_TSRichViewEdit__6 PageEndTableItem;
	_TSRichViewEdit__7 PageStartTableRow;
	_TSRichViewEdit__8 PageEndTableRow;
	_TSRichViewEdit__9 PageHeader;
	_TSRichViewEdit__01 InfoRow;
	_TSRichViewEdit__11 PageFootnoteHeight;
	_TSRichViewEdit__21 PageFootnoteStart;
	_TSRichViewEdit__31 PageFootnoteEnd;
	_TSRichViewEdit__41 PageEndnoteStart;
	_TSRichViewEdit__51 PageEndnoteEnd;
	_TSRichViewEdit__61 PagePos;
	_TSRichViewEdit__71 PageZoomPercent;
	_TSRichViewEdit__81 UsePageOrders;
	_TSRichViewEdit__91 ListPOrder;
	int FPageWidth100Pix;
	int FPageHeight100Pix;
	int FHScrollPos;
	int FVScrollPos;
	float FOffsetDocX;
	float FOffsetDocY;
	int FPageWidthPix;
	int FPageHeightPix;
	bool CaretUpdate;
	Types::TRect CaretRect;
	Types::TRect EComBGRect;
	Graphics::TBitmap* EComBG;
	Graphics::TBitmap* DaDBitmap;
	Types::TRect DaDRect;
	int countTables;
	_TSRichViewEdit__02 tables;
	Graphics::TCanvas* FFormatCanvas;
	HIDESBASE MESSAGE void __fastcall WMContextMenu(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Message);
	MESSAGE void __fastcall WMPageScroll(Messages::TMessage &Message);
	MESSAGE void __fastcall WMPageSet(Messages::TMessage &Message);
	MESSAGE void __fastcall WMRepaint(Messages::TMessage &Message);
	void __fastcall WMDblClick(Messages::TWMMouse &Message);
	MESSAGE void __fastcall WMCreate(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMDestroy(Messages::TMessage &Message);
	MESSAGE void __fastcall WMUpdateImeWindow(Messages::TMessage &Message);
	void __fastcall GetCompositionFormParams(tagCOMPOSITIONFORM &CF);
	MESSAGE void __fastcall WMImeStartComposition(Messages::TMessage &Message);
	void __fastcall CreateDropTarget(void);
	void __fastcall DestroyDropTarget(void);
	Rvedit::TRichViewEdit* __fastcall CreateRVEdit(Classes::TComponentName AName, Rvstyle::TRVStyle* rvse);
	bool __fastcall ResetHints(void);
	void __fastcall resizeControl(Classes::TShiftState Shift, int X, int Y);
	void __fastcall resizeTable(Classes::TShiftState Shift, int X, int Y);
	void __fastcall resizeImage(Classes::TShiftState Shift, int X, int Y);
	void __fastcall boundTable(Classes::TShiftState Shift, int X, int Y, const Types::TPoint &p);
	void __fastcall boundItem(Classes::TShiftState Shift, int X, int Y);
	void __fastcall CalculateTableIconPos(void);
	void __fastcall GetInSide(int X, int Y, const Types::TRect &R);
	void __fastcall selectCellTable(const Types::TPoint &p, Rvtable::TRVTableItemInfo* RVT);
	bool __fastcall IsCellSelectedAt(int X, int Y);
	bool __fastcall checkTable(Classes::TShiftState Shift, int X, int Y, Rvitem::TCustomRVItemInfo* item);
	bool __fastcall checkItem(Classes::TShiftState Shift, int X, int Y, Crvfdata::TCustomRVFormattedData* rvd, Rvitem::TCustomRVItemInfo* item);
	void __fastcall SetUnitsProgram(const Rvstyle::TRVUnits Value);
	void __fastcall SetCaretBlinkTime(unsigned Value);
	void __fastcall HookControlAction(Richview::TCustomRichView* Sender, Rvstyle::TRVControlAction ControlAction, int ItemNo, Controls::TControl* &ctrl);
	void __fastcall HookDrawHyperlink(Crvdata::TCustomRVData* RVData, int ItemNo, const Types::TRect &R);
	void __fastcall HookStyleConversionEvent(Rvedit::TCustomRichViewEdit* Sender, int StyleNo, int UserData, bool AppliedToText, int &NewStyleNo);
	void __fastcall HookParaStyleConversion(Rvedit::TCustomRichViewEdit* Sender, int StyleNo, int UserData, bool AppliedToText, int &NewStyleNo);
	void __fastcall HookCurParaStyleChanged(System::TObject* Sender);
	void __fastcall HookCurTextStyleChanged(System::TObject* Sender);
	void __fastcall HookJump(System::TObject* Sender, int id);
	void __fastcall HookRVSetHint(System::TObject* Sender);
	void __fastcall HookReadHyperlink(Richview::TCustomRichView* Sender, const System::UnicodeString Target, const System::UnicodeString Extras, Rvstyle::TRVLoadFormat DocFormat, int &StyleNo, int &ItemTag, Rvtypes::TRVRawByteString &ItemName);
	void __fastcall HookWriteHyperlink(Richview::TCustomRichView* Sender, int id, Crvdata::TCustomRVData* RVData, int ItemNo, Rvstyle::TRVSaveFormat SaveFormat, System::UnicodeString &Target, System::UnicodeString &Extras);
	void __fastcall HookRVPaintEvent(Richview::TCustomRichView* Sender, Graphics::TCanvas* Canvas, bool Prepaint);
	void __fastcall HookRVCaretMove(System::TObject* Sender);
	void __fastcall HookRVKeyDown(System::TObject* Sender, System::Word &Key, Classes::TShiftState Shift);
	void __fastcall HookRVKeyUp(System::TObject* Sender, System::Word &Key, Classes::TShiftState Shift);
	void __fastcall HookHScrolled(System::TObject* Sender);
	void __fastcall HookVScrolled(System::TObject* Sender);
	void __fastcall HookOnChange(System::TObject* Sender);
	void __fastcall HookOnSelect(System::TObject* Sender);
	void __fastcall HookOnExit(System::TObject* Sender);
	void __fastcall HookMouseWheelEvent(System::TObject* Sender, Classes::TShiftState Shift, int WheelDelta, const Types::TPoint &MousePos, bool &Handled);
	void __fastcall HookBiDiModeChange(System::TObject* Sender);
	void __fastcall HookGetFormatCanvas(Richview::TCustomRichView* Sender, Graphics::TCanvas* &Canvas);
	void __fastcall HookGetSRichViewEdit(Rvedit::TCustomRichViewEdit* Sender, Controls::TCustomControl* &SRichViewEdit);
	void __fastcall HookBeforeSaving(System::TObject* Sender);
	void __fastcall HookAfterReadNote(Crvdata::TCustomRVData* RVData, int ItemNo);
	void __fastcall HookNoteCaretGetOut(Rvedit::TCustomRichViewEdit* Sender, Rvedit::TRVGetOutDirection Direction);
	void __fastcall HookGetMouseClientCoords(Controls::TControl* Sender, int &X, int &Y);
	void __fastcall HookRVResize(System::TObject* Sender);
	void __fastcall HookRVClear(System::TObject* Sender);
	void __fastcall HookRVFormat(System::TObject* Sender);
	void __fastcall HookRVEnter(System::TObject* Sender);
	void __fastcall HookRVRepaint(Controls::TControl* Sender, Crvfdata::TRVRepaintOperation Operation, Types::PRect Rect);
	void __fastcall HookOnKeyPress(System::TObject* Sender, System::WideChar &Key);
	void __fastcall HookOnSpellingCheck(Richview::TCustomRichView* Sender, const System::UnicodeString AWord, int StyleNo, bool &Misspelled);
	void __fastcall HookOnClick(System::TObject* Sender);
	void __fastcall HookOnDblClick(System::TObject* Sender);
	void __fastcall HookOnDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y);
	void __fastcall HookOnDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, Controls::TDragState State, bool &Accept);
	void __fastcall HookOnEndDrag(System::TObject* Sender, System::TObject* Target, int X, int Y);
	void __fastcall HookOnMouseMove(System::TObject* Sender, Classes::TShiftState Shift, int X, int Y);
	void __fastcall HookOnPaste(Rvedit::TCustomRichViewEdit* Sender, bool &DoDefault);
	void __fastcall HookOnCopy(System::TObject* Sender);
	void __fastcall HookOnOleDragLeave(System::TObject* Sender);
	void __fastcall HookOnOleDragEnter(Richview::TCustomRichView* Sender, const _di_IDataObject DataObject, Classes::TShiftState Shift, int X, int Y, Rvedit::TRVOleDropEffects PossibleDropEffects, Rvedit::TRVOleDropEffect &DropEffect);
	void __fastcall HookOnOleDragOver(Richview::TCustomRichView* Sender, Classes::TShiftState Shift, int X, int Y, Rvedit::TRVOleDropEffects PossibleDropEffects, Rvedit::TRVOleDropEffect &DropEffect);
	void __fastcall HookOnOleDrop(Richview::TCustomRichView* Sender, const _di_IDataObject DataObject, Classes::TShiftState Shift, int X, int Y, Rvedit::TRVOleDropEffects PossibleDropEffects, Rvedit::TRVOleDropEffect &DropEffect, bool &DoDefault);
	void __fastcall HookOnCaretGetOut(Rvedit::TCustomRichViewEdit* Sender, Rvedit::TRVGetOutDirection Direction);
	void __fastcall HookOnChanging(Rvedit::TCustomRichViewEdit* Sender, bool &CanEdit);
	void __fastcall HookOnContextPopup(System::TObject* Sender, const Types::TPoint &MousePos, bool &Handled);
	void __fastcall HookOnDropFiles(Rvedit::TCustomRichViewEdit* Sender, Classes::TStrings* Files, Rvedit::TRVDropFileAction &FileAction, bool &DoDefault);
	void __fastcall HookOnHTMLSaveImage(Richview::TCustomRichView* Sender, Crvdata::TCustomRVData* RVData, int ItemNo, const System::UnicodeString Path, Graphics::TColor BackgroundColor, System::UnicodeString &Location, bool &DoDefault);
	void __fastcall HookOnImportPicture(Richview::TCustomRichView* Sender, const System::UnicodeString Location, int Width, int Height, Graphics::TGraphic* &Graphic);
	void __fastcall HookOnItemAction(Richview::TCustomRichView* Sender, Rvstyle::TRVItemAction ItemAction, Rvitem::TCustomRVItemInfo* Item, Rvtypes::TRVRawByteString &Text, Crvdata::TCustomRVData* RVData);
	void __fastcall HookOnItemHint(Richview::TCustomRichView* Sender, Crvdata::TCustomRVData* RVData, int ItemNo, System::UnicodeString &HintText);
	void __fastcall HookOnItemResize(Rvedit::TCustomRichViewEdit* Sender, Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, int Val1, int Val2);
	void __fastcall HookOnItemTextEdit(Rvedit::TCustomRichViewEdit* Sender, const Rvtypes::TRVRawByteString OldText, Crvdata::TCustomRVData* RVData, int ItemNo, int &NewTag, int &NewStyleNo);
	void __fastcall HookOnProgress(Richview::TCustomRichView* Sender, Rvstyle::TRVLongOperation Operation, Rvstyle::TRVProgressStage Stage, System::Byte PercentDone);
	void __fastcall HookOnRVDblClick(Richview::TCustomRichView* Sender, Rvtypes::TRVRawByteString ClickedWord, int Style);
	void __fastcall HookOnRVFControlNeeded(Richview::TCustomRichView* Sender, System::UnicodeString Name, int Tag, Controls::TControl* &ctrl);
	void __fastcall HookOnRVFImageListNeeded(Richview::TCustomRichView* Sender, int ImageListTag, Imglist::TCustomImageList* &il);
	void __fastcall HookOnRVFPictureNeeded(Richview::TCustomRichView* Sender, System::UnicodeString Name, int Tag, Graphics::TGraphic* &gr);
	void __fastcall HookOnRVMouseDown(Richview::TCustomRichView* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int ItemNo, int X, int Y);
	void __fastcall HookOnRVMouseMove(System::TObject* Sender, int id);
	void __fastcall HookOnRVMouseUp(Richview::TCustomRichView* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int ItemNo, int X, int Y);
	void __fastcall HookOnRVRightClick(Richview::TCustomRichView* Sender, Rvtypes::TRVRawByteString ClickedWord, int Style, int X, int Y);
	void __fastcall HookOnSaveComponentToFile(Richview::TCustomRichView* Sender, System::UnicodeString Path, Classes::TPersistent* SaveMe, Rvstyle::TRVSaveFormat SaveFormat, System::UnicodeString &OutStr);
	void __fastcall HookOnSaveHTMLExtra(Richview::TCustomRichView* Sender, Rvstyle::TRVHTMLSaveArea Area, bool CSSVersion, System::UnicodeString &HTMLCode);
	void __fastcall HookOnSaveImage2(Richview::TCustomRichView* Sender, Graphics::TGraphic* Graphic, Rvstyle::TRVSaveFormat SaveFormat, const System::UnicodeString Path, const System::UnicodeString ImagePrefix, int &ImageSaveNo, System::UnicodeString &Location, bool &DoDefault);
	void __fastcall HookOnSaveItemToFile(Richview::TCustomRichView* Sender, const System::UnicodeString Path, Crvdata::TCustomRVData* RVData, int ItemNo, Rvstyle::TRVSaveFormat SaveFormat, bool Unicode, Rvtypes::TRVRawByteString &OutStr, bool &DoDefault);
	void __fastcall HookOnSaveRTFExtra(Richview::TCustomRichView* Sender, Rvstyle::TRVRTFSaveArea Area, System::TObject* Obj, int Index1, int Index2, bool InStyleSheet, Rvtypes::TRVAnsiString &RTFCode);
	void __fastcall HookOnStartDrag(System::TObject* Sender, Controls::TDragObject* &DragObject);
	void __fastcall HookOnURLNeeded(Richview::TCustomRichView* Sender, int id, System::UnicodeString &url);
	void __fastcall HookRVDragAndDrop(void);
	void __fastcall ScrollBarVChange(System::TObject* Sender, Stdctrls::TScrollCode ScrollCode, int &ScrollPos);
	void __fastcall ScrollBarHChange(System::TObject* Sender, Stdctrls::TScrollCode ScrollCode, int &ScrollPos);
	void __fastcall CreateFormatCanvas(void);
	void __fastcall DestroyFormatCanvas(void);
	void __fastcall FocusActiveEditor(void);
	
protected:
	Graphics::TBitmap* bClientRect;
	Srvtoolbar::TSRVToolBar* FMenuToolBarH;
	Srvtoolbar::TSRVToolBar* FMenuToolBarV;
	TSRVPropertyTBH* FMenuHorizontal;
	TSRVPropertyTBV* FMenuVertical;
	Srvtoolbar::TSRVButtonCollection* FMenuHButtons;
	Srvtoolbar::TSRVButtonCollection* FMenuVButtons;
	Types::TPoint OldCaretPos;
	Graphics::TBitmap* TableImg;
	bool IsScrollTimer;
	bool isSelectCell;
	bool isRefresh;
	bool ShowCaret;
	bool fPosCaret;
	bool UpdateScreen;
	bool TimerCaret;
	int countPO;
	bool isLoaded;
	bool fBusy;
	bool fBusyScroll;
	bool CanScrollToCaret;
	bool fBusyCaret;
	bool IsEmptyHeader;
	int FHeaderY100Pix;
	Rvedit::TRichViewEdit* FRVHeader;
	bool IsEmptyFooter;
	int FFooterY100Pix;
	Rvedit::TRichViewEdit* FRVFooter;
	Rvedit::TRichViewEdit* FRichViewEdit;
	Rvedit::TRichViewEdit* FActiveEditor;
	Rvedit::TRichViewEdit* FExternalRV;
	Rvedit::TRichViewEdit* FExternalRVH;
	Rvedit::TRichViewEdit* FExternalRVF;
	Rvstyle::TRVStyle* FExternalRVStyle;
	Rvstyle::TRVStyle* FExternalRVStyleHeader;
	Rvstyle::TRVStyle* FExternalRVStyleFooter;
	bool FCaretVisible;
	int FScrolledPage;
	Srvtoolbar::TSRVClickButtonEvent FOnHMenuClickButton;
	Srvtoolbar::TSRVClickButtonEvent FOnHMenuEnterButton;
	Srvtoolbar::TSRVClickButtonEvent FOnVMenuClickButton;
	Srvtoolbar::TSRVClickButtonEvent FOnVMenuEnterButton;
	TSRVMouseEvent FOnTableIconClick;
	Classes::TNotifyEvent FOnPageCountChange;
	Classes::TNotifyEvent FOnCurrentPageChange;
	Classes::TNotifyEvent FOnPageScrolled;
	TSRVMarginsChanged FOnMarginsChanged;
	TSRVChangeViewModeEvent FOnChangeViewModeAfter;
	TSRVChangeViewModeEvent FOnChangeViewModeBefore;
	TSRVComponentEvent FOnPaintComponent;
	Rvstyle::TRVUnits FUnitsProgram;
	Rvstyle::TRVStyle* rvse;
	Rvstyle::TRVStyle* rvseH;
	Rvstyle::TRVStyle* rvseF;
	Extctrls::TPanel* Panel;
	Extctrls::TPanel* PanelRight;
	Extctrls::TPanel* PanelBottom;
	Rvedit::TRichViewEdit* RV;
	Rvedit::TRichViewEdit* RVH;
	Rvedit::TRichViewEdit* RVF;
	Rvedit::TRichViewEdit* RVNPaint;
	Rvedit::TRichViewEdit* RVN;
	Rvedit::TRichViewEdit* FRVNote;
	Rvedit::TRichViewEdit* FExternalRVN;
	Rvnote::TCustomRVNoteItemInfo* FCurrentNote;
	int lockUpdateComponent;
	Controls::TControl* MouseMoveControl;
	Controls::TControl* FCurControl;
	Crvdata::TCustomRVData* OldCPRVData;
	int OldCPItemNo;
	Classes::TWndMethod StoredControlWindowProc;
	bool ControlMouseDown;
	TSRVMessageControl FOnMessageControl;
	TSRVCheckControl FOnCheckControl;
	Crvfdata::TCustomRVFormattedData* FirstRVData;
	int FirstCurItemNo;
	int FirstOffsetInCurItem;
	bool __fastcall DelEControl(Controls::TControl* ctrl);
	bool __fastcall DelRControl(Controls::TControl* ctrl);
	void __fastcall SetCurrentControl(Controls::TControl* AControl);
	void __fastcall UpdateControl(Controls::TControl* ctrl);
	void __fastcall HookControlWindowProc(Messages::TMessage &Message);
	bool __fastcall isCaretChange(void);
	DYNAMIC void __fastcall Timer(void);
	void __fastcall UpdateTimer(void);
	void __fastcall UpdateCaret(bool LockRepaint, const Types::TRect &PaintRect);
	void __fastcall UpdateCaretECom(const Types::TRect &PaintRect);
	void __fastcall DrawCaretDragAndDrag(void);
	void __fastcall SetOffsetDocX(const float Value);
	void __fastcall SetOffsetDocY(const float Value);
	void __fastcall UpdateView(void);
	float __fastcall UpdateViewEx(Rvscroll::TRVZoomMode ZoomMode, float ZoomPercent);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	void __fastcall GetOffsetPage(float &xoff, float &yoff);
	float __fastcall GetOffsetPageX(void);
	float __fastcall GetOffsetPageY(void);
	void __fastcall CallEventCheckpoint(void);
	void __fastcall RememberTable(int PageNo, int ItemNo, Rvtable::TRVTableItemInfo* Item, Crvfdata::TCustomRVFormattedData* ParentTable, int ParentLeft, int ParentTop);
	bool __fastcall GetCaretVisible(int PageNo);
	bool __fastcall GetCaretItemVisible(int PageNo);
	Types::TPoint __fastcall calculateMousePos(int X, int Y, bool &bInTextArea, bool &bInLeft, bool &bInPageArea);
	void __fastcall ScaleMargin(void);
	void __fastcall ResizeBuffer(void);
	Srvskinmanager::TSRVSkinManager* __fastcall GetSkinManager(void);
	int __fastcall GetHScrollBarSchemeIndex(void);
	int __fastcall GetVScrollBarSchemeIndex(void);
	void __fastcall SetSkinManager(Srvskinmanager::TSRVSkinManager* Value);
	void __fastcall SetHScrollBarSchemeIndex(int Value);
	void __fastcall SetVScrollBarSchemeIndex(int Value);
	void __fastcall SetHScrollPos(const int Value);
	void __fastcall SetVScrollPos(const int Value);
	void __fastcall SetValueHScrollPos(int Value);
	void __fastcall SetValueVScrollPos(int Value);
	void __fastcall RestoreEvent(const Rvedit::TRichViewEdit* RVE);
	virtual void __fastcall SetRichViewEdit(Rvedit::TRichViewEdit* Value);
	void __fastcall SetRVHeader(Rvedit::TRichViewEdit* Value);
	void __fastcall SetRVFooter(Rvedit::TRichViewEdit* Value);
	void __fastcall SetExternalRVH(Rvedit::TCustomRichViewEdit* Value);
	void __fastcall SetExternalRVF(Rvedit::TCustomRichViewEdit* Value);
	void __fastcall SetExternalRV(Rvedit::TCustomRichViewEdit* Value);
	void __fastcall SetExternalRVStyle(Rvstyle::TRVStyle* Value);
	void __fastcall SetExternalRVStyleHeader(Rvstyle::TRVStyle* Value);
	void __fastcall SetExternalRVStyleFooter(Rvstyle::TRVStyle* Value);
	void __fastcall SetRVSpellingCheck(Richview::TRVSpellingCheckEvent Value);
	bool __fastcall isChangeHScrollBar(int NewValue);
	bool __fastcall isChangeVScrollBar(int NewValue);
	void __fastcall SetHMax(int Value);
	void __fastcall SetVMax(int Value);
	int __fastcall GetHScrollPos(void);
	int __fastcall GetVScrollPos(void);
	int __fastcall GetHMaxScrollPos(void);
	int __fastcall GetVMaxScrollPos(void);
	float __fastcall GetOffsetX(void);
	float __fastcall GetOffsetY(void);
	Rvedit::TCustomRichViewEdit* __fastcall GetExternalRV(void);
	Rvedit::TCustomRichViewEdit* __fastcall GetExternalRVH(void);
	Rvedit::TCustomRichViewEdit* __fastcall GetExternalRVF(void);
	System::UnicodeString __fastcall GetVersion(void);
	void __fastcall SetVersion(const System::UnicodeString Value);
	void __fastcall SetFixMarginsMode(const TSRVFixMarginsMode Value);
	void __fastcall SetUseDrawHyperlinksEvent(const bool Value);
	bool __fastcall GetCanScroll(void);
	void __fastcall SetCanScroll(const bool Value);
	void __fastcall SetCanUpdate(const bool Value);
	void __fastcall SetCanUpdateMargin(const bool Value);
	void __fastcall SetCanCalculatePage(const bool Value);
	void __fastcall SetCaretVisible(const bool Value);
	bool __fastcall GetReadOnly(void);
	void __fastcall SetReadOnly(const bool Value);
	void __fastcall SetPageProperty(TSRVPageProperty* Value);
	void __fastcall SetViewProperty(TSRVViewProperty* Value);
	void __fastcall SetBackgroundProperty(TSRVBackgroundProperty* Value);
	void __fastcall SetMenuHButtons(const Srvtoolbar::TSRVButtonCollection* Value);
	void __fastcall SetMenuVButtons(const Srvtoolbar::TSRVButtonCollection* Value);
	void __fastcall SetMenuHorizontal(const TSRVPropertyTBH* Value);
	void __fastcall SetMenuVertical(const TSRVPropertyTBV* Value);
	void __fastcall VScrolled(void);
	void __fastcall HScrolled(void);
	bool __fastcall UpdatePosition(bool PosCaret);
	bool __fastcall checkRealTimeMode(void);
	HIDESBASE int __fastcall GetClientWidth(void);
	HIDESBASE int __fastcall GetClientHeight(void);
	HIDESBASE Types::TRect __fastcall GetClientRect(void);
	bool __fastcall GetHScrollBar(void);
	bool __fastcall GetVScrollBar(void);
	void __fastcall SetHScrollBar(bool Value);
	void __fastcall SetVScrollBar(bool Value);
	Rvscroll::TCPEventKind __fastcall GetCPEventKind(void);
	Graphics::TColor __fastcall GetRVColor(void);
	Rvscroll::TRVOptions __fastcall GetRVOptions(void);
	Rvedit::TRVEditorOptions __fastcall GetRVEditorOptions(void);
	Rvstyle::TRVRTFOptions __fastcall GetRTFOptions(void);
	Rvrtfprops::TRVRTFReaderProperties* __fastcall GetRTFReadProperties(void);
	Rvstyle::TRVFOptions __fastcall GetRVFOptions(void);
	Graphics::TBitmap* __fastcall GetRVBackgroundBitmap(void);
	Rvscroll::TBackgroundStyle __fastcall GetRVBackgroundStyle(void);
	Rvstyle::TRVFReaderStyleMode __fastcall GetRVFParaStylesReadMode(void);
	Rvstyle::TRVFReaderStyleMode __fastcall GetRVFTextStylesReadMode(void);
	Rvscroll::TRVTabNavigationType __fastcall GetTabNavigation(void);
	Rvscroll::TRVBiDiMode __fastcall GetRVBiDiMode(void);
	int __fastcall GetFirstPageNo(void);
	int __fastcall GetLastPageNo(void);
	int __fastcall GetFirstItemNo(int PageNo = 0x0);
	int __fastcall GetLastItemNo(int PageNo = 0x0);
	bool __fastcall IsInPrintingRange(int ItemNo);
	void __fastcall SetCPEventKind(Rvscroll::TCPEventKind Value);
	void __fastcall SetRVColor(Graphics::TColor Value);
	void __fastcall SetRVOptions(Rvscroll::TRVOptions Value);
	void __fastcall SetRVEditorOptions(Rvedit::TRVEditorOptions Value);
	void __fastcall SetRTFOptions(Rvstyle::TRVRTFOptions Value);
	void __fastcall SetRTFReadProperties(Rvrtfprops::TRVRTFReaderProperties* Value);
	void __fastcall SetRVFOptions(Rvstyle::TRVFOptions Value);
	void __fastcall SetRVBackgroundBitmap(Graphics::TBitmap* Value);
	void __fastcall SetRVBackgroundStyle(Rvscroll::TBackgroundStyle Value);
	void __fastcall SetRVFParaStylesReadMode(Rvstyle::TRVFReaderStyleMode Value);
	void __fastcall SetRVFTextStylesReadMode(Rvstyle::TRVFReaderStyleMode Value);
	void __fastcall SetTabNavigation(Rvscroll::TRVTabNavigationType Value);
	void __fastcall SetRVBiDiMode(Rvscroll::TRVBiDiMode Value);
	DYNAMIC Rvedit::TRichViewEdit* __fastcall CreateRichViewEditObject(void);
	DYNAMIC bool __fastcall isSRV(void);
	void __fastcall SelectArea(void);
	Types::TPoint __fastcall GetNearestPosition(int PageNo, const Types::TPoint &RVPos);
	int __fastcall GetYNearTopItem(int PageNo, int X);
	int __fastcall GetYNearBottomItem(int PageNo, int X);
	Types::TRect __fastcall GetPageClientRectEx(void);
	void __fastcall DrawShade(Graphics::TCanvas* Canvas, const Types::TRect &PageRect, const Types::TRect &PaintRect, float ScaleX, float ScaleY);
	void __fastcall SetScrollTimer(bool Enabled);
	void __fastcall ScrollTimer(void);
	Rvedit::TCustomRichViewEdit* __fastcall GetExternalRVN(void);
	Rvedit::TRichViewEdit* __fastcall CreateNoteEditor(void);
	void __fastcall DestroyNoteEditor(void);
	void __fastcall SetRVNote(Rvedit::TRichViewEdit* Value);
	void __fastcall SetExternalRVN(Rvedit::TCustomRichViewEdit* Value);
	void __fastcall LoadNoteToEditor(Rvedit::TRichViewEdit* NoteEditor, Rvnote::TCustomRVNoteItemInfo* Note);
	void __fastcall UpdateModifyNote(void);
	
public:
	Srvsbar::TSRVScrollBar* ScrollBarH;
	Srvsbar::TSRVScrollBar* ScrollBarV;
	bool RangeSearch;
	int RangeSearchFirstY;
	int RangeSearchLastY;
	int CountECtrs;
	_TSRichViewEdit__12 EControls;
	int CountRCtrs;
	_TSRichViewEdit__22 RControls;
	Classes::TNotifyEvent PSCurrentPageChange;
	Classes::TNotifyEvent PSPageScrolled;
	Classes::TNotifyEvent PSHScrolled;
	Classes::TNotifyEvent PSVScrolled;
	TSRVPaintPage PSPaintPage;
	TSRVPageChange PSPageChange;
	Classes::TNotifyEvent PSFormatChanged;
	Classes::TNotifyEvent PSPageBreakView;
	Classes::TNotifyEvent PrtOnChange;
	Classes::TNotifyEvent PSFullRedraw;
	Classes::TNotifyEvent SRVRHZoomChanged;
	Classes::TNotifyEvent SRVRHHScrolled;
	Classes::TNotifyEvent SRVRHVScrolled;
	Classes::TNotifyEvent SRVRHCaretMove;
	TSRVResizeTable SRVRHResizeTable;
	TSRVResizeCell SRVRHResizeCell;
	Classes::TNotifyEvent SRVRHBiDiModeChanged;
	TSRVChangeActiveEditorEvent SRVRHChangeActiveEditor;
	Classes::TNotifyEvent SRVRVZoomChanged;
	Classes::TNotifyEvent SRVRVHScrolled;
	Classes::TNotifyEvent SRVRVVScrolled;
	Classes::TNotifyEvent SRVRVCaretMove;
	TSRVResizeTable SRVRVResizeTable;
	TSRVResizeCell SRVRVResizeCell;
	Classes::TNotifyEvent SRVRVBiDiModeChanged;
	TSRVChangeActiveEditorEvent SRVRVChangeActiveEditor;
	__fastcall virtual TSRichViewEdit(Classes::TComponent* AOwner);
	__fastcall virtual ~TSRichViewEdit(void);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Paint(void);
	void __fastcall UpdateBuffer(void);
	void __fastcall UpdateBufferAt(const Types::TRect &PaintRect);
	DYNAMIC void __fastcall Resize(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
	void __fastcall Copy(void);
	void __fastcall Cut(void);
	void __fastcall Paste(void);
	void __fastcall SelectAll(void);
	void __fastcall StartCursor(void);
	void __fastcall StopCursor(void);
	bool __fastcall isStopCursor(void);
	void __fastcall SetBusy(const bool Value);
	bool __fastcall isBusy(void);
	void __fastcall InsertPageBreak(void);
	bool __fastcall IsFormatting(void);
	void __fastcall ProcessControls(void);
	void __fastcall ProcessControlsEx(int CtrlFirst, int CtrlLast);
	TDataCaretPos __fastcall SaveCaretPos(void);
	void __fastcall RestoreCaretPos(const TDataCaretPos &Data);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall DragDrop(System::TObject* Source, int X, int Y);
	DYNAMIC void __fastcall DragOver(System::TObject* Source, int X, int Y, Controls::TDragState State, bool &Accept);
	Rvtable::TRVTableItemInfo* __fastcall GetTableIconItem(void);
	Crvfdata::TCustomRVFormattedData* __fastcall GetTableIconRVData(void);
	Rvstyle::TRVLength __fastcall UnitsPerInchH(Rvstyle::TRVUnits Units);
	Rvstyle::TRVLength __fastcall UnitsPerInchV(Rvstyle::TRVUnits Units);
	bool __fastcall GetPageAt(int X, int Y, int &PageNo);
	int __fastcall GetPageNo(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, int Offs);
	void __fastcall CalculateAllPagePositions(void);
	bool __fastcall CalculatePagePosition(int PageNo);
	bool __fastcall CalculateCaretPos(void);
	bool __fastcall GetCaretPosInUnits(Rvstyle::TRVUnits Units, Rvstyle::TRVLength &CaretPosX, Rvstyle::TRVLength &CaretPosY);
	bool __fastcall IsEmpty(Rvedit::TCustomRichViewEdit* rve);
	void __fastcall ResetEventRuler(void);
	void __fastcall ResetEventRulerH(void);
	void __fastcall ResetEventRulerV(void);
	int __fastcall FootnoteCount(void);
	int __fastcall EndnoteCount(void);
	int __fastcall GetFootnoteIndex(Rvnote::TRVFootnoteItemInfo* Note);
	int __fastcall GetEndnoteIndex(Rvnote::TRVEndnoteItemInfo* Note);
	Rvnote::TRVFootnoteItemInfo* __fastcall GetFootnote(int Index);
	Rvnote::TRVEndnoteItemInfo* __fastcall GetEndnote(int Index);
	bool __fastcall UpdateNote(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo);
	bool __fastcall UpdateNoteEx(Rvnote::TCustomRVNoteItemInfo* Note);
	void __fastcall UpdateNotes(void);
	Rvnote::TRVFootnoteItemInfo* __fastcall GetFootnoteAt(int X, int Y);
	Rvnote::TRVEndnoteItemInfo* __fastcall GetEndnoteAt(int X, int Y);
	bool __fastcall GetCoordsNoteAtPage100Pix(Rvnote::TCustomRVNoteItemInfo* Note, int &PageNo, Types::TRect &RectNote);
	bool __fastcall GetNoteCoords(Rvnote::TCustomRVNoteItemInfo* Note, int &PageNo, Types::TRect &RectNote);
	void __fastcall SaveEditorToNote(Rvedit::TRichViewEdit* NoteEditor, Rvnote::TCustomRVNoteItemInfo* Note);
	float __fastcall GetZoomPercent(int PageNo);
	int __fastcall CalculatePageCount(void);
	Types::TPoint __fastcall ConvertRVtoSRV(const Types::TPoint &p);
	Types::TPoint __fastcall ConvertSRVtoRV(const Types::TPoint &p, bool &bInTextArea, bool &bInLeft, bool &bInPageArea);
	bool __fastcall GetItemAt(int X, int Y, Crvfdata::TCustomRVFormattedData* &RVData, int &ItemNo, int &OffsetInItem, bool Strict);
	Types::TRect __fastcall GetPageClientRect(int PageNo);
	Types::TRect __fastcall RectRich(int PageNo);
	Types::TRect __fastcall ScaleRect(const Types::TRect &r, float RatioX, float RatioY);
	Types::TRect __fastcall ScaleRectOut(const Types::TRect &r, float RatioX, float RatioY);
	Types::TRect __fastcall ZoomRectIn(const Types::TRect &r, float Ratio);
	Types::TRect __fastcall ZoomRectOut(const Types::TRect &r, float Ratio);
	int __fastcall GetClosestPageAt(const Types::TPoint &p);
	int __fastcall GetRVPageNoEx(int DrawItemNo);
	int __fastcall GetRVPageNo(const Types::TPoint &p);
	void __fastcall DeletePage(int PageNo);
	TSRVZoomInfo __fastcall ZoomCanvas(Graphics::TCanvas* Canvas, float ScaleX, float ScaleY);
	void __fastcall RestoreCanvasZoom(Graphics::TCanvas* Canvas, const TSRVZoomInfo &OldInfo);
	void __fastcall DrawHeader(int PageNo, Graphics::TCanvas* Canvas, float ScaleX, float ScaleY, const Types::TRect &PageRect, const Types::TRect &PaintRect, const Types::TRect &RClient, int OffsetX, int OffsetY, bool Printing);
	void __fastcall DrawFooter(int PageNo, Graphics::TCanvas* Canvas, float ScaleX, float ScaleY, const Types::TRect &PageRect, const Types::TRect &PaintRect, const Types::TRect &RClient, int OffsetX, int OffsetY, bool Printing);
	void __fastcall PaintPage(int PageNo, Graphics::TCanvas* Canvas, float ScaleX, float ScaleY, const Types::TRect &PageRect, const Types::TRect &PaintRect, const Types::TRect &RClient, int OffsetX, int OffsetY, bool Printing);
	void __fastcall PageBG(Graphics::TCanvas* Canvas, const Types::TRect &PaintRect);
	void __fastcall DrawPageBackground(Graphics::TCanvas* Canvas, int Width, int Height);
	void __fastcall UpdateRect(const Types::TRect &PaintRect);
	bool __fastcall DrawImage(Graphics::TCanvas* Canvas, Graphics::TBitmap* BGImage, int offX, int offY, float scaleX, float scaleY, const Types::TRect &PaintRect);
	bool __fastcall DrawPageBG(Graphics::TCanvas* Canvas, const Types::TRect &PageRect, const Types::TRect &PaintRect, float ScaleX, float ScaleY, int OffsetX, int OffsetY, int PageNo, bool Printing);
	void __fastcall DrawMetafile(int PageNo, Graphics::TMetafile* PicturePage, bool PageNoVisible, bool ClipMargins, bool Printing);
	void __fastcall DrawPage(int PageNo, int PageWd, int PageHt, int OffX, int OffY, Graphics::TCanvas* CanvasPage, bool PageNoVisible, bool ClipMargins, bool Printing);
	void __fastcall DrawPageEx(int PageNo, int PageWd, int PageHt, int OffX, int OffY, Graphics::TCanvas* CanvasPage, const Types::TRect &PaintRect, bool PageNoVisible, bool ClipMargins, bool Printing);
	void __fastcall DrawComponents(Graphics::TCanvas* Canvas, int PageNo, const Types::TRect &PaintRect, bool Printing, float ScaleX, float ScaleY, int OffX, int OffY);
	void __fastcall DrawMarker(Graphics::TCanvas* Canvas, Crvdata::TCustomRVData* RVData, int ItemNo, float ScaleX, float ScaleY);
	void __fastcall DrawFootnotes(Graphics::TCanvas* Canvas, int PageNo, const Types::TRect &PaintRect, bool Printing, float ScaleX, float ScaleY, int OffX, int OffY);
	void __fastcall DrawEndnotes(Graphics::TCanvas* Canvas, int PageNo, const Types::TRect &PaintRect, bool Printing, float ScaleX, float ScaleY, int OffX, int OffY);
	Rvedit::TRichViewEdit* __fastcall StartEditNote(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, bool ScrollToNote = true);
	bool __fastcall GetNoteInfo(Rvnote::TCustomRVNoteItemInfo* Note, Crvfdata::TCustomRVFormattedData* &RVData, int &ItemNo);
	bool __fastcall ReturnToNote(void);
	Types::TPoint __fastcall GetItemPos(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, int &AWidth, int &AHeight);
	void __fastcall BeginComponentsUpdate(void);
	void __fastcall EndComponentsUpdate(void);
	void __fastcall PrintRange(int StartPageNo, int EndPageNo);
	void __fastcall PrintAll(void);
	void __fastcall PrintCurrent(void);
	void __fastcall SetCurPage(int PageNo);
	void __fastcall FirstCurPage(void);
	void __fastcall LastCurPage(void);
	void __fastcall PriorCurPage(void);
	void __fastcall NextCurPage(void);
	bool __fastcall FindPriorItem(int *StyleNo, const int StyleNo_Size, Crvdata::TCustomRVData* &RVData, int &ItemNo);
	bool __fastcall FindNextItem(int *StyleNo, const int StyleNo_Size, Crvdata::TCustomRVData* &RVData, int &ItemNo);
	bool __fastcall FindPriorHyperlink(Crvdata::TCustomRVData* &RVData, int &ItemNo);
	bool __fastcall FindNextHyperlink(Crvdata::TCustomRVData* &RVData, int &ItemNo);
	bool __fastcall FindPriorCheckpoint(Crvdata::TCustomRVData* &RVData, int &ItemNo, bool CheckRaiseEvent);
	bool __fastcall FindNextCheckpoint(Crvdata::TCustomRVData* &RVData, int &ItemNo, bool CheckRaiseEvent);
	bool __fastcall FindPriorHeading(Crvdata::TCustomRVData* &RVData, int &ItemNo);
	bool __fastcall FindNextHeading(Crvdata::TCustomRVData* &RVData, int &ItemNo);
	bool __fastcall PriorCurItem(int *StyleNo, const int StyleNo_Size);
	bool __fastcall NextCurItem(int *StyleNo, const int StyleNo_Size);
	bool __fastcall PriorCurHyperlink(void);
	bool __fastcall NextCurHyperlink(void);
	bool __fastcall PriorCurCheckpoint(void);
	bool __fastcall NextCurCheckpoint(void);
	bool __fastcall PriorCurHeading(void);
	bool __fastcall NextCurHeading(void);
	bool __fastcall GetItemCoords100(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, int &ALeft, int &ATop, int &PageNo, int Part = 0xffffffff);
	bool __fastcall GetItemBounds100(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, Types::TRect &ARect, int &PageNoB, int &PageNoE, int Part = 0xffffffff);
	Types::TRect __fastcall GetItemBounds(Crvdata::TCustomRVData* RVData, int ItemNo, int Part = 0xffffffff);
	bool __fastcall GetItemPages(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, int &FirstPageNo, int &LastPageNo, int Part = 0xffffffff);
	void __fastcall GetFirstItemVisibleRV(Crvfdata::TCustomRVFormattedData* &RVData, int &ItemNo, int &OffsetInItem);
	void __fastcall GetLastItemVisibleRV(Crvfdata::TCustomRVFormattedData* &RVData, int &ItemNo, int &OffsetInItem);
	bool __fastcall ScrollToItem(Crvfdata::TCustomRVFormattedData* RVData, int ItemNo, bool SetCaret = true, bool EndItem = false);
	bool __fastcall ScrollToCaret(void);
	Types::TPoint __fastcall GetRVCaretPos(int &PageNo);
	void __fastcall Clear(void);
	void __fastcall Format(void);
	void __fastcall UpdateDocParameters(void);
	void __fastcall SetMargin(int MarginLeft, int MarginTop, int MarginRight, int MarginBottom);
	void __fastcall SetMarginMM(System::Extended MarginLeftMM, System::Extended MarginTopMM, System::Extended MarginRightMM, System::Extended MarginBottomMM);
	void __fastcall SetMarginUnit(Rvstyle::TRVLength MarginLeft, Rvstyle::TRVLength MarginTop, Rvstyle::TRVLength MarginRight, Rvstyle::TRVLength MarginBottom);
	Rvedit::TRichViewEdit* __fastcall GetEditorAt(int X, int Y, bool Activate);
	__property Canvas;
	__property int CurrentPage = {read=FCurrentPage, write=SetCurPage, nodefault};
	__property int PageNoEditor = {read=FPageNoEditor, nodefault};
	__property Rvedit::TRichViewEdit* ActiveEditor = {read=FActiveEditor};
	__property int PageNoMouseMove = {read=FPageNoMouseMove, nodefault};
	__property int PageNoMouseDown = {read=FPageNoMouseDown, nodefault};
	__property int ScrolledPage = {read=FScrolledPage, nodefault};
	__property int PageCount = {read=FPageCount, nodefault};
	__property int PageCountEndNote = {read=FPageCountEndNote, nodefault};
	__property Rvnote::TCustomRVNoteItemInfo* CurrentNote = {read=FCurrentNote};
	__property float OffsetX = {read=GetOffsetPageX};
	__property float OffsetY = {read=GetOffsetPageY};
	__property Types::TPoint CaretPos = {read=FCaretPos};
	__property Types::TRect ClientRect = {read=GetClientRect};
	__property int ClientWidth = {read=GetClientWidth, nodefault};
	__property int ClientHeight = {read=GetClientHeight, nodefault};
	void __fastcall RefreshData(void);
	void __fastcall RefreshMargin(void);
	void __fastcall RefreshMarginUnit(void);
	void __fastcall SetRVMargins(bool CompleteFormat = true);
	bool __fastcall LoadRVF(System::UnicodeString FileName);
	bool __fastcall LoadRVFFromStream(Classes::TStream* Stream);
	void __fastcall GetCurrentLineCol(int &Line, int &Column);
	void __fastcall GetPageStartItemNo(int PageNo, int &ItemNo, int &Offs);
	void __fastcall GetPageLastItemNo(int PageNo, int &ItemNo, int &Offs);
	int __fastcall GetFirstVisiblePage(void);
	int __fastcall GetLastVisiblePage(void);
	int __fastcall GetPageStartDrawItemNo(int PageNo);
	int __fastcall GetPageStartTableItem(int PageNo);
	int __fastcall GetPageStartTableRow(int PageNo);
	int __fastcall GetHeaderOffs(void);
	int __fastcall GetFooterOffs(void);
	int __fastcall GetHeaderY100Pix(void);
	int __fastcall GetFooterY100Pix(void);
	bool __fastcall StartEditing(TSRVRichViewEditType Editor);
	void __fastcall ConvertToDifferentUnits(Rvstyle::TRVStyleUnits Units);
	void __fastcall ConvertToPixels(void);
	void __fastcall ConvertToTwips(void);
	__property bool CanUpdate = {read=FCanUpdate, write=SetCanUpdate, nodefault};
	__property bool CanScroll = {read=GetCanScroll, write=SetCanScroll, nodefault};
	__property bool CanUpdateMargin = {read=FCanUpdateMargin, write=SetCanUpdateMargin, nodefault};
	__property bool CanCalculatePage = {read=FCanCalculatePage, write=SetCanCalculatePage, nodefault};
	__property float OffsetDocX = {read=FOffsetDocX, write=SetOffsetDocX};
	__property float OffsetDocY = {read=FOffsetDocY, write=SetOffsetDocY};
	__property int HScrollPos = {read=GetHScrollPos, write=SetHScrollPos, nodefault};
	__property int VScrollPos = {read=GetVScrollPos, write=SetVScrollPos, nodefault};
	__property int HMaxScrollPos = {read=GetHMaxScrollPos, nodefault};
	__property int VMaxScrollPos = {read=GetVMaxScrollPos, nodefault};
	__property int LeftMargin100Pix = {read=FLeftMargin100Pix, nodefault};
	__property int RightMargin100Pix = {read=FRightMargin100Pix, nodefault};
	__property int TopMargin100Pix = {read=FTopMargin100Pix, nodefault};
	__property int BottomMargin100Pix = {read=FBottomMargin100Pix, nodefault};
	__property int LeftMarginPix = {read=FLeftMarginPix, nodefault};
	__property int RightMarginPix = {read=FRightMarginPix, nodefault};
	__property int TopMarginPix = {read=FTopMarginPix, nodefault};
	__property int BottomMarginPix = {read=FBottomMarginPix, nodefault};
	__property int PageWidth100Pix = {read=FPageWidth100Pix, nodefault};
	__property int PageHeight100Pix = {read=FPageHeight100Pix, nodefault};
	__property int PageWidthPix = {read=FPageWidthPix, nodefault};
	__property int PageHeightPix = {read=FPageHeightPix, nodefault};
	__property int FirstPageNo = {read=GetFirstPageNo, nodefault};
	__property int LastPageNo = {read=GetLastPageNo, nodefault};
	__property Rvedit::TRichViewEdit* RichViewEdit = {read=FRichViewEdit, write=SetRichViewEdit};
	__property Rvedit::TRichViewEdit* RVHeader = {read=FRVHeader, write=SetRVHeader};
	__property int HeaderY100Pix = {read=FHeaderY100Pix, nodefault};
	__property Rvedit::TRichViewEdit* RVFooter = {read=FRVFooter, write=SetRVFooter};
	__property int FooterY100Pix = {read=FFooterY100Pix, nodefault};
	__property Rvedit::TRichViewEdit* RVNote = {read=FRVNote, write=SetRVNote};
	__property Controls::TControl* CurControl = {read=FCurControl};
	__property Srvtoolbar::TSRVToolBar* MenuToolBarH = {read=FMenuToolBarH};
	__property Srvtoolbar::TSRVToolBar* MenuToolBarV = {read=FMenuToolBarV};
	
__published:
	__property Align = {default=0};
	__property Anchors = {default=3};
	__property Constraints;
	__property PopupMenu;
	__property Color = {default=-16777211};
	__property ShowHint;
	__property Visible = {default=1};
	__property OnKeyPress;
	__property Srvskinmanager::TSRVSkinManager* SkinManager = {read=GetSkinManager, write=SetSkinManager};
	__property int HScrollBarSchemeIndex = {read=GetHScrollBarSchemeIndex, write=SetHScrollBarSchemeIndex, nodefault};
	__property int VScrollBarSchemeIndex = {read=GetVScrollBarSchemeIndex, write=SetVScrollBarSchemeIndex, nodefault};
	__property Rvstyle::TRVUnits UnitsProgram = {read=FUnitsProgram, write=SetUnitsProgram, default=2};
	__property System::UnicodeString Version = {read=GetVersion, write=SetVersion};
	__property TSRVFixMarginsMode FixMarginsMode = {read=FFixMarginsMode, write=SetFixMarginsMode, default=0};
	__property TSRVPageProperty* PageProperty = {read=FPageProperty, write=SetPageProperty};
	__property TSRVViewProperty* ViewProperty = {read=FViewProperty, write=SetViewProperty};
	__property TSRVBackgroundProperty* BackgroundProperty = {read=FBackgroundProperty, write=SetBackgroundProperty};
	__property Srvtoolbar::TSRVButtonCollection* MenuHButtons = {read=FMenuHButtons, write=SetMenuHButtons};
	__property Srvtoolbar::TSRVButtonCollection* MenuVButtons = {read=FMenuVButtons, write=SetMenuVButtons};
	__property TSRVPropertyTBH* MenuHorizontal = {read=FMenuHorizontal, write=SetMenuHorizontal};
	__property TSRVPropertyTBV* MenuVertical = {read=FMenuVertical, write=SetMenuVertical};
	__property Rvedit::TCustomRichViewEdit* ExternalRVN = {read=GetExternalRVN, write=SetExternalRVN};
	__property Rvedit::TCustomRichViewEdit* ExternalRV = {read=GetExternalRV, write=SetExternalRV};
	__property Rvedit::TCustomRichViewEdit* ExternalRVH = {read=GetExternalRVH, write=SetExternalRVH};
	__property Rvedit::TCustomRichViewEdit* ExternalRVF = {read=GetExternalRVF, write=SetExternalRVF};
	__property Rvstyle::TRVStyle* ExternalRVStyle = {read=FExternalRVStyle, write=SetExternalRVStyle};
	__property Rvstyle::TRVStyle* ExternalRVStyleHeader = {read=FExternalRVStyleHeader, write=SetExternalRVStyleHeader};
	__property Rvstyle::TRVStyle* ExternalRVStyleFooter = {read=FExternalRVStyleFooter, write=SetExternalRVStyleFooter};
	__property bool HScrollBar = {read=GetHScrollBar, write=SetHScrollBar, default=1};
	__property bool VScrollBar = {read=GetVScrollBar, write=SetVScrollBar, default=1};
	__property unsigned CaretBlinkTime = {read=FCaretBlinkTime, write=SetCaretBlinkTime, nodefault};
	__property bool CaretVisible = {read=FCaretVisible, write=SetCaretVisible, default=1};
	__property bool UseDrawHyperlinksEvent = {read=FUseDrawHyperlinksEvent, write=SetUseDrawHyperlinksEvent, default=1};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
	__property Rvscroll::TCPEventKind CPEventKind = {read=GetCPEventKind, write=SetCPEventKind, default=0};
	__property Graphics::TColor RVColor = {read=GetRVColor, write=SetRVColor, nodefault};
	__property Rvscroll::TRVOptions RVOptions = {read=GetRVOptions, write=SetRVOptions, nodefault};
	__property Rvedit::TRVEditorOptions RVEditorOptions = {read=GetRVEditorOptions, write=SetRVEditorOptions, nodefault};
	__property Rvstyle::TRVRTFOptions RTFOptions = {read=GetRTFOptions, write=SetRTFOptions, nodefault};
	__property Rvrtfprops::TRVRTFReaderProperties* RTFReadProperties = {read=GetRTFReadProperties, write=SetRTFReadProperties};
	__property Rvstyle::TRVFOptions RVFOptions = {read=GetRVFOptions, write=SetRVFOptions, nodefault};
	__property Rvstyle::TRVFReaderStyleMode RVFParaStylesReadMode = {read=GetRVFParaStylesReadMode, write=SetRVFParaStylesReadMode, default=2};
	__property Rvstyle::TRVFReaderStyleMode RVFTextStylesReadMode = {read=GetRVFTextStylesReadMode, write=SetRVFTextStylesReadMode, default=2};
	__property Rvscroll::TRVTabNavigationType TabNavigation = {read=GetTabNavigation, write=SetTabNavigation, nodefault};
	__property Rvscroll::TRVBiDiMode BiDiMode = {read=GetRVBiDiMode, write=SetRVBiDiMode, default=0};
	__property Graphics::TBitmap* RVBackgroundBitmap = {read=GetRVBackgroundBitmap, write=SetRVBackgroundBitmap};
	__property Rvscroll::TBackgroundStyle RVBackgroundStyle = {read=GetRVBackgroundStyle, write=SetRVBackgroundStyle, default=0};
	__property int MinPrintedItemNo = {read=FMinPrintedItemNo, write=FMinPrintedItemNo, default=0};
	__property int MaxPrintedItemNo = {read=FMaxPrintedItemNo, write=FMaxPrintedItemNo, default=-1};
	__property Richview::TJumpEvent OnJump = {read=FOnJump, write=FOnJump};
	__property Richview::TRVReadHyperlink OnReadHyperlink = {read=FOnReadHyperlink, write=FOnReadHyperlink};
	__property Richview::TRVWriteHyperlink OnWriteHyperlink = {read=FOnWriteHyperlink, write=FOnWriteHyperlink};
	__property TSRVPaintEvent OnPaint = {read=FOnPaint, write=FOnPaint};
	__property Classes::TNotifyEvent OnCaretMove = {read=FOnCaretMove, write=FOnCaretMove};
	__property Controls::TKeyEvent OnKeyDown = {read=FOnKeyDown, write=FOnKeyDown};
	__property Controls::TKeyEvent OnKeyUp = {read=FOnKeyUp, write=FOnKeyUp};
	__property Classes::TNotifyEvent OnSelect = {read=FOnSelect, write=FOnSelect};
	__property Classes::TNotifyEvent OnExit = {read=FOnExit, write=FOnExit};
	__property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
	__property Classes::TNotifyEvent OnResizeDoc = {read=FOnResizeDoc, write=FOnResizeDoc};
	__property Rvedit::TRVStyleConversionEvent OnStyleConversion = {read=FOnStyleConversion, write=FOnStyleConversion};
	__property Rvedit::TRVStyleConversionEvent OnParaStyleConversion = {read=FOnParaStyleConversion, write=FOnParaStyleConversion};
	__property Classes::TNotifyEvent OnCurParaStyleChanged = {read=FOnCurParaStyleChanged, write=FOnCurParaStyleChanged};
	__property Classes::TNotifyEvent OnCurTextStyleChanged = {read=FOnCurTextStyleChanged, write=FOnCurTextStyleChanged};
	__property OnClick;
	__property OnDblClick;
	__property OnEnter;
	__property OnDragDrop;
	__property OnDragOver;
	__property OnEndDrag;
	__property OnMouseMove;
	__property OnMouseUp;
	__property OnMouseDown;
	__property OnMouseWheel;
	__property TSRVCheckpointVisibleEvent OnCheckpointVisible = {read=FOnCheckpointVisible, write=FOnCheckpointVisible};
	__property Classes::TNotifyEvent OnCopy = {read=FRVCopy, write=FRVCopy};
	__property Classes::TNotifyEvent OnOleDragLeave = {read=FOleDragLeave, write=FOleDragLeave};
	__property Rvedit::TRVOnCaretGetOutEvent OnCaretGetOut = {read=FRVCaretGetOut, write=FRVCaretGetOut};
	__property Rvedit::TRVChangingEvent OnChanging = {read=FRVChanging, write=FRVChanging};
	__property OnContextPopup;
	__property Richview::TRVControlActionEvent OnControlAction = {read=FRVControlAction, write=FRVControlAction};
	__property Rvedit::TRVDropFilesEvent OnDropFiles = {read=FRVDropFiles, write=FRVDropFiles};
	__property Richview::TRVHTMLSaveImageEvent OnHTMLSaveImage = {read=FRVHTMLSaveImage, write=FRVHTMLSaveImage};
	__property Richview::TRVImportPictureEvent OnImportPicture = {read=FRVImportPicture, write=FRVImportPicture};
	__property Richview::TRVItemActionEvent OnItemAction = {read=FRVItemAction, write=FRVItemAction};
	__property Richview::TRVItemHintEvent OnItemHint = {read=FRVItemHint, write=FRVItemHint};
	__property Rvedit::TRVItemResizeEvent OnItemResize = {read=FRVItemResize, write=FRVItemResize};
	__property Rvedit::TRVItemTextEditEvent OnItemTextEdit = {read=FRVItemTextEdit, write=FRVItemTextEdit};
	__property Rvedit::TRVOleDragEnterEvent OnOleDragEnter = {read=FOleDragEnter, write=FOleDragEnter};
	__property Rvedit::TRVOleDragOverEvent OnOleDragOver = {read=FOleDragOver, write=FOleDragOver};
	__property Rvedit::TRVOleDropEvent OnOleDrop = {read=FOleDrop, write=FOleDrop};
	__property Rvedit::TRVPasteEvent OnPaste = {read=FRVPaste, write=FRVPaste};
	__property Richview::TRVProgressEvent OnProgress = {read=FRVProgress, write=FRVProgress};
	__property Richview::TRVDblClickEvent OnRVDblClick = {read=FRVDblClick, write=FRVDblClick};
	__property Richview::TRVFControlNeededEvent OnRVFControlNeeded = {read=FRVFControlNeeded, write=FRVFControlNeeded};
	__property Richview::TRVFImageListNeededEvent OnRVFImageListNeeded = {read=FRVFImageListNeeded, write=FRVFImageListNeeded};
	__property Richview::TRVFPictureNeededEvent OnRVFPictureNeeded = {read=FRVFPictureNeeded, write=FRVFPictureNeeded};
	__property Richview::TRVMouseEvent OnRVMouseDown = {read=FRVMouseDown, write=FRVMouseDown};
	__property Richview::TRVMouseMoveEvent OnRVMouseMove = {read=FRVMouseMove, write=FRVMouseMove};
	__property Richview::TRVMouseEvent OnRVMouseUp = {read=FRVMouseUp, write=FRVMouseUp};
	__property Richview::TRVRightClickEvent OnRVRightClick = {read=FRVRightClick, write=FRVRightClick};
	__property Richview::TRVSaveComponentToFileEvent OnSaveComponentToFile = {read=FSaveComponentToFile, write=FSaveComponentToFile};
	__property Richview::TRVSaveHTMLExtraEvent OnSaveHTMLExtra = {read=FSaveHTMLExtra, write=FSaveHTMLExtra};
	__property Richview::TRVSaveImageEvent2 OnSaveImage2 = {read=FSaveImage2, write=FSaveImage2};
	__property Richview::TRVSaveItemToFileEvent OnSaveItemToFile = {read=FSaveItemToFile, write=FSaveItemToFile};
	__property Richview::TRVSaveRTFExtraEvent OnSaveRTFExtra = {read=FSaveRTFExtra, write=FSaveRTFExtra};
	__property Richview::TRVSpellingCheckEvent OnSpellingCheck = {read=FRVSpellingCheck, write=SetRVSpellingCheck};
	__property Richview::TRVURLNeededEvent OnURLNeeded = {read=FURLNeeded, write=FURLNeeded};
	__property Controls::TStartDragEvent OnStartDrag = {read=FStartDrag, write=FStartDrag};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	__property TSRVChangeViewModeEvent OnChangeViewModeAfter = {read=FOnChangeViewModeAfter, write=FOnChangeViewModeAfter};
	__property TSRVChangeViewModeEvent OnChangeViewModeBefore = {read=FOnChangeViewModeBefore, write=FOnChangeViewModeBefore};
	__property TSRVMarginsChanged OnMarginsChanged = {read=FOnMarginsChanged, write=FOnMarginsChanged};
	__property TSRVComponentEvent OnPaintComponent = {read=FOnPaintComponent, write=FOnPaintComponent};
	__property TSRVMessageControl OnMessageControl = {read=FOnMessageControl, write=FOnMessageControl};
	__property TSRVCheckControl OnCheckControl = {read=FOnCheckControl, write=FOnCheckControl};
	__property Classes::TNotifyEvent OnFullRedraw = {read=FOnFullRedraw, write=FOnFullRedraw};
	__property TSRVDataDrawHyperlinkEvent OnDrawHyperlink = {read=FOnDrawHyperlink, write=FOnDrawHyperlink};
	__property TSRVPageChange OnPageChange = {read=FOnPageChange, write=FOnPageChange};
	__property TSRVChangeActiveEditorEvent OnChangeActiveEditor = {read=FOnChangeActiveEditor, write=FOnChangeActiveEditor};
	__property TSRVPaintPage OnPaintPage = {read=FOnPaintPage, write=FOnPaintPage};
	__property TSRVDrawPageBreak OnDrawPageBreak = {read=FOnDrawPageBreak, write=FOnDrawPageBreak};
	__property TSRVGetPagePosEvent OnGetPagePos = {read=FOnGetPagePosEvent, write=FOnGetPagePosEvent};
	__property TSRVMouseEvent OnClickPage = {read=FOnClickPage, write=FOnClickPage};
	__property TSRVMouseEvent OnTableIconClick = {read=FOnTableIconClick, write=FOnTableIconClick};
	__property Classes::TNotifyEvent OnPageFormatChanged = {read=FFormatChanged, write=FFormatChanged};
	__property Classes::TNotifyEvent OnZoomChanged = {read=FZoomChanged, write=FZoomChanged};
	__property Classes::TNotifyEvent OnZoomViewChanged = {read=FZoomViewChanged, write=FZoomViewChanged};
	__property Classes::TNotifyEvent OnPageCountChanged = {read=FOnPageCountChange, write=FOnPageCountChange};
	__property Classes::TNotifyEvent OnCurrentPageChange = {read=FOnCurrentPageChange, write=FOnCurrentPageChange};
	__property Classes::TNotifyEvent OnHScrolled = {read=FOnHScrolled, write=FOnHScrolled};
	__property Classes::TNotifyEvent OnVScrolled = {read=FOnVScrolled, write=FOnVScrolled};
	__property Classes::TNotifyEvent OnPageScrolled = {read=FOnPageScrolled, write=FOnPageScrolled};
	__property Srvtoolbar::TSRVClickButtonEvent OnHMenuClickButton = {read=FOnHMenuClickButton, write=FOnHMenuClickButton};
	__property Srvtoolbar::TSRVClickButtonEvent OnHMenuEnterButton = {read=FOnHMenuEnterButton, write=FOnHMenuEnterButton};
	__property Srvtoolbar::TSRVClickButtonEvent OnVMenuClickButton = {read=FOnVMenuClickButton, write=FOnVMenuClickButton};
	__property Srvtoolbar::TSRVClickButtonEvent OnVMenuEnterButton = {read=FOnVMenuEnterButton, write=FOnVMenuEnterButton};
public:
	/* TWinControl.CreateParented */ inline __fastcall TSRichViewEdit(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
#define SRV_VERSION L"v4.0"
static const System::Word crSRV_TABLE_HINT = 0x7bd;
#define cmPerInch  (2.540000E+00)
#define mmPerInch  (2.540000E+01)
static const System::ShortInt PicasPerInch = 0x6;
static const System::ShortInt PointsPerInch = 0x48;
static const System::ShortInt SRV_NOTESEPARATORHEIGHT = 0xa;
static const System::ShortInt SRV_NOTELINEWIDTH = 0x1;
static const int SRV_NOTELINECOLOR = 0;
static const System::Word WM_PAGESCROLL = 0xbbd;
static const System::Word WM_REPAINT_CLIENTRECT = 0xbbe;
static const System::Word WM_PAGESET = 0xbbf;
static const System::Word WM_UPDATEIMEWINDOW = 0xbc0;
static const System::Word WM_REPAINT_CONTROL = 0xbc1;
extern PACKAGE TSRVItemResizeMode SRVItemResizeMode;
extern PACKAGE int MouseWheelZoomMin;
extern PACKAGE int MouseWheelZoomMax;
extern PACKAGE float MouseWheelZoomSpeed;
extern PACKAGE Rvedit::TCustomRichViewEdit* __fastcall SRVGetRichViewEditFromPopupComponent(Classes::TComponent* PopupComponent);
extern PACKAGE Rvedit::TCustomRichViewEdit* __fastcall SRVGetRichViewEdit(Rvedit::TCustomRichViewEdit* Target, bool MainDoc);

}	/* namespace Sclrview */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE)
using namespace Sclrview;
#endif
#pragma pack(pop)
#pragma option pop

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