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

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

#ifndef EnScanHPP
#define EnScanHPP

#pragma delphiheader begin
#pragma option push -w-
#include <EnMisc.hpp>	// Pascal unit
#include <EnTwain.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Enscan
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TScanner;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TScanner : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	Entwain::TTwainData FTwainData;
	bool FCreated;
	Classes::TStringList* FScanners;
	int FScannerIndex;
	bool FShowUIProgress;
	float FPhysicalWidth;
	float FPhysicalHeight;
	void __fastcall LoadTwain(void);
	void __fastcall UnloadTwain(void);
	void __fastcall SetScannerIndexFromDefault(void);
	bool __fastcall GetShowUI(void);
	void __fastcall SetShowUI(const bool Show);
	Word __fastcall GetRequestedXDpi(void);
	void __fastcall SetRequestedXDpi(const Word Dpi);
	Word __fastcall GetRequestedYDpi(void);
	void __fastcall SetRequestedYDpi(const Word Dpi);
	Enmisc::TImageFormat __fastcall GetRequestedImageFormat(void);
	void __fastcall SetRequestedImageFormat(const Enmisc::TImageFormat ImageFormat);
	AnsiString __fastcall GetProductName(void);
	void __fastcall SetProductName(const AnsiString Name);
	void __fastcall SetScannerIndex(const int Index);
	void __fastcall ApplyOptions(Entwain::TTwainData &TwainData);
	float __fastcall GetPhysicalWidth(void);
	float __fastcall GetPhysicalHeight(void);
	float __fastcall GetPhysicalSize(Word ICap);
	
public:
	__fastcall TScanner(void);
	__fastcall virtual ~TScanner(void);
	bool __fastcall IsConfigured(void);
	bool __fastcall SelectScanner(void);
	__property Classes::TStringList* Scanners = {read=FScanners};
	__property int ScannerIndex = {read=FScannerIndex, write=SetScannerIndex, nodefault};
	void __fastcall Acquire(const Enmisc::TAcquireEvent AcquireEvent, const int CallBackData);
	void __fastcall OpenSource(void);
	void __fastcall AcquireWithSourceOpen(const Enmisc::TAcquireEvent AcquireEvent, const int CallBackData
		);
	void __fastcall CloseSource(void);
	__property bool ShowUI = {read=GetShowUI, write=SetShowUI, nodefault};
	__property Word RequestedXDpi = {read=GetRequestedXDpi, write=SetRequestedXDpi, nodefault};
	__property Word RequestedYDpi = {read=GetRequestedYDpi, write=SetRequestedYDpi, nodefault};
	__property Enmisc::TImageFormat RequestedImageFormat = {read=GetRequestedImageFormat, write=SetRequestedImageFormat
		, nodefault};
	__property bool ShowUIProgress = {read=FShowUIProgress, write=FShowUIProgress, nodefault};
	__property float PhysicalWidth = {read=GetPhysicalWidth};
	__property float PhysicalHeight = {read=GetPhysicalHeight};
	__property AnsiString ProductName = {read=GetProductName, write=SetProductName};
	bool __fastcall GetImageLayout(Enmisc::TSingleRect &Rect);
	bool __fastcall SetImageLayout(const Enmisc::TSingleRect &Rect);
	bool __fastcall EnableFeeder(void);
	bool __fastcall DisableFeeder(void);
	bool __fastcall FeederLoaded(void);
};

#pragma pack(pop)

class DELPHICLASS EScannerError;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION EScannerError : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EScannerError(const AnsiString Msg) : Sysutils::Exception(
		Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EScannerError(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EScannerError(int Ident, Extended Dummy) : Sysutils::Exception(
		Ident, Dummy) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EScannerError(int Ident, const System::TVarRec * Args
		, const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EScannerError(const AnsiString Msg, int AHelpContext) : 
		Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EScannerError(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
		) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EScannerError(int Ident, int AHelpContext) : Sysutils::Exception(
		Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EScannerError(int Ident, const System::TVarRec * 
		Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
		) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EScannerError(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE TScanner* __fastcall Scanner(void);

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

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