DriveView.hpp 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 2002 by Borland Software Corporation
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'DriveView.pas' rev: 6.00
  5. #ifndef DriveViewHPP
  6. #define DriveViewHPP
  7. #pragma delphiheader begin
  8. #pragma option push -w-
  9. #pragma option push -Vx
  10. #include <Menus.hpp> // Pascal unit
  11. #include <CustomDriveView.hpp> // Pascal unit
  12. #include <CustomDirView.hpp> // Pascal unit
  13. #include <ListExt.hpp> // Pascal unit
  14. #include <BaseUtils.hpp> // Pascal unit
  15. #include <PIDL.hpp> // Pascal unit
  16. #include <IEListView.hpp> // Pascal unit
  17. #include <IEDriveInfo.hpp> // Pascal unit
  18. #include <DiscMon.hpp> // Pascal unit
  19. #include <FileOperator.hpp> // Pascal unit
  20. #include <FileChanges.hpp> // Pascal unit
  21. #include <DragDropFilesEx.hpp> // Pascal unit
  22. #include <DragDrop.hpp> // Pascal unit
  23. #include <ShellDialogs.hpp> // Pascal unit
  24. #include <DirView.hpp> // Pascal unit
  25. #include <ShlObj.hpp> // Pascal unit
  26. #include <ActiveX.hpp> // Pascal unit
  27. #include <ExtCtrls.hpp> // Pascal unit
  28. #include <CommCtrl.hpp> // Pascal unit
  29. #include <ShellAPI.hpp> // Pascal unit
  30. #include <ComCtrls.hpp> // Pascal unit
  31. #include <Dialogs.hpp> // Pascal unit
  32. #include <ComObj.hpp> // Pascal unit
  33. #include <Forms.hpp> // Pascal unit
  34. #include <Controls.hpp> // Pascal unit
  35. #include <Graphics.hpp> // Pascal unit
  36. #include <Classes.hpp> // Pascal unit
  37. #include <SysUtils.hpp> // Pascal unit
  38. #include <Messages.hpp> // Pascal unit
  39. #include <Windows.hpp> // Pascal unit
  40. #include <SysInit.hpp> // Pascal unit
  41. #include <System.hpp> // Pascal unit
  42. //-- user supplied -----------------------------------------------------------
  43. namespace Driveview
  44. {
  45. //-- type declarations -------------------------------------------------------
  46. typedef SmallString<12> TString12;
  47. class DELPHICLASS ECreateShortCut;
  48. class PASCALIMPLEMENTATION ECreateShortCut : public Sysutils::Exception
  49. {
  50. typedef Sysutils::Exception inherited;
  51. public:
  52. #pragma option push -w-inl
  53. /* Exception.Create */ inline __fastcall ECreateShortCut(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  54. #pragma option pop
  55. #pragma option push -w-inl
  56. /* Exception.CreateFmt */ inline __fastcall ECreateShortCut(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  57. #pragma option pop
  58. #pragma option push -w-inl
  59. /* Exception.CreateRes */ inline __fastcall ECreateShortCut(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  60. #pragma option pop
  61. #pragma option push -w-inl
  62. /* Exception.CreateResFmt */ inline __fastcall ECreateShortCut(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  63. #pragma option pop
  64. #pragma option push -w-inl
  65. /* Exception.CreateHelp */ inline __fastcall ECreateShortCut(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  66. #pragma option pop
  67. #pragma option push -w-inl
  68. /* Exception.CreateFmtHelp */ inline __fastcall ECreateShortCut(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  69. #pragma option pop
  70. #pragma option push -w-inl
  71. /* Exception.CreateResHelp */ inline __fastcall ECreateShortCut(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  72. #pragma option pop
  73. #pragma option push -w-inl
  74. /* Exception.CreateResFmtHelp */ inline __fastcall ECreateShortCut(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  75. #pragma option pop
  76. public:
  77. #pragma option push -w-inl
  78. /* TObject.Destroy */ inline __fastcall virtual ~ECreateShortCut(void) { }
  79. #pragma option pop
  80. };
  81. class DELPHICLASS EInvalidDirName;
  82. class PASCALIMPLEMENTATION EInvalidDirName : public Sysutils::Exception
  83. {
  84. typedef Sysutils::Exception inherited;
  85. public:
  86. #pragma option push -w-inl
  87. /* Exception.Create */ inline __fastcall EInvalidDirName(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  88. #pragma option pop
  89. #pragma option push -w-inl
  90. /* Exception.CreateFmt */ inline __fastcall EInvalidDirName(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  91. #pragma option pop
  92. #pragma option push -w-inl
  93. /* Exception.CreateRes */ inline __fastcall EInvalidDirName(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  94. #pragma option pop
  95. #pragma option push -w-inl
  96. /* Exception.CreateResFmt */ inline __fastcall EInvalidDirName(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  97. #pragma option pop
  98. #pragma option push -w-inl
  99. /* Exception.CreateHelp */ inline __fastcall EInvalidDirName(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  100. #pragma option pop
  101. #pragma option push -w-inl
  102. /* Exception.CreateFmtHelp */ inline __fastcall EInvalidDirName(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  103. #pragma option pop
  104. #pragma option push -w-inl
  105. /* Exception.CreateResHelp */ inline __fastcall EInvalidDirName(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  106. #pragma option pop
  107. #pragma option push -w-inl
  108. /* Exception.CreateResFmtHelp */ inline __fastcall EInvalidDirName(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  109. #pragma option pop
  110. public:
  111. #pragma option push -w-inl
  112. /* TObject.Destroy */ inline __fastcall virtual ~EInvalidDirName(void) { }
  113. #pragma option pop
  114. };
  115. class DELPHICLASS EInvalidPath;
  116. class PASCALIMPLEMENTATION EInvalidPath : public Sysutils::Exception
  117. {
  118. typedef Sysutils::Exception inherited;
  119. public:
  120. #pragma option push -w-inl
  121. /* Exception.Create */ inline __fastcall EInvalidPath(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  122. #pragma option pop
  123. #pragma option push -w-inl
  124. /* Exception.CreateFmt */ inline __fastcall EInvalidPath(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  125. #pragma option pop
  126. #pragma option push -w-inl
  127. /* Exception.CreateRes */ inline __fastcall EInvalidPath(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  128. #pragma option pop
  129. #pragma option push -w-inl
  130. /* Exception.CreateResFmt */ inline __fastcall EInvalidPath(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  131. #pragma option pop
  132. #pragma option push -w-inl
  133. /* Exception.CreateHelp */ inline __fastcall EInvalidPath(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  134. #pragma option pop
  135. #pragma option push -w-inl
  136. /* Exception.CreateFmtHelp */ inline __fastcall EInvalidPath(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  137. #pragma option pop
  138. #pragma option push -w-inl
  139. /* Exception.CreateResHelp */ inline __fastcall EInvalidPath(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  140. #pragma option pop
  141. #pragma option push -w-inl
  142. /* Exception.CreateResFmtHelp */ inline __fastcall EInvalidPath(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  143. #pragma option pop
  144. public:
  145. #pragma option push -w-inl
  146. /* TObject.Destroy */ inline __fastcall virtual ~EInvalidPath(void) { }
  147. #pragma option pop
  148. };
  149. class DELPHICLASS ENodeNotAssigned;
  150. class PASCALIMPLEMENTATION ENodeNotAssigned : public Sysutils::Exception
  151. {
  152. typedef Sysutils::Exception inherited;
  153. public:
  154. #pragma option push -w-inl
  155. /* Exception.Create */ inline __fastcall ENodeNotAssigned(const AnsiString Msg) : Sysutils::Exception(Msg) { }
  156. #pragma option pop
  157. #pragma option push -w-inl
  158. /* Exception.CreateFmt */ inline __fastcall ENodeNotAssigned(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  159. #pragma option pop
  160. #pragma option push -w-inl
  161. /* Exception.CreateRes */ inline __fastcall ENodeNotAssigned(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
  162. #pragma option pop
  163. #pragma option push -w-inl
  164. /* Exception.CreateResFmt */ inline __fastcall ENodeNotAssigned(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  165. #pragma option pop
  166. #pragma option push -w-inl
  167. /* Exception.CreateHelp */ inline __fastcall ENodeNotAssigned(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  168. #pragma option pop
  169. #pragma option push -w-inl
  170. /* Exception.CreateFmtHelp */ inline __fastcall ENodeNotAssigned(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
  171. #pragma option pop
  172. #pragma option push -w-inl
  173. /* Exception.CreateResHelp */ inline __fastcall ENodeNotAssigned(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
  174. #pragma option pop
  175. #pragma option push -w-inl
  176. /* Exception.CreateResFmtHelp */ inline __fastcall ENodeNotAssigned(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
  177. #pragma option pop
  178. public:
  179. #pragma option push -w-inl
  180. /* TObject.Destroy */ inline __fastcall virtual ~ENodeNotAssigned(void) { }
  181. #pragma option pop
  182. };
  183. #pragma pack(push, 4)
  184. struct TDriveStatus
  185. {
  186. bool Scanned;
  187. bool Verified;
  188. Comctrls::TTreeNode* RootNode;
  189. Discmon::TDiscMonitor* DiscMonitor;
  190. Extctrls::TTimer* ChangeTimer;
  191. AnsiString DefaultDir;
  192. } ;
  193. #pragma pack(pop)
  194. #pragma pack(push, 4)
  195. struct TScanDirInfo
  196. {
  197. bool SearchNewDirs;
  198. Comctrls::TTreeNode* StartNode;
  199. int DriveType;
  200. } ;
  201. #pragma pack(pop)
  202. typedef TScanDirInfo *PScanDirInfo;
  203. typedef void __fastcall (__closure *TDriveViewScanDirEvent)(System::TObject* Sender, Comctrls::TTreeNode* Node, bool &DoScanDir);
  204. typedef void __fastcall (__closure *TDriveViewDiskChangeEvent)(System::TObject* Sender, char Drive);
  205. class DELPHICLASS TNodeData;
  206. class PASCALIMPLEMENTATION TNodeData : public System::TObject
  207. {
  208. typedef System::TObject inherited;
  209. private:
  210. AnsiString FDirName;
  211. TString12 FShortName;
  212. int FAttr;
  213. bool FScanned;
  214. void *FData;
  215. bool FExpanded;
  216. unsigned FDirSize;
  217. bool FIsRecycleBin;
  218. bool FIconEmpty;
  219. public:
  220. unsigned shAttr;
  221. _ITEMIDLIST *PIDL;
  222. _di_IShellFolder ShellFolder;
  223. __fastcall TNodeData(void);
  224. __fastcall virtual ~TNodeData(void);
  225. __property AnsiString DirName = {read=FDirName, write=FDirName};
  226. __property TString12 ShortName = {read=FShortName, write=FShortName};
  227. __property int Attr = {read=FAttr, write=FAttr, nodefault};
  228. __property bool Scanned = {read=FScanned, write=FScanned, nodefault};
  229. __property void * Data = {read=FData, write=FData};
  230. __property bool Expanded = {read=FExpanded, write=FExpanded, nodefault};
  231. __property unsigned DirSize = {read=FDirSize, write=FDirSize, nodefault};
  232. __property bool IsRecycleBin = {read=FIsRecycleBin, nodefault};
  233. __property bool IconEmpty = {read=FIconEmpty, write=FIconEmpty, nodefault};
  234. };
  235. typedef TDriveStatus DriveView__7[26];
  236. class DELPHICLASS TDriveView;
  237. class PASCALIMPLEMENTATION TDriveView : public Customdriveview::TCustomDriveView
  238. {
  239. typedef Customdriveview::TCustomDriveView inherited;
  240. private:
  241. TDriveStatus DriveStatus[26];
  242. bool FConfirmDelete;
  243. bool FConfirmOverwrite;
  244. bool FWatchDirectory;
  245. AnsiString FDirectory;
  246. bool FFullDriveScan;
  247. bool FShowDirSize;
  248. bool FShowVolLabel;
  249. Dirview::TVolumeDisplayStyle FVolDisplayStyle;
  250. bool FShowAnimation;
  251. bool FChangeFlag;
  252. AnsiString FLastDir;
  253. bool FValidateFlag;
  254. bool FCreating;
  255. bool FForceRename;
  256. Comctrls::TTreeNode* FRenameNode;
  257. AnsiString FLastRenameName;
  258. HWND FInternalWindowHandle;
  259. Comctrls::TTreeNode* FPrevSelected;
  260. _di_IShellFolder FDesktop;
  261. _di_IShellFolder FWorkPlace;
  262. Classes::TNotifyEvent FOnStartScan;
  263. Classes::TNotifyEvent FOnEndScan;
  264. TDriveViewScanDirEvent FOnScanDir;
  265. TDriveViewDiskChangeEvent FOnDiskChange;
  266. TDriveViewDiskChangeEvent FOnInsertedDiskChange;
  267. TDriveViewDiskChangeEvent FOnChangeDetected;
  268. TDriveViewDiskChangeEvent FOnChangeInvalid;
  269. Classes::TNotifyEvent FOnDisplayContextMenu;
  270. Classes::TNotifyEvent FOnRefreshDrives;
  271. Dirview::TDirView* FDirView;
  272. Fileoperator::TFileOperator* FFileOperator;
  273. unsigned FChangeInterval;
  274. AnsiString FNoCheckDrives;
  275. Graphics::TColor FCompressedColor;
  276. Dirview::TFileNameDisplay FFileNameDisplay;
  277. AnsiString FLastPathCut;
  278. void __fastcall SignalDirDelete(System::TObject* Sender, Classes::TStringList* Files);
  279. bool __fastcall CheckForSubDirs(AnsiString Path);
  280. bool __fastcall ReadSubDirs(Comctrls::TTreeNode* Node, int DriveType);
  281. bool __fastcall CallBackValidateDir(Comctrls::TTreeNode* &Node, void * Data);
  282. bool __fastcall CallBackSaveNodeState(Comctrls::TTreeNode* &Node, void * Data);
  283. bool __fastcall CallBackRestoreNodeState(Comctrls::TTreeNode* &Node, void * Data);
  284. bool __fastcall CallBackDisplayName(Comctrls::TTreeNode* &Node, void * Data);
  285. bool __fastcall CallBackSetDirSize(Comctrls::TTreeNode* &Node, void * Data);
  286. bool __fastcall CallBackExpandLevel(Comctrls::TTreeNode* &Node, void * Data);
  287. void __fastcall ChangeDetected(System::TObject* Sender, const AnsiString Directory, bool &SubdirsChanged);
  288. void __fastcall ChangeInvalid(System::TObject* Sender, const AnsiString Directory, const AnsiString ErrorStr);
  289. void __fastcall ChangeTimerOnTimer(System::TObject* Sender);
  290. protected:
  291. HIDESBASE void __fastcall SetSelected(Comctrls::TTreeNode* Node);
  292. void __fastcall SetFullDriveScan(bool DoFullDriveScan);
  293. void __fastcall SetWatchDirectory(bool Value);
  294. void __fastcall SetShowDirSize(bool ShowIt);
  295. void __fastcall SetShowVolLabel(bool ShowIt);
  296. void __fastcall SetVolDisplayStyle(Dirview::TVolumeDisplayStyle DoStyle);
  297. void __fastcall SetDirView(Dirview::TDirView* Value);
  298. void __fastcall SetChangeInterval(unsigned Value);
  299. void __fastcall SetNoCheckDrives(AnsiString Value);
  300. void __fastcall SetCompressedColor(Graphics::TColor Value);
  301. void __fastcall SetFileNameDisplay(Dirview::TFileNameDisplay Value);
  302. virtual void __fastcall SetDirectory(AnsiString Value);
  303. void __fastcall SetDrive(char Drive);
  304. char __fastcall GetDrive(void);
  305. void __fastcall GetNodeShellAttr(_di_IShellFolder ParentFolder, TNodeData* NodeData, AnsiString Path, bool ContentMask = true);
  306. virtual bool __fastcall DoScanDir(Comctrls::TTreeNode* FromNode);
  307. virtual Comctrls::TTreeNode* __fastcall AddChildNode(Comctrls::TTreeNode* ParentNode, const Sysutils::TSearchRec &SRec);
  308. virtual void __fastcall CreateWatchThread(char Drive);
  309. void __fastcall InternalWndProc(Messages::TMessage &Msg);
  310. int __fastcall DirAttrMask(void);
  311. virtual void __fastcall ValidateDirectoryEx(Comctrls::TTreeNode* Node, Customdriveview::TRecursiveScan Recurse, bool NewDirs);
  312. void __fastcall ValidateDirectoryEasy(Comctrls::TTreeNode* Node);
  313. virtual void __fastcall RebuildTree(void);
  314. void __fastcall SetLastPathCut(AnsiString Path);
  315. virtual bool __fastcall GetCanUndoCopyMove(void);
  316. virtual void __fastcall CreateWnd(void);
  317. DYNAMIC void __fastcall Edit(const tagTVITEMA &Item);
  318. MESSAGE void __fastcall WMUserRename(Messages::TMessage &Message);
  319. virtual Customdirview::TCustomDirView* __fastcall GetCustomDirView(void);
  320. virtual void __fastcall SetCustomDirView(Customdirview::TCustomDirView* Value);
  321. virtual AnsiString __fastcall NodePath(Comctrls::TTreeNode* Node);
  322. virtual bool __fastcall NodeIsRecycleBin(Comctrls::TTreeNode* Node);
  323. virtual bool __fastcall NodePathExists(Comctrls::TTreeNode* Node);
  324. virtual Graphics::TColor __fastcall NodeColor(Comctrls::TTreeNode* Node);
  325. virtual Comctrls::TTreeNode* __fastcall FindPathNode(AnsiString Path);
  326. virtual Dragdrop::TDropEffectSet __fastcall DDSourceEffects(void);
  327. virtual void __fastcall DDChooseEffect(int KeyState, int &Effect);
  328. virtual bool __fastcall DragCompleteFileList(void);
  329. virtual Dragdrop::TDragResult __fastcall DDExecute(void);
  330. public:
  331. __property Images ;
  332. __property StateImages ;
  333. __property Items = {stored=false};
  334. __property Selected = {write=SetSelected, stored=false};
  335. __property _di_IShellFolder WorkPlace = {read=FWorkPlace};
  336. __property Controls::TDragImageList* DragImageList = {read=FDragImageList};
  337. __property char Drive = {read=GetDrive, write=SetDrive, stored=false, nodefault};
  338. __property char DragDrive = {read=FDragDrive, nodefault};
  339. __property bool CanUndoCopyMove = {read=GetCanUndoCopyMove, nodefault};
  340. __property Fileoperator::TFileOperator* DDFileOperator = {read=FFileOperator};
  341. __property AnsiString LastPathCut = {read=FLastPathCut, write=SetLastPathCut};
  342. DYNAMIC bool __fastcall UndoCopyMove(void);
  343. DYNAMIC void __fastcall EmptyClipboard(void);
  344. DYNAMIC bool __fastcall CopyToClipBoard(Comctrls::TTreeNode* Node);
  345. DYNAMIC bool __fastcall CutToClipBoard(Comctrls::TTreeNode* Node);
  346. DYNAMIC bool __fastcall CanPasteFromClipBoard(void);
  347. DYNAMIC bool __fastcall PasteFromClipBoard(AnsiString TargetPath = "");
  348. virtual void __fastcall PerformDragDropFileOperation(Comctrls::TTreeNode* Node, int Effect);
  349. TDriveStatus __fastcall GetDriveStatus(char Drive);
  350. int __fastcall GetDriveTypetoNode(Comctrls::TTreeNode* Node);
  351. int __fastcall GetDriveType(char Drive);
  352. char __fastcall GetDriveToNode(Comctrls::TTreeNode* Node);
  353. AnsiString __fastcall GetDriveText(char Drive);
  354. void __fastcall ScanDrive(char Drive);
  355. void __fastcall RefreshRootNodes(bool ScanDirectory, int dsFlags);
  356. AnsiString __fastcall GetValidDrivesStr();
  357. void __fastcall RefreshDirSize(Comctrls::TTreeNode* Node);
  358. void __fastcall RefreshDriveDirSize(char Drive);
  359. virtual void __fastcall SetImageIndex(Comctrls::TTreeNode* Node);
  360. Comctrls::TTreeNode* __fastcall FindNodeToPath(AnsiString Path);
  361. bool __fastcall NodeVerified(Comctrls::TTreeNode* Node);
  362. int __fastcall NodeAttr(Comctrls::TTreeNode* Node);
  363. Comctrls::TTreeNode* __fastcall RootNode(Comctrls::TTreeNode* Node);
  364. AnsiString __fastcall GetDirName(Comctrls::TTreeNode* Node);
  365. virtual unsigned __fastcall GetDirSize(Comctrls::TTreeNode* Node);
  366. virtual void __fastcall SetDirSize(Comctrls::TTreeNode* Node);
  367. AnsiString __fastcall GetDisplayName(Comctrls::TTreeNode* Node);
  368. virtual bool __fastcall NodeUpdateAble(Comctrls::TTreeNode* Node);
  369. virtual AnsiString __fastcall FormatDirSize(unsigned Size);
  370. virtual void __fastcall ExpandLevel(Comctrls::TTreeNode* Node, int Level);
  371. virtual AnsiString __fastcall NodePathName(Comctrls::TTreeNode* Node);
  372. Shlobj::PItemIDList __fastcall GetFQPIDL(Comctrls::TTreeNode* Node);
  373. DYNAMIC int __fastcall GetSubTreeSize(Comctrls::TTreeNode* Node);
  374. DYNAMIC Comctrls::TTreeNode* __fastcall CreateDirectory(Comctrls::TTreeNode* ParentNode, AnsiString NewName);
  375. DYNAMIC bool __fastcall DeleteDirectory(Comctrls::TTreeNode* Node, bool AllowUndo);
  376. DYNAMIC void __fastcall DeleteSubNodes(Comctrls::TTreeNode* Node);
  377. __fastcall virtual TDriveView(Classes::TComponent* AOwner);
  378. __fastcall virtual ~TDriveView(void);
  379. void __fastcall SaveNodesState(Comctrls::TTreeNode* Node);
  380. void __fastcall RestoreNodesState(Comctrls::TTreeNode* Node);
  381. virtual void __fastcall DisplayContextMenu(Comctrls::TTreeNode* Node, const Types::TPoint &Point);
  382. virtual void __fastcall DisplayPropertiesMenu(Comctrls::TTreeNode* Node);
  383. virtual void __fastcall StartWatchThread(void);
  384. virtual void __fastcall StopWatchThread(void);
  385. virtual void __fastcall TerminateWatchThread(char Drive);
  386. virtual void __fastcall StartAllWatchThreads(void);
  387. virtual void __fastcall StopAllWatchThreads(void);
  388. bool __fastcall WatchThreadActive(void)/* overload */;
  389. bool __fastcall WatchThreadActive(char Drive)/* overload */;
  390. virtual bool __fastcall NodeWatched(Comctrls::TTreeNode* Node);
  391. virtual void __fastcall GetImageIndex(Comctrls::TTreeNode* Node);
  392. DYNAMIC bool __fastcall CanEdit(Comctrls::TTreeNode* Node);
  393. DYNAMIC bool __fastcall CanChange(Comctrls::TTreeNode* Node);
  394. DYNAMIC bool __fastcall CanExpand(Comctrls::TTreeNode* Node);
  395. DYNAMIC void __fastcall Delete(Comctrls::TTreeNode* Node);
  396. virtual void __fastcall Loaded(void);
  397. DYNAMIC void __fastcall KeyPress(char &Key);
  398. DYNAMIC void __fastcall Change(Comctrls::TTreeNode* Node);
  399. __published:
  400. __property Directory ;
  401. __property bool ConfirmDelete = {read=FConfirmDelete, write=FConfirmDelete, default=1};
  402. __property bool ConfirmOverwrite = {read=FConfirmOverwrite, write=FConfirmOverwrite, default=1};
  403. __property bool FullDriveScan = {read=FFullDriveScan, write=SetFullDriveScan, default=0};
  404. __property bool WatchDirectory = {read=FWatchDirectory, write=SetWatchDirectory, default=0};
  405. __property unsigned ChangeInterval = {read=FChangeInterval, write=SetChangeInterval, default=1000};
  406. __property Dirview::TDirView* DirView = {read=FDirView, write=SetDirView};
  407. __property bool ShowDirSize = {read=FShowDirSize, write=SetShowDirSize, default=0};
  408. __property bool ShowVolLabel = {read=FShowVolLabel, write=SetShowVolLabel, default=1};
  409. __property Dirview::TVolumeDisplayStyle VolDisplayStyle = {read=FVolDisplayStyle, write=SetVolDisplayStyle, default=0};
  410. __property bool ShowAnimation = {read=FShowAnimation, write=FShowAnimation, default=0};
  411. __property AnsiString NoCheckDrives = {read=FNoCheckDrives, write=SetNoCheckDrives};
  412. __property Graphics::TColor CompressedColor = {read=FCompressedColor, write=SetCompressedColor, default=16711680};
  413. __property Dirview::TFileNameDisplay FileNameDisplay = {read=FFileNameDisplay, write=SetFileNameDisplay, default=0};
  414. __property Classes::TNotifyEvent OnStartScan = {read=FOnStartScan, write=FOnStartScan};
  415. __property Classes::TNotifyEvent OnEndScan = {read=FOnEndScan, write=FOnEndScan};
  416. __property TDriveViewScanDirEvent OnScanDir = {read=FOnScanDir, write=FOnScanDir};
  417. __property TDriveViewDiskChangeEvent OnDiskChange = {read=FOnDiskChange, write=FOnDiskChange};
  418. __property TDriveViewDiskChangeEvent OnInsertedDiskChange = {read=FOnInsertedDiskChange, write=FOnInsertedDiskChange};
  419. __property TDriveViewDiskChangeEvent OnChangeDetected = {read=FOnChangeDetected, write=FOnChangeDetected};
  420. __property TDriveViewDiskChangeEvent OnChangeInvalid = {read=FOnChangeInvalid, write=FOnChangeInvalid};
  421. __property Classes::TNotifyEvent OnDisplayContextMenu = {read=FOnDisplayContextMenu, write=FOnDisplayContextMenu};
  422. __property Classes::TNotifyEvent OnRefreshDrives = {read=FOnRefreshDrives, write=FOnRefreshDrives};
  423. __property DDLinkOnExeDrag = {default=1};
  424. __property UseDragImages = {default=1};
  425. __property TargetPopUpMenu = {default=1};
  426. __property OnDDDragEnter ;
  427. __property OnDDDragLeave ;
  428. __property OnDDDragOver ;
  429. __property OnDDDrop ;
  430. __property OnDDQueryContinueDrag ;
  431. __property OnDDGiveFeedback ;
  432. __property OnDDDragDetect ;
  433. __property OnDDProcessDropped ;
  434. __property OnDDError ;
  435. __property OnDDExecuted ;
  436. __property OnDDFileOperation ;
  437. __property OnDDFileOperationExecuted ;
  438. __property OnDDMenuPopup ;
  439. __property Align = {default=0};
  440. __property Anchors = {default=3};
  441. __property AutoExpand = {default=0};
  442. __property BiDiMode ;
  443. __property BorderStyle = {default=1};
  444. __property BorderWidth = {default=0};
  445. __property ChangeDelay = {default=0};
  446. __property Color = {default=-2147483643};
  447. __property Ctl3D ;
  448. __property Constraints ;
  449. __property DragKind = {default=0};
  450. __property DragCursor = {default=-12};
  451. __property DragMode = {default=1};
  452. __property OnDragDrop ;
  453. __property OnDragOver ;
  454. __property Enabled = {default=1};
  455. __property Font ;
  456. __property HideSelection = {default=1};
  457. __property HotTrack = {default=0};
  458. __property Indent ;
  459. __property ParentBiDiMode = {default=1};
  460. __property ParentColor = {default=1};
  461. __property ParentCtl3D = {default=1};
  462. __property ParentFont = {default=1};
  463. __property ParentShowHint = {default=1};
  464. __property PopupMenu ;
  465. __property ReadOnly = {default=0};
  466. __property RightClickSelect = {default=0};
  467. __property RowSelect = {default=0};
  468. __property ShowButtons = {default=1};
  469. __property ShowHint ;
  470. __property ShowLines = {default=1};
  471. __property TabOrder = {default=-1};
  472. __property TabStop = {default=1};
  473. __property ToolTips = {default=1};
  474. __property Visible = {default=1};
  475. __property OnChange ;
  476. __property OnChanging ;
  477. __property OnClick ;
  478. __property OnCollapsing ;
  479. __property OnCollapsed ;
  480. __property OnCompare ;
  481. __property OnDblClick ;
  482. __property OnDeletion ;
  483. __property OnEdited ;
  484. __property OnEditing ;
  485. __property OnEndDock ;
  486. __property OnEndDrag ;
  487. __property OnEnter ;
  488. __property OnExit ;
  489. __property OnExpanding ;
  490. __property OnExpanded ;
  491. __property OnGetImageIndex ;
  492. __property OnGetSelectedIndex ;
  493. __property OnKeyDown ;
  494. __property OnKeyPress ;
  495. __property OnKeyUp ;
  496. __property OnMouseDown ;
  497. __property OnMouseMove ;
  498. __property OnMouseUp ;
  499. __property OnStartDock ;
  500. __property OnStartDrag ;
  501. public:
  502. #pragma option push -w-inl
  503. /* TWinControl.CreateParented */ inline __fastcall TDriveView(HWND ParentWindow) : Customdriveview::TCustomDriveView(ParentWindow) { }
  504. #pragma option pop
  505. };
  506. //-- var, const, procedure ---------------------------------------------------
  507. extern PACKAGE System::ResourceString _coFileOperatorTitle;
  508. #define Driveview_coFileOperatorTitle System::LoadResourceString(&Driveview::_coFileOperatorTitle)
  509. extern PACKAGE System::ResourceString _coInvalidDosChars;
  510. #define Driveview_coInvalidDosChars System::LoadResourceString(&Driveview::_coInvalidDosChars)
  511. extern PACKAGE System::ResourceString _Space;
  512. #define Driveview_Space System::LoadResourceString(&Driveview::_Space)
  513. static const Shortint msThreadChangeDelay = 0x32;
  514. static const unsigned CInvalidSize = 0xffffffff;
  515. #define ErrorNodeNA "%s: Node not assigned"
  516. static const Shortint dvdsFloppy = 0x8;
  517. static const Shortint dvdsRereadAllways = 0x10;
  518. extern PACKAGE void __fastcall Register(void);
  519. } /* namespace Driveview */
  520. using namespace Driveview;
  521. #pragma option pop // -w-
  522. #pragma option pop // -Vx
  523. #pragma delphiheader end.
  524. //-- end unit ----------------------------------------------------------------
  525. #endif // DriveView