WinInterface.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. //---------------------------------------------------------------------------
  2. #ifndef WinInterfaceH
  3. #define WinInterfaceH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Interface.h>
  7. class TStoredSessionList;
  8. class TConfiguration;
  9. class TTerminal;
  10. const int mpNeverAskAgainCheck = 0x01;
  11. const int mpAllowContinueOnError = 0x02;
  12. class TCustomScpExplorerForm;
  13. TCustomScpExplorerForm * __fastcall CreateScpExplorer();
  14. void __fastcall ConfigureInterface();
  15. void __fastcall DoProductLicence();
  16. extern const AnsiString AppName;
  17. extern const AnsiString AppNameVersion;
  18. void __fastcall FlashOnBackground();
  19. void __fastcall ShowExtendedExceptionEx(Exception * E, TObject * Sender,
  20. bool NoReconnect);
  21. // windows\WinInterface.cpp
  22. int __fastcall MessageDialog(const AnsiString Msg, TQueryType Type,
  23. int Answers, int HelpCtx = 0, int Params = 0);
  24. int __fastcall MessageDialog(int Ident, TQueryType Type,
  25. int Answers, int HelpCtx = 0, int Params = 0);
  26. int __fastcall SimpleErrorDialog(const AnsiString Msg);
  27. int __fastcall MoreMessageDialog(const AnsiString Message,
  28. TStrings * MoreMessages, TQueryType Type, int Answers,
  29. int HelpCtx, int Params = 0);
  30. int __fastcall FatalExceptionMessageDialog(Exception * E,
  31. TQueryType Type, AnsiString MessageFormat = "%s", int Answers = qaOK,
  32. int HelpCtx = 0, int Params = 0);
  33. int __fastcall ExceptionMessageDialog(Exception * E,
  34. TQueryType Type, int Answers, int HelpCtx = 0);
  35. // windows\WinMain.cpp
  36. class TProgramParams;
  37. void __fastcall Execute(TProgramParams * Params);
  38. //void __fastcall ReconnectTerminal();
  39. // forms\InputDlg.cpp
  40. TPoint __fastcall GetAveCharSize(TCanvas* Canvas);
  41. bool __fastcall InputDialog(const AnsiString ACaption,
  42. const AnsiString APrompt, AnsiString & Value, TStrings * History = NULL);
  43. // forms\About.cpp
  44. void __fastcall DoAboutDialog(TConfiguration *Configuration);
  45. // forms\Cleanup.cpp
  46. bool __fastcall DoCleanupDialog(TStoredSessionList *SessionList,
  47. TConfiguration *Configuration);
  48. // forms\Console.cpp
  49. void __fastcall DoConsoleDialog(TTerminal * Terminal,
  50. const AnsiString Command = "");
  51. // forms\Copy.cpp
  52. bool __fastcall DoCopyDialog(bool ToRemote,
  53. bool Move, bool DragDrop, TStrings * FileList,
  54. bool AllowTransferMode, AnsiString & TargetDirectory,
  55. TCopyParamType * Params, bool AllowDirectory);
  56. // forms\CopyParams.cpp
  57. enum TParamsForDirection { pdBoth, pdToRemote, pdToLocal, pdAll };
  58. // forms\ImportSessions.cpp
  59. bool __fastcall DoImportSessionsDialog(TStoredSessionList *SessionList);
  60. // forms\Licence.cpp
  61. enum TLicence { lcNoLicence = -1, lcWinScp, lcPutty, lcRX };
  62. void __fastcall DoLicenceDialog(TLicence Licence);
  63. void __fastcall DoLicenceDialog(const AnsiString LicenceText);
  64. // forms\Login.cpp
  65. const loLocalDirectory = 0x01;
  66. const loLanguage = 0x02;
  67. const loTools = 0x04;
  68. const loLogWindow = 0x08;
  69. const loAbout = 0x10;
  70. const loPreferences = 0x20;
  71. const loNone = 0x00;
  72. const loAddSession = (loLocalDirectory | loLogWindow);
  73. const loStartup = (loLocalDirectory | loLanguage | loTools |
  74. loLogWindow | loPreferences | loAbout);
  75. bool __fastcall DoLoginDialog(TStoredSessionList * SessionList,
  76. TSessionData * Data, int Options);
  77. // forms\OpenDirectory.cpp
  78. enum TOpenDirectoryMode { odBrowse, odAddBookmark };
  79. bool __fastcall DoOpenDirectoryDialog(TOpenDirectoryMode Mode, TOperationSide Side,
  80. AnsiString & Directory, TStrings * directories, TTerminal * Terminal);
  81. // forms\LocatinoProfiles.cpp
  82. bool __fastcall LocationProfilesDialog(TOpenDirectoryMode Mode,
  83. TOperationSide Side, AnsiString & LocalDirectory, AnsiString & RemoteDirectory,
  84. TStrings * RemoteDirectories, TTerminal * Terminal);
  85. // forms\Preferences.cpp
  86. enum TPreferencesMode { pmDefault, pmLogin, pmEditor, pmCustomCommands };
  87. typedef void __fastcall (__closure *TGetDefaultLogFileName)
  88. (System::TObject* Sender, AnsiString &DefaultLogFileName);
  89. bool __fastcall DoPreferencesDialog(TPreferencesMode APreferencesMode);
  90. // forms\Password.cpp
  91. bool __fastcall DoPasswordDialog(const AnsiString Caption, TPasswordKind Kind,
  92. AnsiString & Password);
  93. // forms\Properties.cpp
  94. class TRemoteProperties;
  95. const cpMode = 0x01;
  96. const cpOwner = 0x02;
  97. const cpGroup = 0x04;
  98. bool __fastcall DoPropertiesDialog(TStrings * FileList,
  99. const AnsiString Directory, TStrings * GroupList,
  100. TRemoteProperties * Properties, int AllowedChanges,
  101. TTerminal * Terminal);
  102. // forms\ComboInput.cpp
  103. bool __fastcall DoComboInputDialog(
  104. const AnsiString Caption, const AnsiString Prompt, AnsiString & Text,
  105. TStrings * Items, TCloseQueryEvent OnCloseQuery, bool AllowEmpty);
  106. AnsiString __fastcall DoSaveSessionDialog(
  107. TStoredSessionList * SessionList, const AnsiString DefaultName);
  108. bool __fastcall DoRemoteMoveDialog(TStrings * FileList, AnsiString & Target,
  109. AnsiString & FileMask);
  110. // forms\SelectMask.cpp
  111. #ifdef CustomDirViewHPP
  112. bool __fastcall DoSelectMaskDialog(TCustomDirView * Parent, bool Select,
  113. TFileFilter * Filter, TConfiguration * Configuration);
  114. #endif
  115. // forms\Synchronize.cpp
  116. class TSynchronizeParamType {
  117. public:
  118. TCopyParamType CopyParams;
  119. bool AllowTransferMode;
  120. AnsiString LocalDirectory;
  121. AnsiString RemoteDirectory;
  122. TSynchronizeParamType __fastcall operator =(TSynchronizeParamType rhp);
  123. void __fastcall Assign(TSynchronizeParamType Source);
  124. };
  125. enum TSynchronizationStatus { ssStopped, ssWaiting, ssSynchronize, ssSynchronizing };
  126. typedef void __fastcall (__closure * TSynchronizeStartStopEvent)
  127. (System::TObject * Sender, bool Start, TSynchronizeParamType Params);
  128. void __fastcall DoSynchronizeDialog(TSynchronizeParamType Params,
  129. TSynchronizeStartStopEvent OnStartStop);
  130. enum TSynchronizeMode { smRemote, smLocal, smBoth };
  131. const spDelete = 0x01;
  132. const spNoConfirmation = 0x02;
  133. bool __fastcall DoFullSynchronizeDialog(TSynchronizeMode & Mode, int & Params,
  134. AnsiString & LocalDirectory, AnsiString & RemoteDirectory, bool & SaveSettings);
  135. void __fastcall DoEditorForm(const AnsiString FileName, TCustomForm * ParentForm,
  136. TNotifyEvent OnFileChanged, const AnsiString Caption = "");
  137. bool __fastcall DoSymlinkDialog(AnsiString & FileName, AnsiString & PointTo,
  138. TOperationSide Side, bool & SymbolicLink, bool Edit, bool AllowSymbolic);
  139. // forms\FileSystemInfo.cpp
  140. void __fastcall DoFileSystemInfoDialog(TTerminal * Terminal);
  141. // windows\WinMain.cpp
  142. void __fastcall CheckForUpdates();
  143. void __fastcall RegisterAsUrlHandler();
  144. //---------------------------------------------------------------------------
  145. #endif // WinInterfaceH