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

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

#ifndef ClipHistHPP
#define ClipHistHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Clipbrd.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.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 Cliphist
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TClipboardHost;
class PASCALIMPLEMENTATION TClipboardHost : public Controls::TWinControl 
{
	typedef Controls::TWinControl inherited;
	
private:
	HWND FNextViewer;
	
protected:
	MESSAGE void __fastcall WMDrawClipboard(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMDrawClipboardInternal(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMChangeCBChain(Messages::TMessage &Msg);
	
public:
	void __fastcall Run(void);
	void __fastcall Stop(void);
public:
	#pragma option push -w-inl
	/* TWinControl.Create */ inline __fastcall virtual TClipboardHost(Classes::TComponent* AOwner) : Controls::TWinControl(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TClipboardHost(HWND ParentWindow) : Controls::TWinControl(ParentWindow) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TWinControl.Destroy */ inline __fastcall virtual ~TClipboardHost(void) { }
	#pragma option pop
	
};


class DELPHICLASS THistoryClip;
class PASCALIMPLEMENTATION THistoryClip : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FText;
	AnsiString __fastcall GetShortText();
	
public:
	__fastcall THistoryClip(AnsiString AText);
	__property AnsiString Text = {read=FText, write=FText};
	__property AnsiString ShortText = {read=GetShortText};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~THistoryClip(void) { }
	#pragma option pop
	
};


class DELPHICLASS THistoryList;
class PASCALIMPLEMENTATION THistoryList : public Classes::TList 
{
	typedef Classes::TList inherited;
	
public:
	int __fastcall IndexOfText(AnsiString S);
	void __fastcall InsertClip(AnsiString S);
	HIDESBASE void __fastcall Clear(void);
	__fastcall virtual ~THistoryList(void);
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall THistoryList(void) : Classes::TList() { }
	#pragma option pop
	
};


class DELPHICLASS TCustomClipboardHistory;
class PASCALIMPLEMENTATION TCustomClipboardHistory : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	TClipboardHost* FHost;
	THistoryList* FHistory;
	bool FActive;
	Classes::TNotifyEvent FOnChange;
	void __fastcall SetActive(const bool Value);
	int __fastcall GetHistoryCount(void);
	AnsiString __fastcall GetHistory(int Index);
	AnsiString __fastcall GetHistoryShort(int Index);
	
protected:
	virtual void __fastcall Change(void);
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	
public:
	__fastcall virtual TCustomClipboardHistory(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomClipboardHistory(void);
	void __fastcall Clear(void);
	void __fastcall HistoryShortToStrings(Classes::TStrings* Strings);
	void __fastcall SaveToStream(Classes::TStream* S);
	void __fastcall LoadFromStream(Classes::TStream* S);
	void __fastcall SaveToFile(const AnsiString FileName);
	void __fastcall LoadFromFile(const AnsiString FileName);
	__property bool Active = {read=FActive, write=SetActive, nodefault};
	__property int HistoryCount = {read=GetHistoryCount, nodefault};
	__property AnsiString History[int Index] = {read=GetHistory};
	__property AnsiString HistoryShort[int Index] = {read=GetHistoryShort};
};


class DELPHICLASS TClipboardHistory;
class PASCALIMPLEMENTATION TClipboardHistory : public TCustomClipboardHistory 
{
	typedef TCustomClipboardHistory inherited;
	
__published:
	__property OnChange ;
public:
	#pragma option push -w-inl
	/* TCustomClipboardHistory.Create */ inline __fastcall virtual TClipboardHistory(Classes::TComponent* AOwner) : TCustomClipboardHistory(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomClipboardHistory.Destroy */ inline __fastcall virtual ~TClipboardHistory(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word WM_DRAWCLIPBOARDINTERNAL = 0x708;
extern PACKAGE void __fastcall Register(void);

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

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