CustomScpExplorer.h 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  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. 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. bool __fastcall GetEnableFocusedOperation(TOperationSide Side, int FilesOnly);
  242. bool __fastcall GetEnableSelectedOperation(TOperationSide Side, int FilesOnly);
  243. void __fastcall SetTerminal(TTerminal * value);
  244. void __fastcall SetQueue(TTerminalQueue * value);
  245. void __fastcall TransferListChange(TObject * Sender);
  246. void __fastcall TransferListDrawItem(TTBXCustomList * Sender, TCanvas * ACanvas,
  247. const TRect & ARect, int AIndex, int AHoverIndex, bool & DrawDefault);
  248. void __fastcall CloseInternalEditor(TObject * Sender);
  249. void __fastcall ForceCloseInternalEditor(TObject * Sender);
  250. void __fastcall ForceCloseLocalEditors();
  251. void __fastcall TerminalCaptureLog(const UnicodeString & AddedLine, bool StdError);
  252. void __fastcall HistoryItemClick(System::TObject* Sender);
  253. void __fastcall UpdateHistoryMenu(TOperationSide Side, bool Back);
  254. void __fastcall AdHocCustomCommandValidate(const TCustomCommandType & Command);
  255. void __fastcall SetDockAllowDrag(bool value);
  256. void __fastcall QueueSplitterDblClick(TObject * Sender);
  257. void __fastcall ApplicationMinimize(TObject * Sender);
  258. void __fastcall ApplicationRestore(TObject * Sender);
  259. void __fastcall AddQueueItem(TTransferDirection Direction,
  260. TStrings * FileList, const UnicodeString TargetDirectory,
  261. const TCopyParamType & CopyParam, int Params);
  262. void __fastcall SessionsDDDragOver(int KeyState, const TPoint & Point, int & Effect);
  263. void __fastcall SessionsDDProcessDropped(TObject * Sender, int KeyState, const TPoint & Point, int Effect);
  264. void __fastcall RemoteFileControlDragDropFileOperation(
  265. TObject * Sender, int Effect, UnicodeString TargetPath);
  266. void __fastcall SessionsDDDragEnter(_di_IDataObject DataObj, int KeyState,
  267. const TPoint & Point, int & Effect, bool & Accept);
  268. void __fastcall SessionsDDDragLeave();
  269. void __fastcall EnableDDTransferConfirmation(TObject * Sender);
  270. void __fastcall CollectItemsWithTextDisplayMode(TWinControl * Control);
  271. void __fastcall CreateHiddenWindow();
  272. static LRESULT WINAPI HiddenWindowProc(HWND HWnd, UINT Message, WPARAM WParam, LPARAM LParam);
  273. protected:
  274. TOperationSide FCurrentSide;
  275. bool FEverShown;
  276. TControl * FDDTargetControl;
  277. TProgressForm * FProgressForm;
  278. TSynchronizeProgressForm * FSynchronizeProgressForm;
  279. HANDLE FDDExtMapFile;
  280. bool FDDMoveSlipped;
  281. TTimer * FUserActionTimer;
  282. TQueueItemProxy * FPendingQueueActionItem;
  283. TTBXPopupMenu * FHistoryMenu[2][2];
  284. bool FAllowTransferPresetAutoSelect;
  285. TStrings * FNotes;
  286. TTimer * FNoteTimer;
  287. TDateTime FNoteShown;
  288. UnicodeString FNote;
  289. TObject * FNoteData;
  290. UnicodeString FNoteHints;
  291. TNotifyEvent FOnNoteClick;
  292. unsigned int FLockLevel;
  293. unsigned int FLockSuspendLevel;
  294. bool FDisabledOnLockSuspend;
  295. TImageList * FSystemImageList;
  296. bool FAlternativeDelete;
  297. TDragDropFilesEx * FSessionsDragDropFilesEx;
  298. TPoint FLastContextPopupScreenPoint;
  299. virtual bool __fastcall CopyParamDialog(TTransferDirection Direction,
  300. TTransferType Type, bool Temp, TStrings * FileList,
  301. UnicodeString & TargetDirectory, TGUICopyParamType & CopyParam, bool Confirm,
  302. bool DragDrop);
  303. virtual bool __fastcall RemoteTransferDialog(TTerminal *& Session,
  304. UnicodeString & Target, UnicodeString & FileMask, bool & DirectCopy,
  305. bool NoConfirmation, bool Move);
  306. virtual void __fastcall CreateParams(TCreateParams & Params);
  307. void __fastcall DeleteFiles(TOperationSide Side, TStrings * FileList, bool Alternative);
  308. bool __fastcall RemoteTransferFiles(TStrings * FileList, bool NoConfirmation,
  309. bool Move, TTerminal * Session);
  310. virtual void __fastcall DoDirViewExecFile(TObject * Sender, TListItem * Item, bool & AllowExec);
  311. virtual TControl * __fastcall GetComponent(Byte Component);
  312. bool __fastcall GetComponentVisible(Byte Component);
  313. virtual Boolean __fastcall GetHasDirView(TOperationSide Side);
  314. DYNAMIC void __fastcall KeyDown(Word & Key, Classes::TShiftState Shift);
  315. virtual void __fastcall RestoreFormParams();
  316. virtual void __fastcall RestoreParams();
  317. virtual void __fastcall SetComponentVisible(Byte Component, bool value);
  318. virtual void __fastcall ComponentShowing(Byte Component, bool value);
  319. virtual void __fastcall FixControlsPlacement();
  320. bool __fastcall SetProperties(TOperationSide Side, TStrings * FileList);
  321. void __fastcall CustomCommand(TStrings * FileList,
  322. const TCustomCommandType & Command, TStrings * ALocalFileList);
  323. virtual void __fastcall TerminalChanging();
  324. virtual void __fastcall TerminalChanged();
  325. virtual void __fastcall QueueChanged();
  326. void __fastcall InitStatusBar();
  327. void __fastcall UpdateStatusBar();
  328. virtual void __fastcall UpdateStatusPanelText(TTBXStatusPanel * Panel);
  329. virtual void __fastcall DoOperationFinished(TFileOperation Operation,
  330. TOperationSide Side, bool Temp, const UnicodeString & FileName, bool Success,
  331. TOnceDoneOperation & OnceDoneOperation);
  332. virtual void __fastcall DoOpenDirectoryDialog(TOpenDirectoryMode Mode, TOperationSide Side);
  333. virtual void __fastcall FileOperationProgress(
  334. TFileOperationProgressType & ProgressData, TCancelStatus & Cancel);
  335. void __fastcall OperationComplete(const TDateTime & StartTime);
  336. void __fastcall ExecutedFileChanged(const UnicodeString FileName,
  337. TEditedFileData * Data, HANDLE UploadCompleteEvent);
  338. void __fastcall ExecutedFileReload(const UnicodeString FileName,
  339. const TEditedFileData * Data);
  340. void __fastcall ExecutedFileEarlyClosed(const TEditedFileData * Data,
  341. bool & KeepOpen);
  342. inline void __fastcall CMAppSysCommand(TMessage & Message);
  343. inline void __fastcall WMAppCommand(TMessage & Message);
  344. inline void __fastcall WMSysCommand(TMessage & Message);
  345. void __fastcall WMQueryEndSession(TMessage & Message);
  346. void __fastcall WMEndSession(TWMEndSession & Message);
  347. void __fastcall WMCopyData(TMessage & Message);
  348. virtual void __fastcall SysResizing(unsigned int Cmd);
  349. DYNAMIC void __fastcall DoShow();
  350. TStrings * __fastcall CreateVisitedDirectories(TOperationSide Side);
  351. void __fastcall HandleErrorList(TStringList *& ErrorList);
  352. void __fastcall TerminalSynchronizeDirectory(const UnicodeString LocalDirectory,
  353. const UnicodeString RemoteDirectory, bool & Continue, bool Collect);
  354. void __fastcall DoSynchronize(TSynchronizeController * Sender,
  355. const UnicodeString LocalDirectory, const UnicodeString RemoteDirectory,
  356. const TCopyParamType & CopyParam, const TSynchronizeParamType & Params,
  357. TSynchronizeChecklist ** Checklist, TSynchronizeOptions * Options, bool Full);
  358. void __fastcall DoSynchronizeInvalid(TSynchronizeController * Sender,
  359. const UnicodeString Directory, const UnicodeString ErrorStr);
  360. void __fastcall DoSynchronizeTooManyDirectories(TSynchronizeController * Sender,
  361. int & MaxDirectories);
  362. void __fastcall Synchronize(const UnicodeString LocalDirectory,
  363. const UnicodeString RemoteDirectory, TSynchronizeMode Mode,
  364. const TCopyParamType & CopyParam, int Params, TSynchronizeChecklist ** Checklist,
  365. TSynchronizeOptions * Options);
  366. void __fastcall GetSynchronizeOptions(int Params, TSynchronizeOptions & Options);
  367. bool __fastcall SynchronizeAllowSelectedOnly();
  368. virtual void __fastcall BatchStart(void *& Storage);
  369. virtual void __fastcall BatchEnd(void * Storage);
  370. bool __fastcall ExecuteFileOperation(TFileOperation Operation, TOperationSide Side,
  371. TStrings * FileList, bool NoConfirmation, void * Param);
  372. virtual bool __fastcall DDGetTarget(UnicodeString & Directory, bool & Internal);
  373. virtual void __fastcall DDExtInitDrag(TFileList * FileList, bool & Created);
  374. virtual void __fastcall SideEnter(TOperationSide Side);
  375. virtual TOperationSide __fastcall GetSide(TOperationSide Side);
  376. virtual void __fastcall PanelExportStore(TOperationSide Side,
  377. TPanelExport Export, TPanelExportDestination Destination,
  378. TStringList * ExportData);
  379. void __fastcall QueueListUpdate(TTerminalQueue * Queue);
  380. void __fastcall QueueItemUpdate(TTerminalQueue * Queue, TQueueItem * Item);
  381. void __fastcall UpdateQueueStatus(bool QueueChanging);
  382. void __fastcall RefreshQueueItems();
  383. virtual int __fastcall GetStaticComponentsHeight();
  384. void __fastcall FillQueueViewItem(TListItem * Item,
  385. TQueueItemProxy * QueueItem, bool Detail);
  386. void __fastcall QueueViewDeleteItem(int Index);
  387. void __fastcall UserActionTimer(TObject * Sender);
  388. void __fastcall UpdateQueueView();
  389. bool __fastcall CanCloseQueue();
  390. virtual bool __fastcall IsFileControl(TObject * Control, TOperationSide Side);
  391. virtual void __fastcall ReloadLocalDirectory(const UnicodeString Directory = L"");
  392. virtual bool __fastcall PanelOperation(TOperationSide Side, bool DragDrop);
  393. void __fastcall DoWarnLackOfTempSpace(const UnicodeString Path,
  394. __int64 RequiredSpace, bool & Continue);
  395. void __fastcall AddDelayedDirectoryDeletion(const UnicodeString TempDir, int SecDelay);
  396. void __fastcall DoDelayedDeletion(TObject * Sender);
  397. TDragDropFilesEx * __fastcall DragDropFiles(TObject * Sender);
  398. void __fastcall RemoteFileControlDDTargetDrop();
  399. bool __fastcall RemoteFileControlFileOperation(TObject * Sender,
  400. TFileOperation Operation, bool NoConfirmation, void * Param);
  401. void __fastcall DDDownload(TStrings * FilesToCopy,
  402. const UnicodeString TargetDir, const TCopyParamType * CopyParam, int Params);
  403. bool __fastcall EnsureCommandSessionFallback(TFSCapability Capability);
  404. bool __fastcall CommandSessionFallback();
  405. void __fastcall FileTerminalRemoved(const UnicodeString FileName,
  406. TEditedFileData * Data, TObject * Token, void * Arg);
  407. void __fastcall FileConfigurationChanged(const UnicodeString FileName,
  408. TEditedFileData * Data, TObject * Token, void * Arg);
  409. void __fastcall CustomExecuteFile(TOperationSide Side,
  410. TExecuteFileBy ExecuteFileBy, UnicodeString FileName, UnicodeString OriginalFileName,
  411. const TEditorData * ExternalEditor, UnicodeString LocalRootDirectory,
  412. UnicodeString RemoteDirectory);
  413. void __fastcall ExecuteFile(TOperationSide Side,
  414. TExecuteFileBy ExecuteFileBy, const TEditorData * ExternalEditor,
  415. UnicodeString FullFileName, TObject * Object,
  416. const TFileMasks::TParams & MaskParams);
  417. bool __fastcall RemoteExecuteForceText(TExecuteFileBy ExecuteFileBy,
  418. const TEditorData * ExternalEditor);
  419. void __fastcall ExecuteFileNormalize(TExecuteFileBy & ExecuteFileBy,
  420. const TEditorData *& ExternalEditor, const UnicodeString & FileName,
  421. bool Local, const TFileMasks::TParams & MaskParams);
  422. void __fastcall TemporaryDirectoryForRemoteFiles(
  423. UnicodeString RemoteDirectory, TCopyParamType CopyParam,
  424. UnicodeString & Result, UnicodeString & RootDirectory);
  425. void __fastcall TemporarilyDownloadFiles(TStrings * FileList, bool ForceText,
  426. UnicodeString & RootTempDir, UnicodeString & TempDir, bool AllFiles, bool GetTargetNames,
  427. bool AutoOperation);
  428. void __fastcall LocalEditorClosed(TObject * Sender, bool Forced);
  429. TTBXPopupMenu * __fastcall HistoryMenu(TOperationSide Side, bool Back);
  430. UnicodeString __fastcall FileStatusBarText(const TStatusFileInfo & FileInfo);
  431. void __fastcall UpdateFileStatusBar(TTBXStatusBar * StatusBar,
  432. const TStatusFileInfo & FileInfo, int Panel);
  433. virtual void __fastcall DoDirViewLoaded(TCustomDirView * Sender);
  434. virtual void __fastcall UpdateControls();
  435. void __fastcall UpdateTransferList();
  436. void __fastcall UpdateTransferLabel();
  437. void __fastcall StartUpdates();
  438. void __fastcall TransferPresetAutoSelect();
  439. virtual void __fastcall GetTransferPresetAutoSelectData(TCopyParamRuleData & Data);
  440. inline bool __fastcall CustomCommandRemoteAllowed();
  441. void __fastcall CustomCommandMenu(TObject * Sender, TRect Rect,
  442. TStrings * LocalFileList, TStrings * RemoteFileList);
  443. void __fastcall LoadToolbarsLayoutStr(UnicodeString LayoutStr);
  444. UnicodeString __fastcall GetToolbarsLayoutStr();
  445. virtual void __fastcall Dispatch(void * Message);
  446. void __fastcall PostComponentHide(Byte Component);
  447. void __fastcall GetSpaceAvailable(const UnicodeString Path,
  448. TSpaceAvailable & ASpaceAvailable, bool & Close);
  449. void __fastcall CalculateSize(TStrings * FileList, __int64 & Size,
  450. TCalculateSizeStats & Stats, bool & Close);
  451. void __fastcall CalculateChecksum(const UnicodeString & Alg, TStrings * FileList,
  452. TCalculatedChecksumEvent OnCalculatedChecksum, bool & Close);
  453. void __fastcall UpdateCustomCommandsToolbar();
  454. virtual void __fastcall UpdateActions();
  455. void __fastcall SetSessionColor(TColor value);
  456. void __fastcall NoteTimer(TObject * Sender);
  457. void __fastcall AddNote(UnicodeString Note, bool UpdateNow = true);
  458. void __fastcall PostNote(UnicodeString Note, unsigned int Seconds,
  459. TNotifyEvent OnNoteClick, TObject * NoteData);
  460. bool __fastcall CancelNote(bool Force);
  461. void __fastcall UpdatesChecked();
  462. void __fastcall UpdatesNoteClicked(TObject * Sender);
  463. void __fastcall TransferPresetNoteClicked(TObject * Sender);
  464. void __fastcall TransferPresetNoteMessage(TTransferPresetNoteData * NoteData,
  465. bool AllowNeverAskAgain);
  466. void __fastcall UpdateTrayIcon();
  467. void __fastcall TrayIconClick(TObject * Sender);
  468. void __fastcall Notify(TTerminal * Terminal, UnicodeString Message,
  469. TQueryType Type, bool Important = false, TNotifyEvent OnClick = NULL,
  470. TObject * UserData = NULL, Exception * E = NULL);
  471. virtual void __fastcall UpdateSessionData(TSessionData * Data);
  472. virtual void __fastcall UpdateRemotePathComboBox(
  473. TTBXComboBoxItem * RemotePathComboBox, bool TextOnly);
  474. virtual void __fastcall ToolbarItemResize(TTBXCustomDropDownItem * Item, int Width);
  475. virtual void __fastcall CreateWnd();
  476. virtual void __fastcall DestroyWnd();
  477. void __fastcall ClickToolbarItem(TTBCustomItem * Item, bool PositionCursor);
  478. virtual bool __fastcall OpenBookmark(UnicodeString Local, UnicodeString Remote);
  479. void __fastcall DoFindFiles(UnicodeString Directory, const TFileMasks & FileMask,
  480. TFileFoundEvent OnFileFound, TFindingFileEvent OnFindingFile);
  481. virtual void __fastcall DoFocusRemotePath(UnicodeString Path);
  482. bool __fastcall ExecuteFileOperation(TFileOperation Operation, TOperationSide Side,
  483. bool OnFocused, bool NoConfirmation = false, void * Param = NULL);
  484. void __fastcall UpdateCopyParamCounters(const TCopyParamType & CopyParam);
  485. int __fastcall AddSessionColor(TColor Color);
  486. void __fastcall UpdateSessionTab(TTabSheet * TabSheet);
  487. void __fastcall UpdateNewSessionTab();
  488. void __fastcall AddFixedSessionImages();
  489. int __fastcall AddFixedSessionImage(int GlyphsSourceIndex);
  490. TObjectList * __fastcall DoCollectWorkspace();
  491. void __fastcall DoSaveWorkspace(const UnicodeString & Name,
  492. TObjectList * DataList, bool SavePasswords);
  493. UnicodeString __fastcall WorkspaceName();
  494. virtual bool __fastcall EligibleForImageDisplayMode(TTBCustomItem * Item);
  495. virtual bool __fastcall UpdateToolbarDisplayMode();
  496. virtual void __fastcall QueueLabelUpdateStatus();
  497. void __fastcall EditorAutoConfig();
  498. void __fastcall DirViewContextPopupDefaultItem(
  499. TOperationSide Side, TTBXItem * Item, TDoubleClickAction DoubleClickAction);
  500. void __fastcall DirViewContextPopup(
  501. TOperationSide Side, Byte PopupComponent, const TPoint & MousePos);
  502. bool __fastcall CommandLineFromAnotherInstance(const UnicodeString & CommandLine);
  503. bool __fastcall CanCommandLineFromAnotherInstance();
  504. void __fastcall SetQueueProgress();
  505. void __fastcall UpdateQueueLabel();
  506. TTerminal * __fastcall GetSessionTabTerminal(TTabSheet * TabSheet);
  507. bool __fastcall SessionTabSwitched();
  508. void __fastcall RestoreApp();
  509. void __fastcall GoToQueue();
  510. public:
  511. virtual __fastcall ~TCustomScpExplorerForm();
  512. void __fastcall AddBookmark(TOperationSide Side);
  513. virtual void __fastcall AddEditLink(TOperationSide Side, bool Add);
  514. bool __fastcall CanAddEditLink(TOperationSide Side);
  515. bool __fastcall LinkFocused();
  516. virtual Boolean __fastcall AllowedAction(TAction * Action, TActionAllowed Allowed) = 0;
  517. virtual void __fastcall ConfigurationChanged();
  518. void __fastcall CreateDirectory(TOperationSide Side);
  519. void __fastcall ExecuteFileOperationCommand(TFileOperation Operation, TOperationSide Side,
  520. bool OnFocused, bool NoConfirmation = false, void * Param = NULL);
  521. void __fastcall AdHocCustomCommand(bool OnFocused);
  522. virtual TCustomDirView * __fastcall DirView(TOperationSide Side);
  523. virtual void __fastcall ChangePath(TOperationSide Side) = 0;
  524. virtual void __fastcall StoreParams();
  525. int __fastcall CustomCommandState(const TCustomCommandType & Command, bool OnFocused);
  526. int __fastcall BothCustomCommandState(const TCustomCommandType & Command);
  527. bool __fastcall GetLastCustomCommand(bool OnFocused,
  528. TCustomCommandType & CustomCommand, int & State);
  529. void __fastcall LastCustomCommand(bool OnFocused);
  530. void __fastcall BothCustomCommand(const TCustomCommandType & Command);
  531. void __fastcall LockWindow();
  532. void __fastcall UnlockWindow();
  533. void __fastcall SuspendWindowLock();
  534. void __fastcall ResumeWindowLock();
  535. void __fastcall NewSession(bool FromSite);
  536. void __fastcall DuplicateSession();
  537. void __fastcall CloseSession();
  538. void __fastcall OpenDirectory(TOperationSide Side);
  539. virtual void __fastcall HomeDirectory(TOperationSide Side);
  540. void __fastcall OpenStoredSession(TSessionData * Data);
  541. void __fastcall OpenFolderOrWorkspace(const UnicodeString & Name);
  542. void __fastcall Idle();
  543. __fastcall TCustomScpExplorerForm(TComponent* Owner);
  544. void __fastcall SaveCurrentSession();
  545. TSessionData * __fastcall CloneCurrentSessionData();
  546. bool __fastcall SaveWorkspace(bool EnableAutoSave);
  547. virtual void __fastcall CompareDirectories();
  548. void __fastcall ExecuteCurrentFile();
  549. virtual void __fastcall OpenConsole(UnicodeString Command = L"");
  550. virtual void __fastcall UpdateTerminal(TTerminal * Terminal);
  551. virtual void __fastcall SynchronizeDirectories();
  552. virtual void __fastcall FullSynchronizeDirectories() = 0;
  553. virtual void __fastcall ExploreLocalDirectory();
  554. virtual void __fastcall GoToCommandLine();
  555. virtual void __fastcall GoToTree();
  556. virtual void __fastcall PanelExport(TOperationSide Side, TPanelExport Export,
  557. TPanelExportDestination Destination, bool OnFocused = false);
  558. void __fastcall Filter(TOperationSide Side);
  559. void __fastcall ExecuteFile(TOperationSide Side, TExecuteFileBy ExecuteFileBy,
  560. const TEditorData * ExternalEditor = NULL, bool AllSelected = false,
  561. bool OnFocused = false);
  562. void __fastcall ExecuteCurrentFileWith();
  563. void __fastcall EditNew(TOperationSide Side);
  564. bool __fastcall AllowQueueOperation(TQueueOperation Operation, void ** Param = NULL);
  565. void __fastcall ExecuteQueueOperation(TQueueOperation Operation, void * Param = NULL);
  566. TQueueOperation __fastcall DefaultQueueOperation();
  567. bool __fastcall GetQueueEnabled();
  568. void __fastcall ToggleQueueEnabled();
  569. UnicodeString __fastcall GetQueueProgressTitle();
  570. void __fastcall LastTerminalClosed(TObject * Sender);
  571. void __fastcall TerminalRemoved(TObject * Sender);
  572. void __fastcall TerminalListChanged(TObject * Sender);
  573. void __fastcall ApplicationTitleChanged();
  574. unsigned int __fastcall MoreMessageDialog(const UnicodeString Message,
  575. TStrings * MoreMessages, TQueryType Type, unsigned int Answers,
  576. UnicodeString HelpKeyword, const TMessageParams * Params = NULL,
  577. TTerminal * Terminal = NULL);
  578. void __fastcall OperationFinished(TFileOperation Operation, TOperationSide Side,
  579. bool Temp, const UnicodeString & FileName, bool Success, TOnceDoneOperation & OnceDoneOperation);
  580. void __fastcall OperationProgress(TFileOperationProgressType & ProgressData, TCancelStatus & Cancel);
  581. void __fastcall ShowExtendedException(TTerminal * Terminal, Exception * E);
  582. void __fastcall InactiveTerminalException(TTerminal * Terminal, Exception * E);
  583. void __fastcall TerminalReady();
  584. void __fastcall QueueEvent(TTerminal * Terminal, TTerminalQueue * Queue, TQueueEvent Event);
  585. void __fastcall QueueEmptyNoteClicked(TObject * Sender);
  586. bool __fastcall DoSynchronizeDirectories(UnicodeString & LocalDirectory,
  587. UnicodeString & RemoteDirectory, bool UseDefaults);
  588. bool __fastcall DoFullSynchronizeDirectories(UnicodeString & LocalDirectory,
  589. UnicodeString & RemoteDirectory, TSynchronizeMode & Mode, bool & SaveMode,
  590. bool UseDefaults);
  591. bool __fastcall CanPasteFromClipBoard();
  592. void __fastcall PasteFromClipBoard();
  593. void __fastcall ToggleQueueVisibility();
  594. virtual UnicodeString __fastcall PathForCaption();
  595. void __fastcall FileListFromClipboard();
  596. void __fastcall PreferencesDialog(TPreferencesMode APreferencesMode);
  597. void __fastcall WhatsThis();
  598. virtual void __fastcall BeforeAction();
  599. void __fastcall FileSystemInfo();
  600. void __fastcall ReadDirectoryCancelled();
  601. void __fastcall SynchronizeBrowsingChanged();
  602. void __fastcall ToggleShowHiddenFiles();
  603. void __fastcall ToggleFormatSizeBytes();
  604. void __fastcall ToggleAutoReadDirectoryAfterOp();
  605. void __fastcall PopupTrayBalloon(TTerminal * Terminal, const UnicodeString & Str,
  606. TQueryType Type, Exception * E = NULL, unsigned int Seconds = 0,
  607. TNotifyEvent OnBalloonClick = NULL, TObject * UserData = NULL);
  608. void __fastcall RemoteFindFiles();
  609. virtual void __fastcall HistoryGo(TOperationSide Side, int Index);
  610. void __fastcall UpdateTaskbarList(ITaskbarList3 * TaskbarList);
  611. virtual void __fastcall DisplaySystemContextMenu();
  612. bool __fastcall HandleMouseWheel(WPARAM WParam, LPARAM LParam);
  613. __property bool ComponentVisible[Byte Component] = { read = GetComponentVisible, write = SetComponentVisible };
  614. __property bool EnableFocusedOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 0 };
  615. __property bool EnableSelectedOperation[TOperationSide Side] = { read = GetEnableSelectedOperation, index = 0 };
  616. __property bool EnableFocusedFileOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 1 };
  617. __property bool EnableSelectedFileOperation[TOperationSide Side] = { read = GetEnableSelectedOperation, index = 1 };
  618. __property bool HasDirView[TOperationSide Side] = { read = GetHasDirView };
  619. __property TTerminal * Terminal = { read = FTerminal, write = SetTerminal };
  620. __property TTerminalQueue * Queue = { read = FQueue, write = SetQueue };
  621. __property TColor SessionColor = { read = FSessionColor, write = SetSessionColor };
  622. };
  623. //---------------------------------------------------------------------------
  624. #endif