fpvars.pas 11 KB

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