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

// (DO NOT EDIT: machine generated header) 'CRVPP.pas' rev: 4.00

#ifndef CRVPPHPP
#define CRVPPHPP

#pragma delphiheader begin
#pragma option push -w-
#include <Menus.hpp>	// Pascal unit
#include <Printers.hpp>	// Pascal unit
#include <RVScroll.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 Crvpp
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TRVZoomMode { rvzmFullPage, rvzmPageWidth, rvzmCustom };
#pragma option pop

class DELPHICLASS TCustomRVPrintPreview;
#pragma pack(push, 4)
class 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:
	DYNAMIC bool __fastcall CanDrawContents(void);
	DYNAMIC void __fastcall DrawContents(Graphics::TCanvas* Canvas, const Windows::TRect &R);
	DYNAMIC int __fastcall GetPreview100PercentWidth(void);
	DYNAMIC int __fastcall GetPreview100PercentHeight(void);
	DYNAMIC int __fastcall GetPageCount(void);
	virtual void __fastcall Paint(void);
	void __fastcall UpdateView(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall Click(void);
	DYNAMIC 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 Anchors ;
	__property Constraints ;
	__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:
	#pragma option push -w-inl
	/* TCustomControl.Destroy */ inline __fastcall virtual ~TCustomRVPrintPreview(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TCustomRVPrintPreview(HWND ParentWindow) : Rvscroll::TRVScroller(
		ParentWindow) { }
	#pragma option pop
	
};

#pragma pack(pop)

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

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

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