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

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

#ifndef ahmtdbnavigatorHPP
#define ahmtdbnavigatorHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ahmenhancedconst.hpp>	// Pascal unit
#include <ahmenhancedclass.hpp>	// Pascal unit
#include <ahmtbackground.hpp>	// Pascal unit
#include <DB.hpp>	// Pascal unit
#include <ComCtrls.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <Mask.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Ahmtdbnavigator
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TAHMNavGlyph { ngEnabled, ngDisabled };
#pragma option pop

#pragma option push -b-
enum TAHMNavigateBtn { nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEdit, nbPost, nbCancel, nbRefresh };
#pragma option pop

typedef Set<TAHMNavigateBtn, nbFirst, nbRefresh>  TAHMButtonSet;

#pragma option push -b-
enum ahmtdbnavigator__1 { nsAllowTimer, nsFocusRect };
#pragma option pop

typedef Set<ahmtdbnavigator__1, nsAllowTimer, nsFocusRect>  TAHMNavButtonStyle;

typedef void __fastcall (__closure *TAHMNavigationClick)(System::TObject* Sender, TAHMNavigateBtn Button);

class DELPHICLASS TAHMDBNavigator;
class DELPHICLASS TAHMNavDataLink;
class PASCALIMPLEMENTATION TAHMNavDataLink : public Db::TDataLink 
{
	typedef Db::TDataLink inherited;
	
private:
	TAHMDBNavigator* FNavigator;
	
protected:
	virtual void __fastcall EditingChanged(void);
	virtual void __fastcall DataSetChanged(void);
	virtual void __fastcall ActiveChanged(void);
	
public:
	__fastcall TAHMNavDataLink(TAHMDBNavigator* ANav);
	__fastcall virtual ~TAHMNavDataLink(void);
};


class DELPHICLASS TAHMNavButton;
class PASCALIMPLEMENTATION TAHMDBNavigator : public Extctrls::TCustomPanel 
{
	typedef Extctrls::TCustomPanel inherited;
	
private:
	bool fchangedir;
	AnsiString FAHMAboutStr;
	Ahmtbackground::TAHMBackground* fback;
	TAHMNavDataLink* FDataLink;
	TAHMButtonSet FVisibleButtons;
	Classes::TStrings* FHints;
	Ahmenhancedclass::TAHMKind fDir;
	int ButtonWidth;
	int Buttonheight;
	#pragma pack(push, 1)
	Types::TPoint MinBtnSize;
	#pragma pack(pop)
	
	TAHMNavigationClick FOnNavClick;
	TAHMNavigationClick FBeforeAction;
	TAHMNavigateBtn FocusedButton;
	bool FConfirmDelete;
	bool FFlat;
	void __fastcall ClickHandler(System::TObject* Sender);
	Db::TDataSource* __fastcall GetDataSource(void);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	void __fastcall SetDir(Ahmenhancedclass::TAHMKind Value);
	void __fastcall InitButtons(void);
	void __fastcall InitHints(void);
	void __fastcall BtnMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	HIDESBASE void __fastcall SetVisible(TAHMButtonSet Value);
	void __fastcall AdjustHSize(int &W, int &H);
	void __fastcall AdjustVSize(int &W, int &H);
	void __fastcall Setback(Ahmtbackground::TAHMBackground* value);
	void __fastcall HintsChanged(System::TObject* Sender);
	void __fastcall SetHints(Classes::TStrings* Value);
	void __fastcall SetFlat(bool Value);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
	
protected:
	TAHMNavButton* Buttons[10];
	void __fastcall DataChanged(void);
	void __fastcall EditingChanged(void);
	void __fastcall ActiveChanged(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
	
public:
	__fastcall virtual TAHMDBNavigator(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMDBNavigator(void);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
	void __fastcall BtnClick(TAHMNavigateBtn Index);
	virtual void __fastcall Paint(void);
	
__published:
	__property AnsiString About = {read=FAHMAboutStr, write=FAHMAboutStr, stored=false};
	__property Anchors  = {default=3};
	__property BiDiMode ;
	__property Constraints ;
	__property DragKind  = {default=0};
	__property ParentBiDiMode  = {default=1};
	__property Ahmenhancedclass::TAHMKind Direction = {read=fDir, write=SetDir, default=1};
	__property Ahmtbackground::TAHMBackground* Background = {read=fback, write=Setback};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property TAHMButtonSet VisibleButtons = {read=FVisibleButtons, write=SetVisible, default=1023};
	__property Align  = {default=0};
	__property DragCursor  = {default=-12};
	__property DragMode  = {default=0};
	__property Enabled  = {default=1};
	__property bool Flat = {read=FFlat, write=SetFlat, default=0};
	__property Ctl3D ;
	__property Classes::TStrings* Hints = {read=FHints, write=SetHints};
	__property ParentCtl3D  = {default=1};
	__property ParentShowHint  = {default=1};
	__property PopupMenu ;
	__property bool ConfirmDelete = {read=FConfirmDelete, write=FConfirmDelete, default=1};
	__property ShowHint ;
	__property TabOrder  = {default=-1};
	__property TabStop  = {default=0};
	__property Visible  = {default=1};
	__property TAHMNavigationClick BeforeAction = {read=FBeforeAction, write=FBeforeAction};
	__property TAHMNavigationClick OnClick = {read=FOnNavClick, write=FOnNavClick};
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnResize ;
	__property OnStartDrag ;
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMDBNavigator(HWND ParentWindow) : Extctrls::TCustomPanel(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMNavButton : public Buttons::TSpeedButton 
{
	typedef Buttons::TSpeedButton inherited;
	
private:
	TAHMNavigateBtn FIndex;
	TAHMNavButtonStyle FNavStyle;
	Extctrls::TTimer* FRepeatTimer;
	void __fastcall TimerExpired(System::TObject* Sender);
	
protected:
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	
public:
	__fastcall virtual ~TAHMNavButton(void);
	__property TAHMNavButtonStyle NavStyle = {read=FNavStyle, write=FNavStyle, nodefault};
	__property TAHMNavigateBtn Index = {read=FIndex, write=FIndex, nodefault};
public:
	#pragma option push -w-inl
	/* TSpeedButton.Create */ inline __fastcall virtual TAHMNavButton(Classes::TComponent* AOwner) : Buttons::TSpeedButton(AOwner) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word InitRepeatPause = 0x190;
static const Shortint RepeatPause = 0x64;
static const Shortint SpaceSize = 0x5;

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

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