fpvars.pas 9.9 KB

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