fpconst.pas 17 KB

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