CustomScpExplorer.h 37 KB

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