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

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

#ifndef ahmtmultithreadHPP
#define ahmtmultithreadHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ahmsystemclass.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 Ahmtmultithread
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TAHMTimerThread;
class DELPHICLASS TAHMTimedThread;
class DELPHICLASS TAHMMultiThreader;
class DELPHICLASS TAHMTimedThreads;
class PASCALIMPLEMENTATION TAHMTimedThreads : public Ahmsystemclass::TAHMCollection 
{
	typedef Ahmsystemclass::TAHMCollection inherited;
	
public:
	TAHMTimedThread* operator[](int Index) { return Items[Index]; }
	
private:
	TAHMMultiThreader* FAHMMultiThreader;
	TAHMTimedThread* __fastcall GetAHMTimedThread(int Index);
	void __fastcall SetAHMTimedThread(int Index, TAHMTimedThread* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TAHMTimedThreads(TAHMMultiThreader* AOwner);
	HIDESBASE TAHMTimedThread* __fastcall Add(void);
	HIDESBASE bool __fastcall Delete(int Index);
	__property TAHMTimedThread* Items[int Index] = {read=GetAHMTimedThread, write=SetAHMTimedThread/*, default*/};
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TAHMTimedThreads(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TAHMMultiThreadEvent)(System::TObject* Sender, TAHMTimedThread* Thread);

class PASCALIMPLEMENTATION TAHMMultiThreader : public Ahmsystemclass::TAHMSystemComponent 
{
	typedef Ahmsystemclass::TAHMSystemComponent inherited;
	
private:
	TAHMTimedThreads* FAHMTimedThreads;
	TAHMMultiThreadEvent FOnAnyTimer;
	void __fastcall SetAHMTimedThreads(TAHMTimedThreads* Value);
	
public:
	__fastcall virtual TAHMMultiThreader(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMMultiThreader(void);
	
__published:
	__property About ;
	__property TAHMTimedThreads* Threads = {read=FAHMTimedThreads, write=SetAHMTimedThreads};
	__property TAHMMultiThreadEvent OnAnyTimer = {read=FOnAnyTimer, write=FOnAnyTimer};
};


class PASCALIMPLEMENTATION TAHMTimedThread : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	unsigned FInterval;
	AnsiString FThreadID;
	bool fEnabled;
	int FTag;
	Classes::TNotifyEvent FOnTimer;
	TAHMTimerThread* FTimerThread;
	TAHMMultiThreader* FAHMMultiThreader;
	void __fastcall SetEnabled(const bool Value);
	void __fastcall SetInterval(const unsigned Value);
	void __fastcall SetThreadPriority(const Classes::TThreadPriority Value);
	Classes::TThreadPriority __fastcall GetThreadPriority(void);
	bool __fastcall GetEnabled(void);
	
protected:
	virtual AnsiString __fastcall GetDisplayName();
	DYNAMIC void __fastcall Timer(void);
	
public:
	__fastcall virtual TAHMTimedThread(Classes::TCollection* Collection);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property TAHMMultiThreader* Owner = {read=FAHMMultiThreader};
	__property AnsiString DisplayName = {read=GetDisplayName};
	__fastcall virtual ~TAHMTimedThread(void);
	
__published:
	__property bool Enabled = {read=GetEnabled, write=SetEnabled, default=1};
	__property int Tag = {read=FTag, write=FTag, default=0};
	__property AnsiString ThreadID = {read=FThreadID, write=FThreadID};
	__property unsigned Interval = {read=FInterval, write=SetInterval, default=1000};
	__property Classes::TNotifyEvent OnTimer = {read=FOnTimer, write=FOnTimer};
	__property Classes::TThreadPriority Priority = {read=GetThreadPriority, write=SetThreadPriority, default=3};
};


class PASCALIMPLEMENTATION TAHMTimerThread : public Classes::TThread 
{
	typedef Classes::TThread inherited;
	
public:
	TAHMTimedThread* OwnerTimer;
	virtual void __fastcall Execute(void);
	void __fastcall DoTimer(void);
public:
	#pragma option push -w-inl
	/* TThread.Create */ inline __fastcall TAHMTimerThread(bool CreateSuspended) : Classes::TThread(CreateSuspended) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TThread.Destroy */ inline __fastcall virtual ~TAHMTimerThread(void) { }
	#pragma option pop
	
};


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

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

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