// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ahmtdbindexlookup.pas' rev: 6.00

#ifndef ahmtdbindexlookupHPP
#define ahmtdbindexlookupHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <ahmstdclass.hpp>	// Pascal unit
#include <DBTables.hpp>	// Pascal unit
#include <DB.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Ahmtdbindexlookup
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TAHMDBDisplayType { dtDisplayLabel, dtFieldName, dtIndexName };
#pragma option pop

class DELPHICLASS TAHMIndexDataLink;
class DELPHICLASS TAHMDBIndexLookup;
class PASCALIMPLEMENTATION TAHMDBIndexLookup : public Stdctrls::TCustomComboBox 
{
	typedef Stdctrls::TCustomComboBox inherited;
	
private:
	TAHMIndexDataLink* FDataLink;
	bool FUpdate;
	AnsiString FAboutStr;
	AnsiString *FNoIndexItem;
	bool FEnableNoIndex;
	TAHMDBDisplayType FDisplayType;
	Db::TDataSource* __fastcall GetDataSource(void);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	AnsiString __fastcall GetIndexFieldName();
	void __fastcall SetNoIndexItem(const AnsiString Value);
	AnsiString __fastcall GetNoIndexItem();
	void __fastcall SetEnableNoIndex(bool Value);
	void __fastcall SetDisplayType(TAHMDBDisplayType Value);
	void __fastcall ActiveChanged(void);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
	
protected:
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	void __fastcall FillIndexList(Classes::TStrings* List);
	DYNAMIC void __fastcall Change(void);
	virtual void __fastcall UpdateList(void);
	
public:
	__fastcall virtual TAHMDBIndexLookup(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMDBIndexLookup(void);
	
__published:
	__property AnsiString About = {read=FAboutStr, write=FAboutStr};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property AnsiString NoIndexItemName = {read=GetNoIndexItem, write=SetNoIndexItem};
	__property bool NoIndexEnabled = {read=FEnableNoIndex, write=SetEnableNoIndex, default=0};
	__property TAHMDBDisplayType DisplayType = {read=FDisplayType, write=SetDisplayType, default=0};
	__property DragCursor  = {default=-12};
	__property DragMode  = {default=0};
	__property Enabled  = {default=1};
	__property Color  = {default=-2147483643};
	__property Ctl3D ;
	__property DropDownCount  = {default=8};
	__property Font ;
	__property ItemHeight ;
	__property ParentCtl3D  = {default=1};
	__property ParentFont  = {default=1};
	__property ParentShowHint  = {default=1};
	__property PopupMenu ;
	__property ShowHint ;
	__property Sorted  = {default=0};
	__property TabOrder  = {default=-1};
	__property TabStop  = {default=1};
	__property Visible  = {default=1};
	__property OnChange ;
	__property OnClick ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnStartDrag ;
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMDBIndexLookup(HWND ParentWindow) : Stdctrls::TCustomComboBox(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMIndexDataLink : public Db::TDataLink 
{
	typedef Db::TDataLink inherited;
	
private:
	TAHMDBIndexLookup* FILookup;
	
protected:
	virtual void __fastcall ActiveChanged(void);
	virtual void __fastcall DataSetChanged(void);
	
public:
	__fastcall TAHMIndexDataLink(TAHMDBIndexLookup* ALookup);
	__fastcall virtual ~TAHMIndexDataLink(void);
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Ahmtdbindexlookup */
using namespace Ahmtdbindexlookup;
#pragma option pop	// -w-
#pragma option pop	// -Vx

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