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

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

#ifndef SclrvrulerHPP
#define SclrvrulerHPP

#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 <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Ruler.hpp>	// Pascal unit
#include <Rvruler.hpp>	// Pascal unit
#include <Sclrview.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit
#include <Rvtable.hpp>	// Pascal unit
#include <Rvedit.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Crvfdata.hpp>	// Pascal unit

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

namespace Sclrvruler
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TSclRVRuler;
class PASCALIMPLEMENTATION TSclRVRuler : public Rvruler::TRVRuler 
{
	typedef Rvruler::TRVRuler inherited;
	
private:
	bool fBusy;
	Sclrview::TSRichViewEdit* FSRichViewEdit;
	bool FCanUpdate;
	int PageCurrent;
	int OldRulerItemOff;
	void __fastcall DoDrawLine(int Offset);
	
protected:
	Classes::TNotifyEvent FOnAfterMarginChanged;
	Classes::TNotifyEvent FRVEZoomChanged;
	Classes::TNotifyEvent FRVEHScrolled;
	Classes::TNotifyEvent FRVEVScrolled;
	Classes::TNotifyEvent FRVECaretMove;
	Sclrview::TSRVResizeTable FSRVEResizeTable;
	Sclrview::TSRVResizeCell FSRVEResizeCell;
	void __fastcall setMargin(void);
	void __fastcall checkMargin(void);
	void __fastcall restoreEvent(Sclrview::TSRichViewEdit* Value);
	void __fastcall RVEZoomChanged(System::TObject* Sender);
	void __fastcall RVEHScrolled(System::TObject* Sender);
	void __fastcall RVEVScrolled(System::TObject* Sender);
	void __fastcall RVECaretMove(System::TObject* Sender);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	void __fastcall SetSRichViewEdit(Sclrview::TSRichViewEdit* Value);
	void __fastcall SetCanUpdate(const bool Value);
	void __fastcall HookSRVResizeTable(Sclrview::TSRichViewEdit* Sender, Rvtable::TRVTableItemInfo* Table);
	void __fastcall HookSRVResizeCell(Sclrview::TSRichViewEdit* Sender, Rvtable::TRVTableCellData* Cell);
	
public:
	__fastcall virtual TSclRVRuler(Classes::TComponent* AOwner);
	void __fastcall Scrolled(void);
	DYNAMIC void __fastcall Resize(void);
	DYNAMIC void __fastcall DoMarginChanged(void);
	DYNAMIC void __fastcall DoRulerItemMove(Ruler::TDragItem DragItem, int X, bool Removing);
	DYNAMIC void __fastcall DoRulerItemRelease(Ruler::TDragItem DragItem);
	DYNAMIC void __fastcall DoRulerItemSelect(Ruler::TDragItem DragItem, int X);
	DYNAMIC void __fastcall DoTableRowChanged(void);
	void __fastcall GetPageProperties(Ruler::TRulerUnits Units, Extended &AMargin1, Extended &AMargin2, Extended &APageWidth);
	void __fastcall SetPageProperties(Ruler::TRulerUnits Units, Extended AMargin1, Extended AMargin2, Extended APageWidth);
	__property bool CanUpdate = {read=FCanUpdate, write=SetCanUpdate, nodefault};
	
__published:
	__property Sclrview::TSRichViewEdit* SRichViewEdit = {read=FSRichViewEdit, write=SetSRichViewEdit};
	__property Classes::TNotifyEvent OnAfterMarginChanged = {read=FOnAfterMarginChanged, write=FOnAfterMarginChanged};
	__property RichViewEdit  = {stored=false};
public:
	#pragma option push -w-inl
	/* TCustomRuler.Destroy */ inline __fastcall virtual ~TSclRVRuler(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TSclRVRuler(HWND ParentWindow) : Rvruler::TRVRuler(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Register(void);

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

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