// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Crvpp.pas' rev: 11.00

#ifndef CrvppHPP
#define CrvppHPP

#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 <Rvscroll.hpp>	// Pascal unit
#include <Printers.hpp>	// Pascal unit

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

namespace Crvpp
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TRVClickMode { rvcmNone, rvcmSwitchZoom };
#pragma option pop

class DELPHICLASS TRVMarginsPen;
class PASCALIMPLEMENTATION TRVMarginsPen : public Graphics::TPen 
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Style  = {default=5};
	__property Color  = {default=12632256};
public:
	#pragma option push -w-inl
	/* TPen.Create */ inline __fastcall TRVMarginsPen(void) : Graphics::TPen() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TPen.Destroy */ inline __fastcall virtual ~TRVMarginsPen(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRVPAPen;
class PASCALIMPLEMENTATION TRVPAPen : public Graphics::TPen 
{
	typedef Graphics::TPen inherited;
	
__published:
	__property Style  = {default=5};
	__property Color  = {default=255};
public:
	#pragma option push -w-inl
	/* TPen.Create */ inline __fastcall TRVPAPen(void) : Graphics::TPen() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TPen.Destroy */ inline __fastcall virtual ~TRVPAPen(void) { }
	#pragma option pop
	
};


class DELPHICLASS TCustomRVPrintPreview;
class PASCALIMPLEMENTATION TCustomRVPrintPreview : public Rvscroll::TRVScroller 
{
	typedef Rvscroll::TRVScroller inherited;
	
private:
	int SavedZoomPercent;
	int FPageNo;
	int FZoomPercent;
	Rvscroll::TRVZoomMode FZoomMode;
	int FPageWidth;
	int FPageHeight;
	int FPhysPageWidth;
	int FPhysPageHeight;
	Types::TRect FPhysMargins;
	Controls::TCursor FZoomInCursor;
	Controls::TCursor FZoomOutCursor;
	Classes::TNotifyEvent FZoomChanged;
	TRVMarginsPen* FMarginsPen;
	TRVPAPen* FPrintableAreaPen;
	TRVClickMode FClickMode;
	Graphics::TColor FPageBorderColor;
	Graphics::TColor FShadowColor;
	int FShadowWidth;
	int FPageBorderWidth;
	int FBackgroundMargin;
	void __fastcall SetZoomPercent(const int Value);
	void __fastcall SetZoomMode(const Rvscroll::TRVZoomMode Value);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	void __fastcall SetZoomInCursor(const Controls::TCursor Value);
	void __fastcall SetZoomOutCursor(const Controls::TCursor Value);
	void __fastcall SetMarginsPen(const TRVMarginsPen* Value);
	void __fastcall SetPrintableAreaPen(const TRVPAPen* Value);
	
protected:
	DYNAMIC bool __fastcall CanDrawContents(void);
	DYNAMIC void __fastcall DrawContents(Graphics::TCanvas* Canvas, const Types::TRect &R);
	virtual void __fastcall DrawMargins(Graphics::TCanvas* Canvas, const Types::TRect &R, int PageNo);
	virtual void __fastcall DrawPrintableAreaBorder(Graphics::TCanvas* Canvas, const Types::TRect &R, int PageNo);
	DYNAMIC int __fastcall GetPreview100PercentWidth(void);
	DYNAMIC int __fastcall GetPreview100PercentHeight(void);
	DYNAMIC Types::TRect __fastcall GetPhysMargins();
	DYNAMIC int __fastcall GetPageCount(void);
	virtual void __fastcall Paint(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall Click(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC int __fastcall GetDefSmallStep(void);
	void __fastcall UpdateCursor(void);
	virtual void __fastcall SetPageNo(const int Value);
	__property Controls::TCursor ZoomInCursor = {read=FZoomInCursor, write=SetZoomInCursor, default=102};
	__property Controls::TCursor ZoomOutCursor = {read=FZoomOutCursor, write=SetZoomOutCursor, default=103};
	__property Classes::TNotifyEvent OnZoomChanged = {read=FZoomChanged, write=FZoomChanged};
	__property TRVMarginsPen* MarginsPen = {read=FMarginsPen, write=SetMarginsPen};
	__property TRVPAPen* PrintableAreaPen = {read=FPrintableAreaPen, write=SetPrintableAreaPen};
	
public:
	__fastcall virtual TCustomRVPrintPreview(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomRVPrintPreview(void);
	void __fastcall SetZoom(int Percent);
	void __fastcall First(void);
	void __fastcall Last(void);
	void __fastcall Next(void);
	void __fastcall Prev(void);
	void __fastcall UpdateView(void);
	__property int PageNo = {read=FPageNo, write=SetPageNo, nodefault};
	__property int ZoomPercent = {read=FZoomPercent, write=SetZoomPercent, nodefault};
	__property Rvscroll::TRVZoomMode ZoomMode = {read=FZoomMode, write=SetZoomMode, nodefault};
	__property TRVClickMode ClickMode = {read=FClickMode, write=FClickMode, default=1};
	__property Graphics::TColor PageBorderColor = {read=FPageBorderColor, write=FPageBorderColor, default=-16777203};
	__property int PageBorderWidth = {read=FPageBorderWidth, write=FPageBorderWidth, default=2};
	__property Graphics::TColor ShadowColor = {read=FShadowColor, write=FShadowColor, default=-16777195};
	__property int ShadowWidth = {read=FShadowWidth, write=FShadowWidth, default=4};
	__property int BackgroundMargin = {read=FBackgroundMargin, write=FBackgroundMargin, default=20};
	
__published:
	__property Color  = {default=-16777200};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TCustomRVPrintPreview(HWND ParentWindow) : Rvscroll::TRVScroller(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint crRVZoomIn = 0x66;
static const Shortint crRVZoomOut = 0x67;

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

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