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

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

#ifndef IEMViewHPP
#define IEMViewHPP

#pragma delphiheader begin
#pragma option push -w-
#include <Menus.hpp>	// Pascal unit
#include <ImageEnIO.hpp>	// Pascal unit
#include <ImageEnProc.hpp>	// Pascal unit
#include <ImageEnView.hpp>	// Pascal unit
#include <hyiedefs.hpp>	// Pascal unit
#include <hyieutils.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Clipbrd.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <Dialogs.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 Iemview
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TIEImageSelectEvent)(System::TObject* Sender, int idx);

typedef void __fastcall (__closure *TIEImageIDRequestEvent)(System::TObject* Sender, int ID, Graphics::TBitmap* 
	&Bitmap);

typedef void __fastcall (__closure *TIEMProgressEvent)(System::TObject* Sender, int per, int idx);

typedef void __fastcall (__closure *TIEImageDrawEvent)(System::TObject* Sender, int idx, int Left, int 
	Top, Graphics::TCanvas* Canvas);

#pragma option push -b-
enum TIEStoreType { ietNormal, ietThumb };
#pragma option pop

#pragma pack(push, 4)
struct TIEImageInfo
{
	unsigned hbi;
	int BmpCount;
	int X;
	int Y;
	int row;
	int col;
	Graphics::TColor Background;
	char *name;
	int ID;
	int DTime;
} ;
#pragma pack(pop)

typedef TIEImageInfo *PIEImageInfo;

#pragma option push -b-
enum TIEMMouseInteractItems { mmiScroll, mmiSelect };
#pragma option pop

typedef Set<TIEMMouseInteractItems, mmiScroll, mmiSelect>  TIEMMouseInteract;

#pragma option push -b-
enum TIEMKeyInteractItems { mkiMoveSelected };
#pragma option pop

typedef Set<TIEMKeyInteractItems, mkiMoveSelected, mkiMoveSelected>  TIEMKeyInteract;

#pragma option push -b-
enum TIEMDisplayMode { mdGrid, mdSingle };
#pragma option pop

#pragma option push -b-
enum TIESeek { iskLeft, iskRight, iskUp, iskDown, iskFirst, iskLast, iskPagDown, iskPagUp };
#pragma option pop

class DELPHICLASS TImageEnMView;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TImageEnMView : public Imageenview::TIEView 
{
	typedef Imageenview::TIEView inherited;
	
private:
	int fHSVX1;
	int fHSVY1;
	Stdctrls::TScrollStyle fScrollBars;
	double fRXScroll;
	double fRYScroll;
	int fViewX;
	int fViewY;
	Classes::TList* fImage;
	Classes::TList* fImageInfo;
	TIEStoreType fStoreType;
	int fThumbWidth;
	int fThumbHeight;
	int fHorizBorder;
	int fVertBorder;
	int fVWidth;
	int fVHeight;
	Imageenview::TViewChangeEvent fOnViewChange;
	TIEMProgressEvent fOnDrawProgress;
	unsigned fHDrawDib;
	TIEImageIDRequestEvent fOnImageIDRequest;
	TIEImageDrawEvent fOnImageDraw;
	Hyiedefs::TIEProgressEvent fOnIOProgress;
	int fBottomGap;
	int fUpperGap;
	TIEMDisplayMode fDisplayMode;
	int fGridWidth;
	int fHSX1;
	int fHSY1;
	Imageenio::TImageEnIO* fImageEnIO;
	int fLockPaint;
	bool fRemoveCorrupted;
	bool fDrawImageBackground;
	bool fScrollBarsAlwaysVisible;
	Hyieutils::TIEScrollBarParams* fVScrollBarParams;
	Hyieutils::TIEScrollBarParams* fHScrollBarParams;
	Hyiedefs::TResampleFilter fThumbnailResampleFilter;
	bool fDestroying;
	int fSelectedItem;
	bool fVisibleSelection;
	int fSelectionWidth;
	Graphics::TColor fSelectionColor;
	TIEImageSelectEvent fOnImageSelect;
	TIEMMouseInteract fMouseInteract;
	TIEMKeyInteract fKeyInteract;
	bool fPlaying;
	int fPlayTimer;
	bool fPlayLoop;
	bool fTimerInProgress;
	int fFrame;
	TIEMDisplayMode fSaveDM;
	int fSaveSel;
	int fLastImOp;
	int fLastImIdx;
	void __fastcall GetMaxViewXY(int &mx, int &my);
	void __fastcall SetViewX(int v);
	void __fastcall SetViewY(int v);
	int __fastcall GetImageX(int idx);
	int __fastcall GetImageY(int idx);
	int __fastcall GetImageCol(int idx);
	int __fastcall GetImageRow(int idx);
	void __fastcall SetThumbWidth(int v);
	void __fastcall SetThumbHeight(int v);
	int __fastcall GetImageCount(void);
	void __fastcall SetImageFileName(int idx, AnsiString v);
	AnsiString __fastcall GetImageFileName(int idx);
	void __fastcall SetImageID(int idx, int v);
	int __fastcall GetImageID(int idx);
	void __fastcall SetHorizBorder(int v);
	void __fastcall SetVertBorder(int v);
	bool __fastcall DeleteImageNU(int idx);
	void __fastcall SetVisibleSelection(bool v);
	void __fastcall SetSelectionWidth(int v);
	void __fastcall SetSelectionColor(Graphics::TColor v);
	void __fastcall SetSelectedItem(int v);
	void __fastcall SetBottomGap(int v);
	void __fastcall SetUpperGap(int v);
	void __fastcall SetImageBackground(int idx, Graphics::TColor v);
	Graphics::TColor __fastcall GetImageBackground(int idx);
	void __fastcall SetImageDelayTime(int idx, int v);
	int __fastcall GetImageDelayTime(int idx);
	bool __fastcall ObtainImage(int idx);
	void __fastcall SetDisplayMode(TIEMDisplayMode v);
	void __fastcall SetGridWidth(int v);
	void __fastcall SetPlaying(bool v);
	void __fastcall PlayFrame(void);
	void __fastcall FreeImage(int idx);
	void __fastcall DecBmpCount(int idx);
	void __fastcall SetImageNU(int idx, Graphics::TBitmap* v);
	void __fastcall SetSelectedItemNU(int v);
	void __fastcall DeselectNU(void);
	void __fastcall SetVisibleFrame(int v);
	TIEMMouseInteract __fastcall GetMouseInteract(void);
	TIEMKeyInteract __fastcall GetKeyInteract(void);
	void __fastcall SetRemoveCorrupted(bool v);
	void __fastcall SetDrawImageBackground(bool v);
	bool __fastcall GetScrollBarsAlwaysVisible(void);
	void __fastcall SetScrollBarsAlwaysVisible(bool v);
	
protected:
	virtual void __fastcall SetScrollBars(Stdctrls::TScrollStyle v);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TMessage &Message);
	MESSAGE void __fastcall WMTimer(Messages::TWMTimer &Message);
	MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Msg);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
		Y);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Msg);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Msg);
	HIDESBASE MESSAGE void __fastcall WMMouseWheel(Messages::TMessage &Message);
	virtual void __fastcall ViewChange(int c);
	DYNAMIC bool __fastcall PaletteChanged(bool Foreground);
	virtual void __fastcall SetBackGround(Graphics::TColor cl);
	virtual Graphics::TBitmap* __fastcall GetFBitmap(void);
	virtual void __fastcall SetMouseInteract(TIEMMouseInteract v);
	virtual void __fastcall SetKeyInteract(TIEMKeyInteract v);
	int __fastcall GetImageWidth(int idx);
	int __fastcall GetImageHeight(int idx);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyUp(Word &Key, Classes::TShiftState Shift);
	
public:
	__fastcall virtual TImageEnMView(Classes::TComponent* Owner);
	__fastcall virtual ~TImageEnMView(void);
	virtual void __fastcall Update(void);
	HIDESBASE virtual void __fastcall PaintTo(Graphics::TCanvas* Canvas);
	virtual void __fastcall Paint(void);
	__property ClientWidth ;
	__property ClientHeight ;
	__property int ViewX = {read=fViewX, write=SetViewX, nodefault};
	__property int ViewY = {read=fViewY, write=SetViewY, nodefault};
	void __fastcall SetViewXY(int x, int y);
	void __fastcall CenterSelected(void);
	void __fastcall CenterFrame(void);
	void __fastcall LockPaint(void);
	int __fastcall UnLockPaint(void);
	int __fastcall NPUnLockPaint(void);
	__property int LockPaintCount = {read=fLockPaint, nodefault};
	__property MouseCapture ;
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
	int __fastcall GetLastOp(void);
	int __fastcall GetLastOpIdx(void);
	__property bool ScrollBarsAlwaysVisible = {read=GetScrollBarsAlwaysVisible, write=SetScrollBarsAlwaysVisible
		, default=0};
	__property Hyieutils::TIEScrollBarParams* VScrollBarParams = {read=fVScrollBarParams};
	__property Hyieutils::TIEScrollBarParams* HScrollBarParams = {read=fHScrollBarParams};
	__property int ImageWidth[int idx] = {read=GetImageWidth};
	__property int ImageHeight[int idx] = {read=GetImageHeight};
	__property int ImageX[int idx] = {read=GetImageX};
	__property int ImageY[int idx] = {read=GetImageY};
	__property int ImageRow[int idx] = {read=GetImageRow};
	__property int ImageCol[int idx] = {read=GetImageCol};
	__property AnsiString ImageFileName[int idx] = {read=GetImageFileName, write=SetImageFileName};
	__property int ImageID[int idx] = {read=GetImageID, write=SetImageID};
	__property Graphics::TColor ImageBackground[int idx] = {read=GetImageBackground, write=SetImageBackground
		};
	__property int ImageDelayTime[int idx] = {read=GetImageDelayTime, write=SetImageDelayTime};
	void __fastcall UpdateImage(int idx);
	void __fastcall InsertImage(int idx);
	void __fastcall MoveImage(int idx, int destination);
	int __fastcall AppendImage(void);
	void __fastcall DeleteImage(int idx);
	__property int ImageCount = {read=GetImageCount, nodefault};
	void __fastcall UpdateCoords(void);
	void __fastcall SetImage(int idx, Graphics::TBitmap* v);
	bool __fastcall SetImageFromFile(int idx, const AnsiString FileName);
	void __fastcall SetImageRect(int idx, Graphics::TBitmap* v, int x1, int y1, int x2, int y2);
	void __fastcall Clear(void);
	Graphics::TBitmap* __fastcall GetBitmap(int idx);
	unsigned __fastcall GetBitmapInfo(int idx);
	void __fastcall ReleaseBitmap(int idx);
	int __fastcall GetImageVisibility(int idx);
	int __fastcall ImageAtPos(int x, int y);
	__property Hyiedefs::TResampleFilter ThumbnailResampleFilter = {read=fThumbnailResampleFilter, write=
		fThumbnailResampleFilter, nodefault};
	__property int SelectedImage = {read=fSelectedItem, write=SetSelectedItem, nodefault};
	void __fastcall Deselect(void);
	void __fastcall SelectSeek(TIESeek pos);
	__property bool Playing = {read=fPlaying, write=SetPlaying, nodefault};
	__property bool PlayLoop = {read=fPlayLoop, write=fPlayLoop, nodefault};
	__property int VisibleFrame = {read=fFrame, write=SetVisibleFrame, nodefault};
	
__published:
	__property Stdctrls::TScrollStyle ScrollBars = {read=fScrollBars, write=SetScrollBars, default=0};
	__property TIEStoreType StoreType = {read=fStoreType, write=fStoreType, default=0};
	__property int ThumbWidth = {read=fThumbWidth, write=SetThumbWidth, default=100};
	__property int ThumbHeight = {read=fThumbHeight, write=SetThumbHeight, default=100};
	__property int HorizBorder = {read=fHorizBorder, write=SetHorizBorder, default=4};
	__property int VertBorder = {read=fVertBorder, write=SetVertBorder, default=4};
	__property int BottomGap = {read=fBottomGap, write=SetBottomGap, default=0};
	__property int UpperGap = {read=fUpperGap, write=SetUpperGap, default=0};
	__property Imageenview::TViewChangeEvent OnViewChange = {read=fOnViewChange, write=fOnViewChange};
	__property TIEImageIDRequestEvent OnImageIDRequest = {read=fOnImageIDRequest, write=fOnImageIDRequest
		};
	__property TIEImageDrawEvent OnImageDraw = {read=fOnImageDraw, write=fOnImageDraw};
	__property TIEImageSelectEvent OnImageSelect = {read=fOnImageSelect, write=fOnImageSelect};
	__property Hyiedefs::TIEProgressEvent OnIOProgress = {read=fOnIOProgress, write=fOnIOProgress};
	__property TIEMProgressEvent OnDrawProgress = {read=fOnDrawProgress, write=fOnDrawProgress};
	__property bool VisibleSelection = {read=fVisibleSelection, write=SetVisibleSelection, default=1};
	__property TIEMMouseInteract MouseInteract = {read=GetMouseInteract, write=SetMouseInteract, default=2
		};
	__property TIEMKeyInteract KeyInteract = {read=GetKeyInteract, write=SetKeyInteract, default=1};
	__property TIEMDisplayMode DisplayMode = {read=fDisplayMode, write=SetDisplayMode, default=0};
	__property int GridWidth = {read=fGridWidth, write=SetGridWidth, default=0};
	__property int SelectionWidth = {read=fSelectionWidth, write=SetSelectionWidth, nodefault};
	__property Graphics::TColor SelectionColor = {read=fSelectionColor, write=SetSelectionColor, nodefault
		};
	__property bool RemoveCorrupted = {read=fRemoveCorrupted, write=SetRemoveCorrupted, default=0};
	__property bool DrawImageBackground = {read=fDrawImageBackground, write=SetDrawImageBackground, default=0
		};
	__property Align ;
	__property DragCursor ;
	__property DragMode ;
	__property Enabled ;
	__property ParentShowHint ;
	__property PopupMenu ;
	__property ShowHint ;
	__property Visible ;
	__property TabOrder ;
	__property TabStop ;
	__property OnClick ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnStartDrag ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TImageEnMView(HWND ParentWindow) : Imageenview::TIEView(
		ParentWindow) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern "C" bool __stdcall DrawDibClose(unsigned hdd);
extern "C" bool __stdcall DrawDibDraw(unsigned hdd, unsigned hDC, int xDst, int yDst, int dxDst, int 
	dyDst, tagBITMAPINFOHEADER &lpbi, void * Bits, int xSrc, int ySrc, int dxSrc, int dySrc, unsigned wFlags
	);
extern "C" unsigned __stdcall DrawDibOpen(void);
extern "C" unsigned __stdcall DrawDibRealize(unsigned hdd, unsigned hDC, BOOL fBackground);

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

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