DirView.hpp 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 2002 by Borland Software Corporation
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'DirView.pas' rev: 6.00
  5. #ifndef DirViewHPP
  6. #define DirViewHPP
  7. #pragma delphiheader begin
  8. #pragma option push -w-
  9. #pragma option push -Vx
  10. #include <AssociatedStatusBar.hpp> // Pascal unit
  11. #include <PathLabel.hpp> // Pascal unit
  12. #include <CustomPathComboBox.hpp> // Pascal unit
  13. #include <Controls.hpp> // Pascal unit
  14. #include <NortonLikeListView.hpp> // Pascal unit
  15. #include <IEListView.hpp> // Pascal unit
  16. #include <BaseUtils.hpp> // Pascal unit
  17. #include <SysUtils.hpp> // Pascal unit
  18. #include <FileCtrl.hpp> // Pascal unit
  19. #include <DragDropFilesEx.hpp> // Pascal unit
  20. #include <CommCtrl.hpp> // Pascal unit
  21. #include <ListViewColProperties.hpp> // Pascal unit
  22. #include <Messages.hpp> // Pascal unit
  23. #include <DragDrop.hpp> // Pascal unit
  24. #include <DirViewColProperties.hpp> // Pascal unit
  25. #include <Classes.hpp> // Pascal unit
  26. #include <DiscMon.hpp> // Pascal unit
  27. #include <FileOperator.hpp> // Pascal unit
  28. #include <Graphics.hpp> // Pascal unit
  29. #include <ExtCtrls.hpp> // Pascal unit
  30. #include <ListExt.hpp> // Pascal unit
  31. #include <CustomDirView.hpp> // Pascal unit
  32. #include <CompThread.hpp> // Pascal unit
  33. #include <ComCtrls.hpp> // Pascal unit
  34. #include <ShlObj.hpp> // Pascal unit
  35. #include <Windows.hpp> // Pascal unit
  36. #include <SysInit.hpp> // Pascal unit
  37. #include <System.hpp> // Pascal unit
  38. //-- user supplied -----------------------------------------------------------
  39. namespace Dirview
  40. {
  41. //-- type declarations -------------------------------------------------------
  42. #pragma option push -b-
  43. enum TVolumeDisplayStyle { doPrettyName, doDisplayName, doLongPrettyName };
  44. #pragma option pop
  45. class DELPHICLASS EIUThread;
  46. class PASCALIMPLEMENTATION EIUThread : public Sysutils::Exception
  47. {
  48. typedef Sysutils::Exception inherited;
  49. public:
  50. #pragma option push -w-inl
  51. /* Exception.Create */ inline __fastcall EIUThread(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  52. #pragma option pop
  53. #pragma option push -w-inl
  54. /* Exception.CreateFmt */ inline __fastcall EIUThread(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  55. #pragma option pop
  56. #pragma option push -w-inl
  57. /* Exception.CreateRes */ inline __fastcall EIUThread(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  58. #pragma option pop
  59. #pragma option push -w-inl
  60. /* Exception.CreateResFmt */ inline __fastcall EIUThread(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  61. #pragma option pop
  62. #pragma option push -w-inl
  63. /* Exception.CreateHelp */ inline __fastcall EIUThread(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  64. #pragma option pop
  65. #pragma option push -w-inl
  66. /* Exception.CreateFmtHelp */ inline __fastcall EIUThread(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  67. #pragma option pop
  68. #pragma option push -w-inl
  69. /* Exception.CreateResHelp */ inline __fastcall EIUThread(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  70. #pragma option pop
  71. #pragma option push -w-inl
  72. /* Exception.CreateResFmtHelp */ inline __fastcall EIUThread(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  73. #pragma option pop
  74. public:
  75. #pragma option push -w-inl
  76. /* TObject.Destroy */ inline __fastcall virtual ~EIUThread(void) { }
  77. #pragma option pop
  78. };
  79. class DELPHICLASS EDragDrop;
  80. class PASCALIMPLEMENTATION EDragDrop : public Sysutils::Exception
  81. {
  82. typedef Sysutils::Exception inherited;
  83. public:
  84. #pragma option push -w-inl
  85. /* Exception.Create */ inline __fastcall EDragDrop(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  86. #pragma option pop
  87. #pragma option push -w-inl
  88. /* Exception.CreateFmt */ inline __fastcall EDragDrop(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  89. #pragma option pop
  90. #pragma option push -w-inl
  91. /* Exception.CreateRes */ inline __fastcall EDragDrop(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  92. #pragma option pop
  93. #pragma option push -w-inl
  94. /* Exception.CreateResFmt */ inline __fastcall EDragDrop(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  95. #pragma option pop
  96. #pragma option push -w-inl
  97. /* Exception.CreateHelp */ inline __fastcall EDragDrop(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  98. #pragma option pop
  99. #pragma option push -w-inl
  100. /* Exception.CreateFmtHelp */ inline __fastcall EDragDrop(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  101. #pragma option pop
  102. #pragma option push -w-inl
  103. /* Exception.CreateResHelp */ inline __fastcall EDragDrop(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  104. #pragma option pop
  105. #pragma option push -w-inl
  106. /* Exception.CreateResFmtHelp */ inline __fastcall EDragDrop(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  107. #pragma option pop
  108. public:
  109. #pragma option push -w-inl
  110. /* TObject.Destroy */ inline __fastcall virtual ~EDragDrop(void) { }
  111. #pragma option pop
  112. };
  113. class DELPHICLASS EInvalidFileName;
  114. class PASCALIMPLEMENTATION EInvalidFileName : public Sysutils::Exception
  115. {
  116. typedef Sysutils::Exception inherited;
  117. public:
  118. #pragma option push -w-inl
  119. /* Exception.Create */ inline __fastcall EInvalidFileName(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  120. #pragma option pop
  121. #pragma option push -w-inl
  122. /* Exception.CreateFmt */ inline __fastcall EInvalidFileName(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  123. #pragma option pop
  124. #pragma option push -w-inl
  125. /* Exception.CreateRes */ inline __fastcall EInvalidFileName(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  126. #pragma option pop
  127. #pragma option push -w-inl
  128. /* Exception.CreateResFmt */ inline __fastcall EInvalidFileName(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  129. #pragma option pop
  130. #pragma option push -w-inl
  131. /* Exception.CreateHelp */ inline __fastcall EInvalidFileName(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  132. #pragma option pop
  133. #pragma option push -w-inl
  134. /* Exception.CreateFmtHelp */ inline __fastcall EInvalidFileName(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  135. #pragma option pop
  136. #pragma option push -w-inl
  137. /* Exception.CreateResHelp */ inline __fastcall EInvalidFileName(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  138. #pragma option pop
  139. #pragma option push -w-inl
  140. /* Exception.CreateResFmtHelp */ inline __fastcall EInvalidFileName(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  141. #pragma option pop
  142. public:
  143. #pragma option push -w-inl
  144. /* TObject.Destroy */ inline __fastcall virtual ~EInvalidFileName(void) { }
  145. #pragma option pop
  146. };
  147. class DELPHICLASS ERenameFileFailed;
  148. class PASCALIMPLEMENTATION ERenameFileFailed : public Sysutils::Exception
  149. {
  150. typedef Sysutils::Exception inherited;
  151. public:
  152. #pragma option push -w-inl
  153. /* Exception.Create */ inline __fastcall ERenameFileFailed(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  154. #pragma option pop
  155. #pragma option push -w-inl
  156. /* Exception.CreateFmt */ inline __fastcall ERenameFileFailed(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  157. #pragma option pop
  158. #pragma option push -w-inl
  159. /* Exception.CreateRes */ inline __fastcall ERenameFileFailed(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  160. #pragma option pop
  161. #pragma option push -w-inl
  162. /* Exception.CreateResFmt */ inline __fastcall ERenameFileFailed(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  163. #pragma option pop
  164. #pragma option push -w-inl
  165. /* Exception.CreateHelp */ inline __fastcall ERenameFileFailed(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  166. #pragma option pop
  167. #pragma option push -w-inl
  168. /* Exception.CreateFmtHelp */ inline __fastcall ERenameFileFailed(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  169. #pragma option pop
  170. #pragma option push -w-inl
  171. /* Exception.CreateResHelp */ inline __fastcall ERenameFileFailed(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  172. #pragma option pop
  173. #pragma option push -w-inl
  174. /* Exception.CreateResFmtHelp */ inline __fastcall ERenameFileFailed(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  175. #pragma option pop
  176. public:
  177. #pragma option push -w-inl
  178. /* TObject.Destroy */ inline __fastcall virtual ~ERenameFileFailed(void) { }
  179. #pragma option pop
  180. };
  181. #pragma option push -b-
  182. enum TClipboardOperation { cboNone, cboCut, cboCopy };
  183. #pragma option pop
  184. #pragma option push -b-
  185. enum TFileNameDisplay { fndStored, fndCap, fndNoCap, fndNice };
  186. #pragma option pop
  187. typedef SmallString<4> TExtStr;
  188. struct TFileRec;
  189. typedef TFileRec *PFileRec;
  190. struct TFileRec
  191. {
  192. bool Empty;
  193. bool IconEmpty;
  194. bool IsDirectory;
  195. bool IsRecycleBin;
  196. bool IsParentDir;
  197. AnsiString FileName;
  198. AnsiString Displayname;
  199. TExtStr FileExt;
  200. AnsiString TypeName;
  201. int ImageIndex;
  202. __int64 Size;
  203. unsigned Attr;
  204. _FILETIME FileTime;
  205. _ITEMIDLIST *PIDL;
  206. } ;
  207. struct TInfoCache;
  208. typedef TInfoCache *PInfoCache;
  209. #pragma pack(push, 4)
  210. struct TInfoCache
  211. {
  212. TExtStr FileExt;
  213. System::ShortString TypeName;
  214. int ImageIndex;
  215. } ;
  216. #pragma pack(pop)
  217. typedef void __fastcall (__closure *TDirViewAddFileEvent)(System::TObject* Sender, Sysutils::TSearchRec &SearchRec, bool &AddFile);
  218. typedef void __fastcall (__closure *TDirViewFileSizeChanged)(System::TObject* Sender, Comctrls::TListItem* Item);
  219. class DELPHICLASS TSubDirScanner;
  220. class DELPHICLASS TDirView;
  221. class DELPHICLASS TIconUpdateThread;
  222. class PASCALIMPLEMENTATION TIconUpdateThread : public Compthread::TCompThread
  223. {
  224. typedef Compthread::TCompThread inherited;
  225. private:
  226. TDirView* FOwner;
  227. int FIndex;
  228. int FMaxIndex;
  229. bool FNewIcons;
  230. int FSyncIcon;
  231. int CurrentIndex;
  232. AnsiString CurrentFilePath;
  233. TFileRec CurrentItemData;
  234. bool InvalidItem;
  235. void __fastcall SetIndex(int Value);
  236. void __fastcall SetMaxIndex(int Value);
  237. protected:
  238. __fastcall TIconUpdateThread(TDirView* Owner);
  239. void __fastcall DoFetchData(void);
  240. void __fastcall DoUpdateIcon(void);
  241. virtual void __fastcall Execute(void);
  242. HIDESBASE void __fastcall Terminate(void);
  243. __property int Index = {read=FIndex, write=SetIndex, nodefault};
  244. __property int MaxIndex = {read=FMaxIndex, write=SetMaxIndex, nodefault};
  245. public:
  246. #pragma option push -w-inl
  247. /* TCompThread.Destroy */ inline __fastcall virtual ~TIconUpdateThread(void) { }
  248. #pragma option pop
  249. };
  250. class PASCALIMPLEMENTATION TDirView : public Customdirview::TCustomDirView
  251. {
  252. typedef Customdirview::TCustomDirView inherited;
  253. private:
  254. bool FConfirmDelete;
  255. bool FConfirmOverwrite;
  256. bool FUseIconCache;
  257. Listext::TListExt* FInfoCacheList;
  258. System::TObject* FDriveView;
  259. Extctrls::TTimer* FChangeTimer;
  260. unsigned FChangeInterval;
  261. bool FUseIconUpdateThread;
  262. bool FIUThreadFinished;
  263. int FDriveType;
  264. AnsiString FAttrSpace;
  265. AnsiString FNoCheckDrives;
  266. bool FSortAfterUpdate;
  267. Graphics::TColor FCompressedColor;
  268. TFileNameDisplay FFileNameDisplay;
  269. _di_IShellFolder FParentFolder;
  270. _di_IShellFolder FDesktopFolder;
  271. bool FDirOK;
  272. AnsiString FPath;
  273. bool FDrawLinkOverlay;
  274. bool SelectNewFiles;
  275. bool FSelfDropDuplicates;
  276. Customdirview::TSelAttr FSelArchive;
  277. Customdirview::TSelAttr FSelHidden;
  278. Customdirview::TSelAttr FSelSysFile;
  279. Customdirview::TSelAttr FSelReadOnly;
  280. __int64 FSelFileSizeFrom;
  281. __int64 FSelFileSizeTo;
  282. Word FSelFileDateFrom;
  283. Word FSelFileDateTo;
  284. Word FSelFileTimeFrom;
  285. Word FSelFileTimeTo;
  286. Fileoperator::TFileOperator* FFileOperator;
  287. TIconUpdateThread* FIconUpdateThread;
  288. Discmon::TDiscMonitor* FDiscMonitor;
  289. AnsiString FHomeDirectory;
  290. Classes::TList* FSubDirScanner;
  291. TDirViewAddFileEvent FOnAddFile;
  292. TDirViewFileSizeChanged FOnFileSizeChanged;
  293. Classes::TNotifyEvent FOnChangeDetected;
  294. Classes::TNotifyEvent FOnChangeInvalid;
  295. _di_IShellFolder iRecycleFolder;
  296. _ITEMIDLIST *PIDLRecycle;
  297. Dirviewcolproperties::TDirViewColProperties* __fastcall GetDirColProperties(void);
  298. AnsiString __fastcall GetHomeDirectory();
  299. void __fastcall SignalFileDelete(System::TObject* Sender, Classes::TStringList* Files);
  300. void __fastcall PerformDragDropFileOperation(AnsiString TargetPath, int dwEffect, bool RenameOnCollision);
  301. void __fastcall SetDirColProperties(Dirviewcolproperties::TDirViewColProperties* Value);
  302. protected:
  303. virtual Listviewcolproperties::TCustomListViewColProperties* __fastcall NewColProperties(void);
  304. virtual void __fastcall SetShowSubDirSize(bool Value);
  305. virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
  306. DYNAMIC void __fastcall Delete(Comctrls::TListItem* Item);
  307. virtual void __fastcall SetMask(AnsiString Value);
  308. void __fastcall DDError(Customdirview::TDDError ErrorNo);
  309. virtual bool __fastcall GetCanUndoCopyMove(void);
  310. _di_IShellFolder __fastcall GetShellFolder(AnsiString Dir);
  311. virtual bool __fastcall GetDirOK(void);
  312. virtual void __fastcall GetDisplayInfo(Comctrls::TListItem* ListItem, tagLVITEMA &DispInfo);
  313. virtual void __fastcall DDDragDetect(int grfKeyState, const Types::TPoint &DetectStart, const Types::TPoint &Point, Dragdrop::TDragDetectStatus DragStatus);
  314. virtual void __fastcall DDMenuDone(System::TObject* Sender, HMENU AMenu);
  315. virtual void __fastcall DDDropHandlerSucceeded(System::TObject* Sender, int grfKeyState, const Types::TPoint &Point, int dwEffect);
  316. virtual void __fastcall DDChooseEffect(int grfKeyState, int &dwEffect);
  317. virtual AnsiString __fastcall GetPathName();
  318. virtual void __fastcall SetChangeInterval(unsigned Value);
  319. virtual void __fastcall LoadFromRecycleBin(AnsiString Dir);
  320. virtual void __fastcall SetLoadEnabled(bool Value);
  321. virtual AnsiString __fastcall GetPath();
  322. virtual void __fastcall SetPath(AnsiString Value);
  323. virtual void __fastcall SetItemImageIndex(Comctrls::TListItem* Item, int Index);
  324. void __fastcall SetCompressedColor(Graphics::TColor Value);
  325. void __fastcall ChangeDetected(System::TObject* Sender, const AnsiString Directory);
  326. void __fastcall ChangeInvalid(System::TObject* Sender, const AnsiString Directory);
  327. void __fastcall TimerOnTimer(System::TObject* Sender);
  328. void __fastcall ResetItemImage(int Index);
  329. void __fastcall SetAttrSpace(AnsiString Value);
  330. void __fastcall SetNoCheckDrives(AnsiString Value);
  331. virtual void __fastcall SetWatchForChanges(bool Value);
  332. void __fastcall AddParentDirItem(void);
  333. virtual void __fastcall AddToDragFileList(Dragdropfilesex::TFileList* FileList, Comctrls::TListItem* Item);
  334. virtual void __fastcall SetFileNameDisplay(TFileNameDisplay Value);
  335. virtual void __fastcall DisplayContextMenu(const Types::TPoint &Where);
  336. virtual bool __fastcall DragCompleteFileList(void);
  337. virtual void __fastcall ExecuteFile(Comctrls::TListItem* Item);
  338. virtual bool __fastcall GetIsRoot(void);
  339. virtual void __fastcall InternalEdit(const tagLVITEMA &HItem);
  340. virtual Graphics::TColor __fastcall ItemColor(Comctrls::TListItem* Item);
  341. virtual AnsiString __fastcall ItemDisplayName(AnsiString FileName);
  342. AnsiString __fastcall ItemFileExt(Comctrls::TListItem* Item);
  343. AnsiString __fastcall ItemFileNameOnly(Comctrls::TListItem* Item);
  344. virtual __int64 __fastcall ItemFileSize(Comctrls::TListItem* Item);
  345. virtual System::TDateTime __fastcall ItemFileTime(Comctrls::TListItem* Item, Baseutils::TDateTimePrecision &Precision);
  346. virtual int __fastcall ItemImageIndex(Comctrls::TListItem* Item, bool Cache);
  347. virtual bool __fastcall ItemIsFile(Comctrls::TListItem* Item);
  348. virtual bool __fastcall ItemIsRecycleBin(Comctrls::TListItem* Item);
  349. virtual bool __fastcall ItemMatchesFilter(Comctrls::TListItem* Item, const Customdirview::TFileFilter &Filter);
  350. virtual Word __fastcall ItemOverlayIndexes(Comctrls::TListItem* Item);
  351. virtual void __fastcall LoadFiles(void);
  352. virtual AnsiString __fastcall MinimizePath(AnsiString Path, int Len);
  353. virtual void __fastcall PerformItemDragDropOperation(Comctrls::TListItem* Item, int Effect);
  354. virtual void __fastcall SortItems(void);
  355. void __fastcall StartFileDeleteThread(void);
  356. virtual void __fastcall SetShowHiddenFiles(bool Value);
  357. HIDESBASE MESSAGE void __fastcall WMDestroy(Messages::TWMNoParams &Msg);
  358. public:
  359. __property int DriveType = {read=FDriveType, nodefault};
  360. __property System::TObject* DriveView = {read=FDriveView, write=FDriveView};
  361. __property Items = {stored=false};
  362. __property Columns = {stored=false};
  363. __property _di_IShellFolder ParentFolder = {read=FParentFolder};
  364. __property bool CanUndoCopyMove = {read=GetCanUndoCopyMove, nodefault};
  365. __property Fileoperator::TFileOperator* DDFileOperator = {read=FFileOperator};
  366. DYNAMIC bool __fastcall UndoCopyMove(void);
  367. DYNAMIC void __fastcall EmptyClipboard(void);
  368. DYNAMIC bool __fastcall CopyToClipBoard(void);
  369. DYNAMIC bool __fastcall CutToClipBoard(void);
  370. virtual bool __fastcall PasteFromClipBoard(AnsiString TargetPath = "");
  371. DYNAMIC bool __fastcall DuplicateSelectedFiles(void);
  372. virtual void __fastcall DisplayPropertiesMenu(void);
  373. virtual void __fastcall ExecuteParentDirectory(void);
  374. virtual void __fastcall ExecuteRootDirectory(void);
  375. virtual bool __fastcall ItemIsDirectory(Comctrls::TListItem* Item);
  376. virtual AnsiString __fastcall ItemFullFileName(Comctrls::TListItem* Item);
  377. virtual bool __fastcall ItemIsParentDirectory(Comctrls::TListItem* Item);
  378. virtual AnsiString __fastcall ItemFileName(Comctrls::TListItem* Item);
  379. void __fastcall StartWatchThread(void);
  380. void __fastcall StopWatchThread(void);
  381. bool __fastcall WatchThreadActive(void);
  382. void __fastcall StartIconUpdateThread(void);
  383. void __fastcall StopIconUpdateThread(void);
  384. void __fastcall StartSubDirScanner(void);
  385. void __fastcall StopSubDirScanner(void);
  386. void __fastcall TerminateThreads(void);
  387. void __fastcall Syncronize(void);
  388. void __fastcall ClearIconCache(void);
  389. DYNAMIC Comctrls::TListItem* __fastcall CreateFile(AnsiString NewName);
  390. virtual void __fastcall CreateDirectory(AnsiString DirName);
  391. DYNAMIC bool __fastcall DeleteSelectedFiles(bool AllowUndo);
  392. void __fastcall ValidateFile(Comctrls::TListItem* Item)/* overload */;
  393. void __fastcall ValidateFile(AnsiString FileName)/* overload */;
  394. DYNAMIC void __fastcall ValidateSelectedFiles(void);
  395. HIDESBASE Comctrls::TListItem* __fastcall AddItem(const Sysutils::TSearchRec &SRec);
  396. void __fastcall GetDisplayData(Comctrls::TListItem* Item, bool FetchIcon);
  397. PFileRec __fastcall GetFileRec(int Index);
  398. virtual void __fastcall Load(void);
  399. virtual void __fastcall ReLoad(bool CacheIcons);
  400. void __fastcall Reload2(void);
  401. virtual AnsiString __fastcall FormatFileTime(const _FILETIME &FileTime);
  402. virtual AnsiString __fastcall GetAttrString(int Attr);
  403. void __fastcall FetchAllDisplayData(void);
  404. __fastcall virtual TDirView(Classes::TComponent* AOwner);
  405. __fastcall virtual ~TDirView(void);
  406. virtual void __fastcall ExecuteHomeDirectory(void);
  407. virtual void __fastcall ReloadDirectory(void);
  408. __property AnsiString HomeDirectory = {read=GetHomeDirectory, write=FHomeDirectory};
  409. __property Customdirview::TSelAttr SelArchive = {read=FSelArchive, write=FSelArchive, default=0};
  410. __property Customdirview::TSelAttr SelHidden = {read=FSelHidden, write=FSelHidden, default=0};
  411. __property Customdirview::TSelAttr SelSysFile = {read=FSelSysFile, write=FSelSysFile, default=0};
  412. __property Customdirview::TSelAttr SelReadOnly = {read=FSelReadOnly, write=FSelReadOnly, default=0};
  413. __property __int64 SelFileSizeFrom = {read=FSelFileSizeFrom, write=FSelFileSizeFrom};
  414. __property __int64 SelFileSizeTo = {read=FSelFileSizeTo, write=FSelFileSizeTo, default=0};
  415. __property Word SelFileDateFrom = {read=FSelFileDateFrom, write=FSelFileDateFrom, default=33};
  416. __property Word SelFileDateTo = {read=FSelFileDateTo, write=FSelFileDateTo, default=61343};
  417. __property Word SelFileTimeFrom = {read=FSelFileTimeFrom, write=FSelFileTimeFrom, nodefault};
  418. __property Word SelFileTimeTo = {read=FSelFileTimeTo, write=FSelFileTimeTo, default=49152};
  419. __published:
  420. __property Dirviewcolproperties::TDirViewColProperties* DirColProperties = {read=GetDirColProperties, write=SetDirColProperties};
  421. __property PathComboBox ;
  422. __property PathLabel ;
  423. __property StatusBar ;
  424. __property OnGetSelectFilter ;
  425. __property HeaderImages ;
  426. __property LoadAnimation = {default=1};
  427. __property DimmHiddenFiles = {default=1};
  428. __property ShowDirectories = {default=1};
  429. __property ShowHiddenFiles = {default=1};
  430. __property DirsOnTop = {default=1};
  431. __property ShowSubDirSize = {default=0};
  432. __property SingleClickToExec = {default=0};
  433. __property WantUseDragImages = {default=1};
  434. __property TargetPopupMenu = {default=1};
  435. __property AddParentDir = {default=0};
  436. __property OnSelectItem ;
  437. __property OnStartLoading ;
  438. __property OnLoaded ;
  439. __property OnDDDragEnter ;
  440. __property OnDDDragLeave ;
  441. __property OnDDDragOver ;
  442. __property OnDDDrop ;
  443. __property OnDDQueryContinueDrag ;
  444. __property OnDDGiveFeedback ;
  445. __property OnDDDragDetect ;
  446. __property OnDDCreateDragFileList ;
  447. __property OnDDEnd ;
  448. __property OnDDCreateDataObject ;
  449. __property OnDDTargetHasDropHandler ;
  450. __property DDLinkOnExeDrag = {default=1};
  451. __property OnDDProcessDropped ;
  452. __property OnDDError ;
  453. __property OnDDExecuted ;
  454. __property OnDDFileOperation ;
  455. __property OnDDFileOperationExecuted ;
  456. __property OnDDMenuPopup ;
  457. __property OnExecFile ;
  458. __property Graphics::TColor CompressedColor = {read=FCompressedColor, write=SetCompressedColor, default=16711680};
  459. __property bool ConfirmDelete = {read=FConfirmDelete, write=FConfirmDelete, default=1};
  460. __property bool ConfirmOverwrite = {read=FConfirmOverwrite, write=FConfirmOverwrite, default=1};
  461. __property bool SortAfterUpdate = {read=FSortAfterUpdate, write=FSortAfterUpdate, default=1};
  462. __property unsigned ChangeInterval = {read=FChangeInterval, write=SetChangeInterval, default=1000};
  463. __property bool UseIconUpdateThread = {read=FUseIconUpdateThread, write=FUseIconUpdateThread, default=0};
  464. __property bool UseIconCache = {read=FUseIconCache, write=FUseIconCache, default=0};
  465. __property TFileNameDisplay FileNameDisplay = {read=FFileNameDisplay, write=SetFileNameDisplay, default=0};
  466. __property AnsiString AttrSpace = {read=FAttrSpace, write=SetAttrSpace};
  467. __property AnsiString NoCheckDrives = {read=FNoCheckDrives, write=SetNoCheckDrives};
  468. __property WatchForChanges = {default=0};
  469. __property bool SelfDropDuplicates = {read=FSelfDropDuplicates, write=FSelfDropDuplicates, default=0};
  470. __property Classes::TNotifyEvent OnChangeDetected = {read=FOnChangeDetected, write=FOnChangeDetected};
  471. __property Classes::TNotifyEvent OnChangeInvalid = {read=FOnChangeInvalid, write=FOnChangeInvalid};
  472. __property TDirViewAddFileEvent OnAddFile = {read=FOnAddFile, write=FOnAddFile};
  473. __property TDirViewFileSizeChanged OnFileSizeChanged = {read=FOnFileSizeChanged, write=FOnFileSizeChanged};
  474. __property UseSystemContextMenu = {default=1};
  475. __property OnContextPopup ;
  476. __property OnBeginRename ;
  477. __property OnEndRename ;
  478. __property OnHistoryChange ;
  479. __property ColumnClick = {default=1};
  480. __property MultiSelect = {default=1};
  481. __property ReadOnly = {default=0};
  482. public:
  483. #pragma option push -w-inl
  484. /* TWinControl.CreateParented */ inline __fastcall TDirView(HWND ParentWindow) : Customdirview::TCustomDirView(ParentWindow) { }
  485. #pragma option pop
  486. };
  487. class PASCALIMPLEMENTATION TSubDirScanner : public Compthread::TCompThread
  488. {
  489. typedef Compthread::TCompThread inherited;
  490. private:
  491. TDirView* FOwner;
  492. AnsiString FStartPath;
  493. AnsiString FDirName;
  494. __int64 FTotalSize;
  495. void __fastcall ThreadTerminated(System::TObject* Sender);
  496. protected:
  497. __fastcall TSubDirScanner(TDirView* Owner, Comctrls::TListItem* Item);
  498. void __fastcall DoUpdateItem(void);
  499. virtual void __fastcall Execute(void);
  500. public:
  501. #pragma option push -w-inl
  502. /* TCompThread.Destroy */ inline __fastcall virtual ~TSubDirScanner(void) { }
  503. #pragma option pop
  504. };
  505. //-- var, const, procedure ---------------------------------------------------
  506. extern PACKAGE System::ResourceString _coFileOperatorTitle;
  507. #define Dirview_coFileOperatorTitle System::LoadResourceString(&Dirview::_coFileOperatorTitle)
  508. extern PACKAGE System::ResourceString _coInvalidDosChars;
  509. #define Dirview_coInvalidDosChars System::LoadResourceString(&Dirview::_coInvalidDosChars)
  510. extern PACKAGE System::ResourceString _Space;
  511. #define Dirview_Space System::LoadResourceString(&Dirview::_Space)
  512. static const Shortint msThreadChangeDelay = 0xa;
  513. static const Shortint MaxWaitTimeOut = 0xa;
  514. static const Shortint FileAttr = 0x37;
  515. static const Shortint ExtLen = 0x4;
  516. #define SpecialExtensions "EXE,LNK,ICO,ANI,CUR,PIF,JOB,CPL"
  517. #define ExeExtension "EXE"
  518. static const Shortint MinDate = 0x21;
  519. static const Word MaxDate = 0xef9f;
  520. static const Shortint MinTime = 0x0;
  521. static const Word MaxTime = 0xc000;
  522. extern PACKAGE TClipboardOperation LastClipBoardOperation;
  523. extern PACKAGE unsigned LastIOResult;
  524. extern PACKAGE void __fastcall Register(void);
  525. extern PACKAGE bool __fastcall MatchesFileExt( TExtStr &Ext, const AnsiString FileExtList);
  526. } /* namespace Dirview */
  527. using namespace Dirview;
  528. #pragma option pop // -w-
  529. #pragma option pop // -Vx
  530. #pragma delphiheader end.
  531. //-- end unit ----------------------------------------------------------------
  532. #endif // DirView