//----------------------------------------------------------------------------
// PtblRV.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: PtblRV.pas
//----------------------------------------------------------------------------
#ifndef PtblRVHPP
#define PtblRVHPP
//----------------------------------------------------------------------------
#include <PtRVData.hpp>
#include <RVRVData.hpp>
#include <CRVFData.hpp>
#include <CRVData.hpp>
#include <RVFuncs.hpp>
#include <DLines.hpp>
#include <CommDlg.hpp>
#include <Printers.hpp>
#include <RVStyle.hpp>
#include <RVItem.hpp>
#include <RichView.hpp>
#include <RVScroll.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
namespace Ptblrv
{
//-- type declarations -------------------------------------------------------
class __declspec(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 __declspec(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 __declspec(delphiclass) TCustomPrintableRV;
class __declspec(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, nodefault};
public:
	/* TCustomRichView.Destroy */ __fastcall virtual ~TCustomPrintableRV(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TCustomPrintableRV(HWND ParentWindow) : Richview::TCustomRichView(
		ParentWindow) { }
	
};

class __declspec(delphiclass) TPrintableRV;
class __declspec(pascalimplementation) TPrintableRV : public TCustomPrintableRV
{
	typedef TCustomPrintableRV inherited;
	
private:
	void __fastcall DoOnPrinting(int PageCompleted, Richview::TRVPrintingStep Step);
	
protected:
	virtual System::TMetaClass* __fastcall GetDataClass(void);
	
public:
	bool FMirrorMargins;
	int FLeftMarginMM;
	int FRightMarginMM;
	int FTopMarginMM;
	int FBottomMarginMM;
	void __fastcall PrintPages(int firstPgNo, int lastPgNo, const System::AnsiString Title, int Copies, 
		bool Collate);
	void __fastcall Print(const System::AnsiString Title, int Copies, bool Collate);
	void __fastcall ContinuousPrint(void);
public:
	/* TCustomPrintableRV.Create */ __fastcall virtual TPrintableRV(Classes::TComponent* AOwner) : Ptblrv::
		TCustomPrintableRV(AOwner) { }
	
public:
	/* TCustomRichView.Destroy */ __fastcall virtual ~TPrintableRV(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TPrintableRV(HWND ParentWindow) : Ptblrv::TCustomPrintableRV(
		ParentWindow) { }
	
};

class __declspec(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:
	/* TComponent.Destroy */ __fastcall virtual ~TCustomRVPrint(void) { }
	
};

class __declspec(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,  System::AnsiString Title, int Copies, bool 
		Collate);
	void __fastcall Print( System::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:
		
	/* TComponent.Destroy */ __fastcall virtual ~TRVPrint(void) { }
	
};

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

}	/* namespace Ptblrv */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ptblrv;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// PtblRV
