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

// (DO NOT EDIT: machine generated header) 'DBImageEn.pas' rev: 3.00

#ifndef DBImageEnHPP
#define DBImageEnHPP
#include <Controls.hpp>
#include <ImageEnIO.hpp>
#include <ImageEnView.hpp>
#include <DBCtrls.hpp>
#include <Db.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

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

namespace Dbimageen
{
//-- type declarations -------------------------------------------------------
enum TDataFieldImageFormat { ifBitmap, ifJpeg, ifGif, ifPCX, ifTIFF, ifPNG, ifUnknown };

class DELPHICLASS TImageEnDBView;
class PASCALIMPLEMENTATION TImageEnDBView : public Imageenview::TImageEnView 
{
	typedef Imageenview::TImageEnView inherited;
	
private:
	bool FAutoDisplay;
	Dbctrls::TFieldDataLink* FDataLink;
	bool FPictureLoaded;
	TDataFieldImageFormat fDataFieldImageFormat;
	bool fStreamHeaders;
	bool fDoImageChange;
	int fWorkingRec;
	void __fastcall SetAutoDisplay(bool Value);
	System::AnsiString __fastcall GetDataField(void);
	Db::TDataSource* __fastcall GetDataSource(void);
	Db::TField* __fastcall GetField(void);
	bool __fastcall GetReadOnly(void);
	void __fastcall SetDataField(const System::AnsiString Value);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	void __fastcall SetReadOnly(bool Value);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	void __fastcall SetJPegQuality(int q);
	int __fastcall GetJPegQuality(void);
	Imageenio::TIOParamsVals* __fastcall GetIOParams(void);
	Imageenio::TIOPreviewsParams __fastcall GetIOPreviewsParams(void);
	void __fastcall SetIOPreviewsParams(Imageenio::TIOPreviewsParams v);
	void __fastcall SetPreviewFont(Graphics::TFont* f);
	Graphics::TFont* __fastcall GetPreviewFont(void);
	
protected:
	Imageenio::TImageEnIO* fImageEnIO;
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
		);
	virtual void __fastcall DataChange(System::TObject* Sender);
	virtual void __fastcall UpdateData(System::TObject* Sender);
	virtual TDataFieldImageFormat __fastcall GetDataFieldImageFormat(void);
	virtual void __fastcall SetDataFieldImageFormat(TDataFieldImageFormat v);
	void __fastcall LoadPictureEx(Imageenio::TImageEnIO* ffImageEnIO);
	
public:
	__fastcall virtual TImageEnDBView(Classes::TComponent* AOwner);
	__fastcall virtual ~TImageEnDBView(void);
	virtual void __fastcall PaintTo(Graphics::TCanvas* Canvas);
	virtual void __fastcall Paint(void);
	virtual void __fastcall ImageChange(void);
	__property Db::TField* Field = {read=GetField};
	virtual void __fastcall LoadPicture(void);
	virtual TDataFieldImageFormat __fastcall LoadedFieldImageFormat(void);
	__property Imageenio::TIOParamsVals* IOParams = {read=GetIOParams};
	bool __fastcall DoIOPreview(void);
	__property bool PictureLoaded = {read=FPictureLoaded, nodefault};
	
__published:
	__property bool AutoDisplay = {read=FAutoDisplay, write=SetAutoDisplay, default=1};
	__property System::AnsiString DataField = {read=GetDataField, write=SetDataField};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
	__property TDataFieldImageFormat DataFieldImageFormat = {read=GetDataFieldImageFormat, write=SetDataFieldImageFormat
		, default=0};
	__property int JpegQuality = {read=GetJPegQuality, write=SetJPegQuality, default=25};
	__property Imageenio::TIOPreviewsParams IOPreviewsParams = {read=GetIOPreviewsParams, write=SetIOPreviewsParams
		, default=0};
	__property Graphics::TFont* PreviewFont = {read=GetPreviewFont, write=SetPreviewFont};
	__property bool StreamHeaders = {read=fStreamHeaders, write=fStreamHeaders, default=0};
public:
	/* TWinControl.CreateParented */ __fastcall TImageEnDBView(HWND ParentWindow) : Imageenview::TImageEnView(
		ParentWindow) { }
	
};

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE System::AnsiString SImageFormats[7];

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