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

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

#ifndef AHMTControlManagerHPP
#define AHMTControlManagerHPP
#include <AHMTHookClass.hpp>
#include <ShellAPI.hpp>
#include <AHMTStoreData.hpp>
#include <AHMSystemClass.hpp>
#include <AHMSystemConst.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

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

namespace Ahmtcontrolmanager
{
//-- type declarations -------------------------------------------------------
enum TAHMControlProperties { DesignPreview, pDialog, pSizeable, pBorder, pCaption, pMinimize, pMaximize, 
	pSystemMenu, pClientEdge, pDialogEdge, pStaticEdge, pToolWindow, pContextHelp, pAcceptFiles, pWindowEdge 
	};

typedef Set<TAHMControlProperties, DesignPreview, pWindowEdge>  TAHMControlPropertySet;

typedef void __fastcall (__closure *TAHMCtrlGetConstraints)(System::TObject* Sender, int &MinWidth, 
	int &MaxWidth, int &MinHeight, int &MaxHeight);

typedef void __fastcall (__closure *TAHMOnControlDropFile)(System::TObject* Sender, int X, int Y, Classes::TStringList* 
	Files, int FileCount);

typedef void __fastcall (__closure *TAHMControlGetFile)(System::TObject* Sender, System::AnsiString 
	FileAndPath);

typedef void __fastcall (__closure *TAHMControlOnSysMemLow)(System::TObject* Sender, int CompactRatio
	);

typedef void __fastcall (__closure *TAHMControlDisplayChange)(System::TObject* Sender, int BitPerPixel
	, Word ScreenWidth, Word ScreenHeight);

class DELPHICLASS TAHMControlConstraints;
class PASCALIMPLEMENTATION TAHMControlConstraints : public Graphics::TGraphicsObject 
{
	typedef Graphics::TGraphicsObject inherited;
	
private:
	int FMaxWidth;
	int FMinWidth;
	int FMaxHeight;
	int FMinHeight;
	void __fastcall SetMaxHeight(const int Value);
	void __fastcall SetMaxWidth(const int Value);
	void __fastcall SetMinHeight(const int Value);
	void __fastcall SetMinWidth(const int Value);
	
__published:
	__property int MinWidth = {read=FMinWidth, write=SetMinWidth, default=0};
	__property int MinHeight = {read=FMinHeight, write=SetMinHeight, default=0};
	__property int MaxWidth = {read=FMaxWidth, write=SetMaxWidth, default=0};
	__property int MaxHeight = {read=FMaxHeight, write=SetMaxHeight, default=0};
public:
	/* TPersistent.Destroy */ __fastcall virtual ~TAHMControlConstraints(void) { }
	
public:
	/* TObject.Create */ __fastcall TAHMControlConstraints(void) : Graphics::TGraphicsObject() { }
	
};

class DELPHICLASS TAHMSysControlStore;
class DELPHICLASS TAHMManagedControl;
class DELPHICLASS TAHMControlManager;
class DELPHICLASS TAHMManagedControls;
class PASCALIMPLEMENTATION TAHMManagedControls : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
private:
	TAHMControlManager* FAHMControlManager;
	TAHMManagedControl* __fastcall GetAHMManagedControl(int Index);
	void __fastcall SetAHMManagedControl(int Index, TAHMManagedControl* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TAHMManagedControls(TAHMControlManager* AOwner);
	HIDESBASE TAHMManagedControl* __fastcall Add(void);
	bool __fastcall Delete(int Index);
	__property TAHMControlManager* Owner = {read=FAHMControlManager};
	__property TAHMManagedControl* Items[int Index] = {read=GetAHMManagedControl, write=SetAHMManagedControl
		/*, default*/};
public:
	/* TCollection.Destroy */ __fastcall virtual ~TAHMManagedControls(void) { }
	
};

class PASCALIMPLEMENTATION TAHMControlManager : public Ahmsystemclass::TAHMSystemsComponent 
{
	typedef Ahmsystemclass::TAHMSystemsComponent inherited;
	
private:
	TAHMManagedControls* FAHMManagedControls;
	Classes::TNotifyEvent FOnEnter;
	Classes::TNotifyEvent FOnExit;
	Ahmtstoredata::TAHMStoreData* FStore;
	void __fastcall SetAHMManagedControls(TAHMManagedControls* Value);
	void __fastcall SetStore(const Ahmtstoredata::TAHMStoreData* Value);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
		);
	
public:
	__fastcall virtual TAHMControlManager(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMControlManager(void);
	
__published:
	__property TAHMManagedControls* Controls = {read=FAHMManagedControls, write=SetAHMManagedControls};
		
	__property Ahmtstoredata::TAHMStoreData* Store = {read=FStore, write=SetStore};
	__property Classes::TNotifyEvent OnExit = {read=FOnExit, write=FOnExit};
	__property Classes::TNotifyEvent OnEnter = {read=FOnEnter, write=FOnEnter};
};

typedef void __fastcall (__closure *TAHMControlMessage)(System::TObject* Sender, Messages::TMessage 
	&WndMessage);

class PASCALIMPLEMENTATION TAHMManagedControl : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	TAHMControlManager* FAHMControlManager;
	HWND FApplicationHandle;
	HWND FControlhandle;
	TAHMControlMessage FMessage;
	TAHMControlPropertySet FOldControlProperties;
	TAHMControlPropertySet FControlProperties;
	TAHMControlConstraints* FConstraints;
	TAHMCtrlGetConstraints FOnGetConstraints;
	TAHMControlOnSysMemLow FOnSysMemLow;
	TAHMOnControlDropFile FOnDropFiles;
	TAHMControlGetFile FOnEachDroppedFile;
	Classes::TNotifyEvent FOnMove;
	TAHMControlDisplayChange FOnDisplayChange;
	TAHMSysControlStore* FControlStore;
	Controls::TWinControl* FControl;
	Classes::TNotifyEvent FOnEnter;
	Classes::TNotifyEvent FOnExit;
	Classes::TNotifyEvent FOnSizing;
	Ahmthookclass::TAHMHookClass* FHookClass;
	void __fastcall SetConstraints(System::TObject* Sender);
	TAHMControlPropertySet __fastcall GetControlProperties(void);
	void __fastcall SetControlProperties(const TAHMControlPropertySet Value);
	void __fastcall SetControl(const Controls::TWinControl* Value);
	void __fastcall ReloadHook(System::TObject* Sender);
	void __fastcall SetOldControlProperties(void);
	
protected:
	virtual System::AnsiString __fastcall GetDisplayName(void);
	__property TAHMControlManager* Owner = {read=FAHMControlManager};
	__property System::AnsiString DisplayName = {read=GetDisplayName};
	__property HWND ControlHandle = {read=FControlhandle, nodefault};
	__property HWND ApplicationHandle = {read=FApplicationHandle, nodefault};
	void __fastcall Hooked(Messages::TMessage &AMsg, bool &Handled);
	void __fastcall LoadStore(void);
	void __fastcall SaveStore(void);
	
public:
	__fastcall virtual TAHMManagedControl(Classes::TCollection* Collection);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__fastcall virtual ~TAHMManagedControl(void);
	void __fastcall Update(void);
	
__published:
	__property Controls::TWinControl* Control = {read=FControl, write=SetControl};
	__property TAHMSysControlStore* ControlStore = {read=FControlStore, write=FControlStore};
	__property TAHMControlConstraints* Constraints = {read=FConstraints, write=FConstraints};
	__property TAHMOnControlDropFile OnDropFiles = {read=FOnDropFiles, write=FOnDropFiles};
	__property TAHMControlGetFile OnEachDroppedFile = {read=FOnEachDroppedFile, write=FOnEachDroppedFile
		};
	__property TAHMControlOnSysMemLow OnSysMemLow = {read=FOnSysMemLow, write=FOnSysMemLow};
	__property TAHMControlMessage OnMessage = {read=FMessage, write=FMessage};
	__property TAHMCtrlGetConstraints OnGetConstraints = {read=FOnGetConstraints, write=FOnGetConstraints
		};
	__property TAHMControlDisplayChange OnDisplayChange = {read=FOnDisplayChange, write=FOnDisplayChange
		};
	__property Classes::TNotifyEvent OnMove = {read=FOnMove, write=FOnMove};
	__property TAHMControlPropertySet Properties = {read=FControlProperties, write=SetControlProperties
		, default=0};
	__property Classes::TNotifyEvent OnExit = {read=FOnExit, write=FOnExit};
	__property Classes::TNotifyEvent OnEnter = {read=FOnEnter, write=FOnEnter};
	__property Classes::TNotifyEvent OnSizing = {read=FOnSizing, write=FOnSizing};
};

class PASCALIMPLEMENTATION TAHMSysControlStore : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FVisible;
	bool FSize;
	bool FLocation;
	System::AnsiString FStoreKey;
	TAHMManagedControl* ControlManager;
	void __fastcall SetLocation(const bool Value);
	void __fastcall SetSize(const bool Value);
	void __fastcall SetStoreKey(const System::AnsiString Value);
	void __fastcall SetVisible(const bool Value);
	
protected:
	void __fastcall SaveToStore(void);
	void __fastcall LoadFromStore(void);
	
public:
	__fastcall TAHMSysControlStore(TAHMManagedControl* AOwner);
	__fastcall virtual ~TAHMSysControlStore(void);
	
__published:
	__property System::AnsiString StoreKey = {read=FStoreKey, write=SetStoreKey};
	__property bool Size = {read=FSize, write=SetSize, default=0};
	__property bool Location = {read=FLocation, write=SetLocation, default=0};
	__property bool Visible = {read=FVisible, write=SetVisible, default=0};
};

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

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