1
0

Preferences.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. //----------------------------------------------------------------------------
  2. #ifndef PreferencesH
  3. #define PreferencesH
  4. //----------------------------------------------------------------------------
  5. #include "ComboEdit.hpp"
  6. #include "UpDownEdit.hpp"
  7. #include <System.Classes.hpp>
  8. #include <Vcl.ComCtrls.hpp>
  9. #include <Vcl.Controls.hpp>
  10. #include <Vcl.ExtCtrls.hpp>
  11. #include <Vcl.Forms.hpp>
  12. #include <Vcl.Mask.hpp>
  13. #include <Vcl.StdCtrls.hpp>
  14. //----------------------------------------------------------------------------
  15. #include "UpDownEdit.hpp"
  16. #include <Dialogs.hpp>
  17. #include <PasTools.hpp>
  18. #include "HistoryComboBox.hpp"
  19. #include "PathLabel.hpp"
  20. #include <Vcl.Imaging.pngimage.hpp>
  21. #include <Vcl.Menus.hpp>
  22. #include <WinInterface.h>
  23. #include <WinConfiguration.h>
  24. #include <GUITools.h>
  25. //----------------------------------------------------------------------------
  26. class TCustomCommandList;
  27. class TEditorList;
  28. class THttp;
  29. //----------------------------------------------------------------------------
  30. class TPreferencesDialog : public TForm
  31. {
  32. __published:
  33. TButton *OKButton;
  34. TButton *CloseButton;
  35. TPanel *MainPanel;
  36. TPageControl *PageControl;
  37. TTabSheet *PreferencesSheet;
  38. TGroupBox *CommonPreferencesGroup;
  39. TCheckBox *ConfirmOverwritingCheck;
  40. TCheckBox *ConfirmDeletingCheck;
  41. TCheckBox *ConfirmClosingSessionCheck2;
  42. TCheckBox *DDTransferConfirmationCheck2;
  43. TCheckBox *ContinueOnErrorCheck;
  44. TTabSheet *LogSheet;
  45. TTabSheet *GeneralSheet;
  46. TLabel *InterfaceChangeLabel;
  47. TTabSheet *PanelsSheet;
  48. TGroupBox *PanelsRemoteDirectoryGroup;
  49. TCheckBox *ShowInaccesibleDirectoriesCheck;
  50. TGroupBox *PanelsCommonGroup;
  51. TCheckBox *ShowHiddenFilesCheck;
  52. TCheckBox *DefaultDirIsHomeCheck;
  53. TTabSheet *CommanderSheet;
  54. TLabel *Label3;
  55. TGroupBox *PanelsGroup;
  56. TCheckBox *PreserveLocalDirectoryCheck;
  57. TGroupBox *CommanderMiscGroup;
  58. TCheckBox *UseLocationProfilesCheck;
  59. TGroupBox *CompareCriterionsGroup;
  60. TCheckBox *CompareByTimeCheck;
  61. TCheckBox *CompareBySizeCheck;
  62. TTabSheet *ExplorerSheet;
  63. TLabel *Label4;
  64. TGroupBox *GroupBox2;
  65. TCheckBox *ShowFullAddressCheck;
  66. TTabSheet *EditorSheet;
  67. TGroupBox *EditorPreferenceGroup;
  68. TTabSheet *IntegrationSheet;
  69. TGroupBox *ShellIconsGroup;
  70. TButton *DesktopIconButton;
  71. TButton *SendToHookButton;
  72. TTabSheet *CustomCommandsSheet;
  73. TGroupBox *CustomCommandsGroup;
  74. TListView *CustomCommandsView;
  75. TButton *AddCommandButton;
  76. TButton *RemoveCommandButton;
  77. TButton *UpCommandButton;
  78. TButton *DownCommandButton;
  79. TButton *EditCommandButton;
  80. TPanel *LeftPanel;
  81. TTreeView *NavigationTree;
  82. TCheckBox *DeleteToRecycleBinCheck;
  83. TButton *RegisterAsUrlHandlersButton;
  84. TTabSheet *DragDropSheet;
  85. TGroupBox *DragDropDownloadsGroup;
  86. TLabel *DDFakeFileEnabledLabel;
  87. TLabel *DDFakeFileDisabledLabel;
  88. TRadioButton *DDFakeFileEnabledButton;
  89. TRadioButton *DDFakeFileDisabledButton;
  90. TCheckBox *DDWarnLackOfTempSpaceCheck;
  91. TCheckBox *ConfirmExitOnCompletionCheck;
  92. TTabSheet *QueueSheet;
  93. TGroupBox *QueueGroup;
  94. TUpDownEdit *QueueTransferLimitEdit;
  95. TLabel *Label5;
  96. TGroupBox *QueueViewGroup;
  97. TRadioButton *QueueViewShowButton;
  98. TRadioButton *QueueViewHideWhenEmptyButton;
  99. TRadioButton *QueueViewHideButton;
  100. TCheckBox *QueueAutoPopupCheck;
  101. TCheckBox *QueueCheck;
  102. TCheckBox *ConfirmResumeCheck;
  103. TTabSheet *StorageSheet;
  104. TGroupBox *StorageGroup;
  105. TRadioButton *RegistryStorageButton;
  106. TRadioButton *AutomaticIniFileStorageButton;
  107. TGroupBox *NotificationsGroup;
  108. TCheckBox *BeepOnFinishCheck;
  109. TUpDownEdit *BeepOnFinishAfterEdit;
  110. TLabel *BeepOnFinishAfterText;
  111. TTabSheet *TransferEnduranceSheet;
  112. TGroupBox *ResumeBox;
  113. TLabel *ResumeThresholdUnitLabel2;
  114. TRadioButton *ResumeOnButton;
  115. TRadioButton *ResumeSmartButton;
  116. TRadioButton *ResumeOffButton;
  117. TUpDownEdit *ResumeThresholdEdit;
  118. TCheckBox *ConfirmCommandSessionCheck;
  119. TGroupBox *TemporaryDirectoryGrouo;
  120. TRadioButton *DDSystemTemporaryDirectoryButton;
  121. TRadioButton *DDCustomTemporaryDirectoryButton;
  122. TDirectoryEdit *DDTemporaryDirectoryEdit;
  123. TLabel *Label6;
  124. TCheckBox *TemporaryDirectoryCleanupCheck;
  125. TCheckBox *ConfirmTemporaryDirectoryCleanupCheck;
  126. TGroupBox *OtherStorageGroup;
  127. TLabel *RandomSeedFileLabel;
  128. TFilenameEdit *RandomSeedFileEdit;
  129. TCheckBox *SwappedPanelsCheck;
  130. TCheckBox *PreservePanelStateCheck;
  131. TButton *AddSearchPathButton;
  132. TCheckBox *QueueNoConfirmationCheck;
  133. TGroupBox *PathInCaptionGroup;
  134. TRadioButton *PathInCaptionFullButton;
  135. TRadioButton *PathInCaptionShortButton;
  136. TRadioButton *PathInCaptionNoneButton;
  137. TTabSheet *UpdatesSheet;
  138. TGroupBox *UpdatesGroup2;
  139. TGroupBox *UpdatesProxyGroup;
  140. TLabel *UpdatesProxyHostLabel;
  141. TLabel *UpdatesProxyPortLabel;
  142. TUpDownEdit *UpdatesProxyPortEdit;
  143. TEdit *UpdatesProxyHostEdit;
  144. TRadioButton *UpdatesProxyCheck;
  145. TTabSheet *CopyParamListSheet;
  146. TGroupBox *CopyParamListGroup;
  147. TListView *CopyParamListView;
  148. TButton *AddCopyParamButton;
  149. TButton *RemoveCopyParamButton;
  150. TButton *UpCopyParamButton;
  151. TButton *DownCopyParamButton;
  152. TButton *EditCopyParamButton;
  153. TButton *DuplicateCopyParamButton;
  154. TCheckBox *CopyParamAutoSelectNoticeCheck;
  155. TButton *HelpButton;
  156. TListView *EditorListView3;
  157. TButton *AddEditorButton;
  158. TButton *EditEditorButton;
  159. TButton *UpEditorButton;
  160. TButton *DownEditorButton;
  161. TButton *RemoveEditorButton;
  162. TGroupBox *DoubleClickGroup;
  163. TCheckBox *CopyOnDoubleClickConfirmationCheck;
  164. TLabel *DoubleClickActionLabel;
  165. TComboBox *DoubleClickActionCombo;
  166. TLabel *Label8;
  167. TComboBox *NortonLikeModeCombo;
  168. TStaticText *ShellIconsText2;
  169. TCheckBox *FullRowSelectCheck;
  170. TGroupBox *SessionReopenGroup;
  171. TLabel *SessionReopenAutoLabel;
  172. TCheckBox *SessionReopenAutoCheck;
  173. TLabel *SessionReopenAutoSecLabel;
  174. TUpDownEdit *SessionReopenAutoEdit;
  175. TTabSheet *WindowSheet;
  176. TCheckBox *AutoReadDirectoryAfterOpCheck;
  177. TCheckBox *ConfirmRecyclingCheck;
  178. TGroupBox *WindowMiscellaneousGroup;
  179. TCheckBox *MinimizeToTrayCheck;
  180. TCheckBox *BalloonNotificationsCheck;
  181. TTabSheet *IntegrationAppSheet;
  182. TGroupBox *ExternalAppsGroup;
  183. TLabel *PuttyPathLabel;
  184. THistoryComboBox *PuttyPathEdit;
  185. TCheckBox *PuttyPasswordCheck2;
  186. TCheckBox *AutoOpenInPuttyCheck;
  187. TButton *PuttyPathBrowseButton;
  188. TCheckBox *TelnetForFtpInPuttyCheck;
  189. TRadioButton *UpdatesDirectCheck;
  190. TRadioButton *UpdatesAutoCheck;
  191. TCheckBox *ConfirmTransferringCheck;
  192. TGroupBox *UpdatesOptionsGroup;
  193. TCheckBox *QueueParallelCheck;
  194. TCheckBox *SessionReopenAutoIdleCheck;
  195. TCheckBox *RenameWholeNameCheck;
  196. TCheckBox *TreeOnLeftCheck;
  197. TCheckBox *TemporaryDirectoryAppendSessionCheck;
  198. TCheckBox *TemporaryDirectoryAppendPathCheck;
  199. TLabel *SessionReopenTimeoutLabel;
  200. TUpDownEdit *SessionReopenTimeoutEdit;
  201. TLabel *SessionReopenTimeoutSecLabel;
  202. TTabSheet *SecuritySheet;
  203. TGroupBox *MasterPasswordGroup;
  204. TButton *SetMasterPasswordButton;
  205. TCheckBox *UseMasterPasswordCheck;
  206. TTabSheet *NetworkSheet;
  207. TGroupBox *ExternalIpAddressGroupBox2;
  208. TRadioButton *RetrieveExternalIpAddressButton;
  209. TRadioButton *CustomExternalIpAddressButton;
  210. TEdit *CustomExternalIpAddressEdit;
  211. TCheckBox *SessionReopenAutoStallCheck;
  212. TLabel *SessionReopenAutoStallLabel;
  213. TUpDownEdit *SessionReopenAutoStallEdit;
  214. TLabel *SessionReopenAutoStallSecLabel;
  215. TCheckBox *EnableQueueByDefaultCheck;
  216. TCheckBox *RefreshRemotePanelCheck;
  217. TUpDownEdit *RefreshRemotePanelIntervalEdit;
  218. TLabel *RefreshRemoteDirectoryUnitLabel;
  219. TLabel *Label12;
  220. TComboBox *UpdatesPeriodCombo;
  221. TLabel *UpdatesBetaVersionsLabel;
  222. TComboBox *UpdatesBetaVersionsCombo;
  223. TCheckBox *CollectUsageCheck;
  224. TButton *UsageViewButton;
  225. TTabSheet *PanelRemoteSheet;
  226. TGroupBox *WorkspacesGroup;
  227. TCheckBox *AutoSaveWorkspaceCheck;
  228. TComboBox *AutoWorkspaceCombo;
  229. TCheckBox *AutoSaveWorkspacePasswordsCheck;
  230. TLabel *CopyParamLabel;
  231. TGroupBox *ConnectionsGroup;
  232. TCheckBox *TryFtpWhenSshFailsCheck;
  233. TLabel *QueueKeepDoneItemsCheck;
  234. TComboBox *QueueKeepDoneItemsForCombo;
  235. TLabel *Label10;
  236. TComboBox *ExplorerKeyboardShortcutsCombo;
  237. TLabel *SessionReopenAutoIdleLabel;
  238. TUpDownEdit *SessionReopenAutoIdleEdit;
  239. TLabel *SessionReopenAutoIdleSecLabel;
  240. TTabSheet *PanelLocalSheet;
  241. TGroupBox *LocalPanelGroup;
  242. TCheckBox *SystemContextMenuCheck;
  243. TGroupBox *PasswordGroupBox;
  244. TCheckBox *SessionRememberPasswordCheck;
  245. TStaticText *PuttyPathHintText;
  246. TLabel *PuttyRegistryStorageKeyLabel;
  247. THistoryComboBox *PuttyRegistryStorageKeyEdit;
  248. TTabSheet *LanguagesSheet;
  249. TGroupBox *LanguagesGroup;
  250. TListView *LanguagesView;
  251. TLabel *LanguageChangeLabel;
  252. TButton *LanguagesGetMoreButton;
  253. TGroupBox *LoggingGroup;
  254. TLabel *LogFileNameLabel;
  255. TFilenameEdit *LogFileNameEdit3;
  256. TPanel *LogFilePanel;
  257. TRadioButton *LogFileAppendButton;
  258. TRadioButton *LogFileOverwriteButton;
  259. TComboBox *LogProtocolCombo2;
  260. TStaticText *LogFileNameHintText;
  261. TCheckBox *EnableLoggingCheck;
  262. TGroupBox *ActionsLoggingGroup;
  263. TFilenameEdit *ActionsLogFileNameEdit;
  264. TStaticText *ActionsLogFileNameHintText;
  265. TCheckBox *EnableActionsLoggingCheck;
  266. TGroupBox *InterfaceGroup;
  267. TLabel *CommanderDescriptionLabel2;
  268. TLabel *ExplorerDescriptionLabel;
  269. TImage *CommanderInterfacePicture;
  270. TImage *ExplorerInterfacePicture;
  271. TRadioButton *CommanderInterfaceButton2;
  272. TRadioButton *ExplorerInterfaceButton2;
  273. TLabel *AutoWorkspaceLabel;
  274. TPopupMenu *RegisterAsUrlHandlerMenu;
  275. TMenuItem *RegisterAsUrlHandlerItem;
  276. TMenuItem *UnregisterForDefaultProtocolsItem;
  277. TMenuItem *MakeDefaultHandlerItem;
  278. TLabel *Label1;
  279. TComboBox *FormatSizeBytesCombo;
  280. TCheckBox *UpdatesShowOnStartup;
  281. TCheckBox *ExternalSessionInExistingInstanceCheck;
  282. TCheckBox *TemporaryDirectoryDeterministicCheck;
  283. TGroupBox *PanelFontGroup;
  284. TLabel *PanelFontLabel;
  285. TButton *PanelFontButton;
  286. TCheckBox *PanelFontCheck;
  287. TCheckBox *LogSensitiveCheck;
  288. TTabSheet *EditorInternalSheet;
  289. TGroupBox *InternalEditorGroup;
  290. TLabel *Label9;
  291. TLabel *Label11;
  292. TCheckBox *EditorWordWrapCheck;
  293. TUpDownEdit *EditorTabSizeEdit;
  294. TComboBox *EditorEncodingCombo;
  295. TGroupBox *FontGroup;
  296. TLabel *EditorFontLabel;
  297. TButton *EditorFontButton;
  298. TButton *EditorFontColorButton;
  299. TButton *EditorBackgroundColorButton;
  300. TCheckBox *KeepOpenWhenNoSessionCheck;
  301. TLabel *UpdatesAuthenticationEmailLabel;
  302. TEdit *UpdatesAuthenticationEmailEdit;
  303. TStaticText *UpdatesLink;
  304. TCheckBox *ShowTipsCheck;
  305. TPanel *ComponentsPanel;
  306. TPopupMenu *AddCommandMenu;
  307. TMenuItem *AddCustomCommandMenuItem;
  308. TMenuItem *AddExtensionMenuItem;
  309. TStaticText *BackgroundConfirmationsLink;
  310. TButton *ConfigureCommandButton;
  311. TCheckBox *LogMaxSizeCheck;
  312. TComboBox *LogMaxSizeCombo;
  313. TCheckBox *LogMaxSizeCountCheck;
  314. TUpDownEdit *LogMaxSizeCountEdit;
  315. TLabel *LogMaxSizeCountFilesLabel;
  316. TRadioButton *CustomIniFileStorageButton;
  317. TFilenameEdit *CustomIniFileStorageEdit;
  318. TPathLabel *AutomaticIniFileStorageLabel;
  319. TCheckBox *NaturalOrderNumericalSortingCheck;
  320. TLabel *DragExtStatusLabel;
  321. TCheckBox *SynchronizeSummaryCheck;
  322. TMemo *DDDrivesMemo;
  323. TLabel *DDDrivesLabel;
  324. TTabSheet *FileColorsSheet;
  325. TGroupBox *FileColorsGroup;
  326. TListView *FileColorsView;
  327. TButton *AddFileColorButton;
  328. TButton *RemoveFileColorButton;
  329. TButton *UpFileColorButton;
  330. TButton *DownFileColorButton;
  331. TButton *EditFileColorButton;
  332. TGroupBox *ThemeGroup;
  333. TLabel *Label7;
  334. TComboBox *ThemeCombo;
  335. TComboBox *PanelSearchCombo;
  336. TLabel *Label2;
  337. TCheckBox *ShowLoginWhenNoSessionCheck;
  338. TCheckBox *LocalPortNumberCheck;
  339. TLabel *LocalPortNumberRangeLabel;
  340. TUpDownEdit *LocalPortNumberMinEdit;
  341. TUpDownEdit *LocalPortNumberMaxEdit;
  342. TCheckBox *AlwaysSortDirectoriesByNameCheck;
  343. TLabel *LogProtocolHintLabel;
  344. TGroupBox *EditingOptionsGroup;
  345. TCheckBox *EditorCheckNotModifiedCheck;
  346. TCheckBox *ParallelTransferCheck;
  347. TComboBox *ParallelTransferThresholdCombo;
  348. TLabel *ParallelTransferThresholdUnitLabel;
  349. TGroupBox *SshHostCAsGroup;
  350. TListView *SshHostCAsView;
  351. TButton *AddSshHostCAButton;
  352. TButton *RemoveSshHostCAButton;
  353. TButton *EditSshHostCAButton;
  354. TCheckBox *SshHostCAsFromPuTTYCheck;
  355. TButton *ConfigureSshHostCAsButton;
  356. TCheckBox *SessionTabCaptionTruncationCheck;
  357. TGroupBox *InternalEditorBehaviourGroup;
  358. TCheckBox *EditorDisableSmoothScrollCheck;
  359. TComboEdit *SearchEdit;
  360. TTabSheet *SearchSheet;
  361. TGroupBox *SearchGroup;
  362. TPanel *NavigationPanel;
  363. void __fastcall FormShow(TObject *Sender);
  364. void __fastcall ControlChange(TObject *Sender);
  365. void __fastcall EditorFontButtonClick(TObject *Sender);
  366. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  367. void __fastcall IconButtonClick(TObject *Sender);
  368. void __fastcall CustomCommandsViewData(TObject *Sender, TListItem *Item);
  369. void __fastcall ListViewSelectItem(TObject *Sender,
  370. TListItem *Item, bool Selected);
  371. void __fastcall CustomCommandsViewKeyDown(TObject *Sender, WORD &Key,
  372. TShiftState Shift);
  373. void __fastcall RemoveCommandButtonClick(TObject *Sender);
  374. void __fastcall UpDownCommandButtonClick(TObject *Sender);
  375. void __fastcall ListViewStartDrag(TObject *Sender,
  376. TDragObject *&DragObject);
  377. void __fastcall CustomCommandsViewDragDrop(TObject *Sender,
  378. TObject *Source, int X, int Y);
  379. void __fastcall ListViewDragOver(TObject *Sender,
  380. TObject *Source, int X, int Y, TDragState State, bool &Accept);
  381. void __fastcall NavigationTreeChange(TObject *Sender, TTreeNode *Node);
  382. void __fastcall PageControlChange(TObject *Sender);
  383. void __fastcall RegisterAsUrlHandlersButtonClick(TObject *Sender);
  384. void __fastcall DDLabelClick(TObject *Sender);
  385. void __fastcall CustomCommandsViewDblClick(TObject *Sender);
  386. void __fastcall AddSearchPathButtonClick(TObject *Sender);
  387. void __fastcall EditorFontLabelDblClick(TObject *Sender);
  388. void __fastcall CopyParamListViewData(TObject *Sender, TListItem *Item);
  389. void __fastcall CopyParamListViewDragDrop(TObject *Sender,
  390. TObject *Source, int X, int Y);
  391. void __fastcall UpDownCopyParamButtonClick(TObject *Sender);
  392. void __fastcall RemoveCopyParamButtonClick(TObject *Sender);
  393. void __fastcall CopyParamListViewKeyDown(TObject *Sender, WORD &Key,
  394. TShiftState Shift);
  395. void __fastcall AddCopyParamButtonClick(TObject *Sender);
  396. void __fastcall CopyParamListViewDblClick(TObject *Sender);
  397. void __fastcall HelpButtonClick(TObject *Sender);
  398. void __fastcall EditorListView3DragDrop(TObject *Sender, TObject *Source,
  399. int X, int Y);
  400. void __fastcall UpDownEditorButtonClick(TObject *Sender);
  401. void __fastcall RemoveEditorButtonClick(TObject *Sender);
  402. void __fastcall AddEditEditorButtonClick(TObject *Sender);
  403. void __fastcall EditorListView3DblClick(TObject *Sender);
  404. void __fastcall EditorListView3KeyDown(TObject *Sender, WORD &Key,
  405. TShiftState Shift);
  406. void __fastcall EditorListView3Data(TObject *Sender, TListItem *Item);
  407. void __fastcall PuttyPathBrowseButtonClick(TObject *Sender);
  408. void __fastcall PathEditBeforeDialog(TObject *Sender,
  409. UnicodeString &Name, bool &Action);
  410. void __fastcall PathEditAfterDialog(TObject *Sender,
  411. UnicodeString &Name, bool &Action);
  412. void __fastcall NavigationTreeCollapsing(TObject *Sender,
  413. TTreeNode *Node, bool &AllowCollapse);
  414. void __fastcall ListViewEndDrag(TObject *Sender,
  415. TObject *Target, int X, int Y);
  416. void __fastcall SessionReopenTimeoutEditSetValue(TObject *Sender,
  417. Extended Value, UnicodeString &Text, bool &Handed);
  418. void __fastcall SessionReopenTimeoutEditGetValue(TObject *Sender,
  419. UnicodeString Text, Extended &Value, bool &Handed);
  420. void __fastcall UseMasterPasswordCheckClick(TObject *Sender);
  421. void __fastcall SetMasterPasswordButtonClick(TObject *Sender);
  422. void __fastcall UsageViewButtonClick(TObject *Sender);
  423. void __fastcall DuplicateCopyParamButtonClick(TObject *Sender);
  424. void __fastcall EditCopyParamButtonClick(TObject *Sender);
  425. void __fastcall CopyParamLabelClick(TObject *Sender);
  426. void __fastcall CopyParamListViewCustomDrawItem(TCustomListView *Sender, TListItem *Item,
  427. TCustomDrawState State, bool &DefaultDraw);
  428. void __fastcall PuttyPathEditChange(TObject *Sender);
  429. void __fastcall NavigationTreeChanging(TObject *Sender, TTreeNode *Node, bool &AllowChange);
  430. void __fastcall LanguagesGetMoreButtonClick(TObject *Sender);
  431. void __fastcall CommanderClick(TObject *Sender);
  432. void __fastcall ExplorerClick(TObject *Sender);
  433. void __fastcall RegisterAsUrlHandlerItemClick(TObject *Sender);
  434. void __fastcall UnregisterForDefaultProtocolsItemClick(TObject *Sender);
  435. void __fastcall MakeDefaultHandlerItemClick(TObject *Sender);
  436. void __fastcall PanelFontLabelDblClick(TObject *Sender);
  437. void __fastcall PanelFontButtonClick(TObject *Sender);
  438. void __fastcall EditorFontColorButtonClick(TObject *Sender);
  439. void __fastcall EditorBackgroundColorButtonClick(TObject *Sender);
  440. void __fastcall UpdatesAuthenticationEmailEditExit(TObject *Sender);
  441. void __fastcall UpdatesLinkClick(TObject *Sender);
  442. void __fastcall CustomCommandsViewDragOver(TObject *Sender, TObject *Source, int X, int Y, TDragState State, bool &Accept);
  443. void __fastcall AddCommandButtonClick(TObject *Sender);
  444. void __fastcall AddCustomCommandMenuItemClick(TObject *Sender);
  445. void __fastcall AddExtensionMenuItemClick(TObject *Sender);
  446. void __fastcall EditCommandButtonClick(TObject *Sender);
  447. void __fastcall AddCommandButtonDropDownClick(TObject *Sender);
  448. void __fastcall CustomCommandsViewMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
  449. void __fastcall BackgroundConfirmationsLinkClick(TObject *Sender);
  450. void __fastcall ConfigureCommandButtonClick(TObject *Sender);
  451. void __fastcall LanguagesViewCustomDrawItem(TCustomListView * Sender, TListItem * Item, TCustomDrawState State, bool & DefaultDraw);
  452. void __fastcall SizeComboExit(TObject *Sender);
  453. void __fastcall PuttyPathEditExit(TObject *Sender);
  454. void __fastcall AutomaticIniFileStorageLabelGetStatus(TCustomPathLabel *Sender, bool &Active);
  455. void __fastcall CustomIniFileStorageEditExit(TObject *Sender);
  456. void __fastcall CustomIniFileStorageEditAfterDialog(TObject *Sender, UnicodeString &Name, bool &Action);
  457. void __fastcall CustomIniFileStorageButtonClick(TObject *Sender);
  458. void __fastcall FileColorsViewData(TObject *Sender, TListItem *Item);
  459. void __fastcall AddEditFileColorButtonClick(TObject *Sender);
  460. void __fastcall FileColorsViewCustomDrawItem(TCustomListView *Sender, TListItem *Item, TCustomDrawState State, bool &DefaultDraw);
  461. void __fastcall FileColorsViewDragDrop(TObject *Sender, TObject *Source, int X, int Y);
  462. void __fastcall FileColorsViewKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
  463. void __fastcall RemoveFileColorButtonClick(TObject *Sender);
  464. void __fastcall FileColorsViewDblClick(TObject *Sender);
  465. void __fastcall UpDownFileColorButtonClick(TObject *Sender);
  466. void __fastcall CopyParamListViewDragOver(TObject *Sender, TObject *Source, int X, int Y, TDragState State, bool &Accept);
  467. void __fastcall LocalPortNumberMinEditExit(TObject *Sender);
  468. void __fastcall LocalPortNumberMaxEditExit(TObject *Sender);
  469. void __fastcall SshHostCAsViewDblClick(TObject *Sender);
  470. void __fastcall SshHostCAsViewKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
  471. void __fastcall AddSshHostCAButtonClick(TObject *Sender);
  472. void __fastcall SshHostCAsViewData(TObject *Sender, TListItem *Item);
  473. void __fastcall EditSshHostCAButtonClick(TObject *Sender);
  474. void __fastcall RemoveSshHostCAButtonClick(TObject *Sender);
  475. void __fastcall SshHostCAsFromPuTTYCheckClick(TObject *Sender);
  476. void __fastcall ConfigureSshHostCAsButtonClick(TObject *Sender);
  477. void __fastcall SearchEditButtonClick(TObject *Sender);
  478. void __fastcall SearchEditChangeEnter(TObject *Sender);
  479. void __fastcall NavigationTreeEnter(TObject *Sender);
  480. void __fastcall FormShortCut(TWMKey &Msg, bool &Handled);
  481. void __fastcall FormAfterMonitorDpiChanged(TObject *Sender, int OldDPI, int NewDPI);
  482. private:
  483. TPreferencesMode FPreferencesMode;
  484. std::unique_ptr<TFont> FEditorFont;
  485. TColor FEditorBackgroundColor;
  486. std::unique_ptr<TFont> FPanelFont;
  487. TCustomCommandList * FCustomCommandList;
  488. TCustomCommandList * FExtensionList;
  489. TCopyParamList * FCopyParamList;
  490. TEditorList * FEditorList;
  491. bool FCustomCommandChanging;
  492. bool FAfterFilenameEditDialog;
  493. int FListViewDragSource;
  494. int FListViewDragDest;
  495. TPreferencesDialogData * FDialogData;
  496. UnicodeString FBeforeDialogPath;
  497. TCopyParamType FCopyParams;
  498. TListViewScrollOnDragOver * FCustomCommandsScrollOnDragOver;
  499. TListViewScrollOnDragOver * FCopyParamScrollOnDragOver;
  500. TListViewScrollOnDragOver * FEditorScrollOnDragOver;
  501. TListViewScrollOnDragOver * FFileColorScrollOnDragOver;
  502. int FNoUpdate;
  503. bool FLanguagesLoaded;
  504. std::unique_ptr<TPopupMenu> FColorPopupMenu;
  505. UnicodeString FVerifiedUpdatesAuthenticationEmail;
  506. bool FAutomaticUpdatesPossible;
  507. TWndMethod FOrigCustomCommandsViewWindowProc;
  508. int FCustomCommandsHintItem;
  509. std::unique_ptr<TStrings> FAddedExtensions;
  510. std::unique_ptr<TStringList> FCustomCommandOptions;
  511. UnicodeString FCustomIniFileStorageName;
  512. TFileColorData::TList FFileColors;
  513. TSshHostCA::TList FSshHostCAPlainList;
  514. std::unique_ptr<TStrings> FSearchResults;
  515. bool FHideFocus;
  516. bool FInitialized;
  517. void __fastcall CMDialogKey(TWMKeyDown & Message);
  518. void __fastcall WMHelp(TWMHelp & Message);
  519. void WMActivate(TWMActivate & Message);
  520. UnicodeString __fastcall TabSample(UnicodeString Values);
  521. void __fastcall AddEditCopyParam(TCopyParamPresetMode Mode);
  522. const TCopyParamType * GetCopyParam(int Index);
  523. void __fastcall SelectPuttyRegistryStorageKey(const UnicodeString & Key);
  524. TInterface __fastcall GetInterface();
  525. TUpdatesConfiguration __fastcall SaveUpdates();
  526. void __fastcall CustomCommandsViewWindowProc(TMessage & Message);
  527. TCustomCommandList * __fastcall GetCommandList(int Index);
  528. int __fastcall GetCommandIndex(int Index);
  529. int __fastcall GetCommandListIndex(TCustomCommandList * List, int Index);
  530. int __fastcall GetListCommandIndex(TCustomCommandList * List);
  531. UnicodeString __fastcall GetSessionKey();
  532. void __fastcall ExtensionHttpError(THttp * Sender, int Status, const UnicodeString & Message);
  533. const TSshHostCA::TList & GetSshHostCAPlainList();
  534. void UpdateSearching(bool ASearching);
  535. void Search(TControl * Control, TStrings * Results, bool & NewResults);
  536. void __fastcall SearchResultClick(TObject * Sender);
  537. void SetActivePage(TTabSheet * Page);
  538. void FocusAndHighlightControl(TControl * Control, const UnicodeString & Text);
  539. void CMFocusChanged(TMessage & Message);
  540. void HideFocus(int State);
  541. static int __fastcall CompareControlByLocation(void * Item1, void * Item2);
  542. void AddSearchResult(TStrings * Results, UnicodeString & Caption, TControl * Control, bool & NewResults);
  543. void SetFocusIfEnabled(TControl * Control);
  544. UnicodeString GetControlText(TControl * Control);
  545. TWinControl * GetSearchParent(TControl * Control);
  546. public:
  547. virtual __fastcall ~TPreferencesDialog();
  548. bool __fastcall Execute(TPreferencesDialogData * DialogData);
  549. virtual __fastcall TPreferencesDialog(TComponent* AOwner, TPreferencesMode PreferencesMode);
  550. protected:
  551. void __fastcall LoadConfiguration();
  552. void __fastcall SaveConfiguration();
  553. void __fastcall UpdateControls();
  554. void __fastcall UpdateCustomCommandsView();
  555. void __fastcall UpdateCopyParamListView();
  556. void __fastcall UpdateEditorListView();
  557. void __fastcall CustomCommandMove(int Source, int Dest);
  558. void __fastcall CopyParamMove(int Source, int Dest);
  559. void __fastcall EditorMove(int Source, int Dest);
  560. bool __fastcall AllowListViewDrag(TObject * Sender, int X, int Y);
  561. void __fastcall PrepareNavigationTree(TTreeView * Tree);
  562. virtual void __fastcall Dispatch(void * Message);
  563. TListViewScrollOnDragOver * __fastcall ScrollOnDragOver(TObject * ListView);
  564. void __fastcall LoadLanguages();
  565. TTabSheet * __fastcall FindPageForTreeNode(TTreeNode * Node);
  566. TTreeNode * FindTreeNodeForPage(TTabSheet * Sheet);
  567. bool __fastcall CanSetMasterPassword();
  568. void __fastcall ChangeMasterPassword(UnicodeString Message);
  569. void __fastcall MasterPasswordChanged(
  570. UnicodeString Message, TStrings * RecryptPasswordErrors);
  571. void __fastcall EditorFontColorChange(TColor Color);
  572. void __fastcall EditorBackgroundColorChange(TColor Color);
  573. void __fastcall AddEditCommand(bool Edit);
  574. void __fastcall AddExtension();
  575. void __fastcall ConfigureCommand();
  576. void __fastcall CustomIniFileStorageChanged();
  577. UnicodeString __fastcall GetCustomIniFileStorageName();
  578. TShortCuts __fastcall GetShortCuts();
  579. void __fastcall FileColorMove(int Source, int Dest);
  580. void __fastcall UpdateFileColorsView();
  581. void __fastcall AddEditFileColor(bool Edit);
  582. UnicodeString Bullet(const UnicodeString & S);
  583. void UpdateSshHostCAsViewView();
  584. void SshHostCAsRefresh();
  585. INTERFACE_HOOK;
  586. };
  587. //----------------------------------------------------------------------------
  588. #endif