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

// (DO NOT EDIT: machine generated header) 'Sclrvruler.pas' rev: 21.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 <Crvdata.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;
	int OldDocumentHeight;
	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;
	Classes::TNotifyEvent FSRVEBiDiModeChanged;
	Sclrview::TSRVChangeActiveEditorEvent FSRVEChangeActiveEditor;
	void __fastcall CalculateInset(void);
	void __fastcall setMargin(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 RichViewEditCurParaStyleChanged(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);
	void __fastcall HookSRVBiDiModeChanged(System::TObject* Sender);
	void __fastcall HookSRVChangeActiveEditor(Sclrview::TSRichViewEdit* Sender, Rvedit::TRichViewEdit* ActiveEditor);
	virtual void __fastcall SetRulerType(const Ruler::TRulerType Value);
	void __fastcall SetMetods(Sclrview::TSRichViewEdit* Value);
	
public:
	__fastcall virtual TSclRVRuler(Classes::TComponent* AOwner);
	__fastcall virtual ~TSclRVRuler(void);
	void __fastcall CheckMargin(void);
	void __fastcall Scrolled(void);
	DYNAMIC void __fastcall Resize(void);
	void __fastcall ResetEvents(void);
	DYNAMIC void __fastcall DoMarginChanged(void);
	DYNAMIC void __fastcall DoPageHeightChanged(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, System::Extended &AMargin1, System::Extended &AMargin2, System::Extended &APageWidth);
	void __fastcall SetPageProperties(Ruler::TRulerUnits Units, System::Extended AMargin1, System::Extended AMargin2, System::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:
	/* TWinControl.CreateParented */ inline __fastcall TSclRVRuler(HWND ParentWindow) : Rvruler::TRVRuler(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------

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

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