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

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

#ifndef ahmshelltreeHPP
#define ahmshelltreeHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <ahmshellcontrols.hpp>	// Pascal unit
#include <ActiveX.hpp>	// Pascal unit
#include <ahmshellnotifier.hpp>	// Pascal unit
#include <ahmshellobject.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <CommCtrl.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <ImgList.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Ahmshelltree
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS ETreeViewError;
class PASCALIMPLEMENTATION ETreeViewError : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall ETreeViewError(const AnsiString Msg) : Sysutils::Exception(Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall ETreeViewError(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall ETreeViewError(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall ETreeViewError(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall ETreeViewError(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall ETreeViewError(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall ETreeViewError(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall ETreeViewError(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~ETreeViewError(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMShellNode;
typedef void __fastcall (__closure *TShellRenameEvent)(System::TObject* Sender, TAHMShellNode* Node, AnsiString &OldName, AnsiString &NewName);

typedef void __fastcall (__closure *TShellNodeEvent)(System::TObject* Sender, TAHMShellNode* Node);

typedef void __fastcall (__closure *TShellBeforeChangeEvent)(System::TObject* Sender, TAHMShellNode* ToNode, bool &AllowChange);

typedef void __fastcall (__closure *TShellBeforeRenameEvent)(System::TObject* Sender, TAHMShellNode* Node, bool &CanRename);

#pragma option push -b-
enum TAHMNodeState { nsCut, nsDropHilited, nsFocused, nsSelected, nsExpanded };
#pragma option pop

class DELPHICLASS TAHMShellNodes;
class DELPHICLASS TAHMCustomShellTree;
class PASCALIMPLEMENTATION TAHMCustomShellTree : public Ahmshellcontrols::TAHMShellTreeControl 
{
	typedef Ahmshellcontrols::TAHMShellTreeControl inherited;
	
private:
	TAHMShellNode* fTopNode;
	Forms::TFormBorderStyle FBorderStyle;
	bool FDragged;
	TAHMShellNode* FDragNode;
	bool FHotTrack;
	TAHMShellNode* FRClickNode;
	bool FManualNotify;
	bool FReadOnly;
	bool FShowButtons;
	bool FShowLines;
	Imglist::TCustomImageList* FStateImages;
	Imglist::TChangeLink* FStateChangeLink;
	bool FToolTips;
	TAHMShellNodes* FShellNodes;
	WideString FWideText;
	TShellNodeEvent FOnCollapsed;
	TShellNodeEvent FOnDeletion;
	TShellNodeEvent FOnExpanded;
	bool fCheckboxes;
	Ahmshellobject::TAHMShellFolder fShellFolder;
	TShellBeforeRenameEvent fOnBeforeRename;
	TShellRenameEvent fOnRenamed;
	_ITEMIDLIST *IEItem;
	Ahmshellcontrols::TAHMEnumTreeSet fShowTypes;
	HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
	int __fastcall GetIndent(void);
	TAHMShellNode* __fastcall GetNodeFromItem(const tagTVITEMA &Item);
	TAHMShellNode* __fastcall GetSelection(void);
	void __fastcall ImageListChange(System::TObject* Sender);
	void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
	void __fastcall SetButtonStyle(bool Value);
	void __fastcall SetHotTrack(bool Value);
	void __fastcall SetImageList(unsigned Value, int Flags);
	void __fastcall SetIndent(int Value);
	void __fastcall SetLineStyle(bool Value);
	void __fastcall SetReadOnly(bool Value);
	void __fastcall SetSelection(TAHMShellNode* Value);
	void __fastcall SetStateImages(Imglist::TCustomImageList* Value);
	void __fastcall SetToolTips(bool Value);
	HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMNotify(Messages::TWMNotify &Message);
	HIDESBASE MESSAGE void __fastcall WMContextMenu(Messages::TWMContextMenu &Message);
	HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
	void __fastcall SetCheckboxes(const bool Value);
	void __fastcall SetShellFolder(const Ahmshellobject::TAHMShellFolder Value);
	void __fastcall SetShowTypes(const Ahmshellcontrols::TAHMEnumTreeSet Value);
	
protected:
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetDropTarget(void);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetShellSpaceItem(void);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetShellItemAt(int X, int Y);
	DYNAMIC bool __fastcall CanRename(TAHMShellNode* Node);
	DYNAMIC bool __fastcall CanChange(TAHMShellNode* Node);
	unsigned __fastcall GetSourceEffects(void);
	TAHMShellNode* __fastcall GetShellNode(Ahmshellobject::PItemIDList SItemID);
	TAHMShellNode* __fastcall InternalLocateFolder(Ahmshellobject::PItemIDList ShellItemID);
	virtual void __fastcall SetDragMode(Controls::TDragMode Value);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	virtual void __fastcall HandleCreateEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleRemoveEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleUpdateEvent(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall StartDragging(Controls::TMouseButton DragButton);
	virtual void __fastcall SetDropTarget(const Ahmshellcontrols::TAHMShellItem* Value);
	virtual void __fastcall HandleUpdateItemEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleUpdatePathEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleRenameEvent(Ahmshellobject::PItemIDList Item1, Ahmshellobject::PItemIDList Item2);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	virtual void __fastcall ExpandShellNodes(TAHMShellNode* Node);
	virtual void __fastcall CreateTopNode(void);
	DYNAMIC void __fastcall Collapse(TAHMShellNode* Node);
	DYNAMIC void __fastcall DoRename(const tagTVITEMA &Item);
	DYNAMIC void __fastcall Expand(TAHMShellNode* Node);
	virtual void __fastcall ExecContextMenuSelected(AnsiString Cmd);
	virtual void __fastcall DoDefaultAction(Ahmshellcontrols::TAHMShellItem* Item, bool &Handled);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetSelectedItem(void);
	__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
	__property bool HotTrack = {read=FHotTrack, write=SetHotTrack, default=0};
	__property bool Checkboxes = {read=fCheckboxes, write=SetCheckboxes, default=0};
	__property Ahmshellcontrols::TAHMEnumTreeSet ShowTypes = {read=fShowTypes, write=SetShowTypes, default=3};
	__property int Indent = {read=GetIndent, write=SetIndent, stored=false, nodefault};
	__property TAHMShellNodes* ShellNodes = {read=FShellNodes};
	__property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
	__property bool ShowButtons = {read=FShowButtons, write=SetButtonStyle, default=1};
	__property bool ShowLines = {read=FShowLines, write=SetLineStyle, default=1};
	__property Imglist::TCustomImageList* StateImages = {read=FStateImages, write=SetStateImages};
	__property bool ToolTips = {read=FToolTips, write=SetToolTips, default=1};
	__property Ahmshellobject::TAHMShellFolder ShellFolder = {read=fShellFolder, write=SetShellFolder, nodefault};
	__property TShellBeforeRenameEvent BeforeRename = {read=fOnBeforeRename, write=fOnBeforeRename};
	__property TShellNodeEvent OnCollapsed = {read=FOnCollapsed, write=FOnCollapsed};
	__property TShellNodeEvent OnDeletion = {read=FOnDeletion, write=FOnDeletion};
	__property TShellRenameEvent OnRenamed = {read=fOnRenamed, write=fOnRenamed};
	__property TShellNodeEvent OnExpanded = {read=FOnExpanded, write=FOnExpanded};
	virtual void __fastcall SetResponseShellItem(const Ahmshellcontrols::TAHMShellItem* Shellitem);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetResponseShellItem(void);
	
public:
	__fastcall virtual TAHMCustomShellTree(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMCustomShellTree(void);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	TAHMShellNode* __fastcall LocateWebFolder(AnsiString Path);
	TAHMShellNode* __fastcall GetShellNodeAt(int X, int Y);
	bool __fastcall IsEditing(void);
	TAHMShellNode* __fastcall LocateFolder(Ahmshellcontrols::TAHMShellItem* Folder);
	TAHMShellNode* __fastcall LocateFolderByPath(AnsiString Path);
	__property TAHMShellNode* Selected = {read=GetSelection, write=SetSelection};
	__property TAHMShellNode* TopItem = {read=fTopNode};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMCustomShellTree(HWND ParentWindow) : Ahmshellcontrols::TAHMShellTreeControl(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMShellNodes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
public:
	TAHMShellNode* operator[](int Index) { return Item[Index]; }
	
private:
	TAHMCustomShellTree* fShellTree;
	HWND __fastcall GetHandle(void);
	TAHMShellNode* __fastcall GetNodeFromIndex(int Index);
	
protected:
	void __fastcall Clear(void);
	int __fastcall GetCount(void);
	tagTVITEMA __fastcall CreateItem(TAHMShellNode* Node);
	TAHMShellNode* __fastcall GetNode(HTREEITEM AItemId);
	TAHMShellNode* __fastcall AddChild(TAHMShellNode* Node, Ahmshellobject::PItemIDList AChildItem);
	__property TAHMCustomShellTree* ShellTree = {read=fShellTree};
	__property HWND Handle = {read=GetHandle, nodefault};
	
public:
	__fastcall TAHMShellNodes(TAHMCustomShellTree* AShellTree);
	__fastcall virtual ~TAHMShellNodes(void);
	__property int Count = {read=GetCount, nodefault};
	__property TAHMShellNode* Item[int Index] = {read=GetNodeFromIndex/*, default*/};
};


class PASCALIMPLEMENTATION TAHMShellNode : public Ahmshellcontrols::TAHMShellItem 
{
	typedef Ahmshellcontrols::TAHMShellItem inherited;
	
public:
	TAHMShellNode* operator[](int Index) { return Item[Index]; }
	
private:
	TAHMShellNodes* fShellNodes;
	TAHMCustomShellTree* fShellTree;
	_TREEITEM *FItemId;
	int FStateIndex;
	bool FDeleting;
	void __fastcall SetFocused(bool Value);
	void __fastcall SetSelected(bool Value);
	void __fastcall SetExpanded(bool Value);
	void __fastcall SetStateImageIndex(int Value);
	void __fastcall SetChecked(const bool Value);
	void __fastcall SetState(TAHMNodeState NodeState, bool Enabled);
	bool __fastcall GetExpanded(void);
	int __fastcall GetLevel(void);
	TAHMShellNode* __fastcall GetParent(void);
	bool __fastcall GetFocused(void);
	int __fastcall GetIndex(void);
	TAHMShellNode* __fastcall GetItem(int Index);
	bool __fastcall GetSelected(void);
	bool __fastcall GetState(TAHMNodeState NodeState);
	int __fastcall GetCount(void);
	bool __fastcall GetChecked(void);
	Types::TRect __fastcall GetRect(bool TextOnly);
	bool __fastcall GetVisible(void);
	HWND __fastcall GetHandle(void);
	
protected:
	virtual bool __fastcall GetDropTarget(void);
	bool __fastcall HasCount(void);
	virtual void __fastcall SetDropTarget(const bool Value);
	virtual void __fastcall SetNoItems(bool Value);
	void __fastcall Collapse(void);
	void __fastcall Expand(void);
	void __fastcall Delete(void);
	void __fastcall DeleteChildren(void);
	__property HWND Handle = {read=GetHandle, nodefault};
	__property TAHMShellNodes* ShellNodes = {read=fShellNodes};
	
public:
	__fastcall virtual TAHMShellNode(TAHMShellNodes* AShellNodes, TAHMShellNode* AParent);
	__fastcall virtual ~TAHMShellNode(void);
	virtual void __fastcall Update(void);
	void __fastcall MakeVisible(void);
	void __fastcall EndEdit(bool Cancel);
	bool __fastcall Rename(void);
	bool __fastcall ShellSort(void);
	TAHMShellNode* __fastcall getFirstChild(void);
	TAHMShellNode* __fastcall getLastChild(void);
	TAHMShellNode* __fastcall getNext(void);
	TAHMShellNode* __fastcall getNextChild(TAHMShellNode* Value);
	TAHMShellNode* __fastcall getNextSibling(void);
	TAHMShellNode* __fastcall getNextVisible(void);
	TAHMShellNode* __fastcall getPrev(void);
	TAHMShellNode* __fastcall getPrevChild(TAHMShellNode* Value);
	TAHMShellNode* __fastcall getPrevSibling(void);
	TAHMShellNode* __fastcall getPrevVisible(void);
	bool __fastcall HasAsParent(TAHMShellNode* Value);
	int __fastcall IndexOf(TAHMShellNode* Value);
	__property HTREEITEM ItemId = {read=FItemId};
	__property int Count = {read=GetCount, nodefault};
	__property bool Focused = {read=GetFocused, write=SetFocused, nodefault};
	__property bool Selected = {read=GetSelected, write=SetSelected, nodefault};
	__property bool Checked = {read=GetChecked, write=SetChecked, nodefault};
	__property bool Expanded = {read=GetExpanded, write=SetExpanded, nodefault};
	__property int Index = {read=GetIndex, nodefault};
	__property bool Visible = {read=GetVisible, nodefault};
	__property TAHMShellNode* Item[int Index] = {read=GetItem/*, default*/};
	__property int Level = {read=GetLevel, nodefault};
	__property TAHMShellNode* Parent = {read=GetParent};
	__property int StateIndex = {read=FStateIndex, write=SetStateImageIndex, nodefault};
public:
	#pragma option push -w-inl
	/* TAHMShellItem.Create */ inline __fastcall virtual TAHMShellNode(Ahmshellcontrols::TAHMSimpleItem* AParent) : Ahmshellcontrols::TAHMShellItem(AParent) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TAHMSimpleItem.CreateAsID */ inline __fastcall virtual TAHMShellNode(Ahmshellobject::PItemIDList NewItemID) : Ahmshellcontrols::TAHMShellItem(NewItemID) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMShellTree;
class PASCALIMPLEMENTATION TAHMShellTree : public TAHMCustomShellTree 
{
	typedef TAHMCustomShellTree inherited;
	
__published:
	__property Align  = {default=0};
	__property Anchors  = {default=3};
	__property BiDiMode ;
	__property BorderStyle  = {default=1};
	__property BorderWidth  = {default=0};
	__property Checkboxes  = {default=0};
	__property Ctl3D ;
	__property Constraints ;
	__property Enabled  = {default=1};
	__property HotTrack  = {default=0};
	__property Indent ;
	__property ParentBiDiMode  = {default=1};
	__property ParentCtl3D  = {default=1};
	__property ParentShowHint  = {default=1};
	__property PopupMenu ;
	__property ReadOnly  = {default=0};
	__property ShellFolder ;
	__property ShowButtons  = {default=1};
	__property ShowTypes  = {default=3};
	__property ShowHint ;
	__property ShowLines  = {default=1};
	__property StateImages ;
	__property TabOrder  = {default=-1};
	__property TabStop  = {default=1};
	__property ToolTips  = {default=1};
	__property Visible  = {default=1};
	__property OnSelectionChanged ;
	__property OnClick ;
	__property OnCollapsed ;
	__property OnContextPopup ;
	__property OnDeletion ;
	__property OnRenamed ;
	__property OnEnter ;
	__property OnExit ;
	__property OnExpanded ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
public:
	#pragma option push -w-inl
	/* TAHMCustomShellTree.Create */ inline __fastcall virtual TAHMShellTree(Classes::TComponent* AOwner) : TAHMCustomShellTree(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TAHMCustomShellTree.Destroy */ inline __fastcall virtual ~TAHMShellTree(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMShellTree(HWND ParentWindow) : TAHMCustomShellTree(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint TTV_NOCHECK = 0x0;
static const Word TTV_UNCHECK = 0x1000;
static const Word TTV_CHECKED = 0x2000;
extern PACKAGE System::ResourceString _shellNoTopItem;
#define Ahmshelltree_shellNoTopItem System::LoadResourceString(&Ahmshelltree::_shellNoTopItem)

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

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