243 lines
13 KiB
C++
243 lines
13 KiB
C++
// CodeGear C++Builder
|
|
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
|
|
// All rights reserved
|
|
|
|
// (DO NOT EDIT: machine generated header) 'iexFolderMView.pas' rev: 37.00 (Windows)
|
|
|
|
#ifndef iexFolderMViewHPP
|
|
#define iexFolderMViewHPP
|
|
|
|
#pragma delphiheader begin
|
|
#pragma option push
|
|
#if defined(__BORLANDC__) && !defined(__clang__)
|
|
#pragma option -w- // All warnings off
|
|
#pragma option -Vx // Zero-length empty class member
|
|
#endif
|
|
#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 <iexBitmaps.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, ieboClickToSortColumns };
|
|
|
|
typedef System::Set<Iexfoldermview__2, Iexfoldermview__2::ieboOpenFoldersOnDblClick, Iexfoldermview__2::ieboClickToSortColumns> TIEFolderInteractOptions;
|
|
|
|
typedef void __fastcall (__closure *TIEFolderChangeEvent)(System::TObject* Sender, System::UnicodeString &sNewFolder, bool &bAllow);
|
|
|
|
typedef void __fastcall (__closure *TIEDropFilesEvent)(System::TObject* Sender, System::Classes::TStrings* ssFiles, int &DropEffect);
|
|
|
|
enum DECLSPEC_DENUM TIEDefaultFolder : unsigned char { iedfNone, iedfDesktop, iedfDrives, 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;
|
|
bool fIncludeSubFolders;
|
|
System::UnicodeString fExclusionMask;
|
|
bool fAutoRefresh;
|
|
bool fNeedRefreshFileList;
|
|
bool fNeedRefreshSorting;
|
|
bool fInitialized;
|
|
bool fShowHiddenFiles;
|
|
bool fShowFolders;
|
|
bool fLoadOnDemand;
|
|
int fClickedFrameIndex;
|
|
TIEFolderChangeEvent fOnFolderChanging;
|
|
System::Classes::TNotifyEvent fOnFolderChanged;
|
|
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;
|
|
bool fEnableSpecialFolders;
|
|
TIEDropFilesEvent fOnDropFiles;
|
|
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 __fastcall SetIncludeSubFolders(const bool Value);
|
|
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();
|
|
System::WideString __fastcall GetSelectedFilename();
|
|
void __fastcall SetSelectedFilename(const System::WideString Value);
|
|
void __fastcall RefreshFileListEx(bool bNewFolder);
|
|
void __fastcall SetFolderInteract(const TIEFolderInteractOptions Value);
|
|
void __fastcall SetFileOperationOptions(const TIEFileOperationOptions Value);
|
|
HIDESBASE Iemview::TIEFolderImageType __fastcall GetImageType(int idx);
|
|
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 __fastcall StopMonitoring();
|
|
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();
|
|
System::UnicodeString __fastcall GetNextFolder();
|
|
int __fastcall GetFolders(System::Classes::TStrings* ssDest);
|
|
System::UnicodeString __fastcall NormalizeFolder(const System::UnicodeString sFolder);
|
|
System::UnicodeString __fastcall GetParentOfFolder(const System::UnicodeString sFolder);
|
|
void __fastcall FillWithDrives();
|
|
|
|
protected:
|
|
virtual void __fastcall CreateWnd();
|
|
virtual void __fastcall ClickColumnsHeaderRowCell(Iemview::TIEMTextPos Col);
|
|
virtual void __fastcall DrawColumnsHeaderRowCell(Vcl::Graphics::TCanvas* Canvas, const System::Types::TRect &Rect, Iemview::TIEMTextPos Col);
|
|
|
|
public:
|
|
__fastcall virtual TImageEnFolderMView(System::Classes::TComponent* Owner);
|
|
__fastcall virtual ~TImageEnFolderMView();
|
|
DYNAMIC void __fastcall DblClick();
|
|
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();
|
|
virtual int __fastcall UnlockUpdate();
|
|
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();
|
|
int __fastcall CopySelectedFilesToClipboard();
|
|
int __fastcall CutSelectedFilesToClipboard();
|
|
bool __fastcall PasteFilesFromClipboard();
|
|
bool __fastcall CanPasteFilesFromClipboard();
|
|
void __fastcall PopupSystemMenu(int X, int Y);
|
|
__property int FileLimit = {read=fFileLimit, write=fFileLimit, nodefault};
|
|
__property bool LoadOnDemand = {read=fLoadOnDemand, write=fLoadOnDemand, nodefault};
|
|
void __fastcall RefreshFileList();
|
|
void __fastcall RefreshSorting();
|
|
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();
|
|
bool __fastcall CanOpenParentFolder();
|
|
bool __fastcall ExecuteFile(int idx = 0xfffffc19);
|
|
bool __fastcall RenameFile(int idx, const System::UnicodeString sNewName);
|
|
bool __fastcall PromptForFolder();
|
|
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 bool IncludeSubFolders = {read=fIncludeSubFolders, write=SetIncludeSubFolders, default=0};
|
|
__property System::UnicodeString ExclusionMask = {read=fExclusionMask, write=SetExclusionMask};
|
|
__property TIEFolderInteractOptions FolderInteract = {read=fFolderInteract, write=SetFolderInteract, default=41};
|
|
__property TIEFileOperationOptions FileOperationOptions = {read=fFileOperationOptions, write=SetFileOperationOptions, default=15};
|
|
__property Hyiedefs::TIEFileDragDropActions AutoDragFiles = {read=fAutoDragFiles, write=SetAutoDragFiles, default=0};
|
|
__property Hyiedefs::TIEFileDragDropActions AutoDropFiles = {read=fAutoDropFiles, write=SetAutoDropFiles, default=0};
|
|
__property bool ShowHiddenFiles = {read=fShowHiddenFiles, write=SetShowHiddenFiles, default=0};
|
|
__property bool ShowFolders = {read=fShowFolders, write=SetShowFolders, default=1};
|
|
__property bool EnableSpecialFolders = {read=fEnableSpecialFolders, write=fEnableSpecialFolders, default=0};
|
|
__property bool PopupMenuUseSystem = {read=fPopupMenuUseSystem, write=fPopupMenuUseSystem, default=1};
|
|
__property TIEDefaultFolder DefaultFolder = {read=fDefaultFolder, write=SetDefaultFolder, default=0};
|
|
__property TIEFolderChangeEvent OnFolderChanging = {read=fOnFolderChanging, write=fOnFolderChanging};
|
|
__property System::Classes::TNotifyEvent OnFolderChanged = {read=fOnFolderChanged, write=fOnFolderChanged};
|
|
__property TIEDropFilesEvent OnDropFiles = {read=fOnDropFiles, write=fOnDropFiles};
|
|
__property Iemview::TIEImageEnMViewSortCompareEx OnCustomSortCompare = {read=fOnCustomSortCompare, write=fOnCustomSortCompare};
|
|
public:
|
|
/* TWinControl.CreateParented */ inline __fastcall TImageEnFolderMView(HWND ParentWindow) : Iemview::TImageEnMView(ParentWindow) { }
|
|
|
|
};
|
|
|
|
|
|
//-- var, const, procedure ---------------------------------------------------
|
|
static _DELPHI_CONST short IEF_CURRENT_FILE = short(-999);
|
|
#define IEF_Desktop_Folder L"IEF_DESKTOP_FOLDER"
|
|
#define IEF_Drives_Folder L"IEF_DRIVES_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 _DELPHI_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
|