fpconst.pas 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. {
  2. This file is part of the Free Pascal Integrated Development Environment
  3. Copyright (c) 1998 by Berczi Gabor
  4. Constants used by the IDE
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. unit FPConst;
  12. interface
  13. uses Views,App,
  14. FVConsts,
  15. WViews,WEditor,WHTMLHlp;
  16. const
  17. VersionStr = '1.0.12';
  18. MaxRecentFileCount = 9;
  19. MaxToolCount = 16;
  20. ReservedWordMaxLen = 16;
  21. CompilerStatusUpdateDelay = 0.1; { in secs }
  22. {$undef USE_SPECIAL_BASENAME}
  23. {$ifdef USE_FPBASENAME}
  24. { FPBaseName set through environment variable FPBASENAME }
  25. FPBaseName = {$i %FPBASENAME%};
  26. {$define USE_SPECIAL_BASENAME}
  27. {$else}
  28. {$ifdef m68k}
  29. {$ifdef cpui386}
  30. {$define USE_SPECIAL_BASENAME}
  31. FPBaseName = 'fpm68k';
  32. {$endif cpui386}
  33. {$endif m68k}
  34. {$ifdef powerpc}
  35. {$ifdef cpui386}
  36. {$define USE_SPECIAL_BASENAME}
  37. FPBaseName = 'fpppc';
  38. {$endif powerpc}
  39. {$endif m68k}
  40. {$ifdef i386}
  41. {$ifdef cpu68k}
  42. {$define USE_SPECIAL_BASENAME}
  43. FPBaseName = 'fpi386';
  44. {$endif cpu68k}
  45. {$endif i386}
  46. {$ifdef SUPPORT_REMOTE}
  47. {$define USE_SPECIAL_BASENAME}
  48. { this uses PPC_TARGET env. variable from Makefile }
  49. FPBaseName = 'fp_'+{$i %PPC_TARGET%};
  50. {$endif SUPPORT_REMOTE}
  51. {$endif not USE_FPBASENAME}
  52. {$ifndef USE_SPECIAL_BASENAME}
  53. FPBaseName = 'fp';
  54. {$endif not USE_SPECIAL_BASENAME}
  55. ININame = FPBaseName+'.ini';
  56. DirInfoName = FPBaseName+'.dir';
  57. SwitchesName = FPBaseName+'.cfg';
  58. DesktopName = FPBaseName+'.dsk';
  59. BrowserName = FPBaseName+'.brw';
  60. BackgroundName = 'fp.ans';
  61. ReadmeName = 'readme.ide';
  62. ToolCaptureName = '__tool__.out'; { all '$' signs replaces with '_'s }
  63. ToolCaptureErr = '__tool__.err'; { all '$' signs replaces with '_'s }
  64. FilterCaptureName = '_filter_.out';
  65. FPOutFileName = 'fp___.out';
  66. FPErrFileName = 'fp___.err';
  67. GDBOutFileName = 'gdb___.out';
  68. GDBOutPutFileName = 'gdb___.txt';
  69. GDBPrompt = 'gdb>';
  70. DesktopTempName = 'fp___.dsk';
  71. GrepOutName = 'grep$$.out';
  72. GrepErrName = 'grep$$.err';
  73. CodeCompleteUnitName = '__fp__';
  74. HTMLIndexExt = WHTMLHlp.extHTMLIndex;
  75. HTMLExt = WHTMLHlp.extHTML;
  76. TemplateExt = '.pt';
  77. NGExt = '.ng';
  78. INFExt = '.inf';
  79. WinHelpExt = '.hlp';
  80. HelpFileExts = '*.tph;*.htm*;*'+HTMLIndexExt+';*'+NGExt+';*'+WinHelpExt+';*'+INFExt+';*'+ExtChm;
  81. EnterSign = #17#196#217;
  82. { Main menu submenu indexes }
  83. menuFile = 0;
  84. menuTools = 6;
  85. { MouseAction constants }
  86. acNone = 0;
  87. acTopicSearch = 1;
  88. acGotoCursor = 2;
  89. acBreakpoint = 3;
  90. acEvaluate = 4;
  91. acAddWatch = 5;
  92. acBrowseSymbol = 6;
  93. acFirstAction = acTopicSearch;
  94. acLastAction = acBrowseSymbol;
  95. { Startup Option constants }
  96. soReturnToLastDir = $00000001;
  97. soHeapMonitor = $00000002;
  98. { Desktop Flag constants - what to include in the desktop file }
  99. dfHistoryLists = $00000001;
  100. dfClipboardContent = $00000002;
  101. dfWatches = $00000004;
  102. dfBreakpoints = $00000008;
  103. dfOpenWindows = $00000010;
  104. dfSymbolInformation = $00000020;
  105. dfCodeCompleteWords = $00000040;
  106. dfCodeTemplates = $00000080;
  107. { Auto Save flag constants }
  108. asEditorFiles = $00000001; { Editor files }
  109. asEnvironment = $00000002; { .INI file }
  110. asDesktop = $00000004; { .DSK file }
  111. { Misc. Options flag constants }
  112. moAutoTrackSource = $00000001;
  113. moCloseOnGotoSource = $00000002;
  114. moChangeDirOnOpen = $00000004;
  115. { Desktop Location constants }
  116. dlCurrentDir = $00;
  117. dlConfigFileDir = $01;
  118. { History ids }
  119. hidRunParameters = 200;
  120. hidOpenSourceFile = 201;
  121. hidPrimaryFile = 202;
  122. hidOpenIniFile = 203;
  123. hidSaveIniFile = hidOpenIniFile;
  124. hidOpenHelpFile = 204;
  125. hidConditionalDefines= 205;
  126. hidCompilerArgs = 206;
  127. hidWatchDialog = 207;
  128. hidBreakpointDialogName = 208;
  129. hidRunDir = 209;
  130. hidBreakpointDialogCond = 210;
  131. hidPrinterDevice = 211;
  132. hidEvaluate = 212;
  133. { Command constants }
  134. cmShowClipboard = 201;
  135. cmFindProcedure = 206;
  136. cmObjects = 207;
  137. cmModules = 208;
  138. cmGlobals = 209;
  139. cmRun = 210;
  140. cmParameters = 211;
  141. cmCompile = 212;
  142. cmMake = 213;
  143. cmBuild = 214;
  144. cmTarget = 215;
  145. cmPrimaryFile = 216;
  146. cmClearPrimary = 217;
  147. cmRunDir = 218;
  148. { cmWindowList = 219; defined in command.pas, too! - Gabor }
  149. cmHelpTopicSearch = 220;
  150. cmMsgGotoSource = 221;
  151. cmMsgTrackSource = 222;
  152. cmGotoCursor = 223;
  153. {cmToggleBreakpoint = 224; never disabled =>2403 }
  154. cmAddWatch = 225;
  155. cmTraceInto = 226;
  156. cmStepOver = 227;
  157. cmResetDebugger = 228;
  158. cmContToCursor = 229;
  159. cmOpenGDBWindow = 230;
  160. cmToolsMsgNext = 231;
  161. cmToolsMsgPrev = 232;
  162. cmGrep = 233;
  163. cmCompilerMessages = 234;
  164. cmSymbol = 235;
  165. cmStack = 236;
  166. cmBreakpointList = 237;
  167. cmWatches = 238;
  168. cmUntilReturn = 239;
  169. { WARNING these two are also defined in weditor.pas PM }
  170. { and why aren't these defines then removed? Gabor }
  171. { commented out, now in wviews.pas FK
  172. cmCopyWin = 240;
  173. cmPasteWin = 241;
  174. }
  175. cmRegisters = 242;
  176. cmFPURegisters = 243;
  177. cmDoReload = 244;
  178. cmVectorRegisters = 245;
  179. { in wviews.pas defined
  180. cmSelectAll = 246;
  181. cmUnselect = 247;
  182. }
  183. cmPrint = 248;
  184. cmNotImplemented = 1000;
  185. cmNewFromTemplate = 1001;
  186. cmShowReadme = 1002;
  187. cmPrinterSetup = 1003;
  188. cmSearchWindow = 1500;
  189. cmSourceWndClosing = 1601;
  190. cmCalculatorPaste = 1603;
  191. cmMsgClear = 1604;
  192. cmUpdateTools = 1605;
  193. { cmGrep = 160?;}
  194. cmAddItem = 1620;
  195. cmEditItem = 1621;
  196. cmDeleteItem = 1622;
  197. cmShowItem = 1623;
  198. cmHideItem = 1624;
  199. cmUserScreen = 1650;
  200. cmUserScreenWindow = 1651;
  201. cmEvaluate = 1652;
  202. cmCalculator = 1653;
  203. cmASCIITable = 1654;
  204. cmToolsMessages = 1700;
  205. cmToolsBase = 1800;
  206. cmRecentFileBase = 1850;
  207. cmCompiler = 2000;
  208. cmMemorySizes = 2001;
  209. cmLinker = 2002;
  210. cmDebugger = 2003;
  211. cmDirectories = 2004;
  212. cmTools = 2005;
  213. cmPreferences = 2006;
  214. cmEditor = 2007;
  215. cmMouse = 2008;
  216. cmStartup = 2009;
  217. cmColors = 2010;
  218. cmOpenINI = 2011;
  219. cmSaveINI = 2012;
  220. cmSaveAsINI = 2013;
  221. cmSwitchesMode = 2014;
  222. cmBrowser = 2015;
  223. cmDesktopOptions = 2016;
  224. cmCodeCompleteOptions=2017;
  225. cmCodeTemplateOptions=2018;
  226. cmKeys = 2019;
  227. cmAskSaveAll = 2020;
  228. cmRemoteDialog = 2021;
  229. cmTransferRemote = 2022;
  230. cmHelpContents = 2100;
  231. cmHelpIndex = 2101;
  232. cmHelpPrevTopic = 2103;
  233. cmHelpUsingHelp = 2104;
  234. cmHelpFiles = 2105;
  235. cmAbout = 2106;
  236. cmHelpDebug = 2107;
  237. cmEditorOptions = 2202;
  238. cmBrowserOptions = 2203;
  239. cmTrackReference = 2300;
  240. cmGotoReference = 2301;
  241. cmEditBreakpoint = 2400;
  242. cmNewBreakpoint = 2401;
  243. cmDeleteBreakpoint = 2402;
  244. cmToggleBreakpoint = 2403;
  245. cmToggleBreakInList = 2404;
  246. cmDumpUndo = 2500;
  247. cmUndoAll = 2501;
  248. cmRedoAll = 2502;
  249. cmDebuggerStopped = 2600;
  250. cmDisassemble = 2601;
  251. cmContinue = 2602;
  252. cmSymBrowse = 2700;
  253. cmSymGotoSource = 2701;
  254. cmSymTrackSource = 2702;
  255. cmSymOptions = 2703;
  256. { Help constants }
  257. hcSourceWindow = 8000;
  258. hcHelpWindow = 8001;
  259. hcClipboardWindow = 8002;
  260. hcCalcWindow = 8003;
  261. hcInfoWindow = 8004;
  262. hcBrowserWindow = 8005;
  263. hcMessagesWindow = 8006;
  264. hcGDBWindow = 8007;
  265. hcBreakpointListWindow = 8008;
  266. hcASCIITableWindow = 8009;
  267. hcCompilerMessagesWindow = 8010;
  268. hcDisassemblyWindow = 8011;
  269. hcShift = 10000;
  270. hcNoAltXShift = 20000;
  271. hcUsingHelp = 2;
  272. hcContents = 3;
  273. hcQuit = hcShift+cmQuit;
  274. hcRedo = hcShift+cmRedo;
  275. hcFind = hcShift+cmFind;
  276. hcReplace = hcShift+cmReplace;
  277. hcSearchAgain = hcShift+cmSearchAgain;
  278. hcGotoLine = hcShift+cmJumpLine;
  279. hcUserScreen = hcShift+cmUserScreen;
  280. hcUserScreenWindow = hcShift+cmUserScreenWindow;
  281. hcToolsMessages = hcShift+cmToolsMessages;
  282. hcToolsBase = hcShift+cmToolsBase;
  283. hcRecentFileBase = hcShift+cmRecentFileBase;
  284. hcCompiler = hcShift+cmCompiler;
  285. hcCompilerNoAltX = hcNoAltXShift+cmCompiler;
  286. hcMemorySizes = hcShift+cmMemorySizes;
  287. hcLinker = hcShift+cmLinker;
  288. hcDebugger = hcShift+cmDebugger;
  289. hcRemoteDialog = hcShift+cmRemoteDialog;
  290. hcTransferRemote = hcShift+cmTransferRemote;
  291. hcDirectories = hcShift+cmDirectories;
  292. hcTools = hcShift+cmTools;
  293. hcPreferences = hcShift+cmPreferences;
  294. hcEditor = hcShift+cmEditor;
  295. hcMouse = hcShift+cmMouse;
  296. hcStartup = hcShift+cmStartup;
  297. hcColors = hcShift+cmColors;
  298. hcKeys = hcShift+cmKeys;
  299. hcOpenINI = hcShift+cmOpenINI;
  300. hcSaveINI = hcShift+cmSaveINI;
  301. hcSaveAsINI = hcShift+cmSaveAsINI;
  302. hcCalculator = hcShift+cmCalculator;
  303. hcAsciiTable = hcShift+cmAsciiTable;
  304. { hcGrep = hcShift+cmGrep;}
  305. hcSwitchesMode = hcShift+cmSwitchesMode;
  306. hcBrowser = hcShift+cmBrowser;
  307. hcDesktopOptions = hcShift+cmDesktopOptions;
  308. hcCodeCompleteOptions=hcShift+cmCodeCompleteOptions;
  309. hcCodeTemplateOptions=hcShift+cmCodeTemplateOptions;
  310. hcAbout = hcShift+cmAbout;
  311. hcCompilerMessages = hcShift+cmCompilerMessages;
  312. hcSystemMenu = 9000;
  313. hcFileMenu = 9001;
  314. hcEditMenu = 9002;
  315. hcSearchMenu = 9003;
  316. hcRunMenu = 9004;
  317. hcCompileMenu = 9005;
  318. hcDebugMenu = 9006;
  319. hcToolsMenu = 9007;
  320. hcOptionsMenu = 9008;
  321. hcEnvironmentMenu = 9009;
  322. hcWindowMenu = 9010;
  323. hcHelpMenu = 9011;
  324. hcFirstCommand = hcSystemMenu;
  325. hcLastNormalCommand = hcNoAltXShift - 1;
  326. hcFirstNoAltXCommand = hcNoAltXShift;
  327. hcLastCommand = 65535;
  328. hcShowClipboard = hcShift+cmShowClipboard;
  329. hcCopyWin = hcShift+cmCopyWin;
  330. hcPasteWin = hcShift+cmPasteWin;
  331. hcSelectAll = hcShift+cmSelectAll;
  332. hcUnselect = hcShift+cmUnselect;
  333. hcFindProcedure = hcShift+cmFindProcedure;
  334. hcObjects = hcShift+cmObjects;
  335. hcModules = hcShift+cmModules;
  336. hcGlobals = hcShift+cmGlobals;
  337. hcSymbol = hcShift+cmSymbol;
  338. hcRun = hcShift+cmRun;
  339. hcRunDir = hcShift+cmRunDir;
  340. hcParameters = hcShift+cmParameters;
  341. hcResetDebugger = hcShift+cmResetDebugger;
  342. hcContToCursor = hcShift+cmContToCursor;
  343. hcUntilReturn = hcShift+cmUntilReturn;
  344. hcOpenGDBWindow = hcShift+cmOpenGDBWindow;
  345. hcToolsMsgNext = hcShift+cmToolsMsgNext;
  346. hcToolsMsgPrev = hcShift+cmToolsMsgPrev;
  347. hcCompile = hcShift+cmCompile;
  348. hcMake = hcShift+cmMake;
  349. hcBuild = hcShift+cmBuild;
  350. hcTarget = hcShift+cmTarget;
  351. hcPrimaryFile = hcShift+cmPrimaryFile;
  352. hcClearPrimary = hcShift+cmClearPrimary;
  353. hcWindowList = hcShift+cmWindowList;
  354. hcNewFromTemplate = hcShift+cmNewFromTemplate;
  355. hcHelpTopicSearch = hcShift+cmHelpTopicSearch;
  356. hcHelpContents = hcShift+cmHelpContents;
  357. hcHelpIndex = hcShift+cmHelpIndex;
  358. hcHelpPrevTopic = hcShift+cmHelpPrevTopic;
  359. hcHelpUsingHelp = hcShift+cmHelpUsingHelp;
  360. hcHelpFiles = hcShift+cmHelpFiles;
  361. hcHelpDebug = hcShift+cmHelpDebug;
  362. hcUpdate = hcShift+cmUpdate;
  363. hcMsgClear = hcShift+cmMsgClear;
  364. hcMsgGotoSource = hcShift+cmMsgGotoSource;
  365. hcMsgTrackSource = hcShift+cmMsgTrackSource;
  366. hcSymBrowse = hcShift+cmSymBrowse;
  367. hcSymGotoSource = hcShift+cmSymGotoSource;
  368. hcSymTrackSource = hcShift+cmSymTrackSource;
  369. hcSymOptions = hcShift+cmSymOptions;
  370. hcGotoCursor = hcShift+cmGotoCursor;
  371. hcNewBreakpoint = hcShift+cmNewBreakpoint;
  372. hcEditBreakpoint = hcShift+cmEditBreakpoint;
  373. hcDeleteBreakpoint = hcShift+cmDeleteBreakpoint;
  374. hcToggleBreakpoint = hcShift+cmToggleBreakpoint;
  375. hcEvaluate = hcShift+cmEvaluate;
  376. hcAddWatch = hcShift+cmAddWatch;
  377. hcWatchesWindow = hcShift+cmWatches;
  378. hcGrep = hcShift+cmGrep;
  379. hcStackWindow = hcShift+cmStack;
  380. hcBreakPointList = hcShift+cmBreakpointList;
  381. hcRegistersWindow = hcShift+cmRegisters;
  382. hcFPURegisters = hcShift+cmFPURegisters;
  383. hcVectorRegisters = hcShift+cmVectorRegisters;
  384. hcPrint = hcShift+cmPrint;
  385. hcPrinterSetup = hcShift+cmPrinterSetup;
  386. hcOpenAtCursor = hcShift+cmOpenAtCursor;
  387. hcBrowseAtCursor = hcShift+cmBrowseAtCursor;
  388. hcEditorOptions = hcShift+cmEditorOptions;
  389. hcBrowserOptions = hcShift+cmBrowserOptions;
  390. hcDoReload = hcShift+cmDoReload;
  391. { History constants }
  392. hisChDirDialog = 2000;
  393. CIDEHelpDialog =
  394. #128#129#130#131#132#133#134#135#136#137#138#139#140#141#142#143 +
  395. #144#145#146#147#148#149#150#151#152#153#154#155#156#157#158#159 +
  396. #160#161#162#163 +
  397. #164#165#166;
  398. CSourceWindow =
  399. #167#168#169#170#171#172#173#174#175#176#177#178#179#180#181#182 +
  400. #183#184#185#186#187#188#189#190#191#192#193#194#195#196#197#198 +
  401. #199#200#201#202#203#204#205#206#207#208#209#210#211#212#213#214 ;
  402. CBrowserWindow =
  403. #215#216#217#218#219#220#221#222#223#224#225#226;
  404. CBrowserListBox =
  405. #9#9#10#11#12;
  406. CBrowserTab =
  407. #6#12;
  408. CBrowserOutline = #9#10#10#11;
  409. CGDBInputLine = #9#9#10#11#12;
  410. CFPClockView = #0#227;
  411. CFPToolTip = #228;
  412. CFPMemo = #26#26#26#28#26#29#26#26#26#27#26#26#26#26#26#26#26;
  413. CFPSymbolMemo = #9#9#9#9#9#9#9#9#9#9#9#9#9#9#9#9#9;
  414. CHTMLSectionAttrs = #229#230#231#232#233#234;
  415. CIDEAppColor = CAppColor +
  416. { CIDEHelpDialog }
  417. {128-143}#$70#$7F#$7A#$13#$13#$70#$70#$7F#$7E#$20#$2B#$2F#$78#$2E#$70#$30 + { 1-16}
  418. {144-159}#$3F#$3E#$1F#$2F#$1A#$20#$72#$31#$31#$30#$2F#$3E#$31#$13#$38#$00 + {17-32}
  419. {160-163}#$30#$3E#$1E#$70 + { CHelpViewer } {33-36}
  420. {164-166}#$30#$3F#$3A + { CHelpFrame } {37-39}
  421. { CSourceWindow }
  422. {167-182}#$17#$1F#$1A#$31#$31#$1E#$71#$1F#$00#$00#$00#$00#$00#$00#$00#$00 + { 1-16}
  423. {183-198}#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00#$00 + {17-32}
  424. {199-214}#$1E#$1F#$17#$1F#$1E#$1B#$13#$1A#$1E#$71#$3F#$30#$1C#$13#$1F#$4E + {33-48}
  425. { CBrowserWindow }
  426. {215-226}#$31#$3F#$3A#$31#$31#$31#$71#$1F#$31#$2F#$3E#$3F +
  427. { CFPClockView }
  428. {227-227}#$70 +
  429. { CToolTip }
  430. {228-228}#$20 +
  431. { CHTMLSectionAttrs }
  432. {229-234}#$ff#$3a#$37#$ff#$ff#$ff;
  433. implementation
  434. END.