CustomDriveView.hpp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 2002 by Borland Software Corporation
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'CustomDriveView.pas' rev: 6.00
  5. #ifndef CustomDriveViewHPP
  6. #define CustomDriveViewHPP
  7. #pragma delphiheader begin
  8. #pragma option push -w-
  9. #pragma option push -Vx
  10. #include <DragDropFilesEx.hpp> // Pascal unit
  11. #include <IEDriveInfo.hpp> // Pascal unit
  12. #include <CustomDirView.hpp> // Pascal unit
  13. #include <DragDrop.hpp> // Pascal unit
  14. #include <Graphics.hpp> // Pascal unit
  15. #include <Messages.hpp> // Pascal unit
  16. #include <ShlObj.hpp> // Pascal unit
  17. #include <Forms.hpp> // Pascal unit
  18. #include <Controls.hpp> // Pascal unit
  19. #include <Windows.hpp> // Pascal unit
  20. #include <CommCtrl.hpp> // Pascal unit
  21. #include <ComCtrls.hpp> // Pascal unit
  22. #include <Classes.hpp> // Pascal unit
  23. #include <SysInit.hpp> // Pascal unit
  24. #include <System.hpp> // Pascal unit
  25. //-- user supplied -----------------------------------------------------------
  26. namespace Customdriveview
  27. {
  28. //-- type declarations -------------------------------------------------------
  29. #pragma option push -b-
  30. enum TRecursiveScan { rsNoRecursive, rsRecursive, rsRecursiveExisting, rsRecursiveExpanded };
  31. #pragma option pop
  32. #pragma option push -b-
  33. enum TScanStartNode { coNoScanStartNode, coScanStartNode };
  34. #pragma option pop
  35. typedef bool __fastcall (__closure *TCallBackFunc)(Comctrls::TTreeNode* &Node, void * Data);
  36. class DELPHICLASS TCustomDriveView;
  37. class PASCALIMPLEMENTATION TCustomDriveView : public Comctrls::TCustomTreeView
  38. {
  39. typedef Comctrls::TCustomTreeView inherited;
  40. protected:
  41. Forms::TCustomForm* FParentForm;
  42. Classes::TStringList* FDragFileList;
  43. bool FUseDragImages;
  44. Customdirview::TCustomizableDragDropFilesEx* FDragDropFilesEx;
  45. Controls::TDragImageList* FDragImageList;
  46. char FDragDrive;
  47. bool FExeDrag;
  48. bool FDDLinkOnExeDrag;
  49. _FILETIME FDragOverTime;
  50. _FILETIME FLastVScrollTime;
  51. _FILETIME FLastHScrollTime;
  52. int FVScrollCount;
  53. Comctrls::TTreeNode* FDragNode;
  54. _FILETIME FDragStartTime;
  55. #pragma pack(push, 1)
  56. Types::TPoint FDragPos;
  57. #pragma pack(pop)
  58. #pragma pack(push, 1)
  59. Types::TPoint FStartPos;
  60. #pragma pack(pop)
  61. bool FContextMenu;
  62. bool FCanChange;
  63. bool FUseSystemContextMenu;
  64. bool FDimmHiddenDirs;
  65. bool FShowHiddenDirs;
  66. bool FContinue;
  67. Controls::TImageList* FImageList;
  68. Customdirview::TDDOnDragEnter FOnDDDragEnter;
  69. Customdirview::TDDOnDragLeave FOnDDDragLeave;
  70. Customdirview::TDDOnDragOver FOnDDDragOver;
  71. Customdirview::TDDOnDrop FOnDDDrop;
  72. Customdirview::TDDOnQueryContinueDrag FOnDDQueryContinueDrag;
  73. Customdirview::TDDOnChooseEffect FOnDDChooseEffect;
  74. Customdirview::TDDOnGiveFeedback FOnDDGiveFeedback;
  75. Customdirview::TDDOnDragDetect FOnDDDragDetect;
  76. Dragdrop::TOnMenuPopup FOnDDMenuPopup;
  77. Customdirview::TOnProcessDropped FOnDDProcessDropped;
  78. Customdirview::TDDErrorEvent FOnDDError;
  79. Customdirview::TDDExecutedEvent FOnDDExecuted;
  80. Customdirview::TDDFileOperationEvent FOnDDFileOperation;
  81. Customdirview::TDDFileOperationExecutedEvent FOnDDFileOperationExecuted;
  82. Customdirview::TDDOnCreateDragFileList FOnDDCreateDragFileList;
  83. Classes::TNotifyEvent FOnDDEnd;
  84. Customdirview::TDDOnCreateDataObject FOnDDCreateDataObject;
  85. Dragdrop::TDragResult FLastDDResult;
  86. bool __fastcall GetTargetPopupMenu(void);
  87. void __fastcall SetTargetPopUpMenu(bool Value);
  88. void __fastcall SetDimmHiddenDirs(bool Value);
  89. void __fastcall SetShowHiddenDirs(bool Value);
  90. virtual AnsiString __fastcall GetDirectory();
  91. virtual void __fastcall SetDirectory(AnsiString Value);
  92. virtual Customdirview::TCustomDirView* __fastcall GetCustomDirView(void) = 0 ;
  93. virtual void __fastcall SetCustomDirView(Customdirview::TCustomDirView* Value) = 0 ;
  94. virtual void __fastcall CreateWnd(void);
  95. virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
  96. Comctrls::TTreeNode* __fastcall GetNodeFromHItem(const tagTVITEMA &Item);
  97. virtual bool __fastcall IsCustomDrawn(Comctrls::TCustomDrawTarget Target, Comctrls::TCustomDrawStage Stage);
  98. virtual bool __fastcall CustomDrawItem(Comctrls::TTreeNode* Node, Comctrls::TCustomDrawState State, Comctrls::TCustomDrawStage Stage, bool &PaintImages);
  99. HIDESBASE MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Msg);
  100. HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Msg);
  101. HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Msg);
  102. HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Msg);
  103. HIDESBASE MESSAGE void __fastcall WMRButtonDown(Messages::TWMMouse &Msg);
  104. HIDESBASE MESSAGE void __fastcall WMContextMenu(Messages::TWMContextMenu &Msg);
  105. DYNAMIC void __fastcall Delete(Comctrls::TTreeNode* Node);
  106. DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
  107. DYNAMIC void __fastcall KeyPress(char &Key);
  108. DYNAMIC void __fastcall KeyUp(Word &Key, Classes::TShiftState Shift);
  109. void __fastcall InternalOnDrawItem(Comctrls::TCustomTreeView* Sender, Comctrls::TTreeNode* Node, Comctrls::TCustomDrawState State, bool &DefaultDraw);
  110. void __fastcall DDDragEnter(_di_IDataObject DataObj, int KeyState, const Types::TPoint &Point, int &Effect, bool &Accept);
  111. void __fastcall DDDragLeave(void);
  112. void __fastcall DDDragOver(int KeyState, const Types::TPoint &Point, int &Effect);
  113. void __fastcall DDDrop(_di_IDataObject DataObj, int KeyState, const Types::TPoint &Point, int &Effect);
  114. void __fastcall DDQueryContinueDrag(BOOL EscapePressed, int KeyState, HRESULT &Result);
  115. void __fastcall DDDropHandlerSucceeded(System::TObject* Sender, int KeyState, const Types::TPoint &Point, int Effect);
  116. void __fastcall DDGiveFeedback(int Effect, HRESULT &Result);
  117. void __fastcall DDMenuPopup(System::TObject* Sender, HMENU AMenu, _di_IDataObject DataObj, int AMinCustCmd, int grfKeyState, const Types::TPoint &Point);
  118. void __fastcall DDMenuDone(System::TObject* Sender, HMENU AMenu);
  119. void __fastcall DDProcessDropped(System::TObject* Sender, int KeyState, const Types::TPoint &Point, int Effect);
  120. virtual void __fastcall DDError(Customdirview::TDDError Error);
  121. void __fastcall DDSpecifyDropTarget(System::TObject* Sender, bool DragDropHandler, const Types::TPoint &Point, Shlobj::PItemIDList &PIDL, AnsiString &Filename);
  122. virtual void __fastcall DDDragDetect(int KeyState, const Types::TPoint &DetectStart, const Types::TPoint &Point, Dragdrop::TDragDetectStatus DragStatus);
  123. virtual void __fastcall PerformDragDropFileOperation(Comctrls::TTreeNode* Node, int Effect) = 0 ;
  124. virtual void __fastcall DDChooseEffect(int KeyState, int &Effect);
  125. virtual bool __fastcall DragCompleteFileList(void) = 0 ;
  126. virtual Dragdrop::TDragResult __fastcall DDExecute(void);
  127. virtual Dragdrop::TDropEffectSet __fastcall DDSourceEffects(void) = 0 ;
  128. virtual AnsiString __fastcall NodePath(Comctrls::TTreeNode* Node) = 0 ;
  129. virtual bool __fastcall NodeIsRecycleBin(Comctrls::TTreeNode* Node);
  130. virtual bool __fastcall NodePathExists(Comctrls::TTreeNode* Node);
  131. virtual Graphics::TColor __fastcall NodeColor(Comctrls::TTreeNode* Node) = 0 ;
  132. virtual bool __fastcall NodeCanDrag(Comctrls::TTreeNode* Node);
  133. virtual Word __fastcall NodeOverlayIndexes(Comctrls::TTreeNode* Node);
  134. virtual Comctrls::TTreeNode* __fastcall FindPathNode(AnsiString Path) = 0 ;
  135. virtual void __fastcall ClearDragFileList(Dragdropfilesex::TFileList* FileList);
  136. virtual void __fastcall AddToDragFileList(Dragdropfilesex::TFileList* FileList, Comctrls::TTreeNode* Node);
  137. virtual void __fastcall ValidateDirectoryEx(Comctrls::TTreeNode* Node, TRecursiveScan Recurse, bool NewDirs) = 0 ;
  138. void __fastcall ValidateVisibleDirectories(Comctrls::TTreeNode* Node);
  139. void __fastcall ValidateAllDirectories(Comctrls::TTreeNode* Node);
  140. virtual void __fastcall RebuildTree(void) = 0 ;
  141. virtual void __fastcall DisplayContextMenu(Comctrls::TTreeNode* Node, const Types::TPoint &ScreenPos) = 0 ;
  142. virtual void __fastcall DisplayPropertiesMenu(Comctrls::TTreeNode* Node) = 0 ;
  143. __property Controls::TImageList* ImageList = {read=FImageList};
  144. public:
  145. __fastcall virtual TCustomDriveView(Classes::TComponent* AOwner);
  146. __fastcall virtual ~TCustomDriveView(void);
  147. void __fastcall ValidateDirectory(Comctrls::TTreeNode* Node);
  148. virtual void __fastcall CenterNode(Comctrls::TTreeNode* Node);
  149. bool __fastcall SortChildren(Comctrls::TTreeNode* ParentNode, bool Recurse);
  150. bool __fastcall IterateSubTree(Comctrls::TTreeNode* &StartNode, TCallBackFunc CallBackFunc, TRecursiveScan Recurse, TScanStartNode ScanStartNode, void * Data);
  151. virtual AnsiString __fastcall NodePathName(Comctrls::TTreeNode* Node) = 0 ;
  152. __property Customdirview::TCustomizableDragDropFilesEx* DragDropFilesEx = {read=FDragDropFilesEx};
  153. __property bool UseSystemContextMenu = {read=FUseSystemContextMenu, write=FUseSystemContextMenu, default=1};
  154. __property bool DimmHiddenDirs = {read=FDimmHiddenDirs, write=SetDimmHiddenDirs, default=0};
  155. __property bool ShowHiddenDirs = {read=FShowHiddenDirs, write=SetShowHiddenDirs, default=0};
  156. __property bool DDLinkOnExeDrag = {read=FDDLinkOnExeDrag, write=FDDLinkOnExeDrag, default=1};
  157. __property Customdirview::TDDOnDragEnter OnDDDragEnter = {read=FOnDDDragEnter, write=FOnDDDragEnter};
  158. __property Customdirview::TDDOnDragLeave OnDDDragLeave = {read=FOnDDDragLeave, write=FOnDDDragLeave};
  159. __property Customdirview::TDDOnDragOver OnDDDragOver = {read=FOnDDDragOver, write=FOnDDDragOver};
  160. __property Customdirview::TDDOnDrop OnDDDrop = {read=FOnDDDrop, write=FOnDDDrop};
  161. __property Customdirview::TDDOnQueryContinueDrag OnDDQueryContinueDrag = {read=FOnDDQueryContinueDrag, write=FOnDDQueryContinueDrag};
  162. __property Customdirview::TDDOnChooseEffect OnDDChooseEffect = {read=FOnDDChooseEffect, write=FOnDDChooseEffect};
  163. __property Customdirview::TDDOnGiveFeedback OnDDGiveFeedback = {read=FOnDDGiveFeedback, write=FOnDDGiveFeedback};
  164. __property Customdirview::TDDOnDragDetect OnDDDragDetect = {read=FOnDDDragDetect, write=FOnDDDragDetect};
  165. __property Customdirview::TOnProcessDropped OnDDProcessDropped = {read=FOnDDProcessDropped, write=FOnDDProcessDropped};
  166. __property Customdirview::TDDErrorEvent OnDDError = {read=FOnDDError, write=FOnDDError};
  167. __property Customdirview::TDDExecutedEvent OnDDExecuted = {read=FOnDDExecuted, write=FOnDDExecuted};
  168. __property Customdirview::TDDFileOperationEvent OnDDFileOperation = {read=FOnDDFileOperation, write=FOnDDFileOperation};
  169. __property Customdirview::TDDFileOperationExecutedEvent OnDDFileOperationExecuted = {read=FOnDDFileOperationExecuted, write=FOnDDFileOperationExecuted};
  170. __property Customdirview::TDDOnCreateDragFileList OnDDCreateDragFileList = {read=FOnDDCreateDragFileList, write=FOnDDCreateDragFileList};
  171. __property Classes::TNotifyEvent OnDDEnd = {read=FOnDDEnd, write=FOnDDEnd};
  172. __property Customdirview::TDDOnCreateDataObject OnDDCreateDataObject = {read=FOnDDCreateDataObject, write=FOnDDCreateDataObject};
  173. __property Dragdrop::TOnMenuPopup OnDDMenuPopup = {read=FOnDDMenuPopup, write=FOnDDMenuPopup};
  174. __property bool UseDragImages = {read=FUseDragImages, write=FUseDragImages, default=1};
  175. __property bool TargetPopUpMenu = {read=GetTargetPopupMenu, write=SetTargetPopUpMenu, default=1};
  176. __property AnsiString Directory = {read=GetDirectory, write=SetDirectory};
  177. __property Comctrls::TTreeNode* DragNode = {read=FDragNode};
  178. __property bool Continue = {read=FContinue, write=FContinue, nodefault};
  179. __property Dragdrop::TDragResult LastDDResult = {read=FLastDDResult, nodefault};
  180. public:
  181. #pragma option push -w-inl
  182. /* TWinControl.CreateParented */ inline __fastcall TCustomDriveView(HWND ParentWindow) : Comctrls::TCustomTreeView(ParentWindow) { }
  183. #pragma option pop
  184. };
  185. //-- var, const, procedure ---------------------------------------------------
  186. extern PACKAGE System::ResourceString _SDragDropError;
  187. #define Customdriveview_SDragDropError System::LoadResourceString(&Customdriveview::_SDragDropError)
  188. } /* namespace Customdriveview */
  189. using namespace Customdriveview;
  190. #pragma option pop // -w-
  191. #pragma option pop // -Vx
  192. #pragma delphiheader end.
  193. //-- end unit ----------------------------------------------------------------
  194. #endif // CustomDriveView