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

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

#ifndef ahmshellviewHPP
#define ahmshellviewHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <Masks.hpp>	// Pascal unit
#include <ahmshellcalls.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 Ahmshellview
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TAHMSortType { sAsc, sDesc, sNone };
#pragma option pop

#pragma option push -b-
enum TAHMShellViewHotTrackStyle { htHandPoint, htUnderlineCold, htUnderlineHot };
#pragma option pop

typedef Set<TAHMShellViewHotTrackStyle, htHandPoint, htUnderlineHot>  TAHMShellViewHotTrackStyles;

class DELPHICLASS TAHMShellViewItem;
typedef void __fastcall (__closure *TShellRenameItemEvent)(System::TObject* Sender, TAHMShellViewItem* Item, AnsiString &OldName, AnsiString &NewName);

typedef void __fastcall (__closure *TShellItemEvent)(System::TObject* Sender, TAHMShellViewItem* Item);

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

#pragma option push -b-
enum THitTest { htAbove, htBelow, htNowhere, htOnItem, htOnButton, htOnIcon, htOnIndent, htOnLabel, htOnRight, htOnStateIcon, htToLeft, htToRight };
#pragma option pop

typedef Set<THitTest, htAbove, htToRight>  THitTests;

#pragma option push -b-
enum TAHMShellViewArrangement { arAlignBottom, arAlignLeft, arAlignRight, arAlignTop, arDefault, arSnapToGrid };
#pragma option pop

#pragma option push -b-
enum TViewStyle { vsIcon, vsSmallIcon, vsList, vsReport };
#pragma option pop

#pragma option push -b-
enum TItemState { isNone, isCut, isDropHilited, isFocused, isSelected, isActivating };
#pragma option pop

typedef Set<TItemState, isNone, isActivating>  TItemStates;

#pragma option push -b-
enum TItemFind { ifData, ifPartialString, ifExactString, ifNearest };
#pragma option pop

#pragma option push -b-
enum TSearchDirection { sdLeft, sdRight, sdAbove, sdBelow, sdAll };
#pragma option pop

class DELPHICLASS TAHMColumnDetail;
class DELPHICLASS TAHMShellColumns;
#pragma option push -b-
enum TAHMShellColumnOrd { isShellDetails, isShellFolder2, isPrivate, hasNone };
#pragma option pop

class DELPHICLASS TAHMCustomShellView;
class DELPHICLASS TAHMShellViewItems;
class PASCALIMPLEMENTATION TAHMShellViewItems : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
public:
	TAHMShellViewItem* operator[](int Index) { return Item[Index]; }
	
private:
	TAHMCustomShellView* fShellView;
	
protected:
	int __fastcall GetCount(void);
	HWND __fastcall GetHandle(void);
	TAHMShellViewItem* __fastcall GetItem(int Index);
	void __fastcall Clear(void);
	__property TAHMCustomShellView* ShellView = {read=fShellView};
	
public:
	__fastcall TAHMShellViewItems(TAHMCustomShellView* AOwner);
	__fastcall virtual ~TAHMShellViewItems(void);
	int __fastcall IndexOf(TAHMShellViewItem* Value);
	__property int Count = {read=GetCount, nodefault};
	__property HWND Handle = {read=GetHandle, nodefault};
	__property TAHMShellViewItem* Item[int Index] = {read=GetItem/*, default*/};
};


class DELPHICLASS TAHMShellViewOptions;
class PASCALIMPLEMENTATION TAHMShellViewOptions : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAHMCustomShellView* FList;
	bool FAutoArrange;
	bool FWrapText;
	bool FSingleSelect;
	bool FHideSelection;
	TAHMShellViewHotTrackStyles FHotTrackStyles;
	bool FReadOnly;
	TAHMCustomShellView* fShellView;
	void __fastcall SetAutoArrange(bool Value);
	void __fastcall SetWrapText(bool Value);
	void __fastcall SetSingleSelect(const bool Value);
	void __fastcall SetHideSelection(const bool Value);
	void __fastcall SetHotTrackStyles(const TAHMShellViewHotTrackStyles Value);
	void __fastcall SetReadOnly(const bool Value);
	bool __fastcall GetOption(int Index);
	void __fastcall SetOption(const int Index, const bool Value);
	
protected:
	void __fastcall ResetStylesEx(void);
	__property TAHMCustomShellView* ShellView = {read=fShellView};
	
public:
	__fastcall TAHMShellViewOptions(TAHMCustomShellView* AOwner);
	
__published:
	__property bool AutoArrange = {read=FAutoArrange, write=SetAutoArrange, default=0};
	__property bool Checkboxes = {read=GetOption, write=SetOption, index=4, default=0};
	__property bool FlatScrollBars = {read=GetOption, write=SetOption, index=256, default=0};
	__property bool GridLines = {read=GetOption, write=SetOption, index=1, default=0};
	__property bool HotTrack = {read=GetOption, write=SetOption, index=8, default=0};
	__property TAHMShellViewHotTrackStyles HotTrackStyles = {read=FHotTrackStyles, write=SetHotTrackStyles, default=0};
	__property bool HideSelection = {read=FHideSelection, write=SetHideSelection, default=1};
	__property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
	__property bool RowSelect = {read=GetOption, write=SetOption, index=32, default=0};
	__property bool SingleSelect = {read=FSingleSelect, write=SetSingleSelect, default=0};
	__property bool WrapText = {read=FWrapText, write=SetWrapText, default=1};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMShellViewOptions(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMCustomShellView : public Ahmshellcontrols::TAHMShellViewControl 
{
	typedef Ahmshellcontrols::TAHMShellViewControl inherited;
	
private:
	bool fInternalUpdate;
	Forms::TFormBorderStyle FBorderStyle;
	TViewStyle FViewStyle;
	Imglist::TCustomImageList* FStateImages;
	TAHMShellViewItems* FShellViewItems;
	TAHMShellViewOptions* fOptions;
	Imglist::TChangeLink* FStateChangeLink;
	TShellItemEvent fOnAttrChanged;
	Graphics::TBitmap* fSortImages[2];
	TAHMShellColumns* fShellColumns;
	Ahmshellcontrols::TAHMShellItem* fInternalItem;
	TShellRenameItemEvent fOnRenamed;
	int fSortIndex;
	TAHMSortType fSortType;
	AnsiString fMask;
	Ahmshellcontrols::TAHMEnumViewSet fShowTypes;
	bool fNegativeMask;
	Classes::TNotifyEvent fOnFolderChanged;
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
	TAHMShellViewItem* __fastcall GetFocused(void);
	TAHMShellViewItem* __fastcall GetItem(const tagLVITEMA &Value);
	int __fastcall GetSelCount(void);
	int __fastcall GetHoverTime(void);
	void __fastcall ImageListChange(System::TObject* Sender);
	void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
	void __fastcall SetFocused(TAHMShellViewItem* Value);
	void __fastcall SetOptions(TAHMShellViewOptions* Value);
	void __fastcall SetSelection(TAHMShellViewItem* Value);
	void __fastcall SetStateImages(Imglist::TCustomImageList* Value);
	void __fastcall SetViewStyle(TViewStyle Value);
	void __fastcall SetHoverTime(int Value);
	void __fastcall CreateSortImages(void);
	void __fastcall UpdateSortHeader(int SColumn, TAHMSortType SortType);
	HIDESBASE MESSAGE void __fastcall WMContextMenu(Messages::TWMContextMenu &Message);
	void __fastcall SetMask(AnsiString Value);
	void __fastcall SetShowTypes(const Ahmshellcontrols::TAHMEnumViewSet Value);
	void __fastcall SetNegativeMask(const bool Value);
	TAHMShellViewItem* __fastcall GetSelectedViewItem(void);
	
protected:
	Graphics::TBitmap* __fastcall DrawDragImage(Controls::TImageList* &fDragImages, _di_IDataObject &fDataObject);
	unsigned __fastcall GetSourceEffects(void);
	bool __fastcall CanRename(TAHMShellViewItem* AItem);
	virtual void __fastcall StartDragging(Controls::TMouseButton DragButton);
	virtual void __fastcall HandleRenameEvent(Ahmshellobject::PItemIDList Item1, Ahmshellobject::PItemIDList Item2);
	virtual void __fastcall HandleCreateEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleRemoveEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleUpdateItemEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleUpdatePathEvent(Ahmshellobject::PItemIDList Item1);
	virtual void __fastcall HandleUpdateEvent(void);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetShellItemAt(int X, int Y);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetShellSpaceItem(void);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetDropTarget(void);
	virtual void __fastcall SetDropTarget(const Ahmshellcontrols::TAHMShellItem* Value);
	TAHMShellViewItem* __fastcall LocateShellViewItem(Ahmshellobject::PItemIDList SItemID);
	HIDESBASEDYNAMIC void __fastcall Changed(TAHMShellViewItem* Item);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall DoRename(const tagLVITEMA &Item);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	void __fastcall ShowContextMenu(Ahmshellcontrols::TAHMShellItem* ShellItem, const Types::TPoint &AtPoint, Ahmshellcalls::TAHMRenameProc RenameProc);
	virtual void __fastcall ExecContextMenuSelected(AnsiString Cmd);
	void __fastcall ShowContextMenuSelected(void);
	void __fastcall CreateInternalItem(void);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetSelectedItem(void);
	__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
	__property TAHMShellViewOptions* Options = {read=fOptions, write=SetOptions};
	__property TAHMShellViewItems* Items = {read=FShellViewItems, stored=false};
	__property int HoverTime = {read=GetHoverTime, write=SetHoverTime, default=-1};
	__property TShellItemEvent OnAttrChanged = {read=fOnAttrChanged, write=fOnAttrChanged};
	__property TShellRenameItemEvent OnRenamed = {read=fOnRenamed, write=fOnRenamed};
	__property Imglist::TCustomImageList* StateImages = {read=FStateImages, write=SetStateImages};
	__property TViewStyle ViewStyle = {read=FViewStyle, write=SetViewStyle, default=3};
	
public:
	__fastcall virtual TAHMCustomShellView(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMCustomShellView(void);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	virtual void __fastcall SetResponseShellItem(const Ahmshellcontrols::TAHMShellItem* ShellItem);
	virtual Ahmshellcontrols::TAHMShellItem* __fastcall GetResponseShellItem(void);
	void __fastcall SortShellView(int Index, bool UseCurrent);
	void __fastcall OrderShellColumn(int Index);
	virtual void __fastcall DoDefaultAction(Ahmshellcontrols::TAHMShellItem* Item, bool &Handled);
	void __fastcall Arrange(TAHMShellViewArrangement Code);
	TAHMShellViewItem* __fastcall GetItemAt(int X, int Y);
	bool __fastcall Back(void);
	void __fastcall NewFolder(void);
	HIDESBASE void __fastcall Refresh(void);
	TAHMShellViewItem* __fastcall GetNearestItem(const Types::TPoint &Point, TSearchDirection Direction);
	TAHMShellViewItem* __fastcall GetNextItem(TAHMShellViewItem* StartItem, TSearchDirection Direction, TItemStates States);
	void __fastcall SetUpdateState(bool Updating);
	bool __fastcall IsEditing(void);
	void __fastcall Scroll(int DX, int DY);
	__property Ahmshellcontrols::TAHMEnumViewSet ShowTypes = {read=fShowTypes, write=SetShowTypes, nodefault};
	__property bool NegativeMask = {read=fNegativeMask, write=SetNegativeMask, default=0};
	__property AnsiString Mask = {read=fMask, write=SetMask};
	__property TAHMShellColumns* ShellColumns = {read=fShellColumns};
	__property Ahmshellcontrols::TAHMShellItem* ShellParent = {read=GetResponseShellItem, write=SetResponseShellItem, stored=false};
	__property TAHMShellViewItem* ItemFocused = {read=GetFocused, write=SetFocused};
	__property int SelCount = {read=GetSelCount, nodefault};
	__property TAHMShellViewItem* Selected = {read=GetSelectedViewItem, write=SetSelection};
	__property Classes::TNotifyEvent OnFolderChanged = {read=fOnFolderChanged, write=fOnFolderChanged};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMCustomShellView(HWND ParentWindow) : Ahmshellcontrols::TAHMShellViewControl(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMShellColumns : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAHMShellColumnOrd fUseShelldetails;
	_di_IShellFolder2 fShellFolder2;
	Ahmshellobject::_di_IShellDetails fShellDetails;
	Classes::TList* fColumns;
	TAHMCustomShellView* fShellView;
	int __fastcall GetCount(void);
	HWND __fastcall GetHandle(void);
	Ahmshellcontrols::TAHMShellItem* __fastcall GetColumnOwner(void);
	TAHMColumnDetail* __fastcall GetColumn(int Index);
	
protected:
	virtual void __fastcall InitializeColumns(void);
	__property HWND Handle = {read=GetHandle, nodefault};
	__property TAHMCustomShellView* ShellView = {read=fShellView};
	bool __fastcall GetInfoFromShellFolder2(void);
	bool __fastcall GetInfoFromShellDetails(void);
	bool __fastcall PopulateInfoSelf(void);
	__property Ahmshellcontrols::TAHMShellItem* Folder = {read=GetColumnOwner};
	
public:
	__fastcall virtual TAHMShellColumns(TAHMCustomShellView* AShellView);
	__fastcall virtual ~TAHMShellColumns(void);
	AnsiString __fastcall FillInfo(Ahmshellobject::PItemIDList PID, const int ItemIndex);
	void __fastcall UpdateShellFolder(void);
	void __fastcall Clear(void);
	__property TAHMColumnDetail* Column[int Index] = {read=GetColumn};
	__property int Count = {read=GetCount, nodefault};
};


class PASCALIMPLEMENTATION TAHMColumnDetail : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	bool fVisible;
	int fIndex;
	TAHMShellColumns* fColumns;
	AnsiString fCaption;
	void __fastcall SetVisible(const bool Value);
	
protected:
	__property TAHMShellColumns* Columns = {read=fColumns};
	
public:
	__fastcall virtual TAHMColumnDetail(TAHMShellColumns* AColumns);
	__fastcall virtual ~TAHMColumnDetail(void);
	__property int Index = {read=fIndex, write=fIndex, nodefault};
	__property AnsiString Caption = {read=fCaption, write=fCaption};
	__property bool Visible = {read=fVisible, write=SetVisible, nodefault};
};


class PASCALIMPLEMENTATION TAHMShellViewItem : public Ahmshellcontrols::TAHMShellItem 
{
	typedef Ahmshellcontrols::TAHMShellItem inherited;
	
private:
	int fStateIndex;
	bool FDeleting;
	bool FChecked;
	TAHMCustomShellView* fShellView;
	TAHMShellViewItems* fViewItems;
	bool __fastcall GetChecked(void);
	HWND __fastcall GetHandle(void);
	int __fastcall GetIndex(void);
	bool __fastcall GetState(int Index);
	bool __fastcall HandleAllocated(void);
	void __fastcall SetChecked(bool Value);
	void __fastcall SetState(int Index, bool State);
	void __fastcall Delete(void);
	void __fastcall SetStateImageIndex(int Value);
	
protected:
	virtual bool __fastcall GetDropTarget(void);
	virtual void __fastcall SetDropTarget(const bool Value);
	Types::TRect __fastcall DisplayRect(int Code);
	__property TAHMCustomShellView* ShellView = {read=fShellView};
	__property TAHMShellViewItems* ViewItems = {read=fViewItems};
	__property HWND Handle = {read=GetHandle, nodefault};
	
public:
	__fastcall virtual TAHMShellViewItem(TAHMShellViewItems* AViewItems);
	__fastcall virtual ~TAHMShellViewItem(void);
	virtual void __fastcall Update(void);
	void __fastcall CancelEdit(void);
	bool __fastcall Rename(void);
	Types::TPoint __fastcall GetPosition();
	void __fastcall MakeVisible(void);
	void __fastcall SetPosition(const Types::TPoint &Value);
	__property bool Checked = {read=GetChecked, write=SetChecked, nodefault};
	__property bool Focused = {read=GetState, write=SetState, index=2, nodefault};
	__property int Index = {read=GetIndex, nodefault};
	__property Types::TPoint Position = {read=GetPosition, write=SetPosition};
	__property bool Selected = {read=GetState, write=SetState, index=3, nodefault};
	__property int StateIndex = {read=fStateIndex, write=SetStateImageIndex, nodefault};
public:
	#pragma option push -w-inl
	/* TAHMShellItem.Create */ inline __fastcall virtual TAHMShellViewItem(Ahmshellcontrols::TAHMSimpleItem* AParent) : Ahmshellcontrols::TAHMShellItem(AParent) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TAHMSimpleItem.CreateAsID */ inline __fastcall virtual TAHMShellViewItem(Ahmshellobject::PItemIDList NewItemID) : Ahmshellcontrols::TAHMShellItem(NewItemID) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMShellView;
class PASCALIMPLEMENTATION TAHMShellView : public TAHMCustomShellView 
{
	typedef TAHMCustomShellView inherited;
	
__published:
	__property Align  = {default=0};
	__property Anchors  = {default=3};
	__property BiDiMode ;
	__property BorderStyle  = {default=1};
	__property BorderWidth  = {default=0};
	__property Color  = {default=-2147483643};
	__property Constraints ;
	__property Ctl3D ;
	__property DragCursor  = {default=-12};
	__property Enabled  = {default=1};
	__property HoverTime  = {default=-1};
	__property Mask ;
	__property NegativeMask  = {default=0};
	__property Options ;
	__property ParentBiDiMode  = {default=1};
	__property ParentColor  = {default=0};
	__property ParentFont  = {default=1};
	__property ParentShowHint  = {default=1};
	__property PopupMenu ;
	__property ShowHint ;
	__property StateImages ;
	__property ShowTypes ;
	__property TabOrder  = {default=-1};
	__property TabStop  = {default=1};
	__property ViewStyle  = {default=3};
	__property Visible  = {default=1};
	__property OnAttrChanged ;
	__property OnClick ;
	__property OnContextPopup ;
	__property OnRenamed ;
	__property OnEndDock ;
	__property OnEnter ;
	__property OnExit ;
	__property OnFolderChanged ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnResize ;
	__property OnStartDock ;
public:
	#pragma option push -w-inl
	/* TAHMCustomShellView.Create */ inline __fastcall virtual TAHMShellView(Classes::TComponent* AOwner) : TAHMCustomShellView(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TAHMCustomShellView.Destroy */ inline __fastcall virtual ~TAHMShellView(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAHMShellView(HWND ParentWindow) : TAHMCustomShellView(ParentWindow) { }
	#pragma option pop
	
};


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

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

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