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

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

#ifndef RVTInplaceHPP
#define RVTInplaceHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <RVTable.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 <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;
class PASCALIMPLEMENTATION TRVTableInplaceRVData : public Rvervdata::TRVEditRVData 
{
	typedef Rvervdata::TRVEditRVData inherited;
	
private:
	bool resized;
	
protected:
	DYNAMIC void __fastcall Formatted(int FirstItemNo, int LastItemNo, bool Partial);
	
public:
	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);
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
	
};


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

class DELPHICLASS TRVTableInplaceEdit;
class PASCALIMPLEMENTATION TRVTableInplaceEdit : public Rvedit::TRichViewEdit 
{
	typedef Rvedit::TRichViewEdit inherited;
	
private:
	Crvfdata::TCustomRVFormattedData* FRVData;
	Rvtable::TRVTableItemInfo* FTable;
	bool FClearing;
	Classes::TNotifyEvent FOnFormat;
	Graphics::TColor FColor;
	bool FBusy;
	TRVTableInplaceChangeEvent FOnChangeEx;
	MESSAGE void __fastcall CMRelease(Messages::TMessage &Message);
	MESSAGE void __fastcall WMMoveEditor(Messages::TMessage &Message);
	MESSAGE void __fastcall WMInplaceUndo(Messages::TMessage &Message);
	MESSAGE void __fastcall WMInplaceRedo(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &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 void __fastcall WndProc(Messages::TMessage &Message);
	virtual void __fastcall SetReadOnly(const bool Value);
	virtual bool __fastcall GetReadOnly(void);
	
public:
	int FClickTime;
	int FTableItemNo;
	Rvtable::TRVTableCellData* FCell;
	int FRow;
	int FCol;
	__fastcall virtual TRVTableInplaceEdit(Classes::TComponent* AOwner);
	__fastcall virtual ~TRVTableInplaceEdit(void);
	DYNAMIC bool __fastcall RTFReaderAssigned(void);
	DYNAMIC void __fastcall DoChange(bool ClearRedo);
	void __fastcall SetParentRVData(Crvfdata::TCustomRVFormattedData* RVData);
	void __fastcall SetCell(int Row, int Col, Rvtable::TRVTableItemInfo* Table, int CellPadding);
	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);
	__property Classes::TNotifyEvent OnFormat = {read=FOnFormat, write=FOnFormat};
	__property bool Busy = {read=FBusy, nodefault};
	__property TRVTableInplaceChangeEvent OnChangeEx = {read=FOnChangeEx, write=FOnChangeEx};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, nodefault};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TRVTableInplaceEdit(HWND ParentWindow) : Rvedit::TRichViewEdit(
		ParentWindow) { }
	#pragma option pop
	
};


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

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

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