fpide.pas 40 KB

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