CustomScpExplorer.h 33 KB

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