CustomScpExplorer.h 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. //---------------------------------------------------------------------------
  2. #ifndef CustomScpExplorerH
  3. #define CustomScpExplorerH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <CustomDirView.hpp>
  10. #include <CustomUnixDirView.hpp>
  11. #include <IEListView.hpp>
  12. #include <NortonLikeListView.hpp>
  13. #include <UnixDirView.h>
  14. #include <ComCtrls.hpp>
  15. #include <ExtCtrls.hpp>
  16. #include <ToolWin.hpp>
  17. #include <WinInterface.h>
  18. #include <WinConfiguration.h>
  19. #include <Terminal.h>
  20. #include <Queue.h>
  21. #include "QueueController.h"
  22. #include "UnixDriveView.h"
  23. #include "CustomDriveView.hpp"
  24. #include "TBX.hpp"
  25. #include "TB2Dock.hpp"
  26. #include "TBXExtItems.hpp"
  27. #include "TBXStatusBars.hpp"
  28. #include "TB2Item.hpp"
  29. #include "TB2Toolbar.hpp"
  30. #include "TBXToolPals.hpp"
  31. #include "PngImageList.hpp"
  32. #include "ThemePageControl.h"
  33. #include "PathLabel.hpp"
  34. #include <Vcl.AppEvnts.hpp>
  35. //---------------------------------------------------------------------------
  36. class TProgressForm;
  37. class TSynchronizeProgressForm;
  38. class TTerminalQueue;
  39. class TTerminalQueueStatus;
  40. class TQueueItem;
  41. class TQueueItemProxy;
  42. class TQueueController;
  43. class TSynchronizeController;
  44. class TEditorManager;
  45. class TEditorData;
  46. class TTransferPresetNoteData;
  47. struct TEditedFileData;
  48. class ITaskbarList3;
  49. struct TSynchronizeParams;
  50. class TBookmark;
  51. class TManagedTerminal;
  52. class TCalculateSizeOperation;
  53. //---------------------------------------------------------------------------
  54. enum TActionAllowed { aaShortCut, aaUpdate, aaExecute };
  55. enum TActionFlag { afLocal = 1, afRemote = 2, afExplorer = 4, afCommander = 8 };
  56. enum TExecuteFileBy { efShell = 1, efInternalEditor = 2, efExternalEditor = 3, efDefaultEditor = 100 };
  57. enum TPanelExport { pePath, peFileList, peFullFileList };
  58. enum TPanelExportDestination { pedClipboard, pedCommandLine };
  59. enum TCopyOperationCommandFlag {
  60. cocNone = 0x00, cocShortCutHint = 0x01, cocQueue = 0x02, cocNonQueue = 0x04
  61. };
  62. enum TCustomCommandListType { ccltAll, ccltBoth, ccltNonFile, ccltFile };
  63. const TOperationSide osOther = osRemote;
  64. //---------------------------------------------------------------------------
  65. class TCustomScpExplorerForm : public TForm
  66. {
  67. friend class TAutoBatch;
  68. __published:
  69. TPanel *RemotePanel;
  70. TTBXStatusBar *RemoteStatusBar;
  71. TUnixDirView *RemoteDirView;
  72. TPanel *RemoteDirPanel;
  73. TTBXDock *TopDock;
  74. TListView *QueueView3;
  75. TPanel *QueuePanel;
  76. TSplitter *QueueSplitter;
  77. TTBXToolbar *QueueToolbar;
  78. TTBXDock *QueueDock;
  79. TTBXItem *QueueEnableItem;
  80. TTBXSeparatorItem *TBXSeparatorItem203;
  81. TTBXItem *TBXItem201;
  82. TTBXItem *TBXItem202;
  83. TTBXItem *TBXItem203;
  84. TTBXItem *TBXItem204;
  85. TTBXItem *TBXItem205;
  86. TTBXSeparatorItem *TBXSeparatorItem201;
  87. TTBXItem *TBXItem206;
  88. TTBXItem *TBXItem207;
  89. TTBXSeparatorItem *TBXSeparatorItem202;
  90. TTBXItem *TBXItem208;
  91. TUnixDriveView *RemoteDriveView;
  92. TPanel *RemoteDrivePanel;
  93. TSplitter *RemotePanelSplitter;
  94. TTBXItem *TBXItem194;
  95. TTBXItem *TBXItem195;
  96. TTBXSubmenuItem *TBXSubmenuItem27;
  97. TTBXItem *TBXItem211;
  98. TTBXItem *TBXItem225;
  99. TTBXItem *TBXItem226;
  100. TThemeTabSheet *TabSheet1;
  101. TThemePageControl *SessionsPageControl;
  102. TPathLabel *QueueLabel;
  103. TTBXSeparatorItem *TBXSeparatorItem57;
  104. TTBXItem *QueueDeleteAllDoneQueueToolbarItem;
  105. TTBXItem *TBXItem173;
  106. TApplicationEvents *ApplicationEvents;
  107. TTBXToolbar *ReconnectToolbar;
  108. TTBXItem *TBXItem254;
  109. TSplitter *QueueFileListSplitter;
  110. TListView *QueueFileList;
  111. TTBXDock *MessageDock;
  112. void __fastcall ApplicationMinimize(TObject * Sender);
  113. void __fastcall ApplicationRestore(TObject * Sender);
  114. void __fastcall RemoteDirViewContextPopup(TObject *Sender,
  115. const TPoint &MousePos, bool &Handled);
  116. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  117. void __fastcall RemoteDirViewDisplayProperties(TObject *Sender);
  118. void __fastcall DirViewColumnRightClick(TObject *Sender,
  119. TListColumn *Column, TPoint &Point);
  120. void __fastcall DirViewExecFile(TObject *Sender, TListItem *Item, bool &AllowExec);
  121. void __fastcall ToolBarResize(TObject *Sender);
  122. void __fastcall FileControlDDDragEnter(TObject *Sender,
  123. _di_IDataObject DataObj, int grfKeyState, const TPoint &Point,
  124. int &dwEffect, bool &Accept);
  125. void __fastcall FileControlDDDragLeave(TObject *Sender);
  126. void __fastcall RemoteFileControlDDCreateDragFileList(TObject *Sender,
  127. TFileList *FileList, bool &Created);
  128. void __fastcall RemoteFileControlDDEnd(TObject *Sender);
  129. void __fastcall RemoteFileControlDDCreateDataObject(TObject *Sender,
  130. TDataObject *&DataObject);
  131. void __fastcall RemoteFileControlDDGiveFeedback(TObject *Sender,
  132. int dwEffect, HRESULT &Result);
  133. void __fastcall QueueSplitterCanResize(TObject *Sender, int &NewSize,
  134. bool &Accept);
  135. void __fastcall QueueView3ContextPopup(TObject *Sender, TPoint &MousePos,
  136. bool &Handled);
  137. void __fastcall QueueView3Deletion(TObject *Sender, TListItem *Item);
  138. void __fastcall QueueView3StartDrag(TObject *Sender,
  139. TDragObject *&DragObject);
  140. void __fastcall QueueView3DragOver(TObject *Sender, TObject *Source,
  141. int X, int Y, TDragState State, bool &Accept);
  142. void __fastcall QueueView3DragDrop(TObject *Sender, TObject *Source,
  143. int X, int Y);
  144. void __fastcall QueueView3Enter(TObject *Sender);
  145. void __fastcall QueueView3SelectItem(TObject *Sender, TListItem *Item,
  146. bool Selected);
  147. void __fastcall RemoteFileControlDDFileOperation(
  148. TObject * Sender, int Effect, UnicodeString SourcePath, UnicodeString TargetPath,
  149. bool Paste, bool & DoOperation);
  150. void __fastcall RemoteFileContolDDChooseEffect(TObject * Sender,
  151. int grfKeyState, int & dwEffect);
  152. void __fastcall RemoteFileControlDDDragFileName(TObject * Sender,
  153. TRemoteFile * File, UnicodeString & FileName);
  154. void __fastcall RemoteFileControlDDDragDetect(TObject * Sender,
  155. int grfKeyState, const TPoint & DetectStart, const TPoint & Point,
  156. TDragDetectStatus DragStatus);
  157. void __fastcall RemoteFileControlDDQueryContinueDrag(TObject *Sender,
  158. BOOL FEscapePressed, int grfKeyState, HRESULT &Result);
  159. void __fastcall RemoteDirViewEnter(TObject *Sender);
  160. void __fastcall RemoteDriveViewEnter(TObject *Sender);
  161. void __fastcall DirViewMatchMask(TObject *Sender, UnicodeString FileName,
  162. bool Directory, __int64 Size, TDateTime Modification,
  163. UnicodeString Masks, bool &Matches, bool AllowImplicitMatches);
  164. void __fastcall DirViewGetOverlay(TObject *Sender, TListItem *Item,
  165. WORD &Indexes);
  166. void __fastcall DirViewHistoryChange(TCustomDirView *Sender);
  167. void __fastcall RemoteStatusBarClick(TObject *Sender);
  168. void __fastcall DirViewLoaded(TObject *Sender);
  169. void __fastcall ToolbarGetBaseSize(TTBCustomToolbar * Toolbar, TPoint & ASize);
  170. void __fastcall FormConstrainedResize(TObject * Sender, int & MinWidth,
  171. int &MinHeight, int &MaxWidth, int &MaxHeight);
  172. void __fastcall StatusBarPanelDblClick(TTBXCustomStatusBar * Sender,
  173. TTBXStatusPanel * Panel);
  174. void __fastcall RemotePathComboBoxAdjustImageIndex(
  175. TTBXComboBoxItem * Sender, const UnicodeString AText, int AIndex,
  176. int & ImageIndex);
  177. void __fastcall RemotePathComboBoxDrawItem(TTBXCustomList * Sender,
  178. TCanvas * ACanvas, TRect & ARect, int AIndex, int AHoverIndex,
  179. bool & DrawDefault);
  180. void __fastcall RemotePathComboBoxMeasureWidth(TTBXCustomList * Sender,
  181. TCanvas * ACanvas, int AIndex, int & AWidth);
  182. void __fastcall RemotePathComboBoxItemClick(TObject * Sender);
  183. void __fastcall RemotePathComboBoxCancel(TObject * Sender);
  184. void __fastcall DirViewEditing(TObject *Sender, TListItem *Item,
  185. bool &AllowEdit);
  186. void __fastcall FormShow(TObject *Sender);
  187. void __fastcall SessionsPageControlChange(TObject *Sender);
  188. void __fastcall SessionsPageControlMouseDown(TObject *Sender, TMouseButton Button,
  189. TShiftState Shift, int X, int Y);
  190. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  191. void __fastcall RemoteDirViewRead(TObject *Sender);
  192. void __fastcall DirViewSelectItem(TObject *Sender, TListItem *Item, bool Selected);
  193. void __fastcall SessionsPageControlDragDrop(TObject *Sender, TObject *Source, int X,
  194. int Y);
  195. void __fastcall SessionsPageControlDragOver(TObject *Sender, TObject *Source, int X,
  196. int Y, TDragState State, bool &Accept);
  197. void __fastcall QueueView3Exit(TObject *Sender);
  198. void __fastcall EditMenuItemPopup(TTBCustomItem *Sender, bool FromLink);
  199. void __fastcall DirViewBusy(TObject *Sender, int Busy, bool & Allow);
  200. void __fastcall SessionsPageControlContextPopup(TObject *Sender, TPoint &MousePos, bool &Handled);
  201. void __fastcall DockContextPopup(TObject *Sender, TPoint &MousePos, bool &Handled);
  202. void __fastcall SessionsPageControlTabButtonClick(TPageControl *Sender, int Index);
  203. void __fastcall DirViewGetItemColor(
  204. TObject * Sender, UnicodeString FileName, bool Directory, __int64 Size, TDateTime Modification, TColor & Color);
  205. void __fastcall DirViewExit(TObject *Sender);
  206. void __fastcall DirViewKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
  207. void __fastcall DirViewKeyPress(TObject *Sender, System::WideChar &Key);
  208. void __fastcall ApplicationEventsDeactivate(TObject *Sender);
  209. void __fastcall ApplicationEventsModalBegin(TObject *Sender);
  210. void __fastcall DirViewChangeFocus(TObject *Sender, TListItem *Item);
  211. void __fastcall RemoteStatusBarMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  212. void __fastcall RemoteDirViewResize(TObject *Sender);
  213. void __fastcall QueueFileListSplitterCanResize(TObject *Sender, int &NewSize, bool &Accept);
  214. void __fastcall QueueView3Change(TObject *Sender, TListItem *Item, TItemChange Change);
  215. void __fastcall QueueLabelGetStatus(TCustomPathLabel *Sender, bool &Active);
  216. void __fastcall QueueFileListEnterExit(TObject *Sender);
  217. void __fastcall QueueFileListData(TObject *Sender, TListItem *Item);
  218. void __fastcall QueueFileListCustomDrawItem(TCustomListView *Sender, TListItem *Item, TCustomDrawState State, bool &DefaultDraw);
  219. void __fastcall QueueFileListResize(TObject *Sender);
  220. void __fastcall SessionsPageControlResize(TObject *Sender);
  221. void __fastcall SessionsPageControlTabHint(TPageControl *Sender, int Index, UnicodeString &Hint);
  222. void __fastcall MessageDockRequestDock(TObject *Sender, TTBCustomDockableWindow *Bar, bool &Accept);
  223. void __fastcall QueueView3EndDrag(TObject *Sender, TObject *Target, int X, int Y);
  224. private:
  225. TManagedTerminal * FManagedSession;
  226. TTerminalQueue * FQueue;
  227. TTerminalQueueStatus * FQueueStatus;
  228. TCriticalSection * FQueueStatusSection;
  229. bool FQueueStatusInvalidated;
  230. bool FQueueItemInvalidated;
  231. bool FQueueStatusUpdating;
  232. bool FFormRestored;
  233. bool FAutoOperation;
  234. TFileOperationFinishedEvent FOnFileOperationFinished;
  235. TFileOperation FPrimaryOperation;
  236. bool FForceExecution;
  237. unsigned short FIgnoreNextDialogChar;
  238. TStringList * FErrorList;
  239. HANDLE FDDExtMutex;
  240. UnicodeString FDragFakeDirectory;
  241. TObjectList * FDragFakeMonitors;
  242. UnicodeString FClipboardFakeDirectory;
  243. std::unique_ptr<TObjectList> FClipboardFakeMonitors;
  244. bool FDownloadingFromClipboard;
  245. bool FClipboardFakeMonitorsPendingReset;
  246. std::unique_ptr<TDragDropFilesEx> FClipboardDragDropFilesEx;
  247. TManagedTerminal * FClipboardTerminal;
  248. std::unique_ptr<TStrings> FClipboardFileList;
  249. TStrings * FDelayedDeletionList;
  250. TTimer * FDelayedDeletionTimer;
  251. TStrings * FDDFileList;
  252. __int64 FDDTotalSize;
  253. std::unique_ptr<ExtException> FDragDropSshTerminate;
  254. HINSTANCE FOle32Library;
  255. HCURSOR FDragMoveCursor;
  256. UnicodeString FDragTempDir;
  257. bool FRefreshLocalDirectory;
  258. bool FRefreshRemoteDirectory;
  259. TListItem * FQueueActedItem;
  260. TQueueController * FQueueController;
  261. TListViewScrollOnDragOver * FQueueScrollOnDragOver;
  262. int FLastDropEffect;
  263. bool FPendingTempSpaceWarn;
  264. TEditorManager * FEditorManager;
  265. TList * FLocalEditors;
  266. TStrings * FCapturedLog;
  267. bool FDragDropOperation;
  268. UnicodeString FCopyParamDefault;
  269. UnicodeString FCopyParamAutoSelected;
  270. bool FEditingFocusedAdHocCommand;
  271. TList * FDocks;
  272. TSynchronizeController * FSynchronizeController;
  273. UnicodeString FTransferDropDownHint;
  274. int FTransferListHoverIndex;
  275. TColor FSessionColor;
  276. TPngImageList * FSessionColors;
  277. int FNewRemoteTabTabImageIndex;
  278. int FNewLocalTabTabImageIndex;
  279. int FSessionTabImageIndex;
  280. int FSessionColorMaskImageIndex;
  281. int FLocalBrowserTabImageIndex;
  282. ::TTrayIcon * FTrayIcon;
  283. TCustomCommandType FLastCustomCommand;
  284. TFileMasks FDirViewMatchMask;
  285. TTBXPopupMenu * FCustomCommandMenu;
  286. TStrings * FCustomCommandLocalFileList;
  287. TStrings * FCustomCommandRemoteFileList;
  288. ITaskbarList3 * FTaskbarList;
  289. bool FShowing;
  290. int FMaxQueueLength;
  291. TDateTime FSessionsPageControlNewTabTime;
  292. bool FAppIdle;
  293. typedef std::set<TTBCustomItem *> TItemsWithTextDisplayMode;
  294. TItemsWithTextDisplayMode FItemsWithTextDisplayMode;
  295. HWND FHiddenWindow;
  296. TStrings * FTransferResumeList;
  297. TStrings * FDeletedFiles;
  298. bool FMoveToQueue;
  299. bool FStandaloneOperation;
  300. TFeedSynchronizeError FOnFeedSynchronizeError;
  301. TNotifyEvent FOnSynchronizeAbort;
  302. TTerminal * FSynchronizeTerminal;
  303. bool FNeedSession;
  304. TTerminal * FFileFindTerminal;
  305. UnicodeString FFileColorsCurrent;
  306. bool FInvalid;
  307. std::unique_ptr<TQueueFileList> FQueueFileList;
  308. bool FShowingChanged;
  309. bool FStarted;
  310. bool FUpdatingSessionTabs;
  311. TCalculateSizeOperation * FCalculateSizeOperation;
  312. bool __fastcall GetEnableFocusedOperation(TOperationSide Side, int FilesOnly);
  313. bool __fastcall GetEnableSelectedOperation(TOperationSide Side, int FilesOnly);
  314. void __fastcall SetManagedSession(TManagedTerminal * value);
  315. void __fastcall DoSetManagedSession(TManagedTerminal * value, bool Replace);
  316. TManagedTerminal * GetTerminal();
  317. void __fastcall SetQueue(TTerminalQueue * value);
  318. void __fastcall TransferListChange(TObject * Sender);
  319. void __fastcall TransferListDrawItem(TTBXCustomList * Sender, TCanvas * ACanvas,
  320. const TRect & ARect, int AIndex, int AHoverIndex, bool & DrawDefault);
  321. void __fastcall CloseInternalEditor(TObject * Sender);
  322. void __fastcall ForceCloseInternalEditor(TObject * Sender);
  323. void __fastcall ForceCloseLocalEditors();
  324. void __fastcall TerminalCaptureLog(const UnicodeString & AddedLine, TCaptureOutputType OutputType);
  325. void __fastcall HistoryItemClick(System::TObject* Sender);
  326. void __fastcall UpdateHistoryMenu(TOperationSide Side, bool Back);
  327. void __fastcall AdHocCustomCommandValidate(const TCustomCommandType & Command);
  328. void __fastcall SetDockAllowDrag(bool value);
  329. void __fastcall QueueSplitterDblClick(TObject * Sender);
  330. void __fastcall QueueFileListSplitterDblClick(TObject * Sender);
  331. void __fastcall AddQueueItem(
  332. TTerminalQueue * Queue, TTransferDirection Direction,
  333. TStrings * FileList, const UnicodeString TargetDirectory,
  334. TGUICopyParamType & CopyParam, int Params);
  335. void __fastcall AddQueueItem(TTerminalQueue * Queue, TQueueItem * QueueItem, TManagedTerminal * Terminal);
  336. void __fastcall ClearTransferSourceSelection(TTransferDirection Direction);
  337. void ClearOperationSelection(TOperationSide Side);
  338. void __fastcall SessionsDDDragOver(int KeyState, const TPoint & Point, int & Effect, int PreferredEffect);
  339. void __fastcall SessionsDDProcessDropped(TObject * Sender, int KeyState, const TPoint & Point, int Effect);
  340. void __fastcall RemoteFileControlDragDropFileOperation(
  341. TObject * Sender, int Effect, UnicodeString TargetPath, bool ForceQueue, bool Paste);
  342. void __fastcall SessionsDDDragEnter(_di_IDataObject DataObj, int KeyState,
  343. const TPoint & Point, int & Effect, bool & Accept);
  344. void __fastcall SessionsDDDragLeave();
  345. void __fastcall QueueDDProcessDropped(TObject * Sender, int KeyState, const TPoint & Point, int Effect);
  346. void __fastcall QueueDDDragEnter(_di_IDataObject DataObj, int KeyState,
  347. const TPoint & Point, int & Effect, bool & Accept);
  348. void __fastcall QueueDDDragLeave();
  349. void __fastcall EnableDDTransferConfirmation(TObject * Sender);
  350. void __fastcall CollectItemsWithTextDisplayMode(TWinControl * Control);
  351. void __fastcall CreateHiddenWindow();
  352. bool __fastcall IsQueueAutoPopup();
  353. void __fastcall UpdateSessionsPageControlHeight();
  354. TDragDropFilesEx * __fastcall CreateDragDropFilesEx();
  355. void __fastcall KeyProcessed(Word & Key, TShiftState Shift);
  356. void __fastcall CheckCustomCommandShortCut(TCustomCommandList * List, Word & Key, Classes::TShiftState Shift, TShortCut KeyShortCut);
  357. void __fastcall CMShowingChanged(TMessage & Message);
  358. void __fastcall WMClose(TMessage & Message);
  359. void __fastcall CMDpiChanged(TMessage & Message);
  360. void __fastcall WMDpiChanged(TMessage & Message);
  361. void __fastcall DoBookmarkClick(TOperationSide Side, TObject * Sender);
  362. void __fastcall LocalBookmarkClick(TObject * Sender);
  363. void __fastcall RemoteBookmarkClick(TObject * Sender);
  364. void __fastcall InitControls();
  365. void __fastcall UpdateQueueFileList();
  366. void __fastcall QueueFileListColumnAutoSize();
  367. void __fastcall AdjustQueueLayout();
  368. void __fastcall StoreTransitionCloseClick(TObject * Sender);
  369. void __fastcall StoreTransitionLinkClick(TObject * Sender);
  370. protected:
  371. TOperationSide FCurrentSide;
  372. bool FEverShown;
  373. TControl * FDDTargetControl;
  374. TProgressForm * FProgressForm;
  375. TSynchronizeProgressForm * FSynchronizeProgressForm;
  376. HANDLE FDDExtMapFile;
  377. TTimer * FUserActionTimer;
  378. TQueueItemProxy * FPendingQueueActionItem;
  379. TTBXPopupMenu * FHistoryMenu[2][2];
  380. bool FAllowTransferPresetAutoSelect;
  381. bool FSessionChanging;
  382. TStrings * FNotes;
  383. TTimer * FNoteTimer;
  384. TDateTime FNoteShown;
  385. UnicodeString FNote;
  386. TObject * FNoteData;
  387. UnicodeString FNoteHints;
  388. TNotifyEvent FOnNoteClick;
  389. unsigned int FLockLevel;
  390. unsigned int FLockSuspendLevel;
  391. bool FDisabledOnLockSuspend;
  392. bool FAlternativeDelete;
  393. TDragDropFilesEx * FSessionsDragDropFilesEx;
  394. TDragDropFilesEx * FQueueDragDropFilesEx;
  395. TPoint FLastContextPopupScreenPoint;
  396. int FDoNotIdleCurrentTerminal;
  397. UnicodeString FFakeFileDropTarget;
  398. TFileColorData::TList FFileColors;
  399. UnicodeString FIncrementalSearch;
  400. int FIncrementalSearching;
  401. bool FIncrementalSearchHaveNext;
  402. TOperationSide FProgressSide;
  403. bool FImmersiveDarkMode;
  404. virtual bool __fastcall CopyParamDialog(TTransferDirection Direction,
  405. TTransferType Type, bool Temp, TStrings * FileList,
  406. UnicodeString & TargetDirectory, TGUICopyParamType & CopyParam, bool Confirm,
  407. bool DragDrop, int Options);
  408. virtual void __fastcall CopyParamDialogAfter(TTransferDirection Direction, bool Temp, const UnicodeString & TargetDirectory);
  409. virtual bool __fastcall RemoteTransferDialog(TManagedTerminal *& Session,
  410. TStrings * FileList, UnicodeString & Target, UnicodeString & FileMask, bool & DirectCopy,
  411. bool NoConfirmation, bool Move);
  412. virtual void __fastcall CreateParams(TCreateParams & Params);
  413. void __fastcall DeleteFiles(TOperationSide Side, TStrings * FileList, bool Alternative);
  414. bool __fastcall RemoteTransferFiles(TStrings * FileList, bool NoConfirmation,
  415. bool Move, TManagedTerminal * Session);
  416. virtual void __fastcall DoDirViewExecFile(TObject * Sender, TListItem * Item, bool & AllowExec);
  417. virtual TControl * __fastcall GetComponent(Byte Component);
  418. bool __fastcall GetComponentVisible(Byte Component);
  419. virtual Boolean __fastcall GetHasDirView(TOperationSide Side);
  420. virtual TCustomDriveView * __fastcall DriveView(TOperationSide Side);
  421. virtual TCustomDirView * GetCurrentLocalBrowser();
  422. DYNAMIC void __fastcall KeyDown(Word & Key, Classes::TShiftState Shift);
  423. virtual void __fastcall RestoreFormParams();
  424. virtual void __fastcall RestoreParams();
  425. virtual void __fastcall SetComponentVisible(Byte Component, bool value);
  426. virtual void __fastcall ComponentShowing(Byte Component, bool value);
  427. virtual void __fastcall FixControlsPlacement();
  428. bool __fastcall SetProperties(TOperationSide Side, TStrings * FileList);
  429. void __fastcall CustomCommand(TStrings * FileList,
  430. const TCustomCommandType & Command, TStrings * ALocalFileList);
  431. void __fastcall RemoteCustomCommand(
  432. TStrings * FileList, const TCustomCommandType & ACommand,
  433. const TCustomCommandData & Data, const UnicodeString & CommandCommand);
  434. void __fastcall LocalCustomCommandPure(
  435. TStrings * FileList, const TCustomCommandType & ACommand, const UnicodeString & Command, TStrings * ALocalFileList,
  436. const TCustomCommandData & Data, bool LocalFileCommand, bool FileListCommand, UnicodeString * POutput);
  437. void __fastcall LocalCustomCommandWithLocalFiles(
  438. const TCustomCommandType & ACommand, const UnicodeString & Command, const TCustomCommandData & Data,
  439. bool FileListCommand, UnicodeString * POutput);
  440. void __fastcall LocalCustomCommand(TStrings * FileList,
  441. const TCustomCommandType & ACommand, TStrings * ALocalFileList,
  442. const TCustomCommandData & Data, const UnicodeString & CommandCommand);
  443. virtual void __fastcall SessionChanging();
  444. virtual void __fastcall SessionChanged(bool Replaced);
  445. virtual void __fastcall QueueChanged();
  446. void __fastcall InitStatusBar();
  447. void __fastcall UpdateStatusBar();
  448. virtual void __fastcall UpdateStatusPanelText(TTBXStatusPanel * Panel);
  449. virtual void __fastcall DoOperationFinished(TFileOperation Operation,
  450. TOperationSide Side, bool Temp, const UnicodeString & FileName, bool Success,
  451. TOnceDoneOperation & OnceDoneOperation);
  452. virtual void __fastcall DoOpenDirectoryDialog(TOpenDirectoryMode Mode, TOperationSide Side);
  453. void __fastcall CreateProgressForm(TSynchronizeProgress * SynchronizeProgress);
  454. void __fastcall DestroyProgressForm();
  455. virtual void __fastcall FileOperationProgress(TFileOperationProgressType & ProgressData);
  456. void __fastcall OperationComplete(const TDateTime & StartTime);
  457. void __fastcall ExecutedFileChanged(
  458. const UnicodeString & FileName, TEditedFileData * Data, HANDLE UploadCompleteEvent, bool & Retry);
  459. void __fastcall ExecutedFileReload(const UnicodeString FileName,
  460. const TEditedFileData * Data);
  461. void __fastcall ExecutedFileEarlyClosed(const TEditedFileData * Data,
  462. bool & KeepOpen);
  463. void __fastcall ExecutedFileUploadComplete(TObject * Sender);
  464. void __fastcall CMDialogChar(TMessage & AMessage);
  465. inline void __fastcall WMAppCommand(TMessage & Message);
  466. inline void __fastcall WMSysCommand(TMessage & Message);
  467. void __fastcall WMQueryEndSession(TMessage & Message);
  468. void __fastcall WMEndSession(TWMEndSession & Message);
  469. #ifdef _DEBUG
  470. inline void __fastcall WMWindowPosChanged(TWMWindowPosMsg & Message);
  471. #endif
  472. void __fastcall WMCopyData(TMessage & Message);
  473. virtual void __fastcall SysResizing(unsigned int Cmd);
  474. DYNAMIC void __fastcall DoShow();
  475. TStrings * __fastcall CreateVisitedDirectories(TOperationSide Side);
  476. void __fastcall HandleErrorList(TStringList *& ErrorList);
  477. void __fastcall TerminalSynchronizeDirectory(
  478. const UnicodeString & LocalDirectory, const UnicodeString & RemoteDirectory,
  479. bool & Continue, bool Collect, const TSynchronizeOptions * Options);
  480. void __fastcall DoSynchronize(TSynchronizeController * Sender,
  481. const UnicodeString LocalDirectory, const UnicodeString RemoteDirectory,
  482. const TCopyParamType & CopyParam, const TSynchronizeParamType & Params,
  483. TSynchronizeChecklist ** Checklist, TSynchronizeOptions * Options, bool Full);
  484. void __fastcall DoSynchronizeInvalid(TSynchronizeController * Sender,
  485. const UnicodeString Directory, const UnicodeString ErrorStr);
  486. void __fastcall DoSynchronizeTooManyDirectories(TSynchronizeController * Sender,
  487. int & MaxDirectories);
  488. void __fastcall Synchronize(const UnicodeString LocalDirectory,
  489. const UnicodeString RemoteDirectory, TSynchronizeMode Mode,
  490. const TCopyParamType & CopyParam, int Params, TSynchronizeChecklist ** Checklist,
  491. TSynchronizeOptions * Options);
  492. void __fastcall SynchronizeSessionLog(const UnicodeString & Message);
  493. void __fastcall GetSynchronizeOptions(int Params, TSynchronizeOptions & Options);
  494. UnicodeString __fastcall SerializeCopyParamForCommandLine(const TCopyParamType * CopyParams);
  495. void __fastcall SynchronizeInNewWindow(const TSynchronizeParamType & Params, const TCopyParamType * CopyParams);
  496. void __fastcall FullSynchronizeInNewWindow(
  497. TSynchronizeMode Mode, int Params, const UnicodeString & LocalDirectory, const UnicodeString & RemoteDirectory,
  498. const TCopyParamType * CopyParams);
  499. bool __fastcall SynchronizeAllowSelectedOnly();
  500. virtual void __fastcall BatchStart(void *& Storage);
  501. virtual void __fastcall BatchEnd(void * Storage);
  502. bool __fastcall ExecuteFileOperation(TFileOperation Operation, TOperationSide Side,
  503. TStrings * FileList, bool NoConfirmation, void * Param);
  504. bool __fastcall ExecuteCopyMoveFileOperation(
  505. TFileOperation Operation, TOperationSide Side, TStrings * FileList, bool NoConfirmation, void * Param);
  506. bool __fastcall ExecuteDeleteFileOperation(TOperationSide Side, TStrings * FileList, void * Param);
  507. virtual bool __fastcall DDGetTarget(UnicodeString & Directory,
  508. bool & ForceQueue, UnicodeString & CounterName);
  509. virtual void __fastcall DDFakeFileInitDrag(TFileList * FileList, bool & Created);
  510. UnicodeString __fastcall CreateFakeTransferDirectory();
  511. void __fastcall DDFakeCreated(TObject * Sender, const UnicodeString FileName);
  512. void __fastcall ClipboardFakeCreated(TObject * Sender, const UnicodeString FileName);
  513. void __fastcall ClipboardDataObjectRelease(TObject * Sender);
  514. virtual void __fastcall SideEnter(TOperationSide Side);
  515. virtual TOperationSide __fastcall GetSide(TOperationSide Side);
  516. TStrings * __fastcall PanelExport(TOperationSide Side, TPanelExport Export);
  517. virtual void __fastcall PanelExportStore(TOperationSide Side,
  518. TPanelExport Export, TPanelExportDestination Destination,
  519. TStrings * ExportData);
  520. void __fastcall GenerateUrl(TStrings * Paths);
  521. void __fastcall QueueListUpdate(TTerminalQueue * Queue);
  522. void __fastcall QueueItemUpdate(TTerminalQueue * Queue, TQueueItem * Item);
  523. void __fastcall UpdateQueueStatus(bool QueueChanging);
  524. bool IsAnythingQueued();
  525. void __fastcall RefreshQueueItems();
  526. virtual int __fastcall GetStaticComponentsHeight();
  527. void __fastcall FillQueueViewItem(TListItem * Item,
  528. TQueueItemProxy * QueueItem, bool Detail);
  529. void __fastcall QueueViewDeleteItem(int Index);
  530. void __fastcall UserActionTimer(TObject * Sender);
  531. void __fastcall UpdateQueueView();
  532. bool __fastcall CanCloseQueue(TTerminalQueue * Queue);
  533. bool __fastcall CanCloseQueue();
  534. virtual bool __fastcall IsFileControl(TObject * Control, TOperationSide Side);
  535. virtual void __fastcall ReloadLocalDirectory(const UnicodeString Directory = L"");
  536. virtual bool __fastcall PanelOperation(TOperationSide Side, bool DragDrop);
  537. void __fastcall DoWarnLackOfTempSpace(const UnicodeString Path,
  538. __int64 RequiredSpace, bool & Continue);
  539. void __fastcall AddDelayedDirectoryDeletion(const UnicodeString TempDir, int SecDelay);
  540. void __fastcall DoDelayedDeletion(TObject * Sender);
  541. TDragDropFilesEx * __fastcall DragDropFiles(TObject * Sender);
  542. void __fastcall RemoteFileControlDDTargetDrop();
  543. bool __fastcall RemoteFileControlFileOperation(TObject * Sender,
  544. TFileOperation Operation, bool NoConfirmation, void * Param);
  545. void __fastcall DDDownload(
  546. TStrings * FilesToCopy, const UnicodeString & TargetDir, TCopyParamType * CopyParam, int Params);
  547. bool __fastcall EnsureCommandSessionFallback(TFSCapability Capability);
  548. bool __fastcall CommandSessionFallback();
  549. void __fastcall FileTerminalRemoved(const UnicodeString FileName,
  550. TEditedFileData * Data, TObject * Token, void * Arg);
  551. void __fastcall FileConfigurationChanged(const UnicodeString FileName,
  552. TEditedFileData * Data, TObject * Token, void * Arg);
  553. void __fastcall CustomExecuteFile(TOperationSide Side,
  554. TExecuteFileBy ExecuteFileBy, UnicodeString FileName, UnicodeString OriginalFileName,
  555. const TEditorData * ExternalEditor, UnicodeString LocalRootDirectory,
  556. UnicodeString RemoteDirectory, bool NewFile);
  557. void __fastcall ExecuteFile(TOperationSide Side,
  558. TExecuteFileBy ExecuteFileBy, const TEditorData * ExternalEditor,
  559. UnicodeString FullFileName, TObject * Object,
  560. const TFileMasks::TParams & MaskParams);
  561. bool __fastcall RemoteExecuteForceText(TExecuteFileBy ExecuteFileBy,
  562. const TEditorData * ExternalEditor);
  563. void __fastcall ExecuteFileNormalize(TExecuteFileBy & ExecuteFileBy,
  564. const TEditorData *& ExternalEditor, const UnicodeString & FileName,
  565. bool Local, const TFileMasks::TParams & MaskParams);
  566. void __fastcall ExecuteRemoteFile(
  567. const UnicodeString & FullFileName, TRemoteFile * File, TExecuteFileBy ExecuteFileBy);
  568. void __fastcall TemporaryFileCopyParam(TCopyParamType & CopyParam);
  569. void __fastcall TemporaryDirectoryForRemoteFiles(
  570. const UnicodeString & RemoteDirectory, const TCopyParamType & CopyParam, bool Simple,
  571. UnicodeString & Result, UnicodeString & RootDirectory);
  572. void __fastcall TemporarilyDownloadFiles(TStrings * FileList, bool ForceText,
  573. UnicodeString & RootTempDir, UnicodeString & TempDir, bool GetTargetNames,
  574. bool AutoOperation, bool SimpleTempDir);
  575. void __fastcall LocalEditorClosed(TObject * Sender, bool Forced);
  576. TTBXPopupMenu * __fastcall HistoryMenu(TOperationSide Side, bool Back);
  577. UnicodeString __fastcall FileStatusBarText(const TStatusFileInfo & FileInfo, TOperationSide Side);
  578. void __fastcall UpdateFileStatusBar(TTBXStatusBar * StatusBar,
  579. const TStatusFileInfo & FileInfo, TOperationSide Side);
  580. void __fastcall UpdateFileStatusExtendedPanels(
  581. TTBXStatusBar * StatusBar, const TStatusFileInfo & FileInfo);
  582. void __fastcall FileStatusBarPanelClick(TTBXStatusPanel * Panel, TOperationSide Side);
  583. virtual void __fastcall DoDirViewLoaded(TCustomDirView * Sender);
  584. virtual void __fastcall UpdateControls();
  585. void __fastcall UpdateTransferList();
  586. void __fastcall UpdateTransferLabel();
  587. void __fastcall StartUpdates();
  588. void __fastcall TransferPresetAutoSelect();
  589. virtual void __fastcall GetTransferPresetAutoSelectData(TCopyParamRuleData & Data);
  590. inline bool __fastcall CustomCommandRemoteAllowed();
  591. void __fastcall CustomCommandMenu(
  592. TAction * Action, TStrings * LocalFileList, TStrings * RemoteFileList);
  593. void __fastcall LoadToolbarsLayoutStr(UnicodeString LayoutStr, UnicodeString ButtonsStr);
  594. UnicodeString __fastcall GetToolbarItemName(TTBCustomItem * Item);
  595. UnicodeString __fastcall GetToolbarsLayoutStr();
  596. UnicodeString __fastcall GetToolbarsButtonsStr();
  597. virtual void __fastcall Dispatch(void * Message);
  598. void __fastcall PostComponentHide(Byte Component);
  599. void __fastcall GetSpaceAvailable(const UnicodeString Path,
  600. TSpaceAvailable & ASpaceAvailable, bool & Close);
  601. void __fastcall CalculateSize(TStrings * FileList, __int64 & Size,
  602. TCalculateSizeStats & Stats, bool & Close);
  603. void __fastcall CalculateChecksum(const UnicodeString & Alg, TStrings * FileList,
  604. TCalculatedChecksumEvent OnCalculatedChecksum, bool & Close);
  605. void __fastcall UpdateCustomCommandsToolbar();
  606. virtual void __fastcall UpdateActions();
  607. void __fastcall UpdateSessionColor(TColor value);
  608. void __fastcall SetSessionColor(TColor value);
  609. void __fastcall NoteTimer(TObject * Sender);
  610. void __fastcall AddNote(UnicodeString Note, bool UpdateNow = true);
  611. void __fastcall PostNote(UnicodeString Note, unsigned int Seconds,
  612. TNotifyEvent OnNoteClick, TObject * NoteData);
  613. bool __fastcall CancelNote(bool Force);
  614. void __fastcall UpdateNoteHints();
  615. void __fastcall UpdatesChecked();
  616. void __fastcall UpdatesNoteClicked(TObject * Sender);
  617. void __fastcall TransferPresetNoteClicked(TObject * Sender);
  618. void __fastcall TransferPresetNoteMessage(TTransferPresetNoteData * NoteData,
  619. bool AllowNeverAskAgain);
  620. void __fastcall UpdateTrayIcon();
  621. void __fastcall TrayIconClick(TObject * Sender);
  622. void __fastcall Notify(TTerminal * Terminal, UnicodeString Message,
  623. TQueryType Type, bool Important = false, TNotifyEvent OnClick = NULL,
  624. TObject * UserData = NULL, Exception * E = NULL);
  625. virtual void __fastcall UpdateSessionData(TSessionData * Data);
  626. virtual void __fastcall UpdateRemotePathComboBox(bool TextOnly);
  627. virtual void __fastcall ToolbarItemResize(TTBXCustomDropDownItem * Item, int Width);
  628. virtual void __fastcall CreateWnd();
  629. virtual void __fastcall DestroyWnd();
  630. virtual bool __fastcall OpenBookmark(TOperationSide Side, TBookmark * Bookmark);
  631. void __fastcall DoFindFiles(TTerminal * Terminal, UnicodeString Directory, const TFileMasks & FileMask,
  632. TFileFoundEvent OnFileFound, TFindingFileEvent OnFindingFile);
  633. virtual void __fastcall DoFocusRemotePath(TTerminal * Terminal, const UnicodeString & Path);
  634. bool __fastcall CanOperateOnFoundFiles(TTerminal * ATerminal);
  635. void __fastcall DoOperationOnFoundFiles(
  636. TFileOperation Operation, TTerminal * ATerminal, TStrings * FileList, TFileOperationFinishedEvent OnFileOperationFinished);
  637. void __fastcall DoDeleteFoundFiles(TTerminal * Terminal, TStrings * FileList, TFileOperationFinishedEvent OnFileOperationFinished);
  638. void __fastcall DoDownloadFoundFiles(TTerminal * ATerminal, TStrings * FileList, TFileOperationFinishedEvent OnFileOperationFinished);
  639. void __fastcall DoEditFoundFiles(TTerminal * ATerminal, TStrings * FileList, TFileOperationFinishedEvent OnFileOperationFinished);
  640. bool __fastcall ExecuteFileOperation(TFileOperation Operation, TOperationSide Side,
  641. bool OnFocused, bool NoConfirmation = false, void * Param = NULL);
  642. void __fastcall UpdateCopyParamCounters(const TCopyParamType & CopyParam);
  643. int __fastcall AddSessionColor(TColor Color);
  644. void UpdateSessionTab(TThemeTabSheet * TabSheet);
  645. void __fastcall UpdateNewTabTab();
  646. UnicodeString GetNewTabTabCaption();
  647. void __fastcall AddFixedSessionImages();
  648. int __fastcall AddFixedSessionImage(int GlyphsSourceIndex);
  649. TObjectList * __fastcall DoCollectWorkspace();
  650. void __fastcall DoSaveWorkspace(const UnicodeString & Name,
  651. TObjectList * DataList, bool SavePasswords, bool Explicit);
  652. UnicodeString __fastcall WorkspaceName();
  653. virtual bool __fastcall EligibleForImageDisplayMode(TTBCustomItem * Item);
  654. virtual bool __fastcall UpdateToolbarDisplayMode();
  655. virtual void __fastcall QueueLabelUpdateStatus();
  656. void __fastcall EditorAutoConfig();
  657. void __fastcall DirViewContextPopupDefaultItem(
  658. TOperationSide Side, TTBXCustomItem * Item, TResolvedDoubleClickAction DoubleClickAction1, TResolvedDoubleClickAction DoubleClickAction2);
  659. void __fastcall DirViewContextPopup(
  660. TOperationSide Side, Byte PopupComponent, const TPoint & MousePos);
  661. bool __fastcall CommandLineFromAnotherInstance(const UnicodeString & CommandLine);
  662. bool __fastcall CanCommandLineFromAnotherInstance();
  663. void __fastcall SetQueueProgress();
  664. void __fastcall UpdateQueueLabel();
  665. void CheckStoreTransition();
  666. void __fastcall SetTaskbarListProgressState(TBPFLAG Flags);
  667. void __fastcall SetTaskbarListProgressValue(int Progress);
  668. void __fastcall SetTaskbarListProgressValue(TFileOperationProgressType * ProgressData);
  669. TManagedTerminal * __fastcall GetSessionTabSession(TTabSheet * TabSheet);
  670. bool __fastcall SessionTabSwitched();
  671. void __fastcall RestoreApp();
  672. void __fastcall GoToQueue();
  673. void __fastcall LockFiles(TStrings * FileList, bool Lock);
  674. void __fastcall SaveInternalEditor(
  675. const UnicodeString FileName, TEditedFileData * Data, TObject * Token,
  676. void * Arg);
  677. void __fastcall SaveAllInternalEditors(TObject * Sender);
  678. void __fastcall InternalEditorModified(
  679. const UnicodeString FileName, TEditedFileData * Data, TObject * Token,
  680. void * Arg);
  681. void __fastcall AnyInternalEditorModified(TObject * Sender, bool & Modified);
  682. virtual void __fastcall StartingWithoutSession();
  683. virtual void __fastcall NeedSession(bool Startup);
  684. bool __fastcall DraggingAllFilesFromDirView(TOperationSide Side, TStrings * FileList);
  685. bool __fastcall SelectedAllFilesInDirView(TCustomDirView * DView);
  686. TSessionData * __fastcall SessionDataForCode();
  687. void __fastcall RefreshPanel(const UnicodeString & Session, const UnicodeString & Path);
  688. DYNAMIC void __fastcall ChangeScale(int M, int D);
  689. virtual void __fastcall UpdateImages();
  690. void __fastcall UpdatePixelsPerInchMainWindowCounter();
  691. void __fastcall CopyPopup(TControl * DestControl, TControl * SourceControl);
  692. void __fastcall CreateRemoteDirectory(const UnicodeString & Path, TRemoteProperties & Properties);
  693. void __fastcall DoFullSynchronize(
  694. void * Token, TProcessedSynchronizationChecklistItem OnProcessedItem,
  695. TUpdatedSynchronizationChecklistItems OnUpdatedSynchronizationChecklistItems);
  696. void __fastcall DoSynchronizeChecklistCalculateSize(
  697. TSynchronizeChecklist * Checklist, const TSynchronizeChecklist::TItemList & Items, void * Token);
  698. void __fastcall DoSynchronizeMove(
  699. TOperationSide Side, const UnicodeString & FileName, const UnicodeString & NewFileName, TRemoteFile * RemoteFile);
  700. void __fastcall DoSynchronizeBrowse(TOperationSide Side, TSynchronizeChecklist::TAction Action, const TSynchronizeChecklist::TItem * Item);
  701. void __fastcall FullSynchronize(
  702. TSynchronizeParams & Params, TProcessedSynchronizationChecklistItem OnProcessedItem,
  703. TUpdatedSynchronizationChecklistItems OnUpdatedSynchronizationChecklistItems);
  704. void __fastcall SynchronizeProcessedItem(void * Token, const TSynchronizeChecklist::TItem * ChecklistItem);
  705. void __fastcall CreateOpenDirMenuList(TTBCustomItem * Menu, TOperationSide Side, TBookmarkList * BookmarkList);
  706. void __fastcall CreateOpenDirMenu(TTBCustomItem * Menu, TOperationSide Side);
  707. bool __fastcall TryOpenDirectory(TOperationSide Side, const UnicodeString & Path);
  708. void __fastcall ClipboardStop();
  709. void __fastcall ClipboardClear();
  710. void __fastcall ClipboardDownload(const UnicodeString & TargetDirectory, bool NoConfirmation, bool DragDrop);
  711. bool __fastcall DoesClipboardContainOurFiles();
  712. bool __fastcall CanPasteToDirViewFromClipBoard();
  713. void __fastcall CloseSessionTab(int Index);
  714. void __fastcall DoFileColorsChanged(TCustomDirView * DirView);
  715. virtual void __fastcall FileColorsChanged();
  716. TColor __fastcall PanelColor();
  717. TColor __fastcall DisabledPanelColor();
  718. void __fastcall WMSettingChange(TMessage & Message);
  719. void __fastcall ResetIncrementalSearch();
  720. void __fastcall IncrementalSearch(const UnicodeString & Text, bool SkipCurrent, bool Reverse);
  721. TListItem * __fastcall GetNextFile(TListItem * Item, bool Reverse);
  722. TListItem * __fastcall SearchFile(const UnicodeString & Text, bool SkipCurrent, bool Reverse);
  723. void __fastcall CMDialogKey(TWMKeyDown & Message);
  724. DYNAMIC void __fastcall Deactivate();
  725. void __fastcall CenterReconnectToolbar();
  726. void DoOpenFolderOrWorkspace(const UnicodeString & Name, bool ConnectFirstTerminal, bool CheckMaxSessions);
  727. virtual void __fastcall ThemeChanged();
  728. int __fastcall GetStaticQueuePanelComponentsHeight();
  729. int __fastcall GetMinQueueViewHeight();
  730. void __fastcall DetachTerminal(TObject * ATerminal);
  731. bool __fastcall IsActiveTerminal(TTerminal * Terminal);
  732. void __fastcall UpdateRowSelect(TCustomDirView * DirView);
  733. void __fastcall MakeFocusedItemVisible(TCustomDirView * DirView);
  734. virtual void __fastcall DoRemotePathComboBoxAdjustImageIndex(
  735. TTBXComboBoxItem * Sender, const UnicodeString AText, int AIndex, int & ImageIndex);
  736. virtual void __fastcall DoRemotePathComboBoxCancel(TObject * Sender);
  737. virtual void __fastcall DoRemotePathComboBoxItemClick(TObject * Sender);
  738. bool GetDoNotShowCopyDialogDefault(bool DragDrop);
  739. void HandleDoNotShowCopyDialogAgain(bool DragDrop, bool DoNotShowAgain);
  740. void __fastcall UpdateDarkMode();
  741. virtual UnicodeString GetTabHintDetails(TManagedTerminal * ASession);
  742. virtual UnicodeString GetNewTabHintDetails();
  743. UnicodeString GetTabHintSessionDetails(TManagedTerminal * ASession);
  744. UnicodeString GetSessionPath(TManagedTerminal * ASession, TOperationSide Side);
  745. void __fastcall DirectorySizeCalculated(TOperationSide Side, const UnicodeString & FileName, bool Success);
  746. TListItem * VisualiseOperationFinished(TOperationSide Side, const UnicodeString & FileName, bool Unselect);
  747. void __fastcall FileDeleted(TOperationSide Side, const UnicodeString & FileName, bool Success);
  748. void LoadFilesProperties(TStrings * FileList);
  749. public:
  750. virtual __fastcall ~TCustomScpExplorerForm();
  751. void __fastcall AddBookmark(TOperationSide Side);
  752. virtual void __fastcall AddEditLink(TOperationSide Side, bool Add);
  753. bool __fastcall CanAddEditLink(TOperationSide Side);
  754. bool __fastcall LinkFocused();
  755. virtual Boolean __fastcall AllowedAction(TAction * Action, TActionAllowed Allowed);
  756. bool __fastcall IsBusy();
  757. virtual void __fastcall ConfigurationChanged();
  758. void __fastcall CreateDirectory(TOperationSide Side);
  759. void __fastcall ExecuteFileOperationCommand(TFileOperation Operation, TOperationSide Side,
  760. bool OnFocused, bool NoConfirmation = false, void * Param = NULL);
  761. void __fastcall ExecuteCopyOperationCommand(
  762. TOperationSide Side, bool OnFocused, unsigned int Flags);
  763. virtual void LocalLocalCopy(
  764. TFileOperation Operation, TOperationSide Side, bool OnFocused, bool NoConfirmation, bool DragDrop, unsigned int Flags);
  765. void LocalLocalCopyCommand(TFileOperation Operation, TOperationSide Side, bool OnFocused, unsigned int Flags);
  766. void __fastcall AdHocCustomCommand(bool OnFocused);
  767. virtual TCustomDirView * __fastcall DirView(TOperationSide Side);
  768. virtual bool __fastcall DirViewEnabled(TOperationSide Side);
  769. virtual void __fastcall ChangePath(TOperationSide Side) = 0;
  770. virtual void __fastcall StoreParams();
  771. int __fastcall CustomCommandState(const TCustomCommandType & Command, bool OnFocused, TCustomCommandListType ListType);
  772. bool __fastcall GetLastCustomCommand(bool OnFocused,
  773. TCustomCommandType & CustomCommand, int & State);
  774. void __fastcall LastCustomCommand(bool OnFocused);
  775. void __fastcall BothCustomCommand(const TCustomCommandType & Command);
  776. void __fastcall LockWindow(bool Force = false);
  777. void __fastcall UnlockWindow();
  778. void __fastcall SuspendWindowLock();
  779. void __fastcall ResumeWindowLock();
  780. bool __fastcall HasActiveTerminal();
  781. bool __fastcall HasManagedSession();
  782. virtual bool IsLocalBrowserMode();
  783. bool CanCloseSession(TManagedTerminal * Session);
  784. virtual UnicodeString __fastcall DefaultDownloadTargetDirectory() = 0;
  785. virtual bool SupportedSession(TSessionData * SessionData) = 0;
  786. void __fastcall NewSession(const UnicodeString & SessionUrl = L"");
  787. virtual void NewTab(TOperationSide Side = osCurrent);
  788. void __fastcall DuplicateSession();
  789. void __fastcall RenameSession();
  790. void __fastcall CloseSession();
  791. void __fastcall DisconnectSession();
  792. void __fastcall ReconnectSession();
  793. void __fastcall OpenDirectory(TOperationSide Side);
  794. virtual void __fastcall HomeDirectory(TOperationSide Side);
  795. void __fastcall ReloadDirectory(TOperationSide Side);
  796. void __fastcall OpenStoredSession(TSessionData * Data);
  797. void __fastcall OpenFolderOrWorkspace(const UnicodeString & Name);
  798. void __fastcall Idle();
  799. __fastcall TCustomScpExplorerForm(TComponent* Owner);
  800. void __fastcall SaveCurrentSession();
  801. UnicodeString __fastcall CreateHiddenDuplicateSession();
  802. UnicodeString __fastcall SaveHiddenDuplicateSession(TSessionData * SessionData);
  803. TSessionData * __fastcall CloneCurrentSessionData();
  804. bool __fastcall SaveWorkspace(bool EnableAutoSave);
  805. virtual void __fastcall CompareDirectories();
  806. void __fastcall ExecuteCurrentFile();
  807. virtual void __fastcall OpenConsole(UnicodeString Command = L"");
  808. virtual void __fastcall UpdateSession(TManagedTerminal * Terminal);
  809. virtual void __fastcall SynchronizeDirectories();
  810. virtual void __fastcall FullSynchronizeDirectories() = 0;
  811. virtual void __fastcall ExploreLocalDirectory(TOperationSide Side);
  812. virtual void __fastcall GoToCommandLine();
  813. virtual void __fastcall GoToTree();
  814. void __fastcall PanelExport(TOperationSide Side, TPanelExport Export,
  815. TPanelExportDestination Destination);
  816. void __fastcall Filter(TOperationSide Side);
  817. void __fastcall ExecuteFile(TOperationSide Side, TExecuteFileBy ExecuteFileBy,
  818. const TEditorData * ExternalEditor = NULL, bool AllSelected = false,
  819. bool OnFocused = false);
  820. void __fastcall ExecuteCurrentFileWith(bool OnFocused);
  821. void __fastcall EditNew(TOperationSide Side);
  822. bool __fastcall AllowQueueOperation(TQueueOperation Operation, void ** Param = NULL);
  823. void __fastcall ExecuteQueueOperation(TQueueOperation Operation, void * Param = NULL);
  824. TQueueOperation __fastcall DefaultQueueOperation();
  825. bool __fastcall GetQueueEnabled();
  826. void __fastcall ToggleQueueEnabled();
  827. UnicodeString __fastcall GetQueueProgressTitle();
  828. void __fastcall LastTerminalClosed();
  829. virtual TManagedTerminal * GetReplacementForLastSession();
  830. void __fastcall TerminalRemoved(TObject * Sender);
  831. void __fastcall TerminalDisconnected();
  832. void __fastcall TerminalConnecting();
  833. void __fastcall SessionListChanged(bool ForceTruncationUpdate = false);
  834. void __fastcall ApplicationTitleChanged();
  835. unsigned int __fastcall MoreMessageDialog(const UnicodeString Message,
  836. TStrings * MoreMessages, TQueryType Type, unsigned int Answers,
  837. UnicodeString HelpKeyword, const TMessageParams * Params = NULL,
  838. TTerminal * Terminal = NULL);
  839. void __fastcall OperationFinished(TFileOperation Operation, TOperationSide Side,
  840. bool Temp, const UnicodeString & FileName, bool Success, TOnceDoneOperation & OnceDoneOperation);
  841. void __fastcall OperationProgress(TFileOperationProgressType & ProgressData);
  842. UnicodeString __fastcall GetProgressTitle();
  843. void __fastcall ShowExtendedException(TTerminal * Terminal, Exception * E);
  844. void __fastcall InactiveTerminalException(TTerminal * Terminal, Exception * E);
  845. void __fastcall SessionReady();
  846. void __fastcall QueueEvent(TManagedTerminal * Terminal, TTerminalQueue * Queue, TQueueEvent Event);
  847. void __fastcall QueueEmptyNoteClicked(TObject * Sender);
  848. bool __fastcall DoSynchronizeDirectories(
  849. UnicodeString & LocalDirectory, UnicodeString & RemoteDirectory, int UseDefaults);
  850. int __fastcall DoFullSynchronizeDirectories(
  851. UnicodeString & LocalDirectory, UnicodeString & RemoteDirectory, TSynchronizeMode & Mode,
  852. int Params, bool & SaveMode, int UseDefaults);
  853. void __fastcall StandaloneEdit(const UnicodeString & FileName);
  854. bool __fastcall CanPasteFromClipBoard();
  855. virtual void __fastcall PasteFromClipBoard();
  856. virtual void __fastcall CopyFilesToClipboard(TOperationSide Side, bool OnFocused);
  857. void __fastcall ToggleQueueVisibility();
  858. virtual UnicodeString __fastcall PathForCaption();
  859. void __fastcall FileListFromClipboard();
  860. void __fastcall SelectAll(TOperationSide Side, TSelectMode Mode);
  861. void __fastcall SelectByMask(TOperationSide Side, bool Select);
  862. void __fastcall RestoreSelectedNames(TOperationSide Side);
  863. void __fastcall SelectSameExt(bool Select);
  864. void __fastcall PreferencesDialog(TPreferencesMode APreferencesMode);
  865. virtual void __fastcall BeforeAction();
  866. void __fastcall FileSystemInfo();
  867. void __fastcall SessionGenerateUrl();
  868. void __fastcall FileGenerateUrl();
  869. void __fastcall ReadDirectoryCancelled();
  870. void __fastcall SynchronizeBrowsingChanged();
  871. void __fastcall ToggleShowHiddenFiles();
  872. void __fastcall SetFormatSizeBytes(TFormatBytesStyle Style);
  873. void __fastcall ToggleAutoReadDirectoryAfterOp();
  874. void __fastcall PopupTrayBalloon(TTerminal * Terminal, const UnicodeString & Str,
  875. TQueryType Type, Exception * E = NULL, unsigned int Seconds = 0,
  876. TNotifyEvent OnBalloonClick = NULL, TObject * UserData = NULL);
  877. void __fastcall RemoteFindFiles();
  878. virtual void __fastcall HistoryGo(TOperationSide Side, int Index);
  879. void __fastcall UpdateTaskbarList(ITaskbarList3 * TaskbarList);
  880. virtual void __fastcall DisplaySystemContextMenu();
  881. virtual void __fastcall GoToAddress() = 0;
  882. bool __fastcall CanConsole();
  883. bool __fastcall CanChangePassword();
  884. void __fastcall ChangePassword();
  885. bool __fastcall CanPrivateKeyUpload();
  886. void __fastcall PrivateKeyUpload();
  887. bool __fastcall IsComponentPossible(Byte Component);
  888. void __fastcall ReplaceTerminal(TManagedTerminal * value);
  889. virtual void __fastcall BrowseFile();
  890. void __fastcall CloseApp();
  891. virtual bool SupportsLocalBrowser();
  892. virtual bool IsSideLocalBrowser(TOperationSide Side);
  893. virtual UnicodeString GetLocalBrowserSessionTitle(TManagedTerminal * Session);
  894. virtual int GetNewTabActionImageIndex();
  895. virtual int GetNewTabTabImageIndex(TOperationSide Side);
  896. void CalculateDirectorySizes(TOperationSide Side);
  897. __property bool ComponentVisible[Byte Component] = { read = GetComponentVisible, write = SetComponentVisible };
  898. __property bool EnableFocusedOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 0 };
  899. __property bool EnableSelectedOperation[TOperationSide Side] = { read = GetEnableSelectedOperation, index = 0 };
  900. __property bool EnableFocusedFileOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 1 };
  901. __property bool EnableSelectedFileOperation[TOperationSide Side] = { read = GetEnableSelectedOperation, index = 1 };
  902. __property bool HasDirView[TOperationSide Side] = { read = GetHasDirView };
  903. __property TManagedTerminal * ManagedSession = { read = FManagedSession, write = SetManagedSession };
  904. __property TManagedTerminal * Terminal = { read = GetTerminal };
  905. __property TTerminalQueue * Queue = { read = FQueue, write = SetQueue };
  906. __property TColor SessionColor = { read = FSessionColor, write = SetSessionColor };
  907. __property bool StandaloneOperation = { read = FStandaloneOperation, write = FStandaloneOperation };
  908. };
  909. //---------------------------------------------------------------------------
  910. class TAutoBatch
  911. {
  912. public:
  913. TAutoBatch(TCustomScpExplorerForm * Form);
  914. ~TAutoBatch();
  915. private:
  916. TCustomScpExplorerForm * FForm;
  917. void * FBatchStorage;
  918. };
  919. //---------------------------------------------------------------------------
  920. #endif