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

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

#ifndef ahmshellbrowserHPP
#define ahmshellbrowserHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ShellAPI.hpp>	// Pascal unit
#include <ahmshellclass.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <ShlObj.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Classes.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 Ahmshellbrowser
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAHMPathChange)(System::TObject* Sender, const AnsiString NewPath);

typedef void __fastcall (__closure *TAHMCheckPath)(System::TObject* Sender, const AnsiString NewPath, bool &ValidPath);

#pragma option push -b-
enum TAHMBrowseRoots { csidlDesktop, csidlDesktopExpanded, csidlPrograms, csidlControlPanel, csidlPrinters, csidlPersonal, csidlFavorites, csidlStartup, csidlRecent, csidlSendto, csidlRecycleBin, csidlStartMenu, csidlDesktopDirectory, csidlMyComputer, csidlNetwork, csidlNetworkNeighborhood, csidlFonts, csidlTemplates };
#pragma option pop

#pragma option push -b-
enum TAHMBrowseInfoFlags { bifFileSystemDirsOnly, bifDontGoBelowDomain, bifStatusText, bifFileSystemAncestors, bifBrowseForComputer, bifBrowseForPrinter };
#pragma option pop

typedef Set<TAHMBrowseInfoFlags, bifFileSystemDirsOnly, bifBrowseForPrinter>  TAHMBrowseInfoFlagSet;

class DELPHICLASS TAHMShellBrowser;
class PASCALIMPLEMENTATION TAHMShellBrowser : public Ahmshellclass::TAHMShellComponent 
{
	typedef Ahmshellclass::TAHMShellComponent inherited;
	
private:
	HWND fDialogHandle;
	HWND fParentHandle;
	AnsiString fDisplayName;
	int fImageIndex;
	AnsiString fReturnPath;
	TAHMBrowseInfoFlagSet fOptions;
	bool fShowPath;
	TAHMBrowseRoots fBrowseRoot;
	Classes::TNotifyEvent fBeforeBrowse;
	Classes::TNotifyEvent fAfterBrowse;
	TAHMPathChange fOnPathChanged;
	bool fIsDisplayed;
	TAHMCheckPath fIsValidPath;
	Classes::TNotifyEvent fOnCancel;
	AnsiString fCaption;
	Controls::TControl* fToControl;
	void __fastcall SetCaption(const AnsiString Value);
	
protected:
	void __fastcall SetSelectionPIDL(const HWND Hwnd, const Shlobj::PItemIDList ItemIDList);
	void __fastcall SetSelectionPath(const HWND Hwnd, const AnsiString Path);
	void __fastcall SetCaptionVal(const HWND Hwnd, const AnsiString Caption);
	void __fastcall EnableOK(const HWND Hwnd, const bool Value);
	__property HWND ParentHandle = {read=fParentHandle, write=fParentHandle, nodefault};
	__property HWND DialogHandle = {read=fDialogHandle, write=fDialogHandle, nodefault};
	
public:
	__fastcall virtual TAHMShellBrowser(Classes::TComponent* AOwner);
	virtual bool __fastcall Execute(void);
	__property AnsiString DisplayName = {read=fDisplayName};
	__property int ImageIndex = {read=fImageIndex, nodefault};
	
__published:
	__property AnsiString ReturnPath = {read=fReturnPath, write=fReturnPath};
	__property AnsiString Caption = {read=fCaption, write=SetCaption};
	__property Controls::TControl* ToControl = {read=fToControl, write=fToControl};
	__property TAHMBrowseInfoFlagSet Options = {read=fOptions, write=fOptions, default=5};
	__property bool ShowPath = {read=fShowPath, write=fShowPath, default=1};
	__property TAHMBrowseRoots BrowseRoot = {read=fBrowseRoot, write=fBrowseRoot, default=1};
	__property Classes::TNotifyEvent BeforeBrowse = {read=fBeforeBrowse, write=fBeforeBrowse};
	__property Classes::TNotifyEvent AfterBrowse = {read=fAfterBrowse, write=fAfterBrowse};
	__property TAHMCheckPath IsValidPath = {read=fIsValidPath, write=fIsValidPath};
	__property TAHMPathChange OnPathChanged = {read=fOnPathChanged, write=fOnPathChanged};
	__property Classes::TNotifyEvent OnCancel = {read=fOnCancel, write=fOnCancel};
public:
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TAHMShellBrowser(void) { }
	#pragma option pop
	
};


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

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

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