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

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

#ifndef IEUtilsHPP
#define IEUtilsHPP
#include <iedefs.hpp>
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <StdCtrls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

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

namespace Ieutils
{
//-- type declarations -------------------------------------------------------
struct THash1Item;
typedef THash1Item *PHash1Item;

struct THash1Item
{
	int key;
	THash1Item *nextitem;
} ;

class DELPHICLASS THash1;
class PASCALIMPLEMENTATION THash1 : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Iedefs::IntegerArray *fMainKeys;
	Sysutils::TByteArray *fMainKeysUse;
	int fHbits;
	int fHdim;
	int __fastcall HashFunc(int kk);
	
public:
	int nkeys;
	__fastcall THash1(int Hbits);
	__fastcall virtual ~THash1(void);
	bool __fastcall Insert(int kk);
	bool __fastcall KeyPresent(int kk);
};

class DELPHICLASS TImageEnPaletteDialog;
class PASCALIMPLEMENTATION TImageEnPaletteDialog : public Forms::TForm 
{
	typedef Forms::TForm inherited;
	
private:
	int MouseCol;
	Iedefs::RGBROW *fPalette;
	int fNumCol;
	void __fastcall FormPaint(System::TObject* Sender);
	void __fastcall FormMouseMove(System::TObject* Sender, Classes::TShiftState Shift, int x, int y);
	void __fastcall FormClick(System::TObject* Sender);
	
public:
	Stdctrls::TButton* ButtonCancel;
	Graphics::TColor SelCol;
	__property int NumCol = {read=MouseCol, nodefault};
	__fastcall virtual TImageEnPaletteDialog(Classes::TComponent* AOwner);
	void __fastcall SetPalette(Iedefs::TRGB * Palette, const int Palette_Size, int NumCol);
	bool __fastcall Execute(void);
public:
	/* TCustomForm.CreateNew */ __fastcall TImageEnPaletteDialog(Classes::TComponent* AOwner, int Dummy
		) : Forms::TForm(AOwner, Dummy) { }
	/* TCustomForm.Destroy */ __fastcall virtual ~TImageEnPaletteDialog(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TImageEnPaletteDialog(HWND ParentWindow) : Forms::TForm(
		ParentWindow) { }
	
};

class DELPHICLASS TIEHint;
class PASCALIMPLEMENTATION TIEHint : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	System::AnsiString fText;
	Graphics::TFont* fFont;
	HIDESBASE void __fastcall SetText(System::AnsiString s);
	HIDESBASE void __fastcall SetFont(Graphics::TFont* f);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	MESSAGE void __fastcall WMNCPaint(Messages::TMessage &Message);
	
public:
	__fastcall virtual TIEHint(Classes::TComponent* Owner);
	__fastcall virtual ~TIEHint(void);
	virtual void __fastcall Paint(void);
	__property System::AnsiString Text = {read=fText, write=SetText};
	__property Graphics::TFont* Font = {read=fFont, write=SetFont};
public:
	/* TWinControl.CreateParented */ __fastcall TIEHint(HWND ParentWindow) : Controls::TCustomControl(ParentWindow
		) { }
	
};

class DELPHICLASS TIEByteArray;
class PASCALIMPLEMENTATION TIEByteArray : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	int fSize;
	int fRSize;
	int fBlockSize;
	void __fastcall SetSize(int v);
	
public:
	Sysutils::TByteArray *Data;
	__fastcall TIEByteArray(void);
	__fastcall virtual ~TIEByteArray(void);
	void __fastcall AddByte(Byte v);
	__property int Size = {read=fSize, write=SetSize, nodefault};
	__property int BlockSize = {read=fBlockSize, write=fBlockSize, nodefault};
	void __fastcall Clear(void);
	void __fastcall AppendFromStream(Classes::TStream* Stream, int Count);
};

class DELPHICLASS TNulStream;
class PASCALIMPLEMENTATION TNulStream : public Classes::TStream 
{
	typedef Classes::TStream inherited;
	
private:
	int fposition;
	int fsize;
	
public:
	__fastcall TNulStream(void);
	__fastcall virtual ~TNulStream(void);
	virtual int __fastcall Read(void *Buffer, int Count);
	virtual int __fastcall Write(const void *Buffer, int Count);
	virtual int __fastcall Seek(int Offset, Word Origin);
};

enum IEUtils__6 { ielItems, ielRange, ielCurrentValue };

typedef Set<IEUtils__6, ielItems, ielCurrentValue>  TIEListChanges;

class DELPHICLASS TIEList;
class PASCALIMPLEMENTATION TIEList : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	int fCount;
	
protected:
	int fItemSize;
	void *fData;
	TIEListChanges fChanged;
	virtual void __fastcall SetCount(int v);
	int __fastcall AddItem(void * v);
	void __fastcall InsertItem(int idx, void * v);
	int __fastcall IndexOfItem(void * v);
	void * __fastcall BaseGetItem(int idx);
	void __fastcall BaseSetItem(int idx, void * v);
	
public:
	__fastcall virtual TIEList(void);
	__fastcall virtual ~TIEList(void);
	virtual void __fastcall Delete(int idx);
	__property int Count = {read=fCount, write=SetCount, nodefault};
	virtual void __fastcall Clear(void);
	virtual void __fastcall Assign(TIEList* Source);
	__property TIEListChanges Changed = {read=fChanged, write=fChanged, nodefault};
};

class DELPHICLASS TIEDoubleList;
class PASCALIMPLEMENTATION TIEDoubleList : public Ieutils::TIEList 
{
	typedef Ieutils::TIEList inherited;
	
private:
	double fRangeMin;
	double fRangeMax;
	double fRangeStep;
	double fCurrentValue;
	double __fastcall GetItem(int idx);
	void __fastcall SetItem(int idx, double v);
	void __fastcall SetRangeMax(double v);
	void __fastcall SetRangeMin(double v);
	void __fastcall SetRangeStep(double v);
	void __fastcall SetCurrentValue(double v);
	
public:
	int __fastcall Add(double v);
	void __fastcall Insert(int idx, double v);
	virtual void __fastcall Clear(void);
	int __fastcall IndexOf(double v);
	__property double RangeMin = {read=fRangeMin, write=SetRangeMin};
	__property double RangeMax = {read=fRangeMax, write=SetRangeMax};
	__property double RangeStep = {read=fRangeStep, write=SetRangeStep};
	__property double Items[int idx] = {read=GetItem, write=SetItem/*, default*/};
	virtual void __fastcall Assign(TIEList* Source);
	__property double CurrentValue = {read=fCurrentValue, write=SetCurrentValue};
public:
	/* TIEList.Create */ __fastcall virtual TIEDoubleList(void) : Ieutils::TIEList() { }
	/* TIEList.Destroy */ __fastcall virtual ~TIEDoubleList(void) { }
	
};

class DELPHICLASS TIEIntegerList;
class PASCALIMPLEMENTATION TIEIntegerList : public Ieutils::TIEList 
{
	typedef Ieutils::TIEList inherited;
	
private:
	int fRangeMin;
	int fRangeMax;
	int fRangeStep;
	int fCurrentValue;
	int __fastcall GetItem(int idx);
	void __fastcall SetItem(int idx, int v);
	void __fastcall SetRangeMax(int v);
	void __fastcall SetRangeMin(int v);
	void __fastcall SetRangeStep(int v);
	void __fastcall SetCurrentValue(int v);
	
public:
	int __fastcall Add(int v);
	void __fastcall Insert(int idx, int v);
	virtual void __fastcall Clear(void);
	int __fastcall IndexOf(int v);
	__property int RangeMin = {read=fRangeMin, write=SetRangeMin, nodefault};
	__property int RangeMax = {read=fRangeMax, write=SetRangeMax, nodefault};
	__property int RangeStep = {read=fRangeStep, write=SetRangeStep, nodefault};
	__property int Items[int idx] = {read=GetItem, write=SetItem/*, default*/};
	virtual void __fastcall Assign(TIEList* Source);
	__property int CurrentValue = {read=fCurrentValue, write=SetCurrentValue, nodefault};
public:
	/* TIEList.Create */ __fastcall virtual TIEIntegerList(void) : Ieutils::TIEList() { }
	/* TIEList.Destroy */ __fastcall virtual ~TIEIntegerList(void) { }
	
};

class DELPHICLASS TIERecordList;
class PASCALIMPLEMENTATION TIERecordList : public Ieutils::TIEList 
{
	typedef Ieutils::TIEList inherited;
	
private:
	void * __fastcall GetItem(int idx);
	void __fastcall SetItem(int idx, void * v);
	
public:
	int __fastcall Add(void * v);
	void __fastcall Insert(int idx, void * v);
	int __fastcall IndexOf(void * v);
	__property void * Items[int idx] = {read=GetItem, write=SetItem/*, default*/};
	__fastcall TIERecordList(int RecordSize);
public:
	/* TIEList.Create */ __fastcall virtual TIERecordList(void) : Ieutils::TIEList() { }
	/* TIEList.Destroy */ __fastcall virtual ~TIERecordList(void) { }
	
};

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE int __fastcall _GetBitCount(int b);
extern PACKAGE int __fastcall _NColToBitsPixel(int NCol);
extern PACKAGE int __fastcall _BitmapRowLen(int Width, int BitCount);
extern PACKAGE int __fastcall _Pixelformat2BitCount(Graphics::TPixelFormat PixelFormat);
extern PACKAGE Graphics::TPixelFormat __fastcall _Bitcount2Pixelformat(int Bitcount);
extern PACKAGE void __fastcall ReverseBits(int &inp);
extern PACKAGE void __fastcall ReverseBitsB(Byte &inp);
extern PACKAGE void __fastcall _CastPolySelCC(const int x1, const int y1, int &x2, int &y2);
extern PACKAGE bool __fastcall _RectXRect(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int 
	bx2, int by2);
extern PACKAGE int __fastcall _RectPRect(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2
	, int by2);
extern PACKAGE bool __fastcall _InRect(int xx, int yy, int x1, int y1, int x2, int y2);
extern PACKAGE int __fastcall _getfilesize(const System::AnsiString nf);
extern PACKAGE int __fastcall IEFindHandle(Classes::TComponent* cmp);
extern PACKAGE void __fastcall SaveStringToStream(Classes::TStream* Stream, const System::AnsiString 
	ss);
extern PACKAGE void __fastcall LoadStringFromStream(Classes::TStream* Stream, System::AnsiString &ss
	);
extern PACKAGE int __fastcall _GetNumCol(int BitsPerSample, int SamplesPerPixel);
extern PACKAGE System::AnsiString __fastcall iemsg(const System::AnsiString * msg, const Iedefs::TMsgLanguageR 
	lang);

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