fpide.pas 38 KB

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