fpide.pas 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Main IDEApp object
  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 fpide;
  13. interface
  14. {$i globdir.inc}
  15. uses
  16. Objects,Drivers,Views,App,Gadgets,MsgBox,
  17. {$ifdef EDITORS}Editors,{$else}WEditor,{$endif}
  18. Comphook,Browcol,
  19. FPViews,FPSymbol,fpstring;
  20. type
  21. TExecType = (exNormal,exNoSwap,exDosShell);
  22. TIDEApp = object(TApplication)
  23. constructor Init;
  24. procedure InitDesktop; virtual;
  25. procedure InitMenuBar; virtual;
  26. procedure InitStatusLine; virtual;
  27. procedure Open(FileName: string);
  28. function OpenSearch(FileName: string) : boolean;
  29. function SaveAll: boolean;
  30. function AutoSave: boolean;
  31. procedure Idle; virtual;
  32. procedure Update;
  33. procedure UpdateTarget;
  34. procedure GetEvent(var Event: TEvent); virtual;
  35. procedure HandleEvent(var Event: TEvent); virtual;
  36. procedure GetTileRect(var R: TRect); virtual;
  37. function GetPalette: PPalette; virtual;
  38. procedure DosShell; virtual;
  39. destructor Done; virtual;
  40. procedure ShowUserScreen;
  41. procedure ShowIDEScreen;
  42. function IsClosing : boolean;
  43. private
  44. procedure NewEditor;
  45. procedure NewFromTemplate;
  46. procedure OpenRecentFile(RecentIndex: integer);
  47. procedure ChangeDir;
  48. procedure ShowClipboard;
  49. procedure FindProcedure;
  50. procedure Objects;
  51. procedure Modules;
  52. procedure Globals;
  53. procedure SearchSymbol;
  54. procedure Parameters;
  55. procedure DoStepOver;
  56. procedure DoTraceInto;
  57. procedure DoRun;
  58. procedure DoResetDebugger;
  59. procedure DoContToCursor;
  60. procedure DoContUntilReturn;
  61. procedure Target;
  62. procedure DoCompilerMessages;
  63. procedure DoPrimaryFile;
  64. procedure DoClearPrimary;
  65. procedure DoUserScreenWindow;
  66. procedure DoCloseUserScreenWindow;
  67. procedure DoUserScreen;
  68. procedure DoOpenGDBWindow;
  69. procedure DoToggleBreak;
  70. procedure DoShowCallStack;
  71. procedure DoShowBreakpointList;
  72. procedure DoShowWatches;
  73. procedure DoAddWatch;
  74. procedure DoShowRegisters;
  75. procedure DoInformation;
  76. procedure Messages;
  77. procedure Calculator;
  78. procedure DoAsciiTable;
  79. procedure ExecuteTool(Idx: integer);
  80. procedure SetSwitchesMode;
  81. procedure DoCompilerSwitch;
  82. procedure MemorySizes;
  83. procedure DoLinkerSwitch;
  84. procedure DoDebuggerSwitch;
  85. procedure Directories;
  86. procedure Tools;
  87. procedure DoGrep;
  88. procedure Preferences;
  89. procedure EditorOptions(Editor: PEditor);
  90. procedure CodeComplete;
  91. procedure CodeTemplates;
  92. procedure BrowserOptions(Browser: PBrowserWindow);
  93. procedure DesktopOptions;
  94. procedure Mouse;
  95. procedure StartUp;
  96. procedure Colors;
  97. procedure OpenINI;
  98. procedure SaveINI;
  99. procedure SaveAsINI;
  100. procedure CloseAll;
  101. procedure WindowList;
  102. procedure HelpContents;
  103. procedure HelpHelpIndex;
  104. procedure HelpTopicSearch;
  105. procedure HelpPrevTopic;
  106. procedure HelpUsingHelp;
  107. procedure HelpFiles;
  108. procedure About;
  109. private
  110. SaveCancelled: boolean;
  111. InsideDone : boolean;
  112. LastEvent: longint;
  113. function DoExecute(ProgramPath, Params, InFile, OutFile: string; ExecType: TExecType): boolean;
  114. procedure AddRecentFile(AFileName: string; CurX, CurY: integer);
  115. function SearchRecentFile(AFileName: string): integer;
  116. procedure RemoveRecentFile(Index: integer);
  117. procedure CurDirChanged;
  118. procedure UpdatePrimaryFile;
  119. procedure UpdateINIFile;
  120. procedure UpdateRecentFileList;
  121. procedure UpdateTools;
  122. end;
  123. var
  124. IDEApp: TIDEApp;
  125. implementation
  126. uses
  127. {$ifdef linux}
  128. linux,
  129. {$endif}
  130. {$ifdef WinClipSupported}
  131. WinClip,
  132. {$endif WinClipSupported}
  133. Video,Mouse,Keyboard,
  134. Dos,Memory,Menus,Dialogs,StdDlg,ColorSel,Commands,HelpCtx,
  135. AsciiTab,
  136. Systems,
  137. WUtils,WHelp,WHlpView,WINI,WViews,
  138. FPConst,FPVars,FPUtils,FPSwitch,FPIni,FPIntf,FPCompile,FPHelp,
  139. FPTemplt,FPCalc,FPUsrScr,FPTools,{$ifndef NODEBUG}FPDebug,{$endif}FPRedir,
  140. FPDesk,FPCodCmp,FPCodTmp;
  141. function IDEUseSyntaxHighlight(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
  142. begin
  143. IDEUseSyntaxHighlight:=(Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts);
  144. end;
  145. function IDEUseTabsPattern(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
  146. begin
  147. { the commented code lead all new files
  148. to become with TAB use enabled which is wrong in my opinion PM }
  149. IDEUseTabsPattern:={(Editor^.FileName='') or }MatchesFileList(NameAndExtOf(Editor^.FileName),TabsPattern);
  150. end;
  151. constructor TIDEApp.Init;
  152. var R: TRect;
  153. begin
  154. {$ifndef EDITORS}
  155. {$ifdef TP}
  156. UseSyntaxHighlight:=IDEUseSyntaxHighlight;
  157. UseTabsPattern:=IDEUseTabsPattern;
  158. {$else TP}
  159. UseSyntaxHighlight:=@IDEUseSyntaxHighlight;
  160. UseTabsPattern:=@IDEUseTabsPattern;
  161. {$endif TP}
  162. {$endif}
  163. inherited Init;
  164. InsideDone:=false;
  165. MenuBar^.GetBounds(R); R.A.X:=R.B.X-8;
  166. New(ClockView, Init(R));
  167. Application^.Insert(ClockView);
  168. New(ClipboardWindow, Init);
  169. Desktop^.Insert(ClipboardWindow);
  170. New(CalcWindow, Init); CalcWindow^.Hide;
  171. Desktop^.Insert(CalcWindow);
  172. {$ifndef OLDCOMP}
  173. New(CompilerMessageWindow, Init);
  174. CompilerMessageWindow^.Hide;
  175. Desktop^.Insert(CompilerMessageWindow);
  176. {$else}
  177. New(ProgramInfoWindow, Init);
  178. ProgramInfoWindow^.Hide;
  179. Desktop^.Insert(ProgramInfoWindow);
  180. {$endif}
  181. Message(@Self,evBroadcast,cmUpdate,nil);
  182. CurDirChanged;
  183. { heap viewer }
  184. GetExtent(R); Dec(R.B.X); R.A.X:=R.B.X-9; R.A.Y:=R.B.Y-1;
  185. New(HeapView, InitKb(R));
  186. Insert(HeapView);
  187. Drivers.ShowMouse;
  188. end;
  189. procedure TIDEApp.InitDesktop;
  190. var
  191. R: TRect;
  192. begin
  193. GetExtent(R);
  194. Inc(R.A.Y);
  195. Dec(R.B.Y);
  196. Desktop:=New(PFPDesktop, Init(R));
  197. end;
  198. procedure TIDEApp.InitMenuBar;
  199. var R: TRect;
  200. WinPMI : PMenuItem;
  201. begin
  202. GetExtent(R); R.B.Y:=R.A.Y+1;
  203. WinPMI:=nil;
  204. {$ifdef WinClipSupported}
  205. if WinClipboardSupported then
  206. WinPMI:=NewLine(
  207. NewItem(menu_edit_copywin,'', kbNoKey, cmCopyWin, hcCopyWin,
  208. NewItem(menu_edit_pastewin,'', kbNoKey, cmPasteWin, hcPasteWin,
  209. nil)));
  210. {$endif WinClipSupported}
  211. MenuBar:=New(PAdvancedMenuBar, Init(R, NewMenu(
  212. NewSubMenu(menu_file,hcFileMenu, NewMenu(
  213. NewItem(menu_file_new,'',kbNoKey,cmNew,hcNew,
  214. NewItem(menu_file_template,'',kbNoKey,cmNewFromTemplate,hcNewFromTemplate,
  215. NewItem(menu_file_open,menu_key_file_open,kbF3,cmOpen,hcOpen,
  216. NewItem(menu_file_save,menu_key_file_save,kbF2,cmSave,hcSave,
  217. NewItem(menu_file_saveas,'',kbNoKey,cmSaveAs,hcSaveAs,
  218. NewItem(menu_file_saveall,'',kbNoKey,cmSaveAll,hcSaveAll,
  219. NewLine(
  220. NewItem(menu_file_changedir,'',kbNoKey,cmChangeDir,hcChangeDir,
  221. NewItem(menu_file_dosshell,'',kbNoKey,cmDOSShell,hcDOSShell,
  222. NewItem(menu_file_exit,menu_key_file_exit,kbNoKey,cmQuit,hcQuit,
  223. nil))))))))))),
  224. NewSubMenu(menu_edit,hcEditMenu, NewMenu(
  225. NewItem(menu_edit_undo,menu_key_edit_undo, kbAltBack, cmUndo, hcUndo,
  226. NewItem(menu_edit_redo,'', kbNoKey, cmRedo, hcRedo,
  227. {$ifdef DebugUndo}
  228. NewItem('~D~ump Undo','', kbNoKey, cmDumpUndo, hcUndo,
  229. NewItem('U~n~do All','', kbNoKey, cmUndoAll, hcUndo,
  230. NewItem('R~e~do All','', kbNoKey, cmRedoAll, hcRedo,
  231. {$endif DebugUndo}
  232. NewLine(
  233. NewItem(menu_edit_cut,menu_key_edit_cut, kbShiftDel, cmCut, hcCut,
  234. NewItem(menu_edit_copy,menu_key_edit_copy, kbCtrlIns, cmCopy, hcCut,
  235. NewItem(menu_edit_paste,menu_key_edit_paste, kbShiftIns, cmPaste, hcPaste,
  236. NewItem(menu_edit_clear,menu_key_edit_clear, kbCtrlDel, cmClear, hcClear,
  237. NewLine(
  238. NewItem(menu_edit_showclipboard,'', kbNoKey, cmShowClipboard, hcShowClipboard,
  239. WinPMI))))))
  240. {$ifdef DebugUndo}))){$endif DebugUndo}
  241. )))),
  242. NewSubMenu(menu_search,hcSearchMenu, NewMenu(
  243. NewItem(menu_search_find,'', kbNoKey, cmFind, hcFind,
  244. NewItem(menu_search_replace,'', kbNoKey, cmReplace, hcReplace,
  245. NewItem(menu_search_searchagain,'', kbNoKey, cmSearchAgain, hcSearchAgain,
  246. NewLine(
  247. NewItem(menu_search_jumpline,'', kbNoKey, cmJumpLine, hcGotoLine,
  248. NewItem(menu_search_findproc,'', kbNoKey, cmFindProcedure, hcFindProcedure,
  249. NewLine(
  250. NewItem(menu_search_objects,'', kbNoKey, cmObjects, hcObjects,
  251. NewItem(menu_search_modules,'', kbNoKey, cmModules, hcModules,
  252. NewItem(menu_search_globals,'', kbNoKey, cmGlobals, hcGlobals,
  253. NewLine(
  254. NewItem(menu_search_symbol,'', kbNoKey, cmSymbol, hcSymbol,
  255. nil))))))))))))),
  256. NewSubMenu(menu_run,hcRunMenu, NewMenu(
  257. NewItem(menu_run_run,menu_key_run_run, kbCtrlF9, cmRun, hcRun,
  258. NewItem(menu_run_stepover,menu_key_run_stepover, kbF8, cmStepOver, hcRun,
  259. NewItem(menu_run_traceinto,menu_key_run_traceinto, kbF7, cmTraceInto, hcRun,
  260. NewItem(menu_run_conttocursor,menu_key_run_conttocursor, kbF4, cmContToCursor, hcContToCursor,
  261. NewItem(menu_run_untilreturn,'', kbNoKey,cmUntilReturn,hcUntilReturn,
  262. NewItem(menu_run_parameters,'', kbNoKey, cmParameters, hcParameters,
  263. NewItem(menu_run_resetdebugger,menu_key_run_resetdebugger, kbCtrlF2, cmResetDebugger, hcResetDebugger,
  264. nil)))))))),
  265. NewSubMenu(menu_compile,hcCompileMenu, NewMenu(
  266. NewItem(menu_compile_compile,menu_key_compile_compile, kbAltF9, cmCompile, hcCompile,
  267. NewItem(menu_compile_make,menu_key_compile_make, kbF9, cmMake, hcMake,
  268. NewItem(menu_compile_build,'', kbNoKey, cmBuild, hcBuild,
  269. NewLine(
  270. NewItem(menu_compile_target,'', kbNoKey, cmTarget, hcTarget,
  271. NewItem(menu_compile_primaryfile,'', kbNoKey, cmPrimaryFile, hcPrimaryFile,
  272. NewItem(menu_compile_clearprimaryfile,'', kbNoKey, cmClearPrimary, hcClearPrimary,
  273. NewLine(
  274. NewItem(menu_compile_information,'', kbNoKey, cmInformation, hcInformation,
  275. NewItem(menu_compile_compilermessages,menu_key_compile_compilermessages, kbF12, cmCompilerMessages, hcCompilerMessages,
  276. nil))))))))))),
  277. NewSubMenu(menu_debug, hcDebugMenu, NewMenu(
  278. NewItem(menu_debug_output,'', kbNoKey, cmUserScreenWindow, hcUserScreenWindow,
  279. NewItem(menu_debug_userscreen,menu_key_debug_userscreen, kbAltF5, cmUserScreen, hcUserScreen,
  280. NewItem(menu_debug_breakpoint,menu_key_debug_breakpoint, kbCtrlF8, cmToggleBreakpoint, hcToggleBreakpoint,
  281. NewItem(menu_debug_callstack,menu_key_debug_callstack, kbCtrlF3, cmStack, hcStack,
  282. NewItem(menu_debug_registers,'', kbNoKey, cmRegisters, hcRegisters,
  283. NewItem(menu_debug_addwatch,menu_key_debug_addwatch, kbCtrlF7, cmAddWatch, hcAddWatch,
  284. NewItem(menu_debug_watches,'', kbNoKey, cmWatches, hcWatches,
  285. NewItem(menu_debug_breakpointlist,'', kbNoKey, cmBreakpointList, hcBreakpointList,
  286. NewLine(
  287. NewItem(menu_debug_gdbwindow,'', kbNoKey, cmOpenGDBWindow, hcOpenGDBWindow,
  288. nil))))))))))),
  289. NewSubMenu(menu_tools, hcToolsMenu, NewMenu(
  290. NewItem(menu_tools_messages,menu_key_tools_messages, kbF11, cmToolsMessages, hcToolsMessages,
  291. NewItem(menu_tools_msgnext,menu_key_tools_msgnext, kbAltF8, cmToolsMsgNext, hcToolsMsgNext,
  292. NewItem(menu_tools_msgprev,menu_key_tools_msgprev, kbAltF7, cmToolsMsgPrev, hcToolsMsgPrev,
  293. NewLine(
  294. NewItem(menu_tools_grep,menu_key_tools_grep, kbShiftF2, cmGrep, hcGrep,
  295. NewItem(menu_tools_calculator, '', kbNoKey, cmCalculator, hcCalculator,
  296. NewItem(menu_tools_asciitable, '', kbNoKey, cmAsciiTable, hcAsciiTable,
  297. nil)))))))),
  298. NewSubMenu(menu_options, hcOptionsMenu, NewMenu(
  299. NewItem(menu_options_mode,'', kbNoKey, cmSwitchesMode, hcSwitchesMode,
  300. NewItem(menu_options_compiler,'', kbNoKey, cmCompiler, hcCompiler,
  301. NewItem(menu_options_memory,'', kbNoKey, cmMemorySizes, hcMemorySizes,
  302. NewItem(menu_options_linker,'', kbNoKey, cmLinker, hcLinker,
  303. NewItem(menu_options_debugger,'', kbNoKey, cmDebugger, hcDebugger,
  304. NewItem(menu_options_directories,'', kbNoKey, cmDirectories, hcDirectories,
  305. NewItem(menu_options_browser,'',kbNoKey, cmBrowser, hcBrowser,
  306. NewItem(menu_options_tools,'', kbNoKey, cmTools, hcTools,
  307. NewLine(
  308. NewSubMenu(menu_options_env, hcEnvironmentMenu, NewMenu(
  309. NewItem(menu_options_env_preferences,'', kbNoKey, cmPreferences, hcPreferences,
  310. NewItem(menu_options_env_editor,'', kbNoKey, cmEditor, hcEditor,
  311. NewItem(menu_options_env_codecomplete,'', kbNoKey, cmCodeCompleteOptions, hcCodeCompleteOptions,
  312. NewItem(menu_options_env_codetemplates,'', kbNoKey, cmCodeTemplateOptions, hcCodeTemplateOptions,
  313. NewItem(menu_options_env_desktop,'', kbNoKey, cmDesktopOptions, hcDesktopOptions,
  314. NewItem(menu_options_env_mouse,'', kbNoKey, cmMouse, hcMouse,
  315. NewItem(menu_options_env_startup,'', kbNoKey, cmStartup, hcStartup,
  316. NewItem(menu_options_env_colors,'', kbNoKey, cmColors, hcColors,
  317. nil))))))))),
  318. NewLine(
  319. NewItem(menu_options_open,'', kbNoKey, cmOpenINI, hcOpenINI,
  320. NewItem(menu_options_save,'', kbNoKey, cmSaveINI, hcSaveINI,
  321. NewItem(menu_options_saveas,'', kbNoKey, cmSaveAsINI, hcSaveAsINI,
  322. nil))))))))))))))),
  323. NewSubMenu(menu_window, hcWindowMenu, NewMenu(
  324. NewItem(menu_window_tile,'', kbNoKey, cmTile, hcTile,
  325. NewItem(menu_window_cascade,'', kbNoKey, cmCascade, hcCascade,
  326. NewItem(menu_window_closeall,'', kbNoKey, cmCloseAll, hcCloseAll,
  327. NewLine(
  328. NewItem(menu_window_resize,menu_key_window_resize, kbCtrlF5, cmResize, hcResize,
  329. NewItem(menu_window_zoom,menu_key_window_zoom, kbF5, cmZoom, hcZoom,
  330. NewItem(menu_window_next,menu_key_window_next, kbF6, cmNext, hcNext,
  331. NewItem(menu_window_previous,menu_key_window_previous, kbShiftF6, cmPrev, hcPrev,
  332. NewItem(menu_window_close,menu_key_window_close, kbAltF3, cmClose, hcClose,
  333. NewLine(
  334. NewItem(menu_window_list,menu_key_window_list, kbAlt0, cmWindowList, hcWindowList,
  335. NewItem(menu_window_update,'', kbNoKey, cmUpdate, hcUpdate,
  336. nil))))))))))))),
  337. NewSubMenu(menu_help, hcHelpMenu, NewMenu(
  338. NewItem(menu_help_contents,'', kbNoKey, cmHelpContents, hcHelpContents,
  339. NewItem(menu_help_index,menu_key_help_helpindex, kbShiftF1, cmHelpIndex, hcHelpIndex,
  340. NewItem(menu_help_topicsearch,menu_key_help_topicsearch, kbCtrlF1, cmHelpTopicSearch, hcHelpTopicSearch,
  341. NewItem(menu_help_prevtopic,menu_key_help_prevtopic, kbAltF1, cmHelpPrevTopic, hcHelpPrevTopic,
  342. NewItem(menu_help_using,'',kbNoKey, cmHelpUsingHelp, hcHelpUsingHelp,
  343. NewItem(menu_help_files,'',kbNoKey, cmHelpFiles, hcHelpFiles,
  344. NewLine(
  345. NewItem(menu_help_about,'',kbNoKey, cmAbout, hcAbout,
  346. nil))))))))),
  347. nil)))))))))))));
  348. DisableCommands(EditorCmds+SourceCmds+CompileCmds);
  349. Update;
  350. end;
  351. procedure TIDEApp.InitStatusLine;
  352. var
  353. R: TRect;
  354. begin
  355. GetExtent(R);
  356. R.A.Y := R.B.Y - 1;
  357. StatusLine:=New(PIDEStatusLine, Init(R,
  358. NewStatusDef(hcFirstCommand, hcLastCommand,
  359. NewStatusKey(status_help, kbF1, cmHelp,
  360. StdStatusKeys(
  361. nil)),
  362. NewStatusDef(hcHelpWindow, hcHelpWindow,
  363. NewStatusKey(status_help_on_help, kbF1, cmHelpUsingHelp,
  364. NewStatusKey(status_help_previoustopic, kbAltF1, cmHelpPrevTopic,
  365. NewStatusKey(status_help_index, kbShiftF1, cmHelpIndex,
  366. NewStatusKey(status_help_close, kbEsc, cmClose,
  367. StdStatusKeys(
  368. nil))))),
  369. NewStatusDef(hcSourceWindow, hcSourceWindow,
  370. NewStatusKey(status_help, kbF1, cmHelp,
  371. NewStatusKey(status_save, kbF2, cmSave,
  372. NewStatusKey(status_open, kbF3, cmOpen,
  373. NewStatusKey(status_compile, kbAltF9, cmCompile,
  374. NewStatusKey(status_make, kbF9, cmMake,
  375. NewStatusKey(status_localmenu, kbAltF10, cmLocalMenu,
  376. StdStatusKeys(
  377. nil))))))),
  378. NewStatusDef(hcASCIITableWindow, hcASCIITableWindow,
  379. NewStatusKey(status_help, kbF1, cmHelp,
  380. NewStatusKey(status_transferchar, kbCtrlEnter, cmTransfer,
  381. StdStatusKeys(
  382. nil))),
  383. NewStatusDef(hcMessagesWindow, hcMessagesWindow,
  384. NewStatusKey(status_help, kbF1, cmHelp,
  385. NewStatusKey(status_msggotosource, kbEnter, cmMsgGotoSource,
  386. NewStatusKey(status_msgtracksource, kbNoKey, cmMsgTrackSource,
  387. NewStatusKey(status_localmenu, kbAltF10, cmLocalMenu,
  388. NewStatusKey('', kbEsc, cmClose,
  389. StdStatusKeys(
  390. nil)))))),
  391. NewStatusDef(hcCalcWindow, hcCalcWindow,
  392. NewStatusKey(status_help, kbF1, cmHelp,
  393. NewStatusKey(status_close, kbEsc, cmClose,
  394. NewStatusKey(status_calculatorpaste, kbCtrlEnter, cmCalculatorPaste,
  395. StdStatusKeys(
  396. nil)))),
  397. NewStatusDef(0, $FFFF,
  398. NewStatusKey(status_help, kbF1, cmHelp,
  399. NewStatusKey(status_open, kbF3, cmOpen,
  400. NewStatusKey(status_compile, kbAltF9, cmCompile,
  401. NewStatusKey(status_make, kbF9, cmMake,
  402. NewStatusKey(status_localmenu, kbAltF10, cmLocalMenu,
  403. StdStatusKeys(
  404. nil)))))),
  405. nil)))))))));
  406. end;
  407. procedure TIDEApp.Idle;
  408. begin
  409. inherited Idle;
  410. Message(Application,evIdle,0,nil);
  411. GiveUpTimeSlice;
  412. end;
  413. procedure TIDEApp.GetEvent(var Event: TEvent);
  414. begin
  415. inherited GetEvent(Event);
  416. if Event.What<>evNothing then
  417. LastEvent:=GetDosTicks
  418. else
  419. if abs(GetDosTicks-LastEvent)>SleepTimeOut then
  420. GiveUpTimeSlice;
  421. end;
  422. procedure TIDEApp.HandleEvent(var Event: TEvent);
  423. var DontClear: boolean;
  424. begin
  425. case Event.What of
  426. evCommand :
  427. begin
  428. DontClear:=false;
  429. case Event.Command of
  430. cmUpdate : Message(Application,evBroadcast,cmUpdate,nil);
  431. { -- File menu -- }
  432. cmNew : NewEditor;
  433. cmNewFromTemplate: NewFromTemplate;
  434. cmOpen : begin
  435. if (DirOf(OpenFileName)='') or (Pos(ListSeparator,OpenFileName)<>0) then
  436. OpenFileName:=LocateFile(OpenFileName);
  437. Open(OpenFileName);
  438. OpenFileName:='';
  439. end;
  440. cmSaveAll : SaveAll;
  441. cmChangeDir : ChangeDir;
  442. cmDOSShell : DOSShell;
  443. cmRecentFileBase..
  444. cmRecentFileBase+10
  445. : OpenRecentFile(Event.Command-cmRecentFileBase);
  446. { -- Edit menu -- }
  447. cmShowClipboard : ShowClipboard;
  448. { -- Search menu -- }
  449. cmFindProcedure : FindProcedure;
  450. cmObjects : Objects;
  451. cmModules : Modules;
  452. cmGlobals : Globals;
  453. cmSymbol : SearchSymbol;
  454. { -- Run menu -- }
  455. cmParameters : Parameters;
  456. cmStepOver : DoStepOver;
  457. cmTraceInto : DoTraceInto;
  458. cmRun : DoRun;
  459. cmResetDebugger : DoResetDebugger;
  460. cmContToCursor : DoContToCursor;
  461. cmUntilReturn : DoContUntilReturn;
  462. { -- Compile menu -- }
  463. cmCompile : DoCompile(cCompile);
  464. cmBuild : DoCompile(cBuild);
  465. cmMake : DoCompile(cMake);
  466. cmTarget : Target;
  467. cmPrimaryFile : DoPrimaryFile;
  468. cmClearPrimary : DoClearPrimary;
  469. cmInformation : DoInformation;
  470. cmCompilerMessages : DoCompilerMessages;
  471. { -- Debug menu -- }
  472. cmUserScreen : DoUserScreen;
  473. cmToggleBreakpoint : DoToggleBreak;
  474. cmStack : DoShowCallStack;
  475. cmBreakpointList : DoShowBreakpointList;
  476. cmWatches : DoShowWatches;
  477. cmAddWatch : DoAddWatch;
  478. cmOpenGDBWindow : DoOpenGDBWindow;
  479. cmRegisters : DoShowRegisters;
  480. { -- Options menu -- }
  481. cmSwitchesMode : SetSwitchesMode;
  482. cmCompiler : DoCompilerSwitch;
  483. cmMemorySizes : MemorySizes;
  484. cmLinker : DoLinkerSwitch;
  485. cmDebugger : DoDebuggerSwitch;
  486. cmDirectories : Directories;
  487. cmTools : Tools;
  488. cmPreferences : Preferences;
  489. cmEditor : EditorOptions(nil);
  490. cmEditorOptions : EditorOptions(Event.InfoPtr);
  491. cmCodeTemplateOptions: CodeTemplates;
  492. cmCodeCompleteOptions: CodeComplete;
  493. cmBrowser : BrowserOptions(nil);
  494. cmBrowserOptions : BrowserOptions(Event.InfoPtr);
  495. cmMouse : Mouse;
  496. cmStartup : StartUp;
  497. cmDesktopOptions: DesktopOptions;
  498. cmColors : Colors;
  499. cmOpenINI : OpenINI;
  500. cmSaveINI : SaveINI;
  501. cmSaveAsINI : SaveAsINI;
  502. { -- Tools menu -- }
  503. cmToolsMessages : Messages;
  504. cmCalculator : Calculator;
  505. cmAsciiTable : DoAsciiTable;
  506. cmGrep : DoGrep;
  507. cmToolsBase+1..
  508. cmToolsBase+MaxToolCount
  509. : ExecuteTool(Event.Command-cmToolsBase);
  510. { -- Window menu -- }
  511. cmCloseAll : CloseAll;
  512. cmWindowList : WindowList;
  513. cmUserScreenWindow: DoUserScreenWindow;
  514. { -- Help menu -- }
  515. cmHelpContents : HelpContents;
  516. cmHelpIndex : HelpHelpIndex;
  517. { cmHelpTopicSearch: HelpTopicSearch;}
  518. cmHelpPrevTopic : HelpPrevTopic;
  519. cmHelpUsingHelp : HelpUsingHelp;
  520. cmHelpFiles : HelpFiles;
  521. cmAbout : About;
  522. else DontClear:=true;
  523. end;
  524. if DontClear=false then ClearEvent(Event);
  525. end;
  526. evBroadcast :
  527. case Event.Command of
  528. cmSaveCancelled :
  529. SaveCancelled:=true;
  530. cmUpdateTools :
  531. UpdateTools;
  532. cmCommandSetChanged :
  533. UpdateMenu(MenuBar^.Menu);
  534. cmUpdate :
  535. Update;
  536. cmSourceWndClosing :
  537. begin
  538. with PSourceWindow(Event.InfoPtr)^ do
  539. if Editor^.FileName<>'' then
  540. AddRecentFile(Editor^.FileName,Editor^.CurPos.X,Editor^.CurPos.Y);
  541. {$ifndef NODEBUG}
  542. if assigned(Debugger) and (PView(Event.InfoPtr)=Debugger^.LastSource) then
  543. Debugger^.LastSource:=nil;
  544. {$endif}
  545. end;
  546. end;
  547. end;
  548. inherited HandleEvent(Event);
  549. end;
  550. procedure TIDEApp.GetTileRect(var R: TRect);
  551. begin
  552. Desktop^.GetExtent(R);
  553. { Leave the compiler messages window in the bottom }
  554. if assigned(CompilerMessageWindow) and (CompilerMessageWindow^.GetState(sfVisible)) then
  555. R.B.Y:=Min(CompilerMessageWindow^.Origin.Y,Desktop^.Size.Y);
  556. { Leave the messages window in the bottom }
  557. if assigned(MessagesWindow) and (MessagesWindow^.GetState(sfVisible)) and
  558. (MessagesWindow^.Origin.Y<R.B.Y) then
  559. R.B.Y:=MessagesWindow^.Origin.Y;
  560. end;
  561. {****************************************************************************
  562. Switch Screens
  563. ****************************************************************************}
  564. procedure TIDEApp.ShowUserScreen;
  565. begin
  566. DoneSysError;
  567. DoneEvents;
  568. DoneMouse;
  569. DoneScreen; { this is available in FV app.pas (PFV) }
  570. DoneDosMem;
  571. if Assigned(UserScreen) then
  572. UserScreen^.SwitchTo;
  573. end;
  574. procedure TIDEApp.ShowIDEScreen;
  575. begin
  576. if Assigned(UserScreen) then
  577. UserScreen^.SwitchBack;
  578. InitDosMem;
  579. InitScreen;
  580. InitMouse;
  581. InitEvents;
  582. InitSysError;
  583. CurDirChanged;
  584. Message(Application,evBroadcast,cmUpdate,nil);
  585. UpdateScreen(true);
  586. end;
  587. function TIDEApp.AutoSave: boolean;
  588. var IOK,SOK,DOK: boolean;
  589. begin
  590. IOK:=true; SOK:=true; DOK:=true;
  591. if (AutoSaveOptions and asEnvironment)<>0 then
  592. begin
  593. IOK:=WriteINIFile;
  594. if IOK=false then
  595. ErrorBox(error_saving_cfg_file,nil);
  596. end;
  597. if (AutoSaveOptions and asEditorFiles)=0 then
  598. SOK:=SaveAll;
  599. if (AutoSaveOptions and asDesktop)<>0 then
  600. begin
  601. { destory all help & browser windows - we don't want to store them }
  602. { UserScreenWindow is also not registered PM }
  603. DoCloseUserScreenWindow;
  604. CloseHelpWindows;
  605. CloseAllBrowsers;
  606. DOK:=SaveDesktop;
  607. if DOK=false then
  608. ErrorBox(error_saving_dsk_file,nil);
  609. end;
  610. AutoSave:=IOK and SOK and DOK;
  611. end;
  612. function TIDEApp.DoExecute(ProgramPath, Params, InFile,OutFile: string; ExecType: TExecType): boolean;
  613. var CanRun: boolean;
  614. begin
  615. SaveCancelled:=false;
  616. CanRun:=AutoSave;
  617. if (CanRun=false) and (SaveCancelled=false) then
  618. CanRun:=true; { do not care about .DSK or .INI saving problems - just like TP }
  619. if CanRun then
  620. begin
  621. if UserScreen=nil then
  622. begin
  623. ErrorBox(error_user_screen_not_avail,nil);
  624. Exit;
  625. end;
  626. if ExecType<>exNoSwap then
  627. ShowUserScreen;
  628. if ExecType=exDosShell then
  629. WriteShellMsg;
  630. {$ifdef linux}
  631. Shell(ProgramPath+' '+Params);
  632. {$else}
  633. if (InFile='') and (OutFile='') then
  634. DosExecute(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params)
  635. else
  636. ExecuteRedir(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params,InFile,OutFile,'stderr');
  637. {$endif}
  638. if ExecType<>exNoSwap then
  639. ShowIDEScreen;
  640. end;
  641. DoExecute:=CanRun;
  642. end;
  643. procedure TIDEApp.Update;
  644. begin
  645. SetCmdState([cmSaveAll],IsThereAnyEditor);
  646. SetCmdState([cmCloseAll,cmTile,cmCascade,cmWindowList],IsThereAnyWindow);
  647. SetCmdState([cmFindProcedure,cmObjects,cmModules,cmGlobals,cmSymbol{,cmInformation}],IsSymbolInfoAvailable);
  648. {$ifndef NODEBUG}
  649. SetCmdState([cmResetDebugger,cmUntilReturn],assigned(debugger) and debugger^.debuggee_started);
  650. {$endif}
  651. SetCmdState([cmToolsMsgNext,cmToolsMsgPrev],MessagesWindow<>nil);
  652. UpdateTools;
  653. UpdateRecentFileList;
  654. UpdatePrimaryFile;
  655. UpdateINIFile;
  656. Message(Application,evBroadcast,cmCommandSetChanged,nil);
  657. end;
  658. procedure TIDEApp.CurDirChanged;
  659. begin
  660. Message(Application,evBroadcast,cmUpdateTitle,nil);
  661. UpdatePrimaryFile;
  662. UpdateINIFile;
  663. UpdateMenu(MenuBar^.Menu);
  664. end;
  665. procedure TIDEApp.UpdatePrimaryFile;
  666. begin
  667. SetMenuItemParam(SearchMenuItem(MenuBar^.Menu,cmPrimaryFile),SmartPath(PrimaryFile));
  668. SetCmdState([cmClearPrimary],PrimaryFile<>'');
  669. if PrimaryFile<>'' then
  670. SetCmdState(CompileCmds,true);
  671. UpdateMenu(MenuBar^.Menu);
  672. Message(ProgramInfoWindow,evBroadcast,cmUpdate,nil);
  673. end;
  674. procedure TIDEApp.UpdateINIFile;
  675. begin
  676. SetMenuItemParam(SearchMenuItem(MenuBar^.Menu,cmSaveINI),SmartPath(INIPath));
  677. end;
  678. procedure TIDEApp.UpdateRecentFileList;
  679. var P: PMenuItem;
  680. ID,I: word;
  681. FileMenu: PMenuItem;
  682. begin
  683. ID:=cmRecentFileBase;
  684. FileMenu:=SearchSubMenu(MenuBar^.Menu,menuFile);
  685. repeat
  686. { Inc(ID);
  687. P:=SearchMenuItem(FileMenu^.SubMenu,ID);
  688. if FileMenu^.SubMenu^.Default=P then
  689. FileMenu^.SubMenu^.Default:=FileMenu^.SubMenu^.Items;
  690. if P<>nil then RemoveMenuItem(FileMenu^.SubMenu,P);}
  691. P:=GetMenuItemBefore(FileMenu^.SubMenu,nil);
  692. if (P<>nil) then
  693. begin
  694. if (cmRecentFileBase<P^.Command) and (P^.Command<=cmRecentFileBase+MaxRecentFileCount) then
  695. begin
  696. RemoveMenuItem(FileMenu^.SubMenu,P);
  697. if FileMenu^.SubMenu^.Default=P then
  698. FileMenu^.SubMenu^.Default:=FileMenu^.SubMenu^.Items;
  699. end
  700. else
  701. P:=nil;
  702. end;
  703. until P=nil;
  704. P:=GetMenuItemBefore(FileMenu^.SubMenu,nil);
  705. if (P<>nil) and IsSeparator(P) then
  706. RemoveMenuItem(FileMenu^.SubMenu,P);
  707. if RecentFileCount>0 then
  708. AppendMenuItem(FileMenu^.SubMenu,NewLine(nil));
  709. for I:=1 to RecentFileCount do
  710. begin
  711. P:=NewItem('~'+IntToStr(I)+'~ '+ShrinkPath(SmartPath(RecentFiles[I].FileName),27),' ',
  712. kbNoKey,cmRecentFileBase+I,hcRecentFileBase+I,nil);
  713. AppendMenuItem(FileMenu^.SubMenu,P);
  714. end;
  715. end;
  716. procedure TIDEApp.UpdateTools;
  717. var P: PMenuItem;
  718. ID,I: word;
  719. ToolsMenu: PMenuItem;
  720. S1,S2,S3: string;
  721. W: word;
  722. begin
  723. ID:=cmToolsBase;
  724. ToolsMenu:=SearchSubMenu(MenuBar^.Menu,menuTools);
  725. repeat
  726. P:=GetMenuItemBefore(ToolsMenu^.SubMenu,nil);
  727. if (P<>nil) then
  728. begin
  729. if (cmToolsBase<P^.Command) and (P^.Command<=cmToolsBase+MaxToolCount) then
  730. begin
  731. RemoveMenuItem(ToolsMenu^.SubMenu,P);
  732. if ToolsMenu^.SubMenu^.Default=P then
  733. ToolsMenu^.SubMenu^.Default:=ToolsMenu^.SubMenu^.Items;
  734. end
  735. else
  736. P:=nil;
  737. end;
  738. until P=nil;
  739. P:=GetMenuItemBefore(ToolsMenu^.SubMenu,nil);
  740. if (P<>nil) and IsSeparator(P) then
  741. RemoveMenuItem(ToolsMenu^.SubMenu,P);
  742. if GetToolCount>0 then
  743. AppendMenuItem(ToolsMenu^.SubMenu,NewLine(nil));
  744. for I:=1 to GetToolCount do
  745. begin
  746. GetToolParams(I-1,S1,S2,S3,W);
  747. P:=NewItem(S1,KillTilde(GetHotKeyName(W)),W,cmToolsBase+I,hcToolsBase+I,nil);
  748. AppendMenuItem(ToolsMenu^.SubMenu,P);
  749. end;
  750. end;
  751. procedure TIDEApp.DosShell;
  752. begin
  753. DoExecute(GetEnv('COMSPEC'), '', '', '', exDosShell);
  754. end;
  755. {$I FPMFILE.INC}
  756. {$I FPMEDIT.INC}
  757. {$I FPMSRCH.INC}
  758. {$I FPMRUN.INC}
  759. {$I FPMCOMP.INC}
  760. {$I FPMDEBUG.INC}
  761. {$I FPMTOOLS.INC}
  762. {$I FPMOPTS.INC}
  763. {$I FPMWND.INC}
  764. {$I FPMHELP.INC}
  765. procedure TIDEApp.AddRecentFile(AFileName: string; CurX, CurY: integer);
  766. begin
  767. if SearchRecentFile(AFileName)<>-1 then Exit;
  768. if RecentFileCount>0 then
  769. Move(RecentFiles[1],RecentFiles[2],SizeOf(RecentFiles[1])*Min(RecentFileCount,High(RecentFiles)-1));
  770. if RecentFileCount<High(RecentFiles) then Inc(RecentFileCount);
  771. with RecentFiles[1] do
  772. begin
  773. FileName:=AFileName;
  774. LastPos.X:=CurX; LastPos.Y:=CurY;
  775. end;
  776. UpdateRecentFileList;
  777. end;
  778. function TIDEApp.SearchRecentFile(AFileName: string): integer;
  779. var Idx,I: integer;
  780. begin
  781. Idx:=-1;
  782. for I:=1 to RecentFileCount do
  783. if UpcaseStr(AFileName)=UpcaseStr(RecentFiles[I].FileName) then
  784. begin Idx:=I; Break; end;
  785. SearchRecentFile:=Idx;
  786. end;
  787. procedure TIDEApp.RemoveRecentFile(Index: integer);
  788. begin
  789. if Index<RecentFileCount then
  790. Move(RecentFiles[Index+1],RecentFiles[Index],SizeOf(RecentFiles[1])*(RecentFileCount-Index));
  791. Dec(RecentFileCount);
  792. end;
  793. function TIDEApp.GetPalette: PPalette;
  794. var P: string;
  795. begin
  796. P:=AppPalette;
  797. GetPalette:=@P;
  798. end;
  799. function TIDEApp.IsClosing: Boolean;
  800. begin
  801. IsClosing:=InsideDone;
  802. end;
  803. destructor TIDEApp.Done;
  804. begin
  805. InsideDone:=true;
  806. inherited Done;
  807. RemoveBrowsersCollection;
  808. DoneHelpSystem;
  809. end;
  810. END.
  811. {
  812. $Log$
  813. Revision 1.52 2000-02-07 12:02:32 pierre
  814. Gabor's changes
  815. Revision 1.51 2000/01/23 21:25:17 florian
  816. + start of internationalization support
  817. Revision 1.50 2000/01/08 18:26:20 florian
  818. + added a register window, doesn't work yet
  819. Revision 1.49 2000/01/05 00:31:50 pierre
  820. * avoid new files to use TABS
  821. Revision 1.48 2000/01/03 11:38:33 michael
  822. Changes from Gabor
  823. Revision 1.47 1999/12/20 14:23:17 pierre
  824. * MyApp renamed IDEApp
  825. * TDebugController.ResetDebuggerRows added to
  826. get resetting of debugger rows
  827. Revision 1.46 1999/12/17 15:07:01 florian
  828. + TIDEApp.Idle does always call GiveUpTimeSlice
  829. Revision 1.45 1999/12/10 13:02:05 pierre
  830. + VideoMode save/restore
  831. Revision 1.44 1999/11/25 00:26:49 pierre
  832. * RecentFiles missed the last char
  833. Revision 1.43 1999/11/10 17:19:06 pierre
  834. * Use DosExecute from Fpredir unit
  835. Revision 1.42 1999/10/27 12:10:42 pierre
  836. + With DebugUndo added 3 menu items
  837. "Dump Undo" "Undo All" and "Redo All"
  838. for Undo checks
  839. Revision 1.41 1999/09/22 16:21:41 pierre
  840. * Use ShrinkPas for RecentFiles
  841. Revision 1.40 1999/09/22 13:04:31 pierre
  842. + Close UserScreen to avoid store crash
  843. Revision 1.39 1999/09/21 17:09:00 pierre
  844. + Windows clipboard for win32
  845. Revision 1.38 1999/09/13 16:24:43 peter
  846. + clock
  847. * backspace unident like tp7
  848. Revision 1.37 1999/09/13 11:44:00 peter
  849. * fixes from gabor, idle event, html fix
  850. Revision 1.36 1999/09/09 14:15:27 pierre
  851. + cmCopyWin,cmPasteWin
  852. Revision 1.35 1999/08/16 18:25:19 peter
  853. * Adjusting the selection when the editor didn't contain any line.
  854. * Reserved word recognition redesigned, but this didn't affect the overall
  855. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  856. The syntax scanner loop is a bit slow but the main problem is the
  857. recognition of special symbols. Switching off symbol processing boosts
  858. the performance up to ca. 200%...
  859. * The editor didn't allow copying (for ex to clipboard) of a single character
  860. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  861. * Compiler Messages window (actually the whole desktop) did not act on any
  862. keypress when compilation failed and thus the window remained visible
  863. + Message windows are now closed upon pressing Esc
  864. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  865. only when neccessary
  866. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  867. + LineSelect (Ctrl+K+L) implemented
  868. * The IDE had problems closing help windows before saving the desktop
  869. Revision 1.34 1999/08/03 20:22:32 peter
  870. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  871. + Desktop saving should work now
  872. - History saved
  873. - Clipboard content saved
  874. - Desktop saved
  875. - Symbol info saved
  876. * syntax-highlight bug fixed, which compared special keywords case sensitive
  877. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  878. * with 'whole words only' set, the editor didn't found occourences of the
  879. searched text, if the text appeared previously in the same line, but didn't
  880. satisfied the 'whole-word' condition
  881. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  882. (ie. the beginning of the selection)
  883. * when started typing in a new line, but not at the start (X=0) of it,
  884. the editor inserted the text one character more to left as it should...
  885. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  886. * Shift shouldn't cause so much trouble in TCodeEditor now...
  887. * Syntax highlight had problems recognizing a special symbol if it was
  888. prefixed by another symbol character in the source text
  889. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  890. Revision 1.33 1999/07/12 13:14:18 pierre
  891. * LineEnd bug corrected, now goes end of text even if selected
  892. + Until Return for debugger
  893. + Code for Quit inside GDB Window
  894. Revision 1.32 1999/07/10 01:24:17 pierre
  895. + First implementation of watches window
  896. Revision 1.31 1999/06/29 22:50:14 peter
  897. * more fixes from gabor
  898. Revision 1.30 1999/06/28 19:32:20 peter
  899. * fixes from gabor
  900. Revision 1.29 1999/06/28 12:40:19 pierre
  901. + RemoveBrowsersCollection in TIDEApp.Done
  902. Revision 1.28 1999/06/25 00:46:33 pierre
  903. + UpdateTarget to show current target
  904. + SearchSymbol, not scope aware (this will need a PPU change !)
  905. Revision 1.27 1999/05/22 13:44:30 peter
  906. * fixed couple of bugs
  907. Revision 1.26 1999/04/07 21:55:47 peter
  908. + object support for browser
  909. * html help fixes
  910. * more desktop saving things
  911. * NODEBUG directive to exclude debugger
  912. Revision 1.25 1999/03/23 15:11:29 peter
  913. * desktop saving things
  914. * vesa mode
  915. * preferences dialog
  916. Revision 1.24 1999/03/19 16:04:29 peter
  917. * new compiler dialog
  918. Revision 1.23 1999/03/16 12:38:10 peter
  919. * tools macro fixes
  920. + tph writer
  921. + first things for resource files
  922. Revision 1.22 1999/03/12 01:13:57 peter
  923. * flag if trytoopen should look for other extensions
  924. + browser tab in the tools-compiler
  925. Revision 1.21 1999/03/02 13:48:29 peter
  926. * fixed far problem is fpdebug
  927. * tile/cascading with message window
  928. * grep fixes
  929. Revision 1.20 1999/03/01 15:41:54 peter
  930. + Added dummy entries for functions not yet implemented
  931. * MenuBar didn't update itself automatically on command-set changes
  932. * Fixed Debugging/Profiling options dialog
  933. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is
  934. set
  935. * efBackSpaceUnindents works correctly
  936. + 'Messages' window implemented
  937. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  938. + Added TP message-filter support (for ex. you can call GREP thru
  939. GREP2MSG and view the result in the messages window - just like in TP)
  940. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  941. so topic search didn't work...
  942. * In FPHELP.PAS there were still context-variables defined as word instead
  943. of THelpCtx
  944. * StdStatusKeys() was missing from the statusdef for help windows
  945. + Topic-title for index-table can be specified when adding a HTML-files
  946. Revision 1.19 1999/02/22 11:51:36 peter
  947. * browser updates from gabor
  948. Revision 1.18 1999/02/22 02:15:13 peter
  949. + default extension for save in the editor
  950. + Separate Text to Find for the grep dialog
  951. * fixed redir crash with tp7
  952. Revision 1.17 1999/02/20 15:18:30 peter
  953. + ctrl-c capture with confirm dialog
  954. + ascii table in the tools menu
  955. + heapviewer
  956. * empty file fixed
  957. * fixed callback routines in fpdebug to have far for tp7
  958. Revision 1.16 1999/02/18 13:44:31 peter
  959. * search fixed
  960. + backward search
  961. * help fixes
  962. * browser updates
  963. Revision 1.15 1999/02/16 10:43:55 peter
  964. * use -dGDB for the compiler
  965. * only use gdb_file when -dDEBUG is used
  966. * profiler switch is now a toggle instead of radiobutton
  967. Revision 1.14 1999/02/11 19:07:22 pierre
  968. * GDBWindow redesigned :
  969. normal editor apart from
  970. that any kbEnter will send the line (for begin to cursor)
  971. to GDB command !
  972. GDBWindow opened in Debugger Menu
  973. still buggy :
  974. -echo should not be present if at end of text
  975. -GDBWindow becomes First after each step (I don't know why !)
  976. Revision 1.13 1999/02/10 09:54:11 pierre
  977. * cmSourceWindowClosing resets Debugger LastSource field to avoid problems
  978. Revision 1.12 1999/02/08 17:43:44 pierre
  979. * RestDebugger or multiple running of debugged program now works
  980. + added DoContToCursor(F4)
  981. * Breakpoints are now inserted correctly (was mainlyy a problem
  982. of directories)
  983. Revision 1.11 1999/02/08 10:37:44 peter
  984. + html helpviewer
  985. Revision 1.7 1999/02/04 13:32:03 pierre
  986. * Several things added (I cannot commit them independently !)
  987. + added TBreakpoint and TBreakpointCollection
  988. + added cmResetDebugger,cmGrep,CmToggleBreakpoint
  989. + Breakpoint list in INIFile
  990. * Select items now also depend of SwitchMode
  991. * Reading of option '-g' was not possible !
  992. + added search for -Fu args pathes in TryToOpen
  993. + added code for automatic opening of FileDialog
  994. if source not found
  995. Revision 1.6 1999/02/02 16:41:39 peter
  996. + automatic .pas/.pp adding by opening of file
  997. * better debuggerscreen changes
  998. Revision 1.5 1999/01/22 18:13:22 pierre
  999. * DoneScreen Removed I did not find any such proc ??
  1000. Revision 1.4 1999/01/22 10:24:03 peter
  1001. * first debugger things
  1002. Revision 1.3 1999/01/21 11:54:14 peter
  1003. + tools menu
  1004. + speedsearch in symbolbrowser
  1005. * working run command
  1006. Revision 1.2 1999/01/14 21:42:20 peter
  1007. * source tracking from Gabor
  1008. Revision 1.1 1999/01/12 14:29:34 peter
  1009. + Implemented still missing 'switch' entries in Options menu
  1010. + Pressing Ctrl-B sets ASCII mode in editor, after which keypresses (even
  1011. ones with ASCII < 32 ; entered with Alt+<###>) are interpreted always as
  1012. ASCII chars and inserted directly in the text.
  1013. + Added symbol browser
  1014. * splitted fp.pas to fpide.pas
  1015. Revision 1.4 1999/01/04 11:49:41 peter
  1016. * 'Use tab characters' now works correctly
  1017. + Syntax highlight now acts on File|Save As...
  1018. + Added a new class to syntax highlight: 'hex numbers'.
  1019. * There was something very wrong with the palette managment. Now fixed.
  1020. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  1021. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  1022. process revised
  1023. Revision 1.2 1998/12/28 15:47:40 peter
  1024. + Added user screen support, display & window
  1025. + Implemented Editor,Mouse Options dialog
  1026. + Added location of .INI and .CFG file
  1027. + Option (INI) file managment implemented (see bottom of Options Menu)
  1028. + Switches updated
  1029. + Run program
  1030. Revision 1.3 1998/12/22 10:39:38 peter
  1031. + options are now written/read
  1032. + find and replace routines
  1033. }