//----------------------------------------------------------------------------
// CRVPP.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: CRVPP.pas
//----------------------------------------------------------------------------
#ifndef CRVPPHPP
#define CRVPPHPP
//----------------------------------------------------------------------------
#include <Menus.hpp>
#include <Printers.hpp>
#include <RVScroll.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 Crvpp
{
//-- type declarations -------------------------------------------------------
enum TRVZoomMode { rvzmFullPage, rvzmPageWidth, rvzmCustom };

class __declspec(delphiclass) TCustomRVPrintPreview;
class __declspec(pascalimplementation) TCustomRVPrintPreview : public Rvscroll::TRVScroller
{
	typedef Rvscroll::TRVScroller inherited;
	
private:
	int SavedZoomPercent;
	int FPageNo;
	int FZoomPercent;
	TRVZoomMode FZoomMode;
	int FPageWidth;
	int FPageHeight;
	Controls::TCursor FZoomInCursor;
	Controls::TCursor FZoomOutCursor;
	Classes::TNotifyEvent FZoomChanged;
	void __fastcall SetPageNo(const int Value);
	void __fastcall SetZoomPercent(const int Value);
	void __fastcall SetZoomMode(const 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);
	
protected:
	virtual bool __fastcall CanDrawContents(void);
	virtual void __fastcall DrawContents(Graphics::TCanvas* Canvas, const Windows::TRect &R);
	virtual int __fastcall GetPreview100PercentWidth(void);
	virtual int __fastcall GetPreview100PercentHeight(void);
	virtual int __fastcall GetPageCount(void);
	virtual void __fastcall Paint(void);
	void __fastcall UpdateView(void);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Click(void);
	virtual int __fastcall GetDefSmallStep(void);
	void __fastcall UpdateCursor(void);
	
public:
	__fastcall virtual TCustomRVPrintPreview(Classes::TComponent* AOwner);
	void __fastcall SetZoom(int Percent);
	void __fastcall First(void);
	void __fastcall Last(void);
	void __fastcall Next(void);
	void __fastcall Prev(void);
	__property int PageNo = {read=FPageNo, write=SetPageNo, nodefault};
	__property int ZoomPercent = {read=FZoomPercent, write=SetZoomPercent, nodefault};
	__property TRVZoomMode ZoomMode = {read=FZoomMode, write=SetZoomMode, nodefault};
	
__published:
	__property PopupMenu ;
	__property OnClick ;
	__property OnDblClick ;
	__property OnKeyDown ;
	__property OnKeyUp ;
	__property OnKeyPress ;
	__property Controls::TCursor ZoomInCursor = {read=FZoomInCursor, write=SetZoomInCursor, nodefault};
		
	__property Controls::TCursor ZoomOutCursor = {read=FZoomOutCursor, write=SetZoomOutCursor, nodefault
		};
	__property Classes::TNotifyEvent OnZoomChanged = {read=FZoomChanged, write=FZoomChanged};
public:
	/* TCustomControl.Destroy */ __fastcall virtual ~TCustomRVPrintPreview(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TCustomRVPrintPreview(HWND ParentWindow) : Rvscroll::TRVScroller(
		ParentWindow) { }
	
};

//-- var, const, procedure ---------------------------------------------------
#define crRVZoomIn (Byte)(102)
#define crRVZoomOut (Byte)(103)

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