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

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

#ifndef PtblRVHPP
#define PtblRVHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <PtRVData.hpp>	// Pascal unit
#include <RVRVData.hpp>	// Pascal unit
#include <CRVFData.hpp>	// Pascal unit
#include <CRVData.hpp>	// Pascal unit
#include <RVFuncs.hpp>	// Pascal unit
#include <DLines.hpp>	// Pascal unit
#include <CommDlg.hpp>	// Pascal unit
#include <Printers.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <RVItem.hpp>	// Pascal unit
#include <RichView.hpp>	// Pascal unit
#include <RVScroll.hpp>	// Pascal unit
#include <Dialogs.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 Ptblrv
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TCustomRVPrint;
typedef void __fastcall (__closure *TRVPrintComponentEvent)(TCustomRVPrint* Sender, Controls::TControl* 
	PrintMe, Graphics::TBitmap* &ComponentImage);

typedef void __fastcall (__closure *TRVPrintingEvent)(Richview::TCustomRichView* Sender, int PageCompleted
	, Richview::TRVPrintingStep Step);

class DELPHICLASS TRVPrint;
typedef void __fastcall (__closure *TRVPagePrepaintEvent)(TRVPrint* Sender, int PageNo, Graphics::TCanvas* 
	Canvas, bool Preview, const Windows::TRect &PageRect, const Windows::TRect &PrintAreaRect);

class DELPHICLASS TCustomPrintableRV;
class PASCALIMPLEMENTATION TCustomPrintableRV : public Richview::TCustomRichView 
{
	typedef Richview::TCustomRichView inherited;
	
private:
	TCustomRVPrint* FRVPrint;
	
public:
	__fastcall virtual TCustomPrintableRV(Classes::TComponent* AOwner);
	int __fastcall FormatPages(void);
	void __fastcall DrawPage(int pgNo, Graphics::TCanvas* Canvas, bool Preview, bool Correction);
	__property TCustomRVPrint* RVPrint = {read=FRVPrint, write=FRVPrint};
public:
	#pragma option push -w-inl
	/* TCustomRichView.Destroy */ inline __fastcall virtual ~TCustomPrintableRV(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TCustomPrintableRV(HWND ParentWindow) : Richview::TCustomRichView(
		ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS TPrintableRV;
class PASCALIMPLEMENTATION TPrintableRV : public TCustomPrintableRV 
{
	typedef TCustomPrintableRV inherited;
	
private:
	void __fastcall DoOnPrinting(int PageCompleted, Richview::TRVPrintingStep Step);
	
protected:
	virtual TMetaClass* __fastcall GetDataClass(void);
	
public:
	bool FMirrorMargins;
	int FLeftMarginMM;
	int FRightMarginMM;
	int FTopMarginMM;
	int FBottomMarginMM;
	void __fastcall PrintPages(int firstPgNo, int lastPgNo, const AnsiString Title, int Copies, bool Collate
		);
	void __fastcall Print(const AnsiString Title, int Copies, bool Collate);
	void __fastcall ContinuousPrint(void);
public:
	#pragma option push -w-inl
	/* TCustomPrintableRV.Create */ inline __fastcall virtual TPrintableRV(Classes::TComponent* AOwner)
		 : TCustomPrintableRV(AOwner) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TCustomRichView.Destroy */ inline __fastcall virtual ~TPrintableRV(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TPrintableRV(HWND ParentWindow) : TCustomPrintableRV(
		ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TCustomRVPrint : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	bool FPreviewCorrection;
	TRVPrintComponentEvent FOnPrintComponent;
	int __fastcall GetPagesCount(void);
	bool __fastcall GetTransparentBackground(void);
	void __fastcall SetTransparentBackground(const bool Value);
	
protected:
	virtual void __fastcall Loaded(void);
	virtual TCustomPrintableRV* __fastcall CreateRichView(void);
	
public:
	TCustomPrintableRV* rv;
	bool Ready;
	int StartAt;
	int EndAt;
	__fastcall virtual TCustomRVPrint(Classes::TComponent* AOwner);
	void __fastcall Clear(void);
	void __fastcall UpdatePaletteInfo(void);
	void __fastcall GetFirstItemOnPage(int PageNo, int &ItemNo, int &OffsetInItem);
	bool __fastcall SavePageAsRVF(Classes::TStream* Stream, int PageNo);
	__property int PagesCount = {read=GetPagesCount, nodefault};
	
__published:
	__property bool PreviewCorrection = {read=FPreviewCorrection, write=FPreviewCorrection, nodefault};
		
	__property TRVPrintComponentEvent OnPrintComponent = {read=FOnPrintComponent, write=FOnPrintComponent
		};
	__property bool TransparentBackground = {read=GetTransparentBackground, write=SetTransparentBackground
		, default=0};
public:
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TCustomRVPrint(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TRVPrint : public TCustomRVPrint 
{
	typedef TCustomRVPrint inherited;
	
private:
	TRVPrintingEvent FOnFormatting;
	TRVPrintingEvent FOnPrinting;
	TRVPagePrepaintEvent FOnPagePrepaint;
	int __fastcall GetLM(void);
	int __fastcall GetRM(void);
	int __fastcall GetTM(void);
	int __fastcall GetBM(void);
	void __fastcall SetLM(int mm);
	void __fastcall SetRM(int mm);
	void __fastcall SetTM(int mm);
	void __fastcall SetBM(int mm);
	int __fastcall GetPreview100PercentHeight(void);
	int __fastcall GetPreview100PercentWidth(void);
	bool __fastcall GetMirrorMargins(void);
	void __fastcall SetMirrorMargins(const bool Value);
	
protected:
	virtual TCustomPrintableRV* __fastcall CreateRichView(void);
	
public:
	__fastcall virtual TRVPrint(Classes::TComponent* AOwner);
	void __fastcall AssignSource(Richview::TCustomRichView* PrintMe);
	int __fastcall FormatPages(Rvscroll::TRVDisplayOptions PrintOptions);
	void __fastcall PrintPages(int firstPgNo, int lastPgNo, AnsiString Title, int Copies, bool Collate)
		;
	void __fastcall Print(AnsiString Title, int Copies, bool Collate);
	void __fastcall ContinuousPrint(void);
	void __fastcall MakePreview(int pgNo, Graphics::TBitmap* bmp);
	void __fastcall DrawPreview(int pgNo, Graphics::TCanvas* Canvas, const Windows::TRect &PageRect);
	void __fastcall MakeScaledPreview(int pgNo, Graphics::TBitmap* bmp);
	void __fastcall DrawMarginsRect(Graphics::TCanvas* Canvas, const Windows::TRect &PageRect, int PageNo
		);
	__property int Preview100PercentWidth = {read=GetPreview100PercentWidth, nodefault};
	__property int Preview100PercentHeight = {read=GetPreview100PercentHeight, nodefault};
	
__published:
	__property bool MirrorMargins = {read=GetMirrorMargins, write=SetMirrorMargins, default=0};
	__property int LeftMarginMM = {read=GetLM, write=SetLM, nodefault};
	__property int RightMarginMM = {read=GetRM, write=SetRM, nodefault};
	__property int TopMarginMM = {read=GetTM, write=SetTM, nodefault};
	__property int BottomMarginMM = {read=GetBM, write=SetBM, nodefault};
	__property TRVPrintingEvent OnFormatting = {read=FOnFormatting, write=FOnFormatting};
	__property TRVPrintingEvent OnSendingToPrinter = {read=FOnPrinting, write=FOnPrinting};
	__property TRVPagePrepaintEvent OnPagePrepaint = {read=FOnPagePrepaint, write=FOnPagePrepaint};
public:
		
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TRVPrint(void) { }
	#pragma option pop
	
};


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

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

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