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

// (DO NOT EDIT: machine generated header) 'Rvtinplace.pas' rev: 21.00

#ifndef RvtinplaceHPP
#define RvtinplaceHPP

#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 <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvfuncs.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Crvdata.hpp>	// Pascal unit
#include <Crvfdata.hpp>	// Pascal unit
#include <Rvrvdata.hpp>	// Pascal unit
#include <Rvervdata.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Richview.hpp>	// Pascal unit
#include <Rvedit.hpp>	// Pascal unit
#include <Rvrtfprops.hpp>	// Pascal unit
#include <Richedit.hpp>	// Pascal unit
#include <Rvdocparams.hpp>	// Pascal unit
#include <Rvtable.hpp>	// Pascal unit
#include <Rvback.hpp>	// Pascal unit
#include <Rvgrin.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit
#include <Types.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:
	virtual Crvfdata::TRVSoftPageBreakList* __fastcall GetSoftPageBreaks(void);
	
public:
	bool DrawOnParentMode;
	virtual Rvback::TRVBackground* __fastcall GetBackground(void);
	virtual void __fastcall DrawBackground(Graphics::TCanvas* Canvas, const Types::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 Rvtypes::TRVRawByteString ClickedWord, int StyleNo);
	DYNAMIC void __fastcall DoJump(int id);
	virtual void __fastcall GetItemBackground(int ItemNo, const Types::TRect &r, bool MakeImageRect, Graphics::TColor &Color, Graphics::TBitmap* &bmp, bool &UseBitmap, Rvgrin::TRVGraphicInterface* GraphicInterface);
	DYNAMIC System::UnicodeString __fastcall GetItemHint(Crvdata::TCustomRVData* RVData, int ItemNo, const System::UnicodeString UpperRVDataHint);
	virtual int __fastcall GetHOffs(void);
	virtual int __fastcall GetVOffs(void);
public:
	/* TRVEditRVData.Create */ inline __fastcall virtual TRVTableInplaceRVData(Rvscroll::TRVScroller* RichView) : Rvervdata::TRVEditRVData(RichView) { }
	/* TRVEditRVData.Destroy */ inline __fastcall virtual ~TRVTableInplaceRVData(void) { }
	
};


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;
	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 Rvrvdata::TRichViewRVDataClass __fastcall GetDataClass(void);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	DYNAMIC void __fastcall KeyDown(System::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:
	/* TWinControl.CreateParented */ inline __fastcall TRVTableInplaceEdit(HWND ParentWindow) : Rvedit::TRichViewEdit(ParentWindow) { }
	
};


//-- 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 */
using namespace Rvtinplace;
#pragma pack(pop)
#pragma option pop

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