// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'iexFolderMView.pas' rev: 30.00 (Windows)

#ifndef IexfoldermviewHPP
#define IexfoldermviewHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <Vcl.Graphics.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Dialogs.hpp>
#include <System.Types.hpp>
#include <System.UITypes.hpp>
#include <ieview.hpp>
#include <hyieutils.hpp>
#include <hyiedefs.hpp>
#include <imageenview.hpp>
#include <iemview.hpp>
#include <ieanimation.hpp>
#include <imageenio.hpp>
#include <iemio.hpp>
#include <imageenproc.hpp>
#include <Winapi.ShlObj.hpp>
#include <Winapi.ActiveX.hpp>
#include <iexWindowsFunctions.hpp>

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

namespace Iexfoldermview
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TImageEnFolderMView;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TIEFolderFileTypes : unsigned char { iefAllImages, iefAllImagesAndVideos, iefAllFiles, iefCustom };

enum DECLSPEC_DENUM Iexfoldermview__1 : unsigned char { ieioShowConfirmation, ieioShowProgress, ieioVerboseErrors, ieioSendToRecycleBin, ieioRenameOnCollision };

typedef System::Set<Iexfoldermview__1, Iexfoldermview__1::ieioShowConfirmation, Iexfoldermview__1::ieioRenameOnCollision> TIEFileOperationOptions;

enum DECLSPEC_DENUM Iexfoldermview__2 : unsigned char { ieboOpenFoldersOnDblClick, ieboLaunchImagesOnDblClick, ieboLaunchFilesOnDblClick, ieboEnableFolderShortcuts, ieboEnableFileShortcuts };

typedef System::Set<Iexfoldermview__2, Iexfoldermview__2::ieboOpenFoldersOnDblClick, Iexfoldermview__2::ieboEnableFileShortcuts> TIEFolderInteractOptions;

typedef void __fastcall (__closure *TIEFolderChangeEvent)(System::TObject* Sender, System::UnicodeString &sNewFolder, bool &bAllow);

enum DECLSPEC_DENUM TIEDefaultFolder : unsigned char { iedfNone, iedfDesktop, iedfRootDir, iedfMyDocuments, iedfMyPictures, iedfMyVideos, iedfSpecified };

class PASCALIMPLEMENTATION TImageEnFolderMView : public Iemview::TImageEnMView
{
	typedef Iemview::TImageEnMView inherited;
	
private:
	Iemview::TIEImageEnMViewSortBy fSortOrder;
	bool fSortAscending;
	bool fSortCaseSensitive;
	TIEFolderFileTypes fFileTypes;
	bool fPopupMenuUseSystem;
	int fFileLimit;
	System::UnicodeString fFileTypesMask;
	System::UnicodeString fFolder;
	System::UnicodeString fExclusionMask;
	bool fAutoRefresh;
	bool fNeedRefreshFileList;
	bool fNeedRefreshSorting;
	Iemview::TIEImageEnMViewDefaultText fDefaultTopText;
	Iemview::TIEImageEnMViewDefaultText fDefaultInfoText;
	Iemview::TIEImageEnMViewDefaultText fDefaultBottomText;
	bool fInitialized;
	bool fShowHiddenFiles;
	bool fShowFolders;
	bool fDetectFileFormat;
	bool fLoadOnDemand;
	int fClickedFrameIndex;
	TIEFolderChangeEvent fOnFolderChange;
	Hyiedefs::TIEFileDragDropActions fAutoDragFiles;
	Iemview::TIEImageEnMViewSortCompareEx fOnCustomSortCompare;
	Hyiedefs::TIEFileDragDropActions fAutoDropFiles;
	Iexwindowsfunctions::TIEFileDragDrop* fDragDrop;
	System::Types::TPoint fMouseClickPos;
	Iexwindowsfunctions::TIEFolderWatch* fFolderMonitor;
	TIEDefaultFolder fDefaultFolder;
	TIEFolderInteractOptions fFolderInteract;
	TIEFileOperationOptions fFileOperationOptions;
	int fCurrentFolderIndex;
	void __fastcall SetExclusionMask(const System::UnicodeString Value);
	void __fastcall SetFileTypes(const TIEFolderFileTypes Value);
	void __fastcall SetFileTypesMask(const System::UnicodeString Value);
	void __fastcall SetFolder(const System::UnicodeString Value);
	void __fastcall _SetFolder(const System::UnicodeString Value, bool bIsFirstCall);
	System::UnicodeString __fastcall GetFolder(void);
	void __fastcall SetSortAscending(const bool Value);
	void __fastcall SetSortCaseSensitive(const bool Value);
	void __fastcall SetAutoRefresh(const bool Value);
	void __fastcall SetSortOrder(const Iemview::TIEImageEnMViewSortBy Value);
	void __fastcall CheckForPendingRefresh(void);
	System::WideString __fastcall GetSelectedFilename(void);
	void __fastcall SetSelectedFilename(const System::WideString Value);
	void __fastcall RefreshFileListEx(bool bNewFolder);
	void __fastcall SetFolderInteract(const TIEFolderInteractOptions Value);
	void __fastcall SetFileOperationOptions(const TIEFileOperationOptions Value);
	void __fastcall SetShowThumbnailHint(const bool Value);
	HIDESBASE System::WideString __fastcall GetImageFileType(int idx);
	HIDESBASE Iemview::TIEFolderImageType __fastcall GetImageType(int idx);
	bool __fastcall GetShowThumbnailHint(void);
	void __fastcall HandleDblClick(int idx);
	void __fastcall SetAutoDragFiles(const Hyiedefs::TIEFileDragDropActions Value);
	void __fastcall SetAutoDropFiles(const Hyiedefs::TIEFileDragDropActions Value);
	void __fastcall DropFiles(System::TObject* Sender, System::Classes::TStrings* ssFiles, int dwEffect);
	void __fastcall StartMonitoring(void);
	void __fastcall StopMonitoring(void);
	void __fastcall OnFolderMonitorNotify(System::TObject* const Sender, const Iexwindowsfunctions::TWatchAction Action, const System::UnicodeString FileName);
	void __fastcall CheckIndexForConst(int &idx);
	bool __fastcall DeleteSelectedFilesFromFolderEx(bool bForcePermanentDelete);
	void __fastcall SetShowFolders(const bool Value);
	void __fastcall SetShowHiddenFiles(const bool Value);
	void __fastcall SetDefaultFolder(const TIEDefaultFolder Value);
	void __fastcall _GetFillFromDirectoryParams(/* out */ bool &bAllowUnknownFormats, /* out */ bool &bIncludeVideoFiles, /* out */ System::UnicodeString &sFilterMask);
	void __fastcall CheckIfFilesInFolder(System::Classes::TStrings* ssFilenames);
	void __fastcall CheckIfFilesDeletedFromFolder(System::Classes::TStrings* ssFilenames);
	void __fastcall SetLoadSnapshotParameters(System::TObject* Sender, System::Classes::TStream* Stream, System::Byte Version);
	void __fastcall GetSaveSnapshotParameters(System::TObject* Sender, System::Classes::TStream* Stream, System::Byte Version);
	System::UnicodeString __fastcall GetFirstFolder(void);
	System::UnicodeString __fastcall GetNextFolder(void);
	
protected:
	virtual void __fastcall CreateWnd(void);
	
public:
	__fastcall virtual TImageEnFolderMView(System::Classes::TComponent* Owner);
	__fastcall virtual ~TImageEnFolderMView(void);
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC void __fastcall MouseUp(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(System::Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyUp(System::Word &Key, System::Classes::TShiftState Shift);
	virtual void __fastcall LockUpdate(void);
	virtual int __fastcall UnLockUpdate(void);
	int __fastcall AppendFile(const System::UnicodeString sFilename, bool bSelectIt = true, bool bCheckFileType = true);
	bool __fastcall InsertFile(int idx, const System::UnicodeString sFilename, bool bSelectIt = true, bool bCheckFileType = true);
	void __fastcall RemoveFile(const System::UnicodeString sFilename);
	__property System::WideString SelectedFilename = {read=GetSelectedFilename, write=SetSelectedFilename};
	int __fastcall SelectedFilenames(System::Classes::TStrings* Dest);
	__property Iemview::TIEFolderImageType ImageType[int idx] = {read=GetImageType};
	__property bool AutoRefresh = {read=fAutoRefresh, write=SetAutoRefresh, nodefault};
	bool __fastcall MoveSelectedFilesToFolder(const System::UnicodeString sDestFolder);
	bool __fastcall CopySelectedFilesToFolder(const System::UnicodeString sDestFolder);
	bool __fastcall MoveFilesToCurrentFolder(System::Classes::TStrings* ssFiles);
	bool __fastcall CopyFilesToCurrentFolder(System::Classes::TStrings* ssFiles);
	bool __fastcall DeleteSelectedFilesFromFolder(void);
	int __fastcall CopySelectedFilesToClipboard(void);
	int __fastcall CutSelectedFilesToClipboard(void);
	bool __fastcall PasteFilesFromClipboard(void);
	bool __fastcall CanPasteFilesFromClipboard(void);
	void __fastcall PopupSystemMenu(int X, int Y);
	__property System::WideString ImageFileType[int idx] = {read=GetImageFileType};
	__property int FileLimit = {read=fFileLimit, write=fFileLimit, nodefault};
	__property bool DetectFileFormat = {read=fDetectFileFormat, write=fDetectFileFormat, nodefault};
	__property bool LoadOnDemand = {read=fLoadOnDemand, write=fLoadOnDemand, nodefault};
	void __fastcall RefreshFileList(void);
	void __fastcall RefreshSorting(void);
	void __fastcall SetFolderEx(const System::UnicodeString sFolder, TIEFolderFileTypes xFileTypes, const System::UnicodeString sFileTypesMask = System::UnicodeString(), const System::UnicodeString sExclusionMask = System::UnicodeString());
	void __fastcall SetSortOrderEx(Iemview::TIEImageEnMViewSortBy xSortOrder, bool bSortAscending = true, bool bSortCaseSensitive = false);
	bool __fastcall OpenFolder(int idx = 0xfffffc19);
	bool __fastcall OpenParentFolder(void);
	bool __fastcall CanOpenParentFolder(void);
	bool __fastcall ExecuteFile(int idx = 0xfffffc19);
	bool __fastcall RenameFile(int idx, const System::UnicodeString sNewName);
	bool __fastcall PromptForFolder(void);
	bool __fastcall CreateNewFolder(const System::UnicodeString sFolderName);
	virtual void __fastcall SaveSnapshot(System::Classes::TStream* Stream, bool SaveCache = true, bool Compressed = false, bool SaveParams = false)/* overload */;
	virtual void __fastcall SaveSnapshot(System::WideString FileName, bool SaveCache = true, bool Compressed = false, bool SaveParams = false)/* overload */;
	virtual bool __fastcall LoadSnapshot(System::Classes::TStream* Stream)/* overload */;
	virtual bool __fastcall LoadSnapshot(System::WideString FileName)/* overload */;
	
__published:
	__property Iemview::TIEImageEnMViewSortBy SortOrder = {read=fSortOrder, write=SetSortOrder, default=12};
	__property bool SortAscending = {read=fSortAscending, write=SetSortAscending, default=1};
	__property bool SortCaseSensitive = {read=fSortCaseSensitive, write=SetSortCaseSensitive, default=0};
	__property TIEFolderFileTypes FileTypes = {read=fFileTypes, write=SetFileTypes, default=0};
	__property System::UnicodeString FileTypesMask = {read=fFileTypesMask, write=SetFileTypesMask};
	__property System::UnicodeString Folder = {read=GetFolder, write=SetFolder};
	__property System::UnicodeString ExclusionMask = {read=fExclusionMask, write=SetExclusionMask};
	__property TIEFolderInteractOptions FolderInteract = {read=fFolderInteract, write=SetFolderInteract, default=9};
	__property TIEFileOperationOptions FileOperationOptions = {read=fFileOperationOptions, write=SetFileOperationOptions, default=15};
	__property bool ShowThumbnailHint = {read=GetShowThumbnailHint, write=SetShowThumbnailHint, default=0};
	__property Hyiedefs::TIEFileDragDropActions AutoDragFiles = {read=fAutoDragFiles, write=SetAutoDragFiles, nodefault};
	__property Hyiedefs::TIEFileDragDropActions AutoDropFiles = {read=fAutoDropFiles, write=SetAutoDropFiles, nodefault};
	__property bool ShowHiddenFiles = {read=fShowHiddenFiles, write=SetShowHiddenFiles, default=0};
	__property bool ShowFolders = {read=fShowFolders, write=SetShowFolders, default=1};
	__property Iemview::TIEImageEnMViewDefaultText DefaultTopText = {read=fDefaultTopText, write=fDefaultTopText, default=0};
	__property Iemview::TIEImageEnMViewDefaultText DefaultInfoText = {read=fDefaultInfoText, write=fDefaultInfoText, default=0};
	__property Iemview::TIEImageEnMViewDefaultText DefaultBottomText = {read=fDefaultBottomText, write=fDefaultBottomText, default=1};
	__property bool PopupMenuUseSystem = {read=fPopupMenuUseSystem, write=fPopupMenuUseSystem, default=1};
	__property TIEDefaultFolder DefaultFolder = {read=fDefaultFolder, write=SetDefaultFolder, default=0};
	__property TIEFolderChangeEvent OnFolderChange = {read=fOnFolderChange, write=fOnFolderChange};
	__property Iemview::TIEImageEnMViewSortCompareEx OnCustomSortCompare = {read=fOnCustomSortCompare, write=fOnCustomSortCompare};
	int __fastcall FilenameToIndex(const System::UnicodeString sFilename);
public:
	/* TWinControl.CreateParented */ inline __fastcall TImageEnFolderMView(HWND ParentWindow) : Iemview::TImageEnMView(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
static const short IEF_CURRENT_FILE = short(-999);
#define IEF_Desktop_Folder L"IEF_DESKTOP_FOLDER"
#define IEF_Root_Directory L"IEF_ROOT_DIRECTORY"
#define IEF_MyDocuments_Folder L"IEF_MYDOCUMENTS_FOLDER"
#define IEF_MyPictures_Folder L"IEF_MYPICTURES_FOLDER"
#define IEF_MyVideos_Folder L"IEF_MYVIDEOS_FOLDER"
static const System::WideChar IEM_Folder_Delimiter = (System::WideChar)(0x7c);
}	/* namespace Iexfoldermview */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEXFOLDERMVIEW)
using namespace Iexfoldermview;
#endif
#pragma pack(pop)
#pragma option pop

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