// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'RVERVData.pas' rev: 5.00

#ifndef RVERVDataHPP
#define RVERVDataHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <RVRTFErr.hpp>	// Pascal unit
#include <RVRTFProps.hpp>	// Pascal unit
#include <RVClasses.hpp>	// Pascal unit
#include <TypInfo.hpp>	// Pascal unit
#include <ComCtrls.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <RichView.hpp>	// Pascal unit
#include <RVScroll.hpp>	// Pascal unit
#include <RVUni.hpp>	// Pascal unit
#include <RVEdit.hpp>	// Pascal unit
#include <RVFuncs.hpp>	// Pascal unit
#include <DLines.hpp>	// Pascal unit
#include <RVBack.hpp>	// Pascal unit
#include <RVUndo.hpp>	// Pascal unit
#include <RVItem.hpp>	// Pascal unit
#include <RVRVData.hpp>	// Pascal unit
#include <CRVFData.hpp>	// Pascal unit
#include <CRVData.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.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 TRVUndoDest { udNone, udUndo, udRedo };
#pragma option pop

class DELPHICLASS TRVEditRVData;
class PASCALIMPLEMENTATION TRVEditRVData : public Rvrvdata::TRichViewRVData 
{
	typedef Rvrvdata::TRichViewRVData inherited;
	
private:
	int FPrevTextStyleNo;
	Controls::TControl* ResizingControl;
	bool __fastcall InsSomething(Rvitem::TCustomRVItemInfo* info, const AnsiString s, int &InsertPoint, 
		int &ItemsAdded, bool &FullReformat);
	Rvitem::TCustomRVItemInfo* __fastcall InsEmptyString(int Index, int Tag, int ParaStyle, int FontStyle
		, 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(const AnsiString s, int StyleNo);
	void __fastcall DoResizeControl(int ItemNo, int OldWidth, int OldHeight, int NewWidth, int NewHeight
		);
	int __fastcall GetParaEndItemNo(int ItemNo);
	void __fastcall SetParaStyle(int StartItemNo, int EndItemNo, int ParaNo, bool &FullReformat);
	void __fastcall AfterAddingText(int StartItemNo, int EndItemNo, int ItemsAdded, int DIStartNo, int 
		DIEndNo, bool FullReformat);
	
protected:
	int CaretHeight;
	int CaretOffs;
	TRVCharPosCollection* CharEnds;
	bool __fastcall IsProtected(int ItemNo, Rvstyle::TRVProtectOption Option);
	bool __fastcall IsParaProtected(int ParaNo);
	bool __fastcall IsItemParaProtected(int ItemNo);
	bool __fastcall IsSticking(int FirstItemNo);
	DYNAMIC void __fastcall DeselectPartiallySelectedItem(Rvitem::TCustomRVItemInfo* NewPartiallySelected
		);
	virtual void __fastcall SetPartialSelectedItem(Rvitem::TCustomRVItemInfo* Item);
	DYNAMIC void __fastcall AfterDeleteStyles(Rvclasses::TRVIntegerList* TextStylesShift, Rvclasses::TRVIntegerList* 
		ParaStylesShift);
	
public:
	int FCurTextStyleNo;
	int FCurParaStyleNo;
	Rvundo::TRVUndoList* UndoList;
	Rvundo::TRVUndoList* RedoList;
	TRVUndoDest UndoDest;
	int CaretDrawItemNo;
	DYNAMIC void __fastcall MarkStylesInUse(Rvclasses::TRVIntegerList* UsedTextStyles, Rvclasses::TRVIntegerList* 
		UsedParaStyles);
	DYNAMIC bool __fastcall InsertFirstRVFItem(int &Index, const AnsiString s, Rvitem::TCustomRVItemInfo* 
		li, bool EditFlag, bool &FullReformat);
	Rvundo::TRVUndoList* __fastcall GetUndoList(void);
	void __fastcall Change(void);
	void __fastcall ChangeEx(bool ClearRedo);
	DYNAMIC void __fastcall DoOnSelection(void);
	void __fastcall Do_DeleteItem(int ItemNo, bool &FullReformat);
	void __fastcall Do_InsertItem(int ItemNo, const AnsiString s, Rvitem::TCustomRVItemInfo* item, bool 
		FromUndo, bool &FullReformat);
	void __fastcall Do_DeleteItems(int StartItemNo, int EndItemNo, bool &FullReformat);
	void __fastcall Do_InsertItems(int ItemNo, Classes::TStringList* 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);
	void __fastcall Do_PageBreak(int ItemNo, bool PageBreak);
	void __fastcall Do_Concate(int FirstItemNo);
	void __fastcall Do_Para(int FirstItemNo, int EndItemNo, int ParaNo, bool &FullReformat);
	void __fastcall Do_ParaList(int FirstItemNo, Classes::TList* ParaList, bool &FullReformat);
	void __fastcall Do_StyleNo(int ItemNo, int StyleNo);
	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_ChangeText(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_ModifyItemIntProperties(int ItemNo, System::TObject* 
		SubObject, Classes::TStringList* PropList, bool AffectSize, bool AffectWidth, TMetaClass* UndoInfoClass
		);
	void __fastcall BeginUndoSequence(Rvedit::TRVUndoType UndoType);
	void __fastcall SetUndoGroupMode(bool GroupUndo);
	void __fastcall BeginNamedUndoSequence(Rvedit::TRVUndoType UndoType, const AnsiString Caption);
	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 Clear(void);
	void __fastcall PrepareForEdit(void);
	bool __fastcall DeleteSelection_(void);
	bool __fastcall CanDelete(void);
	void __fastcall InsertTextTyping(AnsiString text);
	void __fastcall InsertText_(const AnsiString text);
	void __fastcall InsertTextW_(const AnsiString text);
	void __fastcall OnEnterPress_(bool Shift);
	void __fastcall OnDeletePress_(bool Ctrl, bool MovedFromLineEnd);
	void __fastcall OnBackSpacePress_(bool Ctrl);
	void __fastcall SetCurTextStyleNo(int Value);
	void __fastcall SetCurParaStyleNo(int Value);
	virtual void __fastcall ClearTemporal(void);
	void __fastcall ApplyParaStyle(int ParaStyleNo);
	bool __fastcall OnHomePress(bool Ctrl);
	bool __fastcall OnDownPress(void);
	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(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);
	DYNAMIC void __fastcall GetSelStart(int &DINo, int &DIOffs);
	DYNAMIC void __fastcall SrchSelectIt(int strt, int offs, int len);
	DYNAMIC void __fastcall SrchStart(bool Down, int &strt, int &offs);
	int __fastcall GetCurItemNo(void);
	int __fastcall GetOffsetInCurItem(void);
	bool __fastcall InsertSomething(Rvitem::TCustomRVItemInfo* info, const AnsiString s);
	bool __fastcall NotFormatted(void);
	void __fastcall StartShiftMoving(void);
	void __fastcall EndShiftMoving(void);
	void __fastcall ApplyStyleConversion_(int UserData);
	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, bool SelectionOnly, int Level, Graphics::TColor 
		Color, Rvback::TRVBackground* Background, Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* 
		StyleToFont, Rvclasses::TRVIntegerList* FontToStyle, double tpp);
	bool __fastcall InsertTextFromFile(const AnsiString FileName, bool OEM);
	bool __fastcall InsertTextFromFileW(const AnsiString FileName);
	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, bool ForceFormat, bool RecalcCaretPos, 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);
	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);
	Windows::TPoint __fastcall GetIMEWinCoord(void);
	__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;

}	/* namespace Rvervdata */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvervdata;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

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