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

// (DO NOT EDIT: machine generated header) 'RVTInplace.pas' rev: 4.00

#ifndef RVTInplaceHPP
#define RVTInplaceHPP

#pragma delphiheader begin
#pragma option push -w-
#include <RVTypes.hpp>	// Pascal unit
#include <RVGrIn.hpp>	// Pascal unit
#include <RVBack.hpp>	// Pascal unit
#include <RVTable.hpp>	// Pascal unit
#include <RVDocParams.hpp>	// Pascal unit
#include <RichEdit.hpp>	// Pascal unit
#include <RVRTFProps.hpp>	// Pascal unit
#include <RVEdit.hpp>	// Pascal unit
#include <RichView.hpp>	// Pascal unit
#include <RVScroll.hpp>	// Pascal unit
#include <RVERVData.hpp>	// Pascal unit
#include <RVRVData.hpp>	// Pascal unit
#include <CRVFData.hpp>	// Pascal unit
#include <CRVData.hpp>	// Pascal unit
#include <RVItem.hpp>	// Pascal unit
#include <RVFuncs.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Rvtinplace
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TRVTableInplaceRVData;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TRVTableInplaceRVData : public Rvervdata::TRVEditRVData 
{
	typedef Rvervdata::TRVEditRVData inherited;
	
private:
	bool resized;
	
protected:
	virtual Crvfdata::TRVSoftPageBreakList* __fastcall GetSoftPageBreaks(void);
	
public:
	bool DrawOnParentMode;
	virtual Rvback::TRVBackground* __fastcall GetBackground(void);
	virtual void __fastcall DrawBackground(Graphics::TCanvas* Canvas, const Windows::TRect &r, Rvgrin::TRVGraphicInterface* 
		GraphicInterface);
	DYNAMIC void __fastcall GetParentInfo(int &ParentItemNo, Rvitem::TRVStoreSubRVData* &Location);
	DYNAMIC bool __fastcall CanLoadLayout(void);
	virtual Crvdata::TCustomRVData* __fastcall GetSourceRVData(void);
	DYNAMIC void __fastcall ShowRectangle(int Left, int Top, int Width, int Height);
	virtual void __fastcall SetDocumentAreaSize(int Width, int Height, bool UpdateH);
	DYNAMIC int __fastcall BuildJumpsCoords(bool IgnoreReadOnly);
	int __fastcall ReallyBuildJumpsCoords(void);
	DYNAMIC void __fastcall ClearJumpsCoords(void);
	DYNAMIC void __fastcall GetOriginEx(int &ALeft, int &ATop);
	virtual Crvdata::TCustomRVData* __fastcall GetAbsoluteParentData(void);
	virtual Crvdata::TCustomRVData* __fastcall GetAbsoluteRootData(void);
	DYNAMIC void __fastcall DoRVDblClick(const AnsiString ClickedWord, int StyleNo);
	DYNAMIC void __fastcall DoJump(int id);
	virtual void __fastcall GetItemBackground(int ItemNo, const Windows::TRect &r, bool MakeImageRect, 
		Graphics::TColor &Color, Graphics::TBitmap* &bmp, bool &UseBitmap, Rvgrin::TRVGraphicInterface* GraphicInterface
		);
	DYNAMIC AnsiString __fastcall GetItemHint(Crvdata::TCustomRVData* RVData, int ItemNo, const AnsiString 
		UpperRVDataHint);
	virtual int __fastcall GetHOffs(void);
	virtual int __fastcall GetVOffs(void);
public:
	#pragma option push -w-inl
	/* TRVEditRVData.Create */ inline __fastcall virtual TRVTableInplaceRVData(Rvscroll::TRVScroller* RichView
		) : Rvervdata::TRVEditRVData(RichView) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TRVEditRVData.Destroy */ inline __fastcall virtual ~TRVTableInplaceRVData(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

typedef void __fastcall (__closure *TRVTableInplaceChangeEvent)(Rvedit::TCustomRichViewEdit* Sender, 
	bool ClearRedo);

class DELPHICLASS TRVTableInplaceEdit;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TRVTableInplaceEdit : public Rvedit::TRichViewEdit 
{
	typedef Rvedit::TRichViewEdit inherited;
	
private:
	Crvfdata::TCustomRVFormattedData* FRVData;
	Rvtable::TRVTableItemInfo* FTable;
	bool FClearing;
	Graphics::TColor FColor;
	TRVTableInplaceChangeEvent FOnChangeEx;
	bool FTransparent;
	MESSAGE void __fastcall CMRelease(Messages::TMessage &Message);
	MESSAGE void __fastcall WMMoveEditor(Messages::TMessage &Message);
	MESSAGE void __fastcall WMExpandSel(Messages::TMessage &Message);
	MESSAGE void __fastcall WMInplaceUndo(Messages::TMessage &Message);
	MESSAGE void __fastcall WMInplaceRedo(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMUndo(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall EMUndo(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall EMRedo(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall EMCanUndo(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall EMCanRedo(Messages::TMessage &Message);
	
protected:
	virtual TMetaClass* __fastcall GetDataClass(void);
	DYNAMIC void __fastcall KeyPress(char &Key);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual Rvrtfprops::TRVRTFReaderProperties* __fastcall GetRTFReadProperties(void);
	virtual Rvdocparams::TRVDocParameters* __fastcall GetDocParameters(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	virtual void __fastcall SetReadOnly(const bool Value);
	virtual bool __fastcall GetReadOnly(void);
	virtual void __fastcall InplaceRedrawing(bool AllowRedrawItself);
	virtual void __fastcall Paint(void);
	
public:
	int FClickTime;
	int FTableItemNo;
	Rvtable::TRVTableCellData* FCell;
	int FRow;
	int FCol;
	bool NormalScrolling;
	__fastcall virtual TRVTableInplaceEdit(Classes::TComponent* AOwner);
	__fastcall virtual ~TRVTableInplaceEdit(void);
	DYNAMIC bool __fastcall RTFReaderAssigned(void);
	DYNAMIC bool __fastcall DocParametersAssigned(void);
	DYNAMIC void __fastcall DoChange(bool ClearRedo);
	void __fastcall SetParentRVData(Crvfdata::TCustomRVFormattedData* RVData);
	void __fastcall SetCell(int Row, int Col, Rvtable::TRVTableItemInfo* Table, int CellHPadding, int CellVPadding
		);
	virtual void __fastcall SetVPos(int p, bool Redraw);
	virtual void __fastcall SetHPos(int p);
	void __fastcall SetClearingState(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
		Y);
	void __fastcall SelectCompletely(bool Select);
	virtual bool __fastcall BeforeChange(bool FromOutside);
	bool __fastcall Resized(void);
	DYNAMIC void __fastcall Undo(void);
	DYNAMIC void __fastcall Redo(void);
	DYNAMIC void __fastcall Click(void);
	DYNAMIC void __fastcall DragDrop(System::TObject* Source, int X, int Y);
	DYNAMIC void __fastcall DoEndDrag(System::TObject* Target, int X, int Y);
	__property TRVTableInplaceChangeEvent OnChangeEx = {read=FOnChangeEx, write=FOnChangeEx};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, nodefault};
	__property bool Transparent = {read=FTransparent, write=FTransparent, nodefault};
	__property Rvtable::TRVTableItemInfo* Table = {read=FTable};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TRVTableInplaceEdit(HWND ParentWindow) : Rvedit::TRichViewEdit(
		ParentWindow) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
static const Word WM_RVMOVEEDITOR = 0x40a;
static const Word WM_RVINPLACEUNDO = 0x40b;
static const Word WM_RVINPLACEREDO = 0x40c;
static const Word WM_RVEXPANDSEL = 0x412;

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

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