CustomScpExplorer.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. //---------------------------------------------------------------------------
  2. #ifndef CustomScpExplorerH
  3. #define CustomScpExplorerH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <CustomDirView.hpp>
  10. #include <CustomUnixDirView.hpp>
  11. #include <IEListView.hpp>
  12. #include <NortonLikeListView.hpp>
  13. #include <UnixDirView.h>
  14. #include <ComCtrls.hpp>
  15. #include <ExtCtrls.hpp>
  16. #include <ToolWin.hpp>
  17. #include <WinInterface.h>
  18. #include <WinConfiguration.h>
  19. #include <Terminal.h>
  20. #include <Queue.h>
  21. #include "QueueController.h"
  22. #include "UnixDriveView.h"
  23. #include "CustomDriveView.hpp"
  24. #include "TBX.hpp"
  25. #include "TB2Dock.hpp"
  26. #include "TBXExtItems.hpp"
  27. #include "TBXStatusBars.hpp"
  28. #include "TB2Item.hpp"
  29. #include "TB2Toolbar.hpp"
  30. #include "TBXToolPals.hpp"
  31. #include "PngImageList.hpp"
  32. #include "ThemePageControl.h"
  33. #include "PathLabel.hpp"
  34. //---------------------------------------------------------------------------
  35. class TProgressForm;
  36. class TSynchronizeProgressForm;
  37. class TTerminalQueue;
  38. class TTerminalQueueStatus;
  39. class TQueueItem;
  40. class TQueueItemProxy;
  41. class TQueueController;
  42. class TSynchronizeController;
  43. class TEditorManager;
  44. class TEditorData;
  45. class TTransferPresetNoteData;
  46. struct TEditedFileData;
  47. class ITaskbarList3;
  48. //---------------------------------------------------------------------------
  49. enum TActionAllowed { aaShortCut, aaUpdate, aaExecute };
  50. enum TActionFlag { afLocal = 1, afRemote = 2, afExplorer = 4 , afCommander = 8 };
  51. enum TExecuteFileBy { efShell = 1, efInternalEditor = 2, efExternalEditor = 3, efDefaultEditor = 100 };
  52. enum TPanelExport { pePath, peFileList, peFullFileList, peUrl };
  53. enum TPanelExportDestination { pedClipboard, pedCommandLine };
  54. //---------------------------------------------------------------------------
  55. class TCustomScpExplorerForm : public TForm
  56. {
  57. __published:
  58. TPanel *RemotePanel;
  59. TTBXStatusBar *RemoteStatusBar;
  60. TUnixDirView *RemoteDirView;
  61. TTBXDock *TopDock;
  62. TListView *QueueView3;
  63. TPanel *QueuePanel;
  64. TSplitter *QueueSplitter;
  65. TTBXToolbar *QueueToolbar;
  66. TTBXDock *QueueDock;
  67. TTBXItem *QueueEnableItem;
  68. TTBXSeparatorItem *TBXSeparatorItem203;
  69. TTBXItem *TBXItem201;
  70. TTBXItem *TBXItem202;
  71. TTBXItem *TBXItem203;
  72. TTBXItem *TBXItem204;
  73. TTBXItem *TBXItem205;
  74. TTBXSeparatorItem *TBXSeparatorItem201;
  75. TTBXItem *TBXItem206;
  76. TTBXItem *TBXItem207;
  77. TTBXSeparatorItem *TBXSeparatorItem202;
  78. TTBXItem *TBXItem208;
  79. TUnixDriveView *RemoteDriveView;
  80. TSplitter *RemotePanelSplitter;
  81. TTBXItem *TBXItem194;
  82. TTBXItem *TBXItem195;
  83. TTBXSubmenuItem *TBXSubmenuItem27;
  84. TTBXItem *TBXItem211;
  85. TTBXItem *TBXItem225;
  86. TTBXItem *TBXItem226;
  87. TTabSheet *TabSheet1;
  88. TThemePageControl *SessionsPageControl;
  89. TPathLabel *QueueLabel;
  90. void __fastcall RemoteDirViewContextPopup(TObject *Sender,
  91. const TPoint &MousePos, bool &Handled);
  92. void __fastcall RemoteDirViewGetSelectFilter(
  93. TCustomDirView *Sender, bool Select, TFileFilter &Filter);
  94. void __fastcall ApplicationHint(TObject * Sender);
  95. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  96. void __fastcall RemoteDirViewDisplayProperties(TObject *Sender);
  97. void __fastcall DirViewColumnRightClick(TObject *Sender,
  98. TListColumn *Column, TPoint &Point);
  99. void __fastcall DirViewExecFile(TObject *Sender, TListItem *Item, bool &AllowExec);
  100. void __fastcall ToolBarResize(TObject *Sender);
  101. void __fastcall FileControlDDDragEnter(TObject *Sender,
  102. _di_IDataObject DataObj, int grfKeyState, const TPoint &Point,
  103. int &dwEffect, bool &Accept);
  104. void __fastcall FileControlDDDragLeave(TObject *Sender);
  105. void __fastcall RemoteFileControlDDCreateDragFileList(TObject *Sender,
  106. TFileList *FileList, bool &Created);
  107. void __fastcall RemoteFileControlDDEnd(TObject *Sender);
  108. void __fastcall RemoteFileControlDDCreateDataObject(TObject *Sender,
  109. TDataObject *&DataObject);
  110. void __fastcall RemoteFileControlDDGiveFeedback(TObject *Sender,
  111. int dwEffect, HRESULT &Result);
  112. void __fastcall QueueSplitterCanResize(TObject *Sender, int &NewSize,
  113. bool &Accept);
  114. void __fastcall QueueView3ContextPopup(TObject *Sender, TPoint &MousePos,
  115. bool &Handled);
  116. void __fastcall QueueView3Deletion(TObject *Sender, TListItem *Item);
  117. void __fastcall QueueView3StartDrag(TObject *Sender,
  118. TDragObject *&DragObject);
  119. void __fastcall QueueView3DragOver(TObject *Sender, TObject *Source,
  120. int X, int Y, TDragState State, bool &Accept);
  121. void __fastcall QueueView3DragDrop(TObject *Sender, TObject *Source,
  122. int X, int Y);
  123. void __fastcall QueueView3Enter(TObject *Sender);
  124. void __fastcall QueueView3SelectItem(TObject *Sender, TListItem *Item,
  125. bool Selected);
  126. void __fastcall RemoteFileControlDDFileOperation(TObject * Sender,
  127. int Effect, UnicodeString SourcePath, UnicodeString TargetPath,
  128. bool & DoOperation);
  129. void __fastcall RemoteFileContolDDChooseEffect(TObject * Sender,
  130. int grfKeyState, int & dwEffect);
  131. void __fastcall RemoteFileControlDDDragFileName(TObject * Sender,
  132. TRemoteFile * File, UnicodeString & FileName);
  133. void __fastcall RemoteFileControlDDDragDetect(TObject * Sender,
  134. int grfKeyState, const TPoint & DetectStart, const TPoint & Point,
  135. TDragDetectStatus DragStatus);
  136. void __fastcall RemoteFileControlDDQueryContinueDrag(TObject *Sender,
  137. BOOL FEscapePressed, int grfKeyState, HRESULT &Result);
  138. void __fastcall RemoteDirViewEnter(TObject *Sender);
  139. void __fastcall RemoteDriveViewEnter(TObject *Sender);
  140. void __fastcall DirViewMatchMask(TObject *Sender, UnicodeString FileName,
  141. bool Directory, __int64 Size, TDateTime Modification,
  142. UnicodeString Masks, bool &Matches, bool AllowImplicitMatches);
  143. void __fastcall DirViewGetOverlay(TObject *Sender, TListItem *Item,
  144. WORD &Indexes);
  145. void __fastcall DirViewHistoryChange(TCustomDirView *Sender);
  146. void __fastcall RemoteStatusBarClick(TObject *Sender);
  147. void __fastcall DirViewLoaded(TObject *Sender);
  148. void __fastcall ToolbarGetBaseSize(TTBCustomToolbar * Toolbar, TPoint & ASize);
  149. void __fastcall FormConstrainedResize(TObject * Sender, int & MinWidth,
  150. int &MinHeight, int &MaxWidth, int &MaxHeight);
  151. void __fastcall StatusBarPanelDblClick(TTBXCustomStatusBar * Sender,
  152. TTBXStatusPanel * Panel);
  153. void __fastcall RemotePathComboBoxAdjustImageIndex(
  154. TTBXComboBoxItem * Sender, const UnicodeString AText, int AIndex,
  155. int & ImageIndex);
  156. void __fastcall RemotePathComboBoxDrawItem(TTBXCustomList * Sender,
  157. TCanvas * ACanvas, TRect & ARect, int AIndex, int AHoverIndex,
  158. bool & DrawDefault);
  159. void __fastcall RemotePathComboBoxMeasureWidth(TTBXCustomList * Sender,
  160. TCanvas * ACanvas, int AIndex, int & AWidth);
  161. void __fastcall RemotePathComboBoxItemClick(TObject * Sender);
  162. void __fastcall RemotePathComboBoxCancel(TObject * Sender);
  163. void __fastcall DirViewEditing(TObject *Sender, TListItem *Item,
  164. bool &AllowEdit);
  165. void __fastcall FormActivate(TObject *Sender);
  166. void __fastcall FormShow(TObject *Sender);
  167. void __fastcall SessionsPageControlChange(TObject *Sender);
  168. void __fastcall SessionsPageControlMouseDown(TObject *Sender, TMouseButton Button,
  169. TShiftState Shift, int X, int Y);
  170. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  171. void __fastcall RemoteDirViewRead(TObject *Sender);
  172. void __fastcall DirViewSelectItem(TObject *Sender, TListItem *Item, bool Selected);
  173. void __fastcall SessionsPageControlDragDrop(TObject *Sender, TObject *Source, int X,
  174. int Y);
  175. void __fastcall SessionsPageControlDragOver(TObject *Sender, TObject *Source, int X,
  176. int Y, TDragState State, bool &Accept);
  177. void __fastcall QueueView3Exit(TObject *Sender);
  178. private:
  179. TTerminal * FTerminal;
  180. TTerminalQueue * FQueue;
  181. TTerminalQueueStatus * FQueueStatus;
  182. TCriticalSection * FQueueStatusSection;
  183. bool FQueueStatusInvalidated;
  184. bool FQueueItemInvalidated;
  185. bool FFormRestored;
  186. bool FAutoOperation;
  187. bool FForceExecution;
  188. bool FShowStatusBarHint;
  189. UnicodeString FStatusBarHint;
  190. bool FIgnoreNextSysCommand;
  191. TStringList * FErrorList;
  192. HANDLE FDDExtMutex;
  193. UnicodeString FDragExtFakeDirectory;
  194. TStrings * FDelayedDeletionList;
  195. TTimer * FDelayedDeletionTimer;
  196. TStrings * FDDFileList;
  197. __int64 FDDTotalSize;
  198. UnicodeString FDragDropSshTerminate;
  199. TOnceDoneOperation FDragDropOnceDoneOperation;
  200. HINSTANCE FOle32Library;
  201. HCURSOR FDragMoveCursor;
  202. UnicodeString FDragTempDir;
  203. bool FRefreshLocalDirectory;
  204. bool FRefreshRemoteDirectory;
  205. TListItem * FQueueActedItem;
  206. TQueueController * FQueueController;
  207. int FLastDropEffect;
  208. bool FPendingTempSpaceWarn;
  209. TEditorManager * FEditorManager;
  210. TList * FLocalEditors;
  211. TStrings * FCapturedLog;
  212. bool FDragDropOperation;
  213. UnicodeString FCopyParamDefault;
  214. UnicodeString FCopyParamAutoSelected;
  215. bool FEditingFocusedAdHocCommand;
  216. TList * FDocks;
  217. TSynchronizeController * FSynchronizeController;
  218. UnicodeString FTransferDropDownHint;
  219. int FTransferListHoverIndex;
  220. TColor FSessionColor;
  221. TPngImageList * FSessionColors;
  222. ::TTrayIcon * FTrayIcon;
  223. TCustomCommandType FLastCustomCommand;
  224. TFileMasks FDirViewMatchMask;
  225. TTBXPopupMenu * FCustomCommandMenu;
  226. TStrings * FCustomCommandLocalFileList;
  227. TStrings * FCustomCommandRemoteFileList;
  228. ITaskbarList3 * FTaskbarList;
  229. bool FShowing;
  230. int FMaxQueueLength;
  231. TDateTime FSessionsPageControlNewSessionTime;
  232. bool FAppIdle;
  233. typedef std::set<TTBCustomItem *> TItemsWithTextDisplayMode;
  234. TItemsWithTextDisplayMode FItemsWithTextDisplayMode;
  235. HWND FHiddenWindow;
  236. bool __fastcall GetEnableFocusedOperation(TOperationSide Side, int FilesOnly);
  237. bool __fastcall GetEnableSelectedOperation(TOperationSide Side, int FilesOnly);
  238. void __fastcall SetTerminal(TTerminal * value);
  239. void __fastcall SetQueue(TTerminalQueue * value);
  240. void __fastcall TransferListChange(TObject * Sender);
  241. void __fastcall TransferListDrawItem(TTBXCustomList * Sender, TCanvas * ACanvas,
  242. const TRect & ARect, int AIndex, int AHoverIndex, bool & DrawDefault);
  243. void __fastcall CloseInternalEditor(TObject * Sender);
  244. void __fastcall ForceCloseInternalEditor(TObject * Sender);
  245. void __fastcall ForceCloseLocalEditors();
  246. void __fastcall TerminalCaptureLog(const UnicodeString & AddedLine, bool StdError);
  247. void __fastcall HistoryItemClick(System::TObject* Sender);
  248. void __fastcall UpdateHistoryMenu(TOperationSide Side, bool Back);
  249. void __fastcall AdHocCustomCommandValidate(const TCustomCommandType & Command);
  250. void __fastcall SetDockAllowDrag(bool value);
  251. void __fastcall QueueSplitterDblClick(TObject * Sender);
  252. void __fastcall ApplicationMinimize(TObject * Sender);
  253. void __fastcall ApplicationRestore(TObject * Sender);
  254. void __fastcall AddQueueItem(TTransferDirection Direction,
  255. TStrings * FileList, const UnicodeString TargetDirectory,
  256. const TCopyParamType & CopyParam, int Params);
  257. void __fastcall SessionsDDDragOver(int KeyState, const TPoint & Point, int & Effect);
  258. void __fastcall SessionsDDProcessDropped(TObject * Sender, int KeyState, const TPoint & Point, int Effect);
  259. void __fastcall RemoteFileControlDragDropFileOperation(
  260. TObject * Sender, int Effect, UnicodeString TargetPath);
  261. void __fastcall SessionsDDDragEnter(_di_IDataObject DataObj, int KeyState,
  262. const TPoint & Point, int & Effect, bool & Accept);
  263. void __fastcall SessionsDDDragLeave();
  264. void __fastcall EnableDDTransferConfirmation(TObject * Sender);
  265. void __fastcall CollectItemsWithTextDisplayMode(TWinControl * Control);
  266. void __fastcall CreateHiddenWindow();
  267. static LRESULT WINAPI HiddenWindowProc(HWND HWnd, UINT Message, WPARAM WParam, LPARAM LParam);
  268. protected:
  269. TOperationSide FCurrentSide;
  270. TControl * FDDTargetControl;
  271. TProgressForm * FProgressForm;
  272. TSynchronizeProgressForm * FSynchronizeProgressForm;
  273. HANDLE FDDExtMapFile;
  274. bool FDDMoveSlipped;
  275. TTimer * FUserActionTimer;
  276. TQueueItemProxy * FPendingQueueActionItem;
  277. TTBXPopupMenu * FHistoryMenu[2][2];
  278. bool FAllowTransferPresetAutoSelect;
  279. TStrings * FNotes;
  280. TTimer * FNoteTimer;
  281. TDateTime FNoteShown;
  282. UnicodeString FNote;
  283. TObject * FNoteData;
  284. UnicodeString FNoteHints;
  285. TNotifyEvent FOnNoteClick;
  286. unsigned int FLockLevel;
  287. TImageList * FSystemImageList;
  288. bool FAlternativeDelete;
  289. TDragDropFilesEx * FSessionsDragDropFilesEx;
  290. TPoint FLastContextPopupScreenPoint;
  291. virtual bool __fastcall CopyParamDialog(TTransferDirection Direction,
  292. TTransferType Type, bool Temp, TStrings * FileList,
  293. UnicodeString & TargetDirectory, TGUICopyParamType & CopyParam, bool Confirm,
  294. bool DragDrop);
  295. virtual bool __fastcall RemoteTransferDialog(TTerminal *& Session,
  296. UnicodeString & Target, UnicodeString & FileMask, bool & DirectCopy,
  297. bool NoConfirmation, bool Move);
  298. virtual void __fastcall CreateParams(TCreateParams & Params);
  299. void __fastcall DeleteFiles(TOperationSide Side, TStrings * FileList, bool Alternative);
  300. bool __fastcall RemoteTransferFiles(TStrings * FileList, bool NoConfirmation,
  301. bool Move, TTerminal * Session);
  302. virtual void __fastcall DoDirViewExecFile(TObject * Sender, TListItem * Item, bool & AllowExec);
  303. virtual TControl * __fastcall GetComponent(Byte Component);
  304. bool __fastcall GetComponentVisible(Byte Component);
  305. virtual Boolean __fastcall GetHasDirView(TOperationSide Side);
  306. DYNAMIC void __fastcall KeyDown(Word & Key, Classes::TShiftState Shift);
  307. virtual void __fastcall RestoreFormParams();
  308. virtual void __fastcall RestoreParams();
  309. virtual void __fastcall SetComponentVisible(Byte Component, bool value);
  310. virtual void __fastcall ComponentShowing(Byte Component, bool value);
  311. virtual void __fastcall FixControlsPlacement();
  312. bool __fastcall SetProperties(TOperationSide Side, TStrings * FileList);
  313. void __fastcall CustomCommand(TStrings * FileList,
  314. const TCustomCommandType & Command, TStrings * ALocalFileList);
  315. virtual void __fastcall TerminalChanging();
  316. virtual void __fastcall TerminalChanged();
  317. virtual void __fastcall QueueChanged();
  318. void __fastcall InitStatusBar();
  319. void __fastcall UpdateStatusBar();
  320. virtual void __fastcall UpdateStatusPanelText(TTBXStatusPanel * Panel);
  321. virtual void __fastcall DoOperationFinished(TFileOperation Operation,
  322. TOperationSide Side, bool Temp, const UnicodeString & FileName, bool Success,
  323. TOnceDoneOperation & OnceDoneOperation);
  324. virtual void __fastcall DoOpenDirectoryDialog(TOpenDirectoryMode Mode, TOperationSide Side);
  325. virtual void __fastcall FileOperationProgress(
  326. TFileOperationProgressType & ProgressData, TCancelStatus & Cancel);
  327. void __fastcall OperationComplete(const TDateTime & StartTime);
  328. void __fastcall ExecutedFileChanged(const UnicodeString FileName,
  329. const TEditedFileData & Data, HANDLE UploadCompleteEvent);
  330. void __fastcall ExecutedFileReload(const UnicodeString FileName,
  331. const TEditedFileData & Data);
  332. void __fastcall ExecutedFileEarlyClosed(const TEditedFileData & Data,
  333. bool & KeepOpen);
  334. inline void __fastcall CMAppSysCommand(TMessage & Message);
  335. inline void __fastcall WMAppCommand(TMessage & Message);
  336. inline void __fastcall WMSysCommand(TMessage & Message);
  337. virtual void __fastcall SysResizing(unsigned int Cmd);
  338. DYNAMIC void __fastcall DoShow();
  339. TStrings * __fastcall CreateVisitedDirectories(TOperationSide Side);
  340. void __fastcall HandleErrorList(TStringList *& ErrorList);
  341. void __fastcall TerminalSynchronizeDirectory(const UnicodeString LocalDirectory,
  342. const UnicodeString RemoteDirectory, bool & Continue, bool Collect);
  343. void __fastcall DoSynchronize(TSynchronizeController * Sender,
  344. const UnicodeString LocalDirectory, const UnicodeString RemoteDirectory,
  345. const TCopyParamType & CopyParam, const TSynchronizeParamType & Params,
  346. TSynchronizeChecklist ** Checklist, TSynchronizeOptions * Options, bool Full);
  347. void __fastcall DoSynchronizeInvalid(TSynchronizeController * Sender,
  348. const UnicodeString Directory, const UnicodeString ErrorStr);
  349. void __fastcall DoSynchronizeTooManyDirectories(TSynchronizeController * Sender,
  350. int & MaxDirectories);
  351. void __fastcall Synchronize(const UnicodeString LocalDirectory,
  352. const UnicodeString RemoteDirectory, TSynchronizeMode Mode,
  353. const TCopyParamType & CopyParam, int Params, TSynchronizeChecklist ** Checklist,
  354. TSynchronizeOptions * Options);
  355. void __fastcall GetSynchronizeOptions(int Params, TSynchronizeOptions & Options);
  356. bool __fastcall SynchronizeAllowSelectedOnly();
  357. virtual void __fastcall BatchStart(void *& Storage);
  358. virtual void __fastcall BatchEnd(void * Storage);
  359. bool __fastcall ExecuteFileOperation(TFileOperation Operation, TOperationSide Side,
  360. TStrings * FileList, bool NoConfirmation, void * Param);
  361. virtual bool __fastcall DDGetTarget(UnicodeString & Directory, bool & Internal);
  362. virtual void __fastcall DDExtInitDrag(TFileList * FileList, bool & Created);
  363. virtual void __fastcall SideEnter(TOperationSide Side);
  364. virtual TOperationSide __fastcall GetSide(TOperationSide Side);
  365. virtual void __fastcall PanelExportStore(TOperationSide Side,
  366. TPanelExport Export, TPanelExportDestination Destination,
  367. TStringList * ExportData);
  368. void __fastcall QueueListUpdate(TTerminalQueue * Queue);
  369. void __fastcall QueueItemUpdate(TTerminalQueue * Queue, TQueueItem * Item);
  370. void __fastcall UpdateQueueStatus(bool QueueChanging);
  371. void __fastcall RefreshQueueItems();
  372. virtual int __fastcall GetStaticComponentsHeight();
  373. void __fastcall FillQueueViewItem(TListItem * Item,
  374. TQueueItemProxy * QueueItem, bool Detail);
  375. void __fastcall QueueViewDeleteItem(int Index);
  376. void __fastcall UserActionTimer(TObject * Sender);
  377. void __fastcall UpdateQueueView();
  378. bool __fastcall CanCloseQueue();
  379. virtual bool __fastcall IsFileControl(TObject * Control, TOperationSide Side);
  380. virtual void __fastcall ReloadLocalDirectory(const UnicodeString Directory = L"");
  381. virtual bool __fastcall PanelOperation(TOperationSide Side, bool DragDrop);
  382. void __fastcall DoWarnLackOfTempSpace(const UnicodeString Path,
  383. __int64 RequiredSpace, bool & Continue);
  384. void __fastcall AddDelayedDirectoryDeletion(const UnicodeString TempDir, int SecDelay);
  385. void __fastcall DoDelayedDeletion(TObject * Sender);
  386. TDragDropFilesEx * __fastcall DragDropFiles(TObject * Sender);
  387. void __fastcall RemoteFileControlDDTargetDrop();
  388. bool __fastcall RemoteFileControlFileOperation(TObject * Sender,
  389. TFileOperation Operation, bool NoConfirmation, void * Param);
  390. void __fastcall DDDownload(TStrings * FilesToCopy,
  391. const UnicodeString TargetDir, const TCopyParamType * CopyParam, int Params);
  392. bool __fastcall EnsureCommandSessionFallback(TFSCapability Capability);
  393. bool __fastcall CommandSessionFallback();
  394. void __fastcall FileTerminalRemoved(const UnicodeString FileName,
  395. TEditedFileData & Data, TObject * Token, void * Arg);
  396. void __fastcall FileConfigurationChanged(const UnicodeString FileName,
  397. TEditedFileData & Data, TObject * Token, void * Arg);
  398. void __fastcall CustomExecuteFile(TOperationSide Side,
  399. TExecuteFileBy ExecuteFileBy, UnicodeString FileName, UnicodeString OriginalFileName,
  400. const TEditorData * ExternalEditor, UnicodeString LocalRootDirectory,
  401. UnicodeString RemoteDirectory);
  402. void __fastcall ExecuteFile(TOperationSide Side,
  403. TExecuteFileBy ExecuteFileBy, const TEditorData * ExternalEditor,
  404. UnicodeString FullFileName, TObject * Object,
  405. const TFileMasks::TParams & MaskParams);
  406. bool __fastcall RemoteExecuteForceText(TExecuteFileBy ExecuteFileBy,
  407. const TEditorData * ExternalEditor);
  408. void __fastcall ExecuteFileNormalize(TExecuteFileBy & ExecuteFileBy,
  409. const TEditorData *& ExternalEditor, const UnicodeString & FileName,
  410. bool Local, const TFileMasks::TParams & MaskParams);
  411. void __fastcall TemporaryDirectoryForRemoteFiles(
  412. UnicodeString RemoteDirectory, TCopyParamType CopyParam,
  413. UnicodeString & Result, UnicodeString & RootDirectory);
  414. void __fastcall TemporarilyDownloadFiles(TStrings * FileList, bool ForceText,
  415. UnicodeString & RootTempDir, UnicodeString & TempDir, bool AllFiles, bool GetTargetNames,
  416. bool AutoOperation);
  417. void __fastcall LocalEditorClosed(TObject * Sender, bool Forced);
  418. TTBXPopupMenu * __fastcall HistoryMenu(TOperationSide Side, bool Back);
  419. UnicodeString __fastcall FileStatusBarText(const TStatusFileInfo & FileInfo);
  420. void __fastcall UpdateFileStatusBar(TTBXStatusBar * StatusBar,
  421. const TStatusFileInfo & FileInfo, int Panel);
  422. virtual void __fastcall DoDirViewLoaded(TCustomDirView * Sender);
  423. virtual void __fastcall UpdateControls();
  424. void __fastcall UpdateTransferList();
  425. void __fastcall UpdateTransferLabel();
  426. void __fastcall StartUpdates();
  427. void __fastcall TransferPresetAutoSelect();
  428. virtual void __fastcall GetTransferPresetAutoSelectData(TCopyParamRuleData & Data);
  429. inline bool __fastcall CustomCommandRemoteAllowed();
  430. void __fastcall CustomCommandMenu(TObject * Sender, const TPoint & MousePos,
  431. TStrings * LocalFileList, TStrings * RemoteFileList);
  432. void __fastcall LoadToolbarsLayoutStr(UnicodeString LayoutStr);
  433. UnicodeString __fastcall GetToolbarsLayoutStr();
  434. virtual void __fastcall Dispatch(void * Message);
  435. void __fastcall PostComponentHide(Byte Component);
  436. void __fastcall GetSpaceAvailable(const UnicodeString Path,
  437. TSpaceAvailable & ASpaceAvailable, bool & Close);
  438. void __fastcall CalculateSize(TStrings * FileList, __int64 & Size,
  439. TCalculateSizeStats & Stats, bool & Close);
  440. void __fastcall CalculateChecksum(const UnicodeString & Alg, TStrings * FileList,
  441. TCalculatedChecksumEvent OnCalculatedChecksum, bool & Close);
  442. void __fastcall UpdateCustomCommandsToolbar();
  443. virtual void __fastcall UpdateActions();
  444. void __fastcall SetSessionColor(TColor value);
  445. void __fastcall NoteTimer(TObject * Sender);
  446. void __fastcall AddNote(UnicodeString Note, bool UpdateNow = true);
  447. void __fastcall PostNote(UnicodeString Note, unsigned int Seconds,
  448. TNotifyEvent OnNoteClick, TObject * NoteData);
  449. bool __fastcall CancelNote();
  450. void __fastcall UpdatesChecked();
  451. void __fastcall UpdatesNoteClicked(TObject * Sender);
  452. void __fastcall TransferPresetNoteClicked(TObject * Sender);
  453. void __fastcall TransferPresetNoteMessage(TTransferPresetNoteData * NoteData,
  454. bool AllowNeverAskAgain);
  455. void __fastcall UpdateTrayIcon();
  456. void __fastcall TrayIconClick(TObject * Sender);
  457. void __fastcall Notify(TTerminal * Terminal, UnicodeString Message,
  458. TQueryType Type, bool Important = false, TNotifyEvent OnClick = NULL,
  459. Exception * E = NULL);
  460. virtual void __fastcall UpdateSessionData(TSessionData * Data);
  461. virtual void __fastcall UpdateRemotePathComboBox(
  462. TTBXComboBoxItem * RemotePathComboBox, bool TextOnly);
  463. virtual void __fastcall ToolbarItemResize(TTBXCustomDropDownItem * Item, int Width);
  464. virtual void __fastcall CreateWnd();
  465. virtual void __fastcall DestroyWnd();
  466. void __fastcall ClickToolbarItem(TTBCustomItem * Item, bool PositionCursor);
  467. virtual bool __fastcall OpenBookmark(UnicodeString Local, UnicodeString Remote);
  468. void __fastcall DoFindFiles(UnicodeString Directory, const TFileMasks & FileMask,
  469. TFileFoundEvent OnFileFound, TFindingFileEvent OnFindingFile);
  470. virtual void __fastcall DoFocusRemotePath(UnicodeString Path);
  471. bool __fastcall ExecuteFileOperation(TFileOperation Operation, TOperationSide Side,
  472. bool OnFocused, bool NoConfirmation = false, void * Param = NULL);
  473. void __fastcall UpdateCopyParamCounters(const TCopyParamType & CopyParam);
  474. int __fastcall AddSessionColor(TColor Color, bool Shadowed);
  475. void __fastcall UpdateSessionTab(TTabSheet * TabSheet);
  476. void __fastcall UpdateNewSessionTab();
  477. void __fastcall AddNewSessionImage();
  478. void __fastcall ExecuteNewInstance(const UnicodeString & Param);
  479. TObjectList * __fastcall DoCollectWorkspace();
  480. void __fastcall DoSaveWorkspace(const UnicodeString & Name,
  481. TObjectList * DataList, bool SavePasswords);
  482. virtual bool __fastcall EligibleForImageDisplayMode(TTBCustomItem * Item);
  483. virtual bool __fastcall UpdateToolbarDisplayMode();
  484. virtual void __fastcall QueueLabelUpdateStatus();
  485. void __fastcall EditorAutoConfig();
  486. void __fastcall DirViewContextPopupDefaultItem(
  487. TOperationSide Side, TTBXItem * Item, TDoubleClickAction DoubleClickAction);
  488. void __fastcall DirViewContextPopup(
  489. TOperationSide Side, Byte PopupComponent, const TPoint & MousePos);
  490. bool __fastcall CommandLineFromAnotherInstance(const UnicodeString & CommandLine);
  491. void __fastcall SetQueueProgress();
  492. void __fastcall UpdateQueueLabel();
  493. public:
  494. virtual __fastcall ~TCustomScpExplorerForm();
  495. void __fastcall AddBookmark(TOperationSide Side);
  496. virtual void __fastcall AddEditLink(TOperationSide Side, bool Add);
  497. bool __fastcall CanAddEditLink(TOperationSide Side);
  498. bool __fastcall LinkFocused();
  499. virtual Boolean __fastcall AllowedAction(TAction * Action, TActionAllowed Allowed) = 0;
  500. virtual void __fastcall ConfigurationChanged();
  501. void __fastcall CreateDirectory(TOperationSide Side);
  502. void __fastcall ExecuteFileOperationCommand(TFileOperation Operation, TOperationSide Side,
  503. bool OnFocused, bool NoConfirmation = false, void * Param = NULL);
  504. void __fastcall AdHocCustomCommand(bool OnFocused);
  505. virtual TCustomDirView * __fastcall DirView(TOperationSide Side);
  506. virtual void __fastcall ChangePath(TOperationSide Side) = 0;
  507. virtual void __fastcall StoreParams();
  508. int __fastcall CustomCommandState(const TCustomCommandType & Command, bool OnFocused);
  509. int __fastcall BothCustomCommandState(const TCustomCommandType & Command);
  510. bool __fastcall GetLastCustomCommand(bool OnFocused,
  511. TCustomCommandType & CustomCommand, int & State);
  512. void __fastcall LastCustomCommand(bool OnFocused);
  513. void __fastcall BothCustomCommand(const TCustomCommandType & Command);
  514. void __fastcall LockWindow();
  515. void __fastcall UnlockWindow();
  516. void __fastcall NewSession(bool FromSite);
  517. void __fastcall DuplicateSession();
  518. void __fastcall CloseSession();
  519. void __fastcall OpenDirectory(TOperationSide Side);
  520. virtual void __fastcall HomeDirectory(TOperationSide Side);
  521. void __fastcall OpenStoredSession(TSessionData * Data);
  522. void __fastcall OpenFolderOrWorkspace(const UnicodeString & Name);
  523. void __fastcall Idle();
  524. __fastcall TCustomScpExplorerForm(TComponent* Owner);
  525. void __fastcall SaveCurrentSession();
  526. bool __fastcall SaveWorkspace(bool EnableAutoSave);
  527. virtual void __fastcall CompareDirectories();
  528. void __fastcall ExecuteCurrentFile();
  529. virtual void __fastcall OpenConsole(UnicodeString Command = L"");
  530. virtual void __fastcall UpdateTerminal(TTerminal * Terminal);
  531. virtual void __fastcall SynchronizeDirectories();
  532. virtual void __fastcall FullSynchronizeDirectories() = 0;
  533. virtual void __fastcall ExploreLocalDirectory();
  534. virtual void __fastcall GoToCommandLine();
  535. virtual void __fastcall GoToTree();
  536. virtual void __fastcall PanelExport(TOperationSide Side, TPanelExport Export,
  537. TPanelExportDestination Destination, bool OnFocused = false);
  538. void __fastcall Filter(TOperationSide Side);
  539. void __fastcall ExecuteFile(TOperationSide Side, TExecuteFileBy ExecuteFileBy,
  540. const TEditorData * ExternalEditor = NULL, bool AllSelected = false,
  541. bool OnFocused = false);
  542. void __fastcall ExecuteCurrentFileWith();
  543. void __fastcall EditNew(TOperationSide Side);
  544. bool __fastcall AllowQueueOperation(TQueueOperation Operation, void ** Param = NULL);
  545. void __fastcall ExecuteQueueOperation(TQueueOperation Operation, void * Param = NULL);
  546. TQueueOperation __fastcall DefaultQueueOperation();
  547. bool __fastcall GetQueueEnabled();
  548. void __fastcall ToggleQueueEnabled();
  549. UnicodeString __fastcall GetQueueProgressTitle();
  550. void __fastcall LastTerminalClosed(TObject * Sender);
  551. void __fastcall TerminalRemoved(TObject * Sender);
  552. void __fastcall TerminalListChanged(TObject * Sender);
  553. void __fastcall ApplicationTitleChanged();
  554. unsigned int __fastcall MoreMessageDialog(const UnicodeString Message,
  555. TStrings * MoreMessages, TQueryType Type, unsigned int Answers,
  556. UnicodeString HelpKeyword, const TMessageParams * Params = NULL,
  557. TTerminal * Terminal = NULL);
  558. void __fastcall OperationFinished(TFileOperation Operation, TOperationSide Side,
  559. bool Temp, const UnicodeString & FileName, bool Success, TOnceDoneOperation & OnceDoneOperation);
  560. void __fastcall OperationProgress(TFileOperationProgressType & ProgressData, TCancelStatus & Cancel);
  561. void __fastcall ShowExtendedException(TTerminal * Terminal, Exception * E);
  562. void __fastcall InactiveTerminalException(TTerminal * Terminal, Exception * E);
  563. void __fastcall TerminalReady();
  564. void __fastcall QueueEvent(TTerminal * Terminal, TTerminalQueue * Queue, TQueueEvent Event);
  565. bool __fastcall DoSynchronizeDirectories(UnicodeString & LocalDirectory,
  566. UnicodeString & RemoteDirectory, bool UseDefaults);
  567. bool __fastcall DoFullSynchronizeDirectories(UnicodeString & LocalDirectory,
  568. UnicodeString & RemoteDirectory, TSynchronizeMode & Mode, bool & SaveMode,
  569. bool UseDefaults);
  570. bool __fastcall CanPasteFromClipBoard();
  571. void __fastcall PasteFromClipBoard();
  572. void __fastcall ToggleQueueVisibility();
  573. virtual UnicodeString __fastcall PathForCaption();
  574. void __fastcall FileListFromClipboard();
  575. void __fastcall PreferencesDialog(TPreferencesMode APreferencesMode);
  576. void __fastcall WhatsThis();
  577. virtual void __fastcall BeforeAction();
  578. void __fastcall FileSystemInfo();
  579. void __fastcall SessionColorPick();
  580. void __fastcall ReadDirectoryCancelled();
  581. void __fastcall SynchronizeBrowsingChanged();
  582. void __fastcall ToggleShowHiddenFiles();
  583. void __fastcall ToggleFormatSizeBytes();
  584. void __fastcall ToggleAutoReadDirectoryAfterOp();
  585. void __fastcall PopupTrayBalloon(TTerminal * Terminal, const UnicodeString & Str,
  586. TQueryType Type, Exception * E = NULL, unsigned int Seconds = 0,
  587. TNotifyEvent OnBalloonClick = NULL);
  588. void __fastcall RemoteFindFiles();
  589. virtual void __fastcall HistoryGo(TOperationSide Side, int Index);
  590. void __fastcall UpdateTaskbarList(ITaskbarList3 * TaskbarList);
  591. virtual void __fastcall DisplaySystemContextMenu();
  592. bool __fastcall HandleMouseWheel(WPARAM WParam, LPARAM LParam);
  593. static bool __fastcall OpenInNewWindow();
  594. __property bool ComponentVisible[Byte Component] = { read = GetComponentVisible, write = SetComponentVisible };
  595. __property bool EnableFocusedOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 0 };
  596. __property bool EnableSelectedOperation[TOperationSide Side] = { read = GetEnableSelectedOperation, index = 0 };
  597. __property bool EnableFocusedFileOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 1 };
  598. __property bool EnableSelectedFileOperation[TOperationSide Side] = { read = GetEnableSelectedOperation, index = 1 };
  599. __property bool HasDirView[TOperationSide Side] = { read = GetHasDirView };
  600. __property TTerminal * Terminal = { read = FTerminal, write = SetTerminal };
  601. __property TTerminalQueue * Queue = { read = FQueue, write = SetQueue };
  602. __property TColor SessionColor = { read = FSessionColor, write = SetSessionColor };
  603. };
  604. //---------------------------------------------------------------------------
  605. #endif