fpvars.pas 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Global variables for 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. {$i globdir.inc}
  13. unit FPVars;
  14. interface
  15. uses Objects,Views,App,
  16. WUtils,WEditor,
  17. FPConst,
  18. FPDebug,
  19. FPUtils,FPViews,FPCalc;
  20. type
  21. TRecentFileEntry = record
  22. FileName : string{$ifdef GABOR}[60]{$endif};
  23. LastPos : TPoint;
  24. end;
  25. TCompPhase = (cpNothing,cpCompiling,cpLinking,
  26. cpAborted,cpFailed,cpDone);
  27. const ClipboardWindow : PClipboardWindow = nil;
  28. CalcWindow : PCalculator = nil;
  29. RecentFileCount : integer = 0;
  30. LastCompileTime : cardinal = 0;
  31. OpenExts : string{$ifdef GABOR}[40]{$endif} = '*.pas;*.pp;*.inc';
  32. HighlightExts : string{$ifdef GABOR}[40]{$endif} = '*.pas;*.pp;*.inc';
  33. TabsPattern : string{$ifdef GABOR}[40]{$endif} = 'make*;make*.*';
  34. SourceDirs : string{$ifdef GABOR}[40]{$endif} = '';
  35. PrimaryFile : string{$ifdef GABOR}[60]{$endif} = '';
  36. PrimaryFileMain : string{$ifdef GABOR}[60]{$endif} = '';
  37. PrimaryFileSwitches : string{$ifdef GABOR}[80]{$endif} = '';
  38. PrimaryFilePara : string{$ifdef GABOR}[80]{$endif} = '';
  39. GDBOutputFile : string{$ifdef GABOR}[50]{$endif} = GDBOutputFileName;
  40. IsEXECompiled : boolean = false;
  41. { LinkAfter : boolean = true; changed into a function }
  42. MainHasDebugInfo : boolean = false;
  43. UseMouse : boolean = true;
  44. MainFile : string{$ifdef GABOR}[60]{$endif} = '';
  45. PrevMainFile : string{$ifdef GABOR}[60]{$endif} = '';
  46. EXEFile : string{$ifdef GABOR}[60]{$endif} = '';
  47. CompilationPhase : TCompPhase = cpNothing;
  48. ProgramInfoWindow: PProgramInfoWindow = nil;
  49. GDBWindow : PGDBWindow = nil;
  50. DisassemblyWindow : PDisassemblyWindow = nil;
  51. BreakpointsWindow : PBreakpointsWindow = nil;
  52. WatchesWindow : PWatchesWindow = nil;
  53. UserScreenWindow : PScreenWindow = nil;
  54. StackWindow : PStackWindow = nil;
  55. RegistersWindow : PRegistersWindow = nil;
  56. FPUWindow : PFPUWindow = nil;
  57. HeapView : PFPHeapView = nil;
  58. ClockView : PFPClockView = nil;
  59. HelpFiles : WUtils.PUnsortedStringCollection = nil;
  60. ShowStatusOnError: boolean = true;
  61. StartupDir : string{$ifdef GABOR}[60]{$endif} = '.'+DirSep;
  62. IDEDir : string{$ifdef GABOR}[60]{$endif} = '.'+DirSep;
  63. {$ifdef Unix}
  64. SystemIDEDir : string{$ifdef GABOR}[60]{$endif} = '';
  65. {$endif Unix}
  66. INIFileName : string{$ifdef GABOR}[50]{$endif} = ININame;
  67. SwitchesPath : string{$ifdef GABOR}[60]{$endif} = SwitchesName;
  68. CtrlMouseAction : integer = acTopicSearch;
  69. AltMouseAction : integer = acBrowseSymbol;
  70. StartupOptions : longint = 0;
  71. LastExitCode : integer = 0;
  72. {$ifndef FVISION}
  73. ASCIIChart : PFPASCIIChart = nil;
  74. {$endif FVISION}
  75. BackgroundPath : string{$ifdef GABOR}[60]{$endif} = BackgroundName;
  76. DesktopPath : string{$ifdef GABOR}[60]{$endif} = DesktopName;
  77. DesktopFileFlags : longint = dfHistoryLists+dfOpenWindows+
  78. dfCodeCompleteWords+dfCodeTemplates;
  79. DesktopLocation : byte = dlConfigFileDir;
  80. AutoSaveOptions : longint = asEnvironment+asDesktop;
  81. MiscOptions : longint = moChangeDirOnOpen+moCloseOnGotoSource;
  82. EditorModified : boolean = false;
  83. IniCenterDebuggerRow : boolean = true;
  84. SleepTimeOut : longint = trunc(10*18.2);
  85. {$ifdef USE_EXTERNAL_COMPILER}
  86. UseExternalCompiler : boolean = true;
  87. ExternalCompilerExe : string = 'ppc386'+ExeExt;
  88. {$endif USE_EXTERNAL_COMPILER}
  89. ShowReadme : boolean = true;
  90. AskRecompileIfModifiedFlag : boolean = true;
  91. ActionCommands : array[acFirstAction..acLastAction] of word =
  92. (cmHelpTopicSearch,cmGotoCursor,cmToggleBreakpoint,
  93. cmEvaluate,cmAddWatch,cmBrowseAtCursor);
  94. AppPalette : string = CIDEAppColor;
  95. var RecentFiles : array[1..MaxRecentFileCount] of TRecentFileEntry;
  96. implementation
  97. END.
  98. {
  99. $Log$
  100. Revision 1.2 2001-08-05 12:23:01 peter
  101. * Automatically support for fvision or old fv
  102. Revision 1.1 2001/08/04 11:30:24 peter
  103. * ide works now with both compiler versions
  104. Revision 1.1.2.5 2001/03/12 17:34:56 pierre
  105. + Disassembly window started
  106. Revision 1.1.2.4 2001/02/13 16:04:01 pierre
  107. * fixes for bugs 1280
  108. Revision 1.1.2.3 2000/12/30 22:52:27 peter
  109. * check modified while in debug mode. But placed it between a
  110. conditional again as it reports also if the file was already modified
  111. before the first compile.
  112. * remove unsaved file checks when compiling without primary file so it
  113. works the same as with a primary file set.
  114. Revision 1.1.2.2 2000/12/20 14:27:49 pierre
  115. * fp.ini for unix
  116. Revision 1.1.2.1 2000/11/14 17:40:44 pierre
  117. + External linking now optional
  118. Revision 1.1 2000/07/13 09:48:36 michael
  119. + Initial import
  120. Revision 1.33 2000/06/16 08:50:42 pierre
  121. + new bunch of Gabor's changes
  122. Revision 1.32 2000/04/25 08:42:33 pierre
  123. * New Gabor changes : see fixes.txt
  124. Revision 1.31 2000/04/18 11:42:37 pierre
  125. lot of Gabor changes : see fixes.txt
  126. Revision 1.30 2000/03/13 20:35:36 pierre
  127. * IniPath replaced by IniFileName
  128. + UseMouse variable
  129. Revision 1.29 2000/03/08 16:50:27 pierre
  130. + MainHasDebugInfo boolean var
  131. Revision 1.28 2000/03/02 22:34:38 pierre
  132. + external compiler support
  133. Revision 1.27 2000/02/07 11:53:11 pierre
  134. Gabor changes
  135. Revision 1.26 2000/02/04 00:08:35 pierre
  136. + IniCenterDebuggerRow
  137. Revision 1.25 1999/09/16 14:34:59 pierre
  138. + TBreakpoint and TWatch registering
  139. + WatchesCollection and BreakpointsCollection stored in desk file
  140. * Syntax highlighting was broken
  141. Revision 1.24 1999/09/13 16:24:43 peter
  142. + clock
  143. * backspace unident like tp7
  144. Revision 1.23 1999/09/13 11:44:00 peter
  145. * fixes from gabor, idle event, html fix
  146. Revision 1.22 1999/08/16 18:25:25 peter
  147. * Adjusting the selection when the editor didn't contain any line.
  148. * Reserved word recognition redesigned, but this didn't affect the overall
  149. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  150. The syntax scanner loop is a bit slow but the main problem is the
  151. recognition of special symbols. Switching off symbol processing boosts
  152. the performance up to ca. 200%...
  153. * The editor didn't allow copying (for ex to clipboard) of a single character
  154. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  155. * Compiler Messages window (actually the whole desktop) did not act on any
  156. keypress when compilation failed and thus the window remained visible
  157. + Message windows are now closed upon pressing Esc
  158. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  159. only when neccessary
  160. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  161. + LineSelect (Ctrl+K+L) implemented
  162. * The IDE had problems closing help windows before saving the desktop
  163. Revision 1.21 1999/08/03 20:22:38 peter
  164. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  165. + Desktop saving should work now
  166. - History saved
  167. - Clipboard content saved
  168. - Desktop saved
  169. - Symbol info saved
  170. * syntax-highlight bug fixed, which compared special keywords case sensitive
  171. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  172. * with 'whole words only' set, the editor didn't found occourences of the
  173. searched text, if the text appeared previously in the same line, but didn't
  174. satisfied the 'whole-word' condition
  175. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  176. (ie. the beginning of the selection)
  177. * when started typing in a new line, but not at the start (X=0) of it,
  178. the editor inserted the text one character more to left as it should...
  179. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  180. * Shift shouldn't cause so much trouble in TCodeEditor now...
  181. * Syntax highlight had problems recognizing a special symbol if it was
  182. prefixed by another symbol character in the source text
  183. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  184. Revision 1.20 1999/07/28 23:11:25 peter
  185. * fixes from gabor
  186. Revision 1.19 1999/07/10 01:24:21 pierre
  187. + First implementation of watches window
  188. Revision 1.18 1999/06/30 23:58:19 pierre
  189. + BreakpointsList Window implemented
  190. with Edit/New/Delete functions
  191. + Individual breakpoint dialog with support for all types
  192. ignorecount and conditions
  193. (commands are not yet implemented, don't know if this wolud be useful)
  194. awatch and rwatch have problems because GDB does not annotate them
  195. I fixed v4.16 for this
  196. Revision 1.17 1999/06/28 19:32:27 peter
  197. * fixes from gabor
  198. Revision 1.16 1999/06/21 23:37:58 pierre
  199. + added LinkAfter var for post linking with -s option
  200. Revision 1.15 1999/03/23 15:11:36 peter
  201. * desktop saving things
  202. * vesa mode
  203. * preferences dialog
  204. Revision 1.14 1999/03/19 16:04:32 peter
  205. * new compiler dialog
  206. Revision 1.13 1999/03/16 12:38:15 peter
  207. * tools macro fixes
  208. + tph writer
  209. + first things for resource files
  210. Revision 1.12 1999/03/12 01:14:02 peter
  211. * flag if trytoopen should look for other extensions
  212. + browser tab in the tools-compiler
  213. Revision 1.11 1999/03/08 14:58:15 peter
  214. + prompt with dialogs for tools
  215. Revision 1.10 1999/03/01 15:42:07 peter
  216. + Added dummy entries for functions not yet implemented
  217. * MenuBar didn't update itself automatically on command-set changes
  218. * Fixed Debugging/Profiling options dialog
  219. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is
  220. set
  221. * efBackSpaceUnindents works correctly
  222. + 'Messages' window implemented
  223. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  224. + Added TP message-filter support (for ex. you can call GREP thru
  225. GREP2MSG and view the result in the messages window - just like in TP)
  226. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  227. so topic search didn't work...
  228. * In FPHELP.PAS there were still context-variables defined as word instead
  229. of THelpCtx
  230. * StdStatusKeys() was missing from the statusdef for help windows
  231. + Topic-title for index-table can be specified when adding a HTML-files
  232. Revision 1.9 1999/02/19 18:43:48 peter
  233. + open dialog supports mask list
  234. Revision 1.8 1999/02/11 13:10:04 pierre
  235. + GDBWindow only with -dGDBWindow for now : still buggy !!
  236. Revision 1.7 1999/02/05 12:07:55 pierre
  237. + SourceDirs added
  238. Revision 1.6 1999/02/04 13:15:40 pierre
  239. + TabsPattern added
  240. Revision 1.5 1999/01/21 11:54:26 peter
  241. + tools menu
  242. + speedsearch in symbolbrowser
  243. * working run command
  244. Revision 1.4 1999/01/12 14:29:41 peter
  245. + Implemented still missing 'switch' entries in Options menu
  246. + Pressing Ctrl-B sets ASCII mode in editor, after which keypresses (even
  247. ones with ASCII < 32 ; entered with Alt+<###>) are interpreted always as
  248. ASCII chars and inserted directly in the text.
  249. + Added symbol browser
  250. * splitted fp.pas to fpide.pas
  251. Revision 1.3 1999/01/04 11:49:52 peter
  252. * 'Use tab characters' now works correctly
  253. + Syntax highlight now acts on File|Save As...
  254. + Added a new class to syntax highlight: 'hex numbers'.
  255. * There was something very wrong with the palette managment. Now fixed.
  256. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  257. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  258. process revised
  259. Revision 1.1 1998/12/28 15:47:54 peter
  260. + Added user screen support, display & window
  261. + Implemented Editor,Mouse Options dialog
  262. + Added location of .INI and .CFG file
  263. + Option (INI) file managment implemented (see bottom of Options Menu)
  264. + Switches updated
  265. + Run program
  266. Revision 1.0 1998/12/23 07:34:40 gabor
  267. }