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

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

#ifndef RvervdataHPP
#define RvervdataHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Crvdata.hpp>	// Pascal unit
#include <Crvfdata.hpp>	// Pascal unit
#include <Rvrvdata.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Rvundo.hpp>	// Pascal unit
#include <Rvback.hpp>	// Pascal unit
#include <Dlines.hpp>	// Pascal unit
#include <Rvfuncs.hpp>	// Pascal unit
#include <Rvedit.hpp>	// Pascal unit
#include <Rvuni.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Richview.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Comctrls.hpp>	// Pascal unit
#include <Typinfo.hpp>	// Pascal unit
#include <Rvclasses.hpp>	// Pascal unit
#include <Rvrtfprops.hpp>	// Pascal unit
#include <Rvresize.hpp>	// Pascal unit
#include <Activex.hpp>	// Pascal unit
#include <Rvdragdrop.hpp>	// Pascal unit
#include <Rvrtferr.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit

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

namespace Rvervdata
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TRVCharPos;
class PASCALIMPLEMENTATION TRVCharPos : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
public:
	int X;
	int DrawItemNo;
	int Offset;
	int MoveRightTo;
	__fastcall virtual TRVCharPos(Classes::TCollection* Owner);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
public:
	#pragma option push -w-inl
	/* TCollectionItem.Destroy */ inline __fastcall virtual ~TRVCharPos(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVCharPosCollection;
class PASCALIMPLEMENTATION TRVCharPosCollection : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
private:
	HIDESBASE TRVCharPos* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TRVCharPos* Value);
	
public:
	__property TRVCharPos* Items[int Index] = {read=GetItem, write=SetItem};
public:
	#pragma option push -w-inl
	/* TCollection.Create */ inline __fastcall TRVCharPosCollection(TMetaClass* ItemClass) : Classes::TCollection(ItemClass) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TRVCharPosCollection(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TRVParaListOperation { rvplopChange, rvplopRemove, rvplopLevel };
#pragma option pop

#pragma option push -b-
enum TRVUndoDest { udNone, udUndo, udRedo };
#pragma option pop

class DELPHICLASS TRVEditRVData;
class PASCALIMPLEMENTATION TRVEditRVData : public Rvrvdata::TRichViewRVData 
{
	typedef Rvrvdata::TRichViewRVData inherited;
	
private:
	int FPrevTextStyleNo;
	int FCurTag;
	Rvresize::TRVItemResizer* FResizer;
	Controls::TControl* ResizingControl;
	bool FCustomCaretActive;
	#pragma pack(push,1)
	Types::TRect FCustomCaretRect;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TPoint FCustomCaretOldPos;
	#pragma pack(pop)
	Graphics::TBitmap* FCustomCaretBack;
	bool __fastcall InsSomething(Rvitem::TCustomRVItemInfo* &info, AnsiString &s, AnsiString &SplitText, bool AutoTag, bool CallTEEvent, int &InsertPoint, int &ItemsAdded, bool &FullReformat, int &NewListNo, bool NoNewLineReset);
	Rvitem::TCustomRVItemInfo* __fastcall InsEmptyString(int Index, int Tag, int ParaStyle, int FontStyle, bool SameAsPrev, bool BR);
	Rvitem::TCustomRVItemInfo* __fastcall InsString(AnsiString s, int Index, int Tag, int ParaStyle, int FontStyle, bool SameAsPrev, bool BR, bool &FullReformat);
	Rvitem::TCustomRVItemInfo* __fastcall InsString2(AnsiString s, int Index, int Tag, Rvitem::TCustomRVItemInfo* Source, bool SameAsPrev, bool BR, bool &FullReformat);
	Rvitem::TCustomRVItemInfo* __fastcall CreateTextItem(int Tag, int ParaStyle, int FontStyle, bool SameAsPrev, bool BR);
	Rvitem::TCustomRVItemInfo* __fastcall CreateTextItem2(int Tag, Rvitem::TCustomRVItemInfo* Source, bool SameAsPrev, bool BR);
	void __fastcall InsertString(AnsiString &s, AnsiString &SplitText, int StyleNo, bool AutoTag, bool CaretBefore);
	void __fastcall DoResizeControl(int ItemNo, int OldWidth, int OldHeight, int NewWidth, int NewHeight);
	int __fastcall GetParaEndItemNo(int ItemNo);
	bool __fastcall SetParaStyle(int StartItemNo, int EndItemNo, int ParaNo, bool &FullReformat);
	void __fastcall AfterAddingText(const AnsiString SplitText, int StartItemNo, int EndItemNo, int ItemsAdded, int DIStartNo, int DIEndNo, bool FullReformat, bool CaretBefore);
	bool __fastcall ItemHasPersistentCheckpoint(int ItemNo);
	bool __fastcall ParaHasPersistentCheckpoint(int ItemNo);
	bool __fastcall MovePersistentCheckpoint(int ItemNo, bool OnlyToPrev);
	void __fastcall ClearCurTag(void);
	int __fastcall GetOneSelectedItemNo(void);
	bool __fastcall InsertItemFromTextFile(AnsiString &s, AnsiString &SplitText, Rvitem::TCustomRVItemInfo* item, bool AutoTag, bool BR, int &FirstIP, int &InsertPoint, int &ItemsAdded, int &MarkerItemNo, bool &FirstItem, bool &PageBreak, bool &FromNewLine, bool &FullReformat);
	bool __fastcall DoItemTextEdit(const AnsiString OldText, int ItemNo);
	bool __fastcall DoItemTextEditEx(const AnsiString OldText, int ItemNo, Rvedit::TRVUndoType UndoType);
	
protected:
	DYNAMIC void __fastcall DeselectPartiallySelectedItem(Rvitem::TCustomRVItemInfo* NewPartiallySelected);
	virtual void __fastcall SetPartialSelectedItem(Rvitem::TCustomRVItemInfo* Item);
	DYNAMIC void __fastcall AfterDeleteStyles(Rvitem::TRVDeleteUnusedStylesData* Data);
	bool __fastcall ReplicateMarker(int ReferenceItemNo, int InsertItemNo, bool &FullReformat, bool EditFlag);
	void __fastcall AdjustMarkerCaret(bool Right, int &Offs);
	void __fastcall AdjustMarkerPos(int &ItemNo, int &Offs, bool DefRight);
	bool __fastcall CaretAtTheBeginningOfParaSection(bool OnlyAllowBeginningOfPara);
	bool __fastcall CaretAtTheEndOfParaSection(bool OnlyAllowEndOfPara);
	bool __fastcall CaretInTheLastLine(void);
	bool __fastcall CaretAtTheBeginningOfLine(void);
	bool __fastcall CaretAtTheEndOfLine(void);
	virtual void __fastcall PostPaintTo(Graphics::TCanvas* Canvas, int XShift, int YShift, int FirstDrawItemNo, int LastDrawItemNo, bool PrintMode, bool StrictTop, bool StrictBottom);
	bool __fastcall GetResizeHandleAt(int X, int Y, Rvresize::TRVResizeHandleIndex &Index);
	DYNAMIC bool __fastcall InitDragging(Rvdragdrop::TRVDropSource* &DropSource, int &OKEffect);
	DYNAMIC void __fastcall DoneDragging(bool FDeleteSelection);
	DYNAMIC void __fastcall LiveSpellingCheckCurrentItem(void);
	DYNAMIC void __fastcall DoAfterFormat(void);
	
public:
	Crvfdata::TRVDragDropCaretInfo* FDragDropCaretInfo;
	int FCurTextStyleNo;
	int FCurParaStyleNo;
	Rvundo::TRVUndoList* UndoList;
	Rvundo::TRVUndoList* RedoList;
	TRVUndoDest UndoDest;
	int CaretDrawItemNo;
	int CaretOffs;
	TRVCharPosCollection* CharEnds;
	int CaretHeight;
	bool FRVFInserted;
	void __fastcall ActivateCustomCaretTimer(void);
	void __fastcall DeactivateCustomCaretTimer(void);
	void __fastcall DrawCustomCaret(void);
	void __fastcall ClearCustomCaret(void);
	void __fastcall DestroyCustomCaretBack(void);
	virtual void __fastcall PaintBuffered(void);
	void __fastcall LaterSetBackLiveSpellingTo(int ItemNo, int Offs, bool ClearPainters);
	void __fastcall CreateDragDropCaretInfo(void);
	void __fastcall ReleaseDragDropCaretInfo(void);
	DYNAMIC Crvfdata::TRVDragDropCaretInfo* __fastcall GetDragDropCaretInfo(void);
	void __fastcall AssignCurTag(void);
	int __fastcall GetActualCurStyleNo(void);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	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);
	bool __fastcall CancelResize(void);
	DYNAMIC void __fastcall AdjustMouseUpSelection(void);
	void __fastcall ResizeItem(int ItemNo, int Width, int Height);
	virtual void __fastcall XorDrawing(void);
	DYNAMIC void __fastcall MarkStylesInUse(Rvitem::TRVDeleteUnusedStylesData* Data);
	DYNAMIC bool __fastcall InsertFirstRVFItem(int &Index, AnsiString &s, Rvitem::TCustomRVItemInfo* &li, bool EditFlag, bool &FullReformat, int &NewListNo);
	Rvundo::TRVUndoList* __fastcall GetUndoList(void);
	void __fastcall Change(void);
	void __fastcall ChangeEx(bool ClearRedo);
	DYNAMIC void __fastcall DoOnSelection(bool AllowScrolling);
	void __fastcall CreateResizer(void);
	void __fastcall DestroyResizer(void);
	void __fastcall UpdateResizer(void);
	DYNAMIC void __fastcall DoCurrentTextStyleConversion(int &StyleNo, int ParaStyleNo, int ItemNo, int UserData, bool ToWholeParagraphs);
	void __fastcall Do_ReformateRange(int StartNo, int EndNo, bool SuperReformat);
	void __fastcall Do_DeleteItem(int ItemNo, bool &FullReformat);
	void __fastcall Do_InsertItem(int ItemNo, AnsiString &s, Rvitem::TCustomRVItemInfo* item, bool FromUndo, bool &FullReformat);
	void __fastcall Do_ReplaceItem(int ItemNo, Rvitem::TCustomRVItemInfo* item);
	void __fastcall Do_DeleteItems(int StartItemNo, int EndItemNo, bool &FullReformat);
	void __fastcall Do_InsertItems(int ItemNo, Rvitem::TRVItemList* sl, bool FromUndo, bool &FullReformat);
	void __fastcall Do_ModifyItem(int ItemNo, const AnsiString s, Rvitem::TCustomRVItemInfo* Item);
	Rvundo::TRVUndoInsertItemsInfo* __fastcall Do_InsertItems_1(int ItemNo, int Count);
	void __fastcall Do_InsertItems_2(int ItemNo, int Count, Rvundo::TRVUndoInsertItemsInfo* ui, bool &FullReformat);
	void __fastcall Do_DeleteSubstring(int ItemNo, int Index, int ALength);
	void __fastcall Do_InsertSubstring(int ItemNo, int Index, const AnsiString s);
	void __fastcall Do_NewLine(int ItemNo, bool SameAsPrev, int ParaNo, bool &FullReformat);
	void __fastcall Do_BR(int ItemNo, bool BR, bool &FullReformat);
	void __fastcall Do_PageBreak(int ItemNo, bool PageBreak);
	void __fastcall Do_ClearTextFlow(int ItemNo, bool Left, bool Right);
	void __fastcall Do_ExtraIntProperty(int ItemNo, Rvitem::TRVExtraItemProperty Prop, int Value);
	void __fastcall Do_ExtraStrProperty(int ItemNo, Rvitem::TRVExtraItemStrProperty Prop, const AnsiString Value);
	void __fastcall Do_Concate(int FirstItemNo);
	void __fastcall Do_MoveCP(int SrcItemNo, int DestItemNo);
	bool __fastcall Do_Para(int FirstItemNo, int EndItemNo, int ParaNo, bool &FullReformat);
	bool __fastcall Do_ParaList(int FirstItemNo, Rvclasses::TRVIntegerList* ParaList, bool &FullReformat);
	void __fastcall Do_StyleNo(int ItemNo, int StyleNo);
	void __fastcall Do_AssociatedTextStyleNo(int ItemNo, int TextStyleNo);
	void __fastcall Do_Tag(int ItemNo, int Tag, bool AssignAsIs);
	void __fastcall Do_AddCP(int ItemNo, Rvitem::TRVCPInfo* Checkpoint);
	void __fastcall Do_DeleteCP(int ItemNo);
	void __fastcall Do_ChangeTextR(int ItemNo, const AnsiString s);
	void __fastcall Do_ChangeVAlign(int ItemNo, Rvstyle::TRVVAlign VAlign);
	void __fastcall Do_Resize(int ItemNo, int Width, int Height, bool Reformat);
	void __fastcall Do_ItemModifyTerminator(int ItemNo, bool Opening);
	Rvundo::TRVUndoModifyItemProps* __fastcall Do_ModifyItemIntProperty(int ItemNo, System::TObject* SubObject, const AnsiString PropertyName, int Value, bool AffectSize, bool AffectWidth, TMetaClass* UndoInfoClass);
	Rvundo::TRVUndoModifyItemProps* __fastcall Do_ModifyItemStrProperty(int ItemNo, System::TObject* SubObject, const AnsiString PropertyName, const AnsiString Value, TMetaClass* UndoInfoClass);
	Rvundo::TRVUndoModifyItemProps* __fastcall Do_ModifyItemIntProperties(int ItemNo, System::TObject* SubObject, Classes::TStringList* PropList, bool AffectSize, bool AffectWidth, TMetaClass* UndoInfoClass);
	void __fastcall BeginUndoSequence(Rvedit::TRVUndoType UndoType, bool AllowFinalize);
	void __fastcall SetUndoGroupMode(bool GroupUndo);
	void __fastcall FinalizeUndoGroup(void);
	void __fastcall BeginNamedUndoSequence(Rvedit::TRVUndoType UndoType, const AnsiString Caption, bool AllowFinalize);
	void __fastcall EndUndoSequence(void);
	void __fastcall BeginRedoSequence(Rvedit::TRVUndoType UndoType, const AnsiString Caption);
	DYNAMIC void __fastcall GetSelectionBoundsEx(int &StartItemNo, int &StartItemOffs, int &EndItemNo, int &EndItemOffs, bool Normalize);
	DYNAMIC void __fastcall GetSelBounds(int &StartNo, int &EndNo, int &StartOffs, int &EndOffs, bool Normalize);
	DYNAMIC void __fastcall Clear(void);
	void __fastcall PrepareForEdit(void);
	bool __fastcall DeleteSelection_(void);
	bool __fastcall CanDelete(void);
	void __fastcall InsertTextTyping(AnsiString text, char Key);
	void __fastcall InsertTextA_(const AnsiString text, bool AutoTag, bool CaretBefore);
	void __fastcall InsertTextW_(const AnsiString text, bool AutoTag, bool CaretBefore);
	bool __fastcall OnEnterPress_(bool Shift, bool Recursive);
	void __fastcall OnDeletePress_(bool Ctrl, bool MovedFromLineEnd);
	void __fastcall OnBackSpacePress_(bool Ctrl, bool MultiDelete, bool FromNextLine);
	void __fastcall SetCurTextStyleNo(int Value);
	void __fastcall SetCurParaStyleNo(int Value);
	virtual void __fastcall ClearTemporal(void);
	void __fastcall ApplyParaStyle(int ParaStyleNo, Rvitem::TRVEStyleConversionType ConvType);
	bool __fastcall OnHomePress(bool Ctrl);
	bool __fastcall OnDownPress(bool Shift, bool Ctrl);
	bool __fastcall OnEndPress(bool Ctrl);
	bool __fastcall OnLeftPress(bool Shift, bool Ctrl);
	bool __fastcall OnPgDownPress(void);
	bool __fastcall OnPgUpPress(void);
	bool __fastcall OnRightPress(bool Shift, bool Ctrl);
	bool __fastcall OnUpPress(bool Shift, bool Ctrl);
	void __fastcall MoveCaretToTheBeginningOfThePrevParagraph(void);
	void __fastcall MoveCaretToTheEndOfTheNextParagraph(void);
	void __fastcall ChangeCaret(bool ForceCreate, bool ScrollToCaret, bool DontChangeStyle, bool RefreshBefore);
	HIDESBASEDYNAMIC int __fastcall BuildJumpsCoords(bool IgnoreReadOnly);
	DYNAMIC void __fastcall ClearJumpsCoords(void);
	virtual void __fastcall Format_(bool OnlyResized, bool ForceFormat, bool NoScroll, int depth, Graphics::TCanvas* Canvas, bool OnlyTail, bool NoCaching, bool Reformatting);
	DYNAMIC void __fastcall GetSelStart(int &DINo, int &DIOffs);
	DYNAMIC void __fastcall SrchSelectIt(int StartItemNo, int StartOffs, int EndItemNo, int EndOffs, bool Invert);
	DYNAMIC void __fastcall SrchStart(bool Down, bool FromStart, int &strt, int &offs);
	int __fastcall GetCurItemNo(void);
	int __fastcall GetOffsetInCurItem(void);
	bool __fastcall InsertSomething(Rvitem::TCustomRVItemInfo* info, AnsiString &s, AnsiString &SplitText, bool AutoTag, bool CaretBefore, bool CallTEEvent);
	bool __fastcall NotFormatted(void);
	void __fastcall StartShiftMoving(void);
	void __fastcall EndShiftMoving(void);
	void __fastcall ApplyStyleConversion_(int UserData, Rvitem::TRVEStyleConversionType ConvType, bool ApplyToWholeParas);
	bool __fastcall InsertRVFFromStreamEd_(Classes::TStream* Stream);
	void __fastcall OnChangeCaretLine(int DLOffs);
	void __fastcall ConcateAfterAdding(int &InsertPoint, int &LastInserted, int &ItemsAdded, int &Offs);
	bool __fastcall InsertRTFFromStreamEd_(Classes::TStream* Stream);
	DYNAMIC bool __fastcall SaveRTFToStream(Classes::TStream* Stream, const AnsiString Path, bool SelectionOnly, int Level, Graphics::TColor Color, Rvback::TRVBackground* Background, Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* StyleToFont, Rvclasses::TRVIntegerList* ListOverrideOffsetsList1, Rvclasses::TRVIntegerList* ListOverrideOffsetsList2, Crvdata::TRVRTFFontTable* FontTable, double tpp, bool CompleteDocument, Crvdata::TCustomRVData* Header, Crvdata::TCustomRVData* Footer);
	bool __fastcall InsertTextFromStream(Classes::TStream* Stream, bool OEM, bool AutoTag);
	bool __fastcall InsertTextFromStreamW(Classes::TStream* Stream, bool AutoTag);
	bool __fastcall InsertTextFromFile(const AnsiString FileName, bool OEM, bool AutoTag);
	bool __fastcall InsertTextFromFileW(const AnsiString FileName, bool AutoTag);
	void __fastcall KeyPress(char &Key);
	void __fastcall AdjustControlPlacement(int ItemNo);
	void __fastcall ResizeControl(int ItemNo, int NewWidth, int NewHeight, bool Reformat);
	void __fastcall Reformat(bool FullFormat, bool ForceFormat, bool NoScroll, int ItemNo, bool UpdateView);
	void __fastcall Reformat_(bool FullFormat, int StartDrawItem, int EndDrawItem, int ItemsAdded);
	void __fastcall BeginItemModify(int ItemNo, int &ModifyData);
	void __fastcall EndItemModify(int ItemNo, int ModifyData);
	void __fastcall SelectCurrentWord(void);
	void __fastcall InsertPageBreak(void);
	void __fastcall SplitAtCaret(void);
	DYNAMIC bool __fastcall SaveHTMLToStreamEx(Classes::TStream* Stream, const AnsiString Path, const AnsiString Title, const AnsiString ImagesPrefix, const AnsiString ExtraStyles, const AnsiString ExternalCSS, const AnsiString CPPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, Graphics::TColor &CurrentFileColor, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background, Rvclasses::TRVList* Bullets);
	DYNAMIC bool __fastcall SaveHTMLToStream(Classes::TStream* Stream, const AnsiString Path, const AnsiString Title, const AnsiString ImagesPrefix, Rvstyle::TRVSaveOptions Options, Graphics::TColor Color, int &imgSaveNo, int LeftMargin, int TopMargin, int RightMargin, int BottomMargin, Rvback::TRVBackground* Background, Rvclasses::TRVList* Bullets);
	Types::TPoint __fastcall GetIMEWinCoord();
	void __fastcall PrepareForUpdateRangeAfterMarkersOrSeq(int StartNo, int EndNo, bool ForDeletion, int &FirstItemNo, int &LastMarkerIndex, int &LastSeqIndex, Rvclasses::TRVIntegerList* &ListNos, Classes::TStringList* &SeqNames);
	void __fastcall UpdateAfterMarkersOrSeq(int FirstItemNo, int LastMarkerIndex, int LastSeqIndex, Rvclasses::TRVIntegerList* ListNos, Classes::TStringList* SeqNames);
	void __fastcall UpdateRangeAfterMarkersOrSeq(int StartNo, int EndNo);
	void __fastcall ApplyListStyle_(int AListNo, int AListLevel, int AStartFrom, bool AUseStartFrom, bool ARecursive, TRVParaListOperation Operation, int &ItemsAdded, int &StartNo, int &EndNo, int &SelStartNo, int &SelStartOffs, int &SelEndNo, int &SelEndOffs, Rvclasses::TRVIntegerList* ListNos, int &LastVWMarkerIndex);
	void __fastcall ApplyListStyle(int AListNo, int AListLevel, int AStartFrom, bool AUseStartFrom, bool ARecursive, TRVParaListOperation Operation);
	__fastcall virtual TRVEditRVData(Rvscroll::TRVScroller* RichView);
	__fastcall virtual ~TRVEditRVData(void);
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE int RichViewEditCaretWidth;
extern PACKAGE int RichViewEditCaretHeightExtra;
extern PACKAGE int RichViewEditMaxCaretHeight;
extern PACKAGE bool RichViewEditDefaultProportionalResize;
extern PACKAGE bool RichViewEditEnterAllowsEmptyMarkeredLines;

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

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