fpconst.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Constants used by the IDE
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit FPConst;
  13. interface
  14. uses Views,App,Commands,
  15. WViews;
  16. const
  17. VersionStr = '0.9';
  18. MaxRecentFileCount = 5;
  19. MaxToolCount = 16;
  20. ReservedWordMaxLen = 16;
  21. CompilerStatusUpdateDelay = 0.8; { in secs }
  22. ININame = 'fp.ini';
  23. SwitchesName = 'fp.cfg';
  24. DesktopName = 'fp.dsk';
  25. ToolCaptureName = '__TOOL__.OUT'; { all '$' signs replaces with '_'s }
  26. FilterCaptureName = '_FILTER_.OUT';
  27. FPOutFileName = 'FP___.OUT';
  28. FPErrFileName = 'FP___.ERR';
  29. GDBOutFileName = 'GDB___.OUT';
  30. GDBOutPutFileName = 'GDB___.txt';
  31. HelpFileExts = '*.tph;*.htm*';
  32. EnterSign = #17#196#217;
  33. { Strings/Messages }
  34. strLoadingHelp = 'Loading help files...';
  35. strBuildingHelpIndex = 'Building Help Index...';
  36. strLocatingTopic = 'Locating topic...';
  37. { Main menu submenu indexes }
  38. menuFile = 0;
  39. menuTools = 6;
  40. { MouseAction constants }
  41. acNone = 0;
  42. acTopicSearch = 1;
  43. acGotoCursor = 2;
  44. acBreakpoint = 3;
  45. acEvaluate = 4;
  46. acAddWatch = 5;
  47. acBrowseSymbol = 6;
  48. acFirstAction = acTopicSearch;
  49. acLastAction = acBrowseSymbol;
  50. { Startup Option constants }
  51. soReturnToLastDir = $00000001;
  52. { Desktop Flag constants - what to include in the desktop file }
  53. dfHistoryLists = $00000001;
  54. dfClipboardContent = $00000002;
  55. dfWatches = $00000004;
  56. dfBreakpoints = $00000008;
  57. dfOpenWindows = $00000010;
  58. dfSymbolInformation = $00000020;
  59. { Auto Save flag constants }
  60. asEditorFiles = $00000001; { Editor files }
  61. asEnvironment = $00000002; { .INI file }
  62. asDesktop = $00000004; { .DSK file }
  63. { Misc. Options flag constants }
  64. moAutoTrackSource = $00000001;
  65. moCloseOnGotoSource = $00000002;
  66. moChangeDirOnOpen = $00000004;
  67. { Desktop Location constants }
  68. dlCurrentDir = $00;
  69. dlConfigFileDir = $01;
  70. { Command constants }
  71. cmShowClipboard = 201;
  72. cmFindProcedure = 206;
  73. cmObjects = 207;
  74. cmModules = 208;
  75. cmGlobals = 209;
  76. cmRun = 210;
  77. cmParameters = 211;
  78. cmCompile = 212;
  79. cmMake = 213;
  80. cmBuild = 214;
  81. cmTarget = 215;
  82. cmPrimaryFile = 216;
  83. cmClearPrimary = 217;
  84. cmInformation = 218;
  85. cmWindowList = 219;
  86. cmHelpTopicSearch = 220;
  87. cmMsgGotoSource = 221;
  88. cmMsgTrackSource = 222;
  89. cmGotoCursor = 223;
  90. {cmToggleBreakpoint = 224; never disabled =>2403 }
  91. cmAddWatch = 225;
  92. cmTraceInto = 226;
  93. cmStepOver = 227;
  94. cmResetDebugger = 228;
  95. cmContToCursor = 229;
  96. cmOpenGDBWindow = 230;
  97. cmToolsMsgNext = 231;
  98. cmToolsMsgPrev = 232;
  99. cmGrep = 233;
  100. cmCompilerMessages = 234;
  101. cmSymbol = 235;
  102. cmStack = 236;
  103. cmBreakpointList = 237;
  104. cmWatches = 238;
  105. cmUntilReturn = 239;
  106. { WARNING these two are also defined in weditor.pas PM }
  107. cmCopyWin = 240;
  108. cmPasteWin = 241;
  109. cmNotImplemented = 1000;
  110. cmNewFromTemplate = 1001;
  111. cmSearchWindow = 1500;
  112. cmSourceWndClosing = 1601;
  113. cmCalculatorPaste = 1603;
  114. cmMsgClear = 1604;
  115. cmUpdateTools = 1605;
  116. { cmGrep = 160?;}
  117. cmAddItem = 1620;
  118. cmEditItem = 1621;
  119. cmDeleteItem = 1622;
  120. cmUserScreen = 1650;
  121. cmUserScreenWindow = 1651;
  122. cmEvaluate = 1652;
  123. cmCalculator = 1653;
  124. cmASCIITable = 1654;
  125. cmToolsMessages = 1700;
  126. cmToolsBase = 1800;
  127. cmRecentFileBase = 1850;
  128. cmCompiler = 2000;
  129. cmMemorySizes = 2001;
  130. cmLinker = 2002;
  131. cmDebugger = 2003;
  132. cmDirectories = 2004;
  133. cmTools = 2005;
  134. cmPreferences = 2006;
  135. cmEditor = 2007;
  136. cmMouse = 2008;
  137. cmStartup = 2009;
  138. cmColors = 2010;
  139. cmOpenINI = 2011;
  140. cmSaveINI = 2012;
  141. cmSaveAsINI = 2013;
  142. cmSwitchesMode = 2014;
  143. cmBrowser = 2015;
  144. cmDesktopOptions = 2016;
  145. cmHelpContents = 2100;
  146. cmHelpIndex = 2101;
  147. cmHelpPrevTopic = 2103;
  148. cmHelpUsingHelp = 2104;
  149. cmHelpFiles = 2105;
  150. cmAbout = 2106;
  151. cmOpenAtCursor = 2200;
  152. cmBrowseAtCursor = 2201;
  153. cmEditorOptions = 2202;
  154. cmBrowserOptions = 2203;
  155. cmTrackReference = 2300;
  156. cmGotoReference = 2301;
  157. cmEditBreakpoint = 2400;
  158. cmNewBreakpoint = 2401;
  159. cmDeleteBreakpoint = 2402;
  160. cmToggleBreakpoint = 2403;
  161. { Help constants }
  162. hcSourceWindow = 8000;
  163. hcHelpWindow = 8001;
  164. hcClipboardWindow = 8002;
  165. hcCalcWindow = 8003;
  166. hcInfoWindow = 8004;
  167. hcBrowserWindow = 8005;
  168. hcMessagesWindow = 8006;
  169. hcGDBWindow = 8007;
  170. hcBreakpointListWindow = 8008;
  171. hcShift = 10000;
  172. hcUsingHelp = 2;
  173. hcContents = 3;
  174. hcQuit = hcShift+cmQuit;
  175. hcRedo = hcShift+cmRedo;
  176. hcFind = hcShift+cmFind;
  177. hcReplace = hcShift+cmReplace;
  178. hcSearchAgain = hcShift+cmSearchAgain;
  179. hcGotoLine = hcShift+cmJumpLine;
  180. hcUserScreen = hcShift+cmUserScreen;
  181. hcUserScreenWindow = hcShift+cmUserScreenWindow;
  182. hcToolsMessages = hcShift+cmToolsMessages;
  183. hcToolsBase = hcShift+cmToolsBase;
  184. hcRecentFileBase = hcShift+cmRecentFileBase;
  185. hcCompiler = hcShift+cmCompiler;
  186. hcMemorySizes = hcShift+cmMemorySizes;
  187. hcLinker = hcShift+cmLinker;
  188. hcDebugger = hcShift+cmDebugger;
  189. hcDirectories = hcShift+cmDirectories;
  190. hcTools = hcShift+cmTools;
  191. hcPreferences = hcShift+cmPreferences;
  192. hcEditor = hcShift+cmEditor;
  193. hcMouse = hcShift+cmMouse;
  194. hcStartup = hcShift+cmStartup;
  195. hcColors = hcShift+cmColors;
  196. hcOpenINI = hcShift+cmOpenINI;
  197. hcSaveINI = hcShift+cmSaveINI;
  198. hcSaveAsINI = hcShift+cmSaveAsINI;
  199. hcCalculator = hcShift+cmCalculator;
  200. hcAsciiTable = hcShift+cmAsciiTable;
  201. { hcGrep = hcShift+cmGrep;}
  202. hcSwitchesMode = hcShift+cmSwitchesMode;
  203. hcBrowser = hcShift+cmBrowser;
  204. hcDesktopOptions = hcShift+cmDesktopOptions;
  205. hcAbout = hcShift+cmAbout;
  206. hcCompilerMessages = hcShift+cmCompilerMessages;
  207. hcSystemMenu = 9000;
  208. hcFileMenu = 9001;
  209. hcEditMenu = 9002;
  210. hcSearchMenu = 9003;
  211. hcRunMenu = 9004;
  212. hcCompileMenu = 9005;
  213. hcDebugMenu = 9006;
  214. hcToolsMenu = 9007;
  215. hcOptionsMenu = 9008;
  216. hcEnvironmentMenu = 9009;
  217. hcWindowMenu = 9010;
  218. hcHelpMenu = 9011;
  219. hcFirstCommand = hcSystemMenu;
  220. hcLastCommand = 65535;
  221. hcShowClipboard = hcShift+cmShowClipboard;
  222. hcCopyWin = hcShift+cmCopyWin;
  223. hcPasteWin = hcShift+cmPasteWin;
  224. hcFindProcedure = hcShift+cmFindProcedure;
  225. hcObjects = hcShift+cmObjects;
  226. hcModules = hcShift+cmModules;
  227. hcGlobals = hcShift+cmGlobals;
  228. hcSymbol = hcShift+cmSymbol;
  229. hcRun = hcShift+cmRun;
  230. hcParameters = hcShift+cmParameters;
  231. hcResetDebugger = hcShift+cmResetDebugger;
  232. hcContToCursor = hcShift+cmContToCursor;
  233. hcUntilReturn = hcShift+cmUntilReturn;
  234. hcOpenGDBWindow = hcShift+cmOpenGDBWindow;
  235. hcToolsMsgNext = hcShift+cmToolsMsgNext;
  236. hcToolsMsgPrev = hcShift+cmToolsMsgPrev;
  237. hcCompile = hcShift+cmCompile;
  238. hcMake = hcShift+cmMake;
  239. hcBuild = hcShift+cmBuild;
  240. hcTarget = hcShift+cmTarget;
  241. hcPrimaryFile = hcShift+cmPrimaryFile;
  242. hcClearPrimary = hcShift+cmClearPrimary;
  243. hcInformation = hcShift+cmInformation;
  244. hcWindowList = hcShift+cmWindowList;
  245. hcNewFromTemplate = hcShift+cmNewFromTemplate;
  246. hcHelpTopicSearch = hcShift+cmHelpTopicSearch;
  247. hcHelpContents = hcShift+cmHelpContents;
  248. hcHelpIndex = hcShift+cmHelpIndex;
  249. hcHelpPrevTopic = hcShift+cmHelpPrevTopic;
  250. hcHelpUsingHelp = hcShift+cmHelpUsingHelp;
  251. hcHelpFiles = hcShift+cmHelpFiles;
  252. hcUpdate = hcShift+cmUpdate;
  253. hcMsgClear = hcShift+cmMsgClear;
  254. hcMsgGotoSource = hcShift+cmMsgGotoSource;
  255. hcMsgTrackSource = hcShift+cmMsgTrackSource;
  256. hcGotoCursor = hcShift+cmGotoCursor;
  257. hcNewBreakpoint = hcShift+cmNewBreakpoint;
  258. hcEditBreakpoint = hcShift+cmEditBreakpoint;
  259. hcDeleteBreakpoint = hcShift+cmDeleteBreakpoint;
  260. hcToggleBreakpoint = hcShift+cmToggleBreakpoint;
  261. hcEvaluate = hcShift+cmEvaluate;
  262. hcAddWatch = hcShift+cmAddWatch;
  263. hcWatches = hcShift+cmWatches;
  264. hcGrep = hcShift+cmGrep;
  265. hcStack = hcShift+cmStack;
  266. hcBreakPointList = hcShift+cmBreakpointList;
  267. hcOpenAtCursor = hcShift+cmOpenAtCursor;
  268. hcBrowseAtCursor = hcShift+cmBrowseAtCursor;
  269. hcEditorOptions = hcShift+cmEditorOptions;
  270. { History constants }
  271. hisChDirDialog = 2000;
  272. CIDEHelpDialog =
  273. #128#129#130#131#132#133#134#135#136#137#138#139#140#141#142#143 +
  274. #144#145#146#147#148#149#150#151#152#153#154#155#156#157#158#159 +
  275. #160#161#162#163 +
  276. #164#165#166;
  277. CSourceWindow =
  278. #167#168#169#170#171#172#173#174#175#176#177#178#179#180#181#182 +
  279. #183#184#185#186#187#188#189#190#191#192#193#194#195#196#197#198 +
  280. #199#200#201#202#203#204#205#206#207#208#209#210#211#212#213#214 ;
  281. CBrowserWindow =
  282. #215#216#217#218#219#220#221#222#223#224#225#226;
  283. CBrowserListBox =
  284. #9#9#10#11#12;
  285. CBrowserTab =
  286. #6#12;
  287. CBrowserOutline = #9#10#10#11;
  288. CGDBInputLine = #9#9#10#11#12;
  289. CFPClockView = #0#227;
  290. CIDEAppColor = CAppColor +
  291. { CIDEHelpDialog }
  292. {128-143}#$70#$7F#$7A#$13#$13#$70#$70#$7F#$7E#$20#$2B#$2F#$78#$2E#$70#$30 + { 1-16}
  293. {144-159}#$3F#$3E#$1F#$2F#$1A#$20#$72#$31#$31#$30#$2F#$3E#$31#$13#$38#$00 + {17-32}
  294. {160-163}#$30#$3E#$1E#$70 + { CHelpViewer } {33-36}
  295. {164-166}#$30#$3F#$3A + { CHelpFrame } {37-39}
  296. { CSourceWindow }
  297. {167-182}#$17#$1F#$1A#$31#$31#$1E#$71#$1F#$00#$00#$00#$00#$00#$00#$00#$00 + { 1-16}
  298. {183-198}#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00 + {17-32}
  299. {199-214}#$1E#$1F#$17#$1F#$1E#$1B#$13#$1A#$1E#$71#$3F#$30#$1C#$13#$1F#$4E + {33-48}
  300. { CBrowserWindow }
  301. {215-226}#$31#$3F#$3A#$31#$31#$31#$71#$1F#$31#$2F#$3E#$3F +
  302. { CFPClockView }
  303. {227- }#$70;
  304. implementation
  305. END.
  306. {
  307. $Log$
  308. Revision 1.28 1999-10-14 10:23:44 pierre
  309. ClockView Black on Gray by default
  310. Revision 1.27 1999/09/13 16:24:43 peter
  311. + clock
  312. * backspace unident like tp7
  313. Revision 1.26 1999/09/09 16:31:45 pierre
  314. * some breakpoint related fixes and Help contexts
  315. Revision 1.25 1999/09/09 14:15:27 pierre
  316. + cmCopyWin,cmPasteWin
  317. Revision 1.24 1999/08/16 18:25:14 peter
  318. * Adjusting the selection when the editor didn't contain any line.
  319. * Reserved word recognition redesigned, but this didn't affect the overall
  320. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  321. The syntax scanner loop is a bit slow but the main problem is the
  322. recognition of special symbols. Switching off symbol processing boosts
  323. the performance up to ca. 200%...
  324. * The editor didn't allow copying (for ex to clipboard) of a single character
  325. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  326. * Compiler Messages window (actually the whole desktop) did not act on any
  327. keypress when compilation failed and thus the window remained visible
  328. + Message windows are now closed upon pressing Esc
  329. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  330. only when neccessary
  331. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  332. + LineSelect (Ctrl+K+L) implemented
  333. * The IDE had problems closing help windows before saving the desktop
  334. Revision 1.23 1999/08/03 20:22:27 peter
  335. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  336. + Desktop saving should work now
  337. - History saved
  338. - Clipboard content saved
  339. - Desktop saved
  340. - Symbol info saved
  341. * syntax-highlight bug fixed, which compared special keywords case sensitive
  342. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  343. * with 'whole words only' set, the editor didn't found occourences of the
  344. searched text, if the text appeared previously in the same line, but didn't
  345. satisfied the 'whole-word' condition
  346. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  347. (ie. the beginning of the selection)
  348. * when started typing in a new line, but not at the start (X=0) of it,
  349. the editor inserted the text one character more to left as it should...
  350. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  351. * Shift shouldn't cause so much trouble in TCodeEditor now...
  352. * Syntax highlight had problems recognizing a special symbol if it was
  353. prefixed by another symbol character in the source text
  354. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  355. Revision 1.22 1999/07/12 13:14:14 pierre
  356. * LineEnd bug corrected, now goes end of text even if selected
  357. + Until Return for debugger
  358. + Code for Quit inside GDB Window
  359. Revision 1.21 1999/07/10 01:24:13 pierre
  360. + First implementation of watches window
  361. Revision 1.20 1999/06/30 23:58:11 pierre
  362. + BreakpointsList Window implemented
  363. with Edit/New/Delete functions
  364. + Individual breakpoint dialog with support for all types
  365. ignorecount and conditions
  366. (commands are not yet implemented, don't know if this wolud be useful)
  367. awatch and rwatch have problems because GDB does not annotate them
  368. I fixed v4.16 for this
  369. Revision 1.19 1999/06/28 19:32:18 peter
  370. * fixes from gabor
  371. Revision 1.18 1999/06/25 00:38:59 pierre
  372. +cmSymbol,cmStack,cmBreakpointList
  373. Revision 1.17 1999/04/07 21:55:44 peter
  374. + object support for browser
  375. * html help fixes
  376. * more desktop saving things
  377. * NODEBUG directive to exclude debugger
  378. Revision 1.16 1999/03/23 15:11:27 peter
  379. * desktop saving things
  380. * vesa mode
  381. * preferences dialog
  382. Revision 1.15 1999/03/19 16:04:28 peter
  383. * new compiler dialog
  384. Revision 1.14 1999/03/16 12:38:08 peter
  385. * tools macro fixes
  386. + tph writer
  387. + first things for resource files
  388. Revision 1.13 1999/03/01 15:41:51 peter
  389. + Added dummy entries for functions not yet implemented
  390. * MenuBar didn't update itself automatically on command-set changes
  391. * Fixed Debugging/Profiling options dialog
  392. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is set
  393. * efBackSpaceUnindents works correctly
  394. + 'Messages' window implemented
  395. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  396. + Added TP message-filter support (for ex. you can call GREP thru
  397. GREP2MSG and view the result in the messages window - just like in TP)
  398. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  399. so topic search didn't work...
  400. * In FPHELP.PAS there were still context-variables defined as word instead
  401. of THelpCtx
  402. * StdStatusKeys() was missing from the statusdef for help windows
  403. + Topic-title for index-table can be specified when adding a HTML-files
  404. Revision 1.12 1999/02/22 11:51:34 peter
  405. * browser updates from gabor
  406. Revision 1.11 1999/02/20 15:18:28 peter
  407. + ctrl-c capture with confirm dialog
  408. + ascii table in the tools menu
  409. + heapviewer
  410. * empty file fixed
  411. * fixed callback routines in fpdebug to have far for tp7
  412. Revision 1.10 1999/02/11 19:07:19 pierre
  413. * GDBWindow redesigned :
  414. normal editor apart from
  415. that any kbEnter will send the line (for begin to cursor)
  416. to GDB command !
  417. GDBWindow opened in Debugger Menu
  418. still buggy :
  419. -echo should not be present if at end of text
  420. -GDBWindow becomes First after each step (I don't know why !)
  421. Revision 1.9 1999/02/08 17:40:00 pierre
  422. + cmContToCursor added
  423. Revision 1.8 1999/02/04 12:23:43 pierre
  424. + cmResetDebugger and cmGrep
  425. * Avoid StatusStack overflow
  426. Revision 1.7 1999/01/22 10:24:02 peter
  427. * first debugger things
  428. Revision 1.6 1999/01/21 11:54:12 peter
  429. + tools menu
  430. + speedsearch in symbolbrowser
  431. * working run command
  432. Revision 1.5 1999/01/12 14:29:33 peter
  433. + Implemented still missing 'switch' entries in Options menu
  434. + Pressing Ctrl-B sets ASCII mode in editor, after which keypresses (even
  435. ones with ASCII < 32 ; entered with Alt+<###>) are interpreted always as
  436. ASCII chars and inserted directly in the text.
  437. + Added symbol browser
  438. * splitted fp.pas to fpide.pas
  439. Revision 1.4 1999/01/04 11:49:43 peter
  440. * 'Use tab characters' now works correctly
  441. + Syntax highlight now acts on File|Save As...
  442. + Added a new class to syntax highlight: 'hex numbers'.
  443. * There was something very wrong with the palette managment. Now fixed.
  444. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  445. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  446. process revised
  447. Revision 1.2 1998/12/28 15:47:43 peter
  448. + Added user screen support, display & window
  449. + Implemented Editor,Mouse Options dialog
  450. + Added location of .INI and .CFG file
  451. + Option (INI) file managment implemented (see bottom of Options Menu)
  452. + Switches updated
  453. + Run program
  454. Revision 1.3 1998/12/22 10:39:41 peter
  455. + options are now written/read
  456. + find and replace routines
  457. }