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

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

#ifndef ahmshellcontrolsHPP
#define ahmshellcontrolsHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ahmshellcalls.hpp>	// Pascal unit
#include <ahmshellclass.hpp>	// Pascal unit
#include <ahmshellnotifier.hpp>	// Pascal unit
#include <ahmshellobject.hpp>	// Pascal unit
#include <CommCtrl.hpp>	// Pascal unit
#include <ActiveX.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <ImgList.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 Ahmshellcontrols
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TAHMItemType { itFolder, itFileSystem, itFileSysAncestor, itRemoveable };
#pragma option pop

typedef Set<TAHMItemType, itFolder, itRemoveable>  TAHMItemTypeSet;

class DELPHICLASS TAHMSimpleItem;
class PASCALIMPLEMENTATION TAHMSimpleItem : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TAHMSimpleItem* fParentItem;
	
protected:
	void __fastcall FreeItemID(void);
	
public:
	_ITEMIDLIST *CShellItemID;
	__fastcall virtual TAHMSimpleItem(TAHMSimpleItem* AParent);
	__fastcall virtual TAHMSimpleItem(Ahmshellobject::PItemIDList NewItemID);
	__fastcall virtual ~TAHMSimpleItem(void);
	__property TAHMSimpleItem* ParentItem = {read=fParentItem};
};


class DELPHICLASS TAHMShellItem;
class PASCALIMPLEMENTATION TAHMShellItem : public TAHMSimpleItem 
{
	typedef TAHMSimpleItem inherited;
	
private:
	AnsiString fText;
	AnsiString fPath;
	void *fData;
	TAHMShellItem* fParentShellItem;
	_di_IShellFolder fCurrentFolder;
	bool fHasNoItems;
	TAHMItemTypeSet fItemType;
	_di_IShellFolder fParentFolder;
	int __fastcall GetIconIndex(bool Selected);
	int __fastcall GetOverLayIndex(void);
	bool __fastcall GetCanCopy(void);
	bool __fastcall GetCanDelete(void);
	bool __fastcall GetCanLink(void);
	bool __fastcall GetCanMoniker(void);
	bool __fastcall GetCanMove(void);
	unsigned __fastcall GetCapabilities(void);
	unsigned __fastcall GetContentsMask(void);
	unsigned __fastcall GetDisplayAttributes(void);
	bool __fastcall GetHasNewContent(void);
	bool __fastcall GetHasPropertySheet(void);
	bool __fastcall GetIsBrowseable(void);
	bool __fastcall GetIsCompressed(void);
	bool __fastcall GetIsGhosted(void);
	bool __fastcall GetIsLink(void);
	bool __fastcall GetIsNonEnumerated(void);
	bool __fastcall GetIsReadOnly(void);
	bool __fastcall GetIsRemoveable(void);
	bool __fastcall GetIsShared(void);
	bool __fastcall GetSubFolder(void);
	AnsiString __fastcall GetFullPath();
	AnsiString __fastcall GetRenameStr();
	bool __fastcall GetIsFolder(void);
	
protected:
	__property TAHMShellItem* ParentShellItem = {read=fParentShellItem};
	AnsiString __fastcall GetItemText(Ahmshellcalls::TAHMShellPathType AType);
	TAHMItemTypeSet __fastcall GetItemType(void);
	virtual void __fastcall SetNoItems(bool Value);
	void __fastcall RenameItem(HWND ParentWnd, AnsiString NewName);
	virtual bool __fastcall GetIsDropTarget(void);
	virtual bool __fastcall GetDropTarget(void);
	virtual void __fastcall SetDropTarget(const bool Value);
	virtual bool __fastcall GetCanRename(void);
	
public:
	_ITEMIDLIST *ShellItemID;
	__fastcall virtual TAHMShellItem(TAHMSimpleItem* AParent);
	virtual void __fastcall InitItem(_di_IShellFolder PFolder, Ahmshellobject::PItemIDList RItem);
	virtual void __fastcall InitItemEx(_di_IShellFolder PFolder, Ahmshellobject::PItemIDList AItem);
	void __fastcall AssignItem(const TAHMShellItem* AItem);
	virtual void __fastcall Update(void);
	bool __fastcall Execute(unsigned AHandle, int ShowStyle);
	void __fastcall AddToMRU(void);
	__fastcall virtual ~TAHMShellItem(void);
	__property bool DropTarget = {read=GetDropTarget, write=SetDropTarget, nodefault};
	__property _di_IShellFolder ParentFolder = {read=fParentFolder};
	_di_IShellFolder __fastcall ShellFolder();
	__property TAHMItemTypeSet ItemType = {read=fItemType, nodefault};
	__property bool HasNoItems = {read=fHasNoItems, write=SetNoItems, default=0};
	__property bool CanRename = {read=GetCanRename, nodefault};
	__property bool CanCopy = {read=GetCanCopy, nodefault};
	__property bool CanDelete = {read=GetCanDelete, nodefault};
	__property bool CanLink = {read=GetCanLink, nodefault};
	__property bool CanMoniker = {read=GetCanMoniker, nodefault};
	__property bool CanMove = {read=GetCanMove, nodefault};
	__property bool IsDropTarget = {read=GetIsDropTarget, nodefault};
	__property bool HasPropertySheet = {read=GetHasPropertySheet, nodefault};
	__property unsigned Capabilities = {read=GetCapabilities, nodefault};
	__property bool IsGhosted = {read=GetIsGhosted, nodefault};
	__property bool IsLink = {read=GetIsLink, nodefault};
	__property bool IsReadOnly = {read=GetIsReadOnly, nodefault};
	__property bool IsShared = {read=GetIsShared, nodefault};
	__property unsigned DisplayAttributes = {read=GetDisplayAttributes, nodefault};
	__property unsigned ContentsMask = {read=GetContentsMask, nodefault};
	__property bool HasSubFolder = {read=GetSubFolder, nodefault};
	__property bool IsBrowseable = {read=GetIsBrowseable, nodefault};
	__property bool IsCompressed = {read=GetIsCompressed, nodefault};
	__property bool IsFolder = {read=GetIsFolder, nodefault};
	__property bool HasNewContent = {read=GetHasNewContent, nodefault};
	__property bool IsNonEnumerated = {read=GetIsNonEnumerated, nodefault};
	__property bool IsRemoveable = {read=GetIsRemoveable, nodefault};
	HRESULT __fastcall Refresh(void);
	__property AnsiString Text = {read=fText};
	__property AnsiString Path = {read=fPath};
	__property AnsiString FullPath = {read=GetFullPath};
	__property AnsiString RenameStr = {read=GetRenameStr};
	__property int ImageIndex[bool Selected] = {read=GetIconIndex};
	__property int OverlayIndex = {read=GetOverLayIndex, nodefault};
	__property void * Data = {read=fData, write=fData};
public:
	#pragma option push -w-inl
	/* TAHMSimpleItem.CreateAsID */ inline __fastcall virtual TAHMShellItem(Ahmshellobject::PItemIDList NewItemID) : TAHMSimpleItem(NewItemID) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TAHMEnumTree { etHiddenItems, etFolders };
#pragma option pop

#pragma option push -b-
enum TAHMEnumView { evNonFolders, evHiddenItems, evFolders };
#pragma option pop

typedef Set<TAHMEnumTree, etHiddenItems, etFolders>  TAHMEnumTreeSet;

typedef Set<TAHMEnumView, evNonFolders, evFolders>  TAHMEnumViewSet;

typedef void __fastcall (__closure *TAHMDebugMessage)(System::TObject* Sender, AnsiString Str);

typedef void __fastcall (__closure *TShellItemDblClick)(System::TObject* Sender, TAHMShellItem* Item, bool &Handled);

typedef void __fastcall (__closure *TShellCanFolderChange)(System::TObject* Sender, TAHMShellItem* OldFolder, TAHMShellItem* NewFolder, bool &AllowChange);

typedef void __fastcall (__closure *TShellItemFeedback)(TAHMShellItem* Item);

typedef void __fastcall (__closure *TShellSrcEnumFormatEtc)(int dwDirection, /* out */ _di_IEnumFORMATETC &enumFormatEtc, HRESULT &AResult);

class DELPHICLASS TShellDataObject;
class PASCALIMPLEMENTATION TShellDataObject : public System::TInterfacedObject 
{
	typedef System::TInterfacedObject inherited;
	
private:
	_ITEMIDLIST *fParentPIDL;
	DynamicArray<Ahmshellobject::PItemIDList >  fChildList;
	DynamicArray<tagFORMATETC >  fFormats;
	HRESULT __stdcall GetData(const tagFORMATETC &formatetcIn, /* out */ tagSTGMEDIUM &medium);
	HRESULT __stdcall GetDataHere(const tagFORMATETC &formatetc, /* out */ tagSTGMEDIUM &medium);
	HRESULT __stdcall QueryGetData(const tagFORMATETC &formatetc);
	HRESULT __stdcall SetData(const tagFORMATETC &formatetc, tagSTGMEDIUM &medium, BOOL fRelease);
	HRESULT __stdcall GetCanonicalFormatEtc(const tagFORMATETC &formatetc, /* out */ tagFORMATETC &formatetcOut);
	HRESULT __stdcall EnumFormatEtc(int dwDirection, /* out */ _di_IEnumFORMATETC &enumFormatEtc);
	HRESULT __stdcall DAdvise(const tagFORMATETC &formatetc, int advf, const _di_IAdviseSink advSink, /* out */ int &dwConnection);
	HRESULT __stdcall DUnadvise(int dwConnection);
	HRESULT __stdcall EnumDAdvise(/* out */ _di_IEnumSTATDATA &enumAdvise);
	
public:
	__fastcall virtual TShellDataObject(const Ahmshellobject::PItemIDList ParentItem, const Ahmshellobject::TItemIDListArray ChildArray);
	virtual void __fastcall RegisterAs(const Word aFormat);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TShellDataObject(void) { }
	#pragma option pop
	
private:
	void *__IDataObject;	/* IDataObject */
	
public:
	operator IDataObject*(void) { return (IDataObject*)&__IDataObject; }
	
};


class DELPHICLASS TShellEnumFormatEtc;
class PASCALIMPLEMENTATION TShellEnumFormatEtc : public System::TInterfacedObject 
{
	typedef System::TInterfacedObject inherited;
	
private:
	DynamicArray<tagFORMATETC >  fFormats;
	int fIndex;
	
protected:
	HRESULT __stdcall Next(int celt, /* out */ void *elt, PLongint pceltFetched);
	HRESULT __stdcall Skip(int celt);
	HRESULT __stdcall Reset(void);
	HRESULT __stdcall Clone(/* out */ _di_IEnumFORMATETC &Enum);
	
public:
	__fastcall TShellEnumFormatEtc(const Ahmshellobject::TFormatListArray Formats, const int Index);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TShellEnumFormatEtc(void) { }
	#pragma option pop
	
private:
	void *__IEnumFORMATETC;	/* IEnumFORMATETC */
	
public:
	operator IEnumFORMATETC*(void) { return (IEnumFORMATETC*)&__IEnumFORMATETC; }
	
};


class DELPHICLASS TShellCustomDragDrop;
class PASCALIMPLEMENTATION TShellCustomDragDrop : public Controls::TWinControl 
{
	typedef Controls::TWinControl inherited;
	
private:
	TAHMDebugMessage fOnXDebug;
	
protected:
	TAHMShellItem* fPosShellItem;
	TAHMShellItem* fLastDropTarget;
	unsigned fScrollStep;
	int fDragButtons;
	int fDropKeyState;
	_di_IDataObject fDropDataObject;
	Controls::TImageList* fDragImage;
	unsigned FDragImageHandle;
	_di_IDropTargetHelper fDropTargetHelper;
	_di_IDragSourceHelper fDragSourceHelper;
	_di_IDragSourceHelper __fastcall CreateDragSourceHelper();
	virtual unsigned __fastcall GetDragImageHandle(void) = 0 ;
	virtual HRESULT __stdcall QueryContinueDragSrc(BOOL fEscapePressed, int grfKeyState);
	virtual HRESULT __stdcall GiveFeedbackSrc(int dwEffect);
	virtual HRESULT __stdcall DragEnterEx(const _di_IDataObject dataObj, int grfKeyState, const Types::TPoint pt, int &dwEffect);
	virtual HRESULT __stdcall DragOverEx(int grfKeyState, const Types::TPoint pt, int &dwEffect);
	virtual HRESULT __stdcall DragLeaveEx(void);
	virtual HRESULT __stdcall DropEx(const _di_IDataObject dataObj, int grfKeyState, const Types::TPoint pt, int &dwEffect);
	_di_IDropTarget __fastcall GetDropTargetIntf(const Types::TPoint &pt);
	virtual void __fastcall StartDragging(Controls::TMouseButton DragButton);
	virtual bool __fastcall AutoScroll(const Types::TPoint &Pt, unsigned &LastTickCount);
	virtual TAHMShellItem* __fastcall GetShellItemAt(int X, int Y) = 0 ;
	virtual TAHMShellItem* __fastcall GetShellSpaceItem(void) = 0 ;
	virtual TAHMShellItem* __fastcall GetDropTarget(void) = 0 ;
	virtual void __fastcall SetDropTarget(const TAHMShellItem* Value);
	__property TAHMShellItem* DropTarget = {read=GetDropTarget, write=SetDropTarget};
	unsigned __fastcall GetDropEffectsObj(const _di_IDataObject DataObject);
	
public:
	__fastcall virtual TShellCustomDragDrop(Classes::TComponent* AOwner);
	__fastcall virtual ~TShellCustomDragDrop(void);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	
__published:
	__property TAHMDebugMessage OnXDebug = {read=fOnXDebug, write=fOnXDebug};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TShellCustomDragDrop(HWND ParentWindow) : Controls::TWinControl(ParentWindow) { }
	#pragma option pop
	
private:
	void *__IDropSource;	/* IDropSource [GiveFeedback=GiveFeedbackSrc, QueryContinueDrag=QueryContinueDragSrc] */
	void *__IDropTarget;	/* IDropTarget [Drop=DropEx, DragLeave=DragLeaveEx, DragEnter=DragEnterEx, DragOver=DragOverEx] */
	
public:
	operator IDropTarget*(void) { return (IDropTarget*)&__IDropTarget; }
	operator IDropSource*(void) { return (IDropSource*)&__IDropSource; }
	
};


class DELPHICLASS TAHMShellControl;
class PASCALIMPLEMENTATION TAHMShellControl : public TShellCustomDragDrop 
{
	typedef TShellCustomDragDrop inherited;
	
private:
	Ahmshellnotifier::TAHMNotifierClass* fInternalNotifier;
	TShellItemDblClick fOnFolderDblClick;
	TShellItemDblClick fOnFileDblClick;
	TShellCanFolderChange fCanFolderChange;
	Classes::TNotifyEvent fOnSelectionChanged;
	AnsiString fAbout;
	DYNAMIC bool __fastcall TakeDefaultAction(void);
	
protected:
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	Ahmshellcalls::TAHMShellMenuResult __fastcall ExecExplorerMenu(_di_IShellFolder AFolder, Ahmshellobject::PItemIDList &AItem, int AItemCount, Ahmshellcalls::TAHMRenameProc RenameShellItem = 0x0);
	virtual void __fastcall NotifyShellChange(int ChangeType, Ahmshellobject::PItemIDList Item1, Ahmshellobject::PItemIDList Item2);
	__property Ahmshellnotifier::TAHMNotifierClass* InternalNotifier = {read=fInternalNotifier};
	virtual void __fastcall HandleRenameEvent(Ahmshellobject::PItemIDList Item1, Ahmshellobject::PItemIDList Item2) = 0 ;
	virtual void __fastcall HandleCreateEvent(Ahmshellobject::PItemIDList Item1) = 0 ;
	virtual void __fastcall HandleRemoveEvent(Ahmshellobject::PItemIDList Item1) = 0 ;
	virtual void __fastcall HandleUpdateItemEvent(Ahmshellobject::PItemIDList Item1) = 0 ;
	virtual void __fastcall HandleUpdatePathEvent(Ahmshellobject::PItemIDList Item1) = 0 ;
	virtual void __fastcall HandleUpdateEvent(void) = 0 ;
	virtual void __fastcall ExecContextMenuSelected(AnsiString Cmd) = 0 ;
	virtual unsigned __fastcall GetDragImageHandle(void);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall DoDefaultAction(TAHMShellItem* Item, bool &Handled) = 0 ;
	virtual TAHMShellItem* __fastcall GetSelectedItem(void) = 0 ;
	DYNAMIC bool __fastcall IsCanFolderChange(TAHMShellItem* FromFolder, TAHMShellItem* ToFolder);
	DYNAMIC char * __fastcall GetInfoTip(TAHMShellItem* AItem);
	virtual void __fastcall SetResponseShellItem(const TAHMShellItem* Shellitem);
	virtual TAHMShellItem* __fastcall GetResponseShellItem(void);
	virtual void __fastcall DoSelectionChanged(void);
	
public:
	__fastcall virtual TAHMShellControl(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMShellControl(void);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	__property TAHMShellItem* ShellItem = {read=GetResponseShellItem, write=SetResponseShellItem};
	
__published:
	__property AnsiString About = {read=fAbout, write=fAbout};
	__property Classes::TNotifyEvent OnSelectionChanged = {read=fOnSelectionChanged, write=fOnSelectionChanged};
	__property TShellItemDblClick OnFileDblClick = {read=fOnFileDblClick, write=fOnFileDblClick};
	__property TShellItemDblClick OnFolderDblClick = {read=fOnFolderDblClick, write=fOnFolderDblClick};
	__property TShellCanFolderChange CanFolderChange = {read=fCanFolderChange, write=fCanFolderChange};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMShellControl(HWND ParentWindow) : TShellCustomDragDrop(ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMShellTreeControl;
class DELPHICLASS TAHMShellViewControl;
class PASCALIMPLEMENTATION TAHMShellViewControl : public TAHMShellControl 
{
	typedef TAHMShellControl inherited;
	
private:
	TAHMShellTreeControl* fShellTree;
	void __fastcall SetShellTree(const TAHMShellTreeControl* Value);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	
__published:
	__property TAHMShellTreeControl* ShellTree = {read=fShellTree, write=SetShellTree};
public:
	#pragma option push -w-inl
	/* TAHMShellControl.Create */ inline __fastcall virtual TAHMShellViewControl(Classes::TComponent* AOwner) : TAHMShellControl(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TAHMShellControl.Destroy */ inline __fastcall virtual ~TAHMShellViewControl(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMShellViewControl(HWND ParentWindow) : TAHMShellControl(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMShellTreeControl : public TAHMShellControl 
{
	typedef TAHMShellControl inherited;
	
private:
	TAHMShellViewControl* fShellView;
	void __fastcall SetShellView(const TAHMShellViewControl* Value);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	
__published:
	__property TAHMShellViewControl* ShellView = {read=fShellView, write=SetShellView};
public:
	#pragma option push -w-inl
	/* TAHMShellControl.Create */ inline __fastcall virtual TAHMShellTreeControl(Classes::TComponent* AOwner) : TAHMShellControl(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TAHMShellControl.Destroy */ inline __fastcall virtual ~TAHMShellTreeControl(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMShellTreeControl(HWND ParentWindow) : TAHMShellControl(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE Word CF_IDLIST;

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

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