CustomScpExplorer.h 33 KB

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