CustomScpExplorer.h 48 KB

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