fpide.pas 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  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. 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 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. SaveCancelled: boolean;
  108. InsideDone : boolean;
  109. LastEvent: longint;
  110. function DoExecute(ProgramPath, Params, InFile, OutFile: string; ExecType: TExecType): boolean;
  111. procedure AddRecentFile(AFileName: string; CurX, CurY: integer);
  112. function SearchRecentFile(AFileName: string): integer;
  113. procedure RemoveRecentFile(Index: integer);
  114. procedure CurDirChanged;
  115. procedure UpdatePrimaryFile;
  116. procedure UpdateINIFile;
  117. procedure UpdateRecentFileList;
  118. procedure UpdateTools;
  119. end;
  120. var
  121. IDEApp: TIDEApp;
  122. implementation
  123. uses
  124. {$ifdef linux}
  125. linux,
  126. {$endif}
  127. {$ifdef WinClipSupported}
  128. WinClip,
  129. {$endif WinClipSupported}
  130. Video,Mouse,Keyboard,
  131. Dos,Memory,Menus,Dialogs,StdDlg,ColorSel,Commands,HelpCtx,
  132. AsciiTab,
  133. Systems,
  134. WUtils,WHelp,WHlpView,WINI,WViews,
  135. FPConst,FPVars,FPUtils,FPSwitch,FPIni,FPIntf,FPCompile,FPHelp,
  136. FPTemplt,FPCalc,FPUsrScr,FPTools,{$ifndef NODEBUG}FPDebug,{$endif}FPRedir,
  137. FPDesk;
  138. function IDEUseSyntaxHighlight(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
  139. begin
  140. IDEUseSyntaxHighlight:=(Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts);
  141. end;
  142. function IDEUseTabsPattern(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
  143. begin
  144. IDEUseTabsPattern:=(Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),TabsPattern);
  145. end;
  146. constructor TIDEApp.Init;
  147. var R: TRect;
  148. begin
  149. {$ifndef EDITORS}
  150. {$ifdef TP}
  151. UseSyntaxHighlight:=IDEUseSyntaxHighlight;
  152. UseTabsPattern:=IDEUseTabsPattern;
  153. {$else TP}
  154. UseSyntaxHighlight:=@IDEUseSyntaxHighlight;
  155. UseTabsPattern:=@IDEUseTabsPattern;
  156. {$endif TP}
  157. {$endif}
  158. inherited Init;
  159. InsideDone:=false;
  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:=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. function TIDEApp.IsClosing: Boolean;
  784. begin
  785. IsClosing:=InsideDone;
  786. end;
  787. destructor TIDEApp.Done;
  788. begin
  789. InsideDone:=true;
  790. inherited Done;
  791. RemoveBrowsersCollection;
  792. DoneHelpSystem;
  793. end;
  794. END.
  795. {
  796. $Log$
  797. Revision 1.47 1999-12-20 14:23:17 pierre
  798. * MyApp renamed IDEApp
  799. * TDebugController.ResetDebuggerRows added to
  800. get resetting of debugger rows
  801. Revision 1.46 1999/12/17 15:07:01 florian
  802. + TIDEApp.Idle does always call GiveUpTimeSlice
  803. Revision 1.45 1999/12/10 13:02:05 pierre
  804. + VideoMode save/restore
  805. Revision 1.44 1999/11/25 00:26:49 pierre
  806. * RecentFiles missed the last char
  807. Revision 1.43 1999/11/10 17:19:06 pierre
  808. * Use DosExecute from Fpredir unit
  809. Revision 1.42 1999/10/27 12:10:42 pierre
  810. + With DebugUndo added 3 menu items
  811. "Dump Undo" "Undo All" and "Redo All"
  812. for Undo checks
  813. Revision 1.41 1999/09/22 16:21:41 pierre
  814. * Use ShrinkPas for RecentFiles
  815. Revision 1.40 1999/09/22 13:04:31 pierre
  816. + Close UserScreen to avoid store crash
  817. Revision 1.39 1999/09/21 17:09:00 pierre
  818. + Windows clipboard for win32
  819. Revision 1.38 1999/09/13 16:24:43 peter
  820. + clock
  821. * backspace unident like tp7
  822. Revision 1.37 1999/09/13 11:44:00 peter
  823. * fixes from gabor, idle event, html fix
  824. Revision 1.36 1999/09/09 14:15:27 pierre
  825. + cmCopyWin,cmPasteWin
  826. Revision 1.35 1999/08/16 18:25:19 peter
  827. * Adjusting the selection when the editor didn't contain any line.
  828. * Reserved word recognition redesigned, but this didn't affect the overall
  829. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  830. The syntax scanner loop is a bit slow but the main problem is the
  831. recognition of special symbols. Switching off symbol processing boosts
  832. the performance up to ca. 200%...
  833. * The editor didn't allow copying (for ex to clipboard) of a single character
  834. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  835. * Compiler Messages window (actually the whole desktop) did not act on any
  836. keypress when compilation failed and thus the window remained visible
  837. + Message windows are now closed upon pressing Esc
  838. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  839. only when neccessary
  840. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  841. + LineSelect (Ctrl+K+L) implemented
  842. * The IDE had problems closing help windows before saving the desktop
  843. Revision 1.34 1999/08/03 20:22:32 peter
  844. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  845. + Desktop saving should work now
  846. - History saved
  847. - Clipboard content saved
  848. - Desktop saved
  849. - Symbol info saved
  850. * syntax-highlight bug fixed, which compared special keywords case sensitive
  851. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  852. * with 'whole words only' set, the editor didn't found occourences of the
  853. searched text, if the text appeared previously in the same line, but didn't
  854. satisfied the 'whole-word' condition
  855. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  856. (ie. the beginning of the selection)
  857. * when started typing in a new line, but not at the start (X=0) of it,
  858. the editor inserted the text one character more to left as it should...
  859. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  860. * Shift shouldn't cause so much trouble in TCodeEditor now...
  861. * Syntax highlight had problems recognizing a special symbol if it was
  862. prefixed by another symbol character in the source text
  863. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  864. Revision 1.33 1999/07/12 13:14:18 pierre
  865. * LineEnd bug corrected, now goes end of text even if selected
  866. + Until Return for debugger
  867. + Code for Quit inside GDB Window
  868. Revision 1.32 1999/07/10 01:24:17 pierre
  869. + First implementation of watches window
  870. Revision 1.31 1999/06/29 22:50:14 peter
  871. * more fixes from gabor
  872. Revision 1.30 1999/06/28 19:32:20 peter
  873. * fixes from gabor
  874. Revision 1.29 1999/06/28 12:40:19 pierre
  875. + RemoveBrowsersCollection in TIDEApp.Done
  876. Revision 1.28 1999/06/25 00:46:33 pierre
  877. + UpdateTarget to show current target
  878. + SearchSymbol, not scope aware (this will need a PPU change !)
  879. Revision 1.27 1999/05/22 13:44:30 peter
  880. * fixed couple of bugs
  881. Revision 1.26 1999/04/07 21:55:47 peter
  882. + object support for browser
  883. * html help fixes
  884. * more desktop saving things
  885. * NODEBUG directive to exclude debugger
  886. Revision 1.25 1999/03/23 15:11:29 peter
  887. * desktop saving things
  888. * vesa mode
  889. * preferences dialog
  890. Revision 1.24 1999/03/19 16:04:29 peter
  891. * new compiler dialog
  892. Revision 1.23 1999/03/16 12:38:10 peter
  893. * tools macro fixes
  894. + tph writer
  895. + first things for resource files
  896. Revision 1.22 1999/03/12 01:13:57 peter
  897. * flag if trytoopen should look for other extensions
  898. + browser tab in the tools-compiler
  899. Revision 1.21 1999/03/02 13:48:29 peter
  900. * fixed far problem is fpdebug
  901. * tile/cascading with message window
  902. * grep fixes
  903. Revision 1.20 1999/03/01 15:41:54 peter
  904. + Added dummy entries for functions not yet implemented
  905. * MenuBar didn't update itself automatically on command-set changes
  906. * Fixed Debugging/Profiling options dialog
  907. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is
  908. set
  909. * efBackSpaceUnindents works correctly
  910. + 'Messages' window implemented
  911. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  912. + Added TP message-filter support (for ex. you can call GREP thru
  913. GREP2MSG and view the result in the messages window - just like in TP)
  914. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  915. so topic search didn't work...
  916. * In FPHELP.PAS there were still context-variables defined as word instead
  917. of THelpCtx
  918. * StdStatusKeys() was missing from the statusdef for help windows
  919. + Topic-title for index-table can be specified when adding a HTML-files
  920. Revision 1.19 1999/02/22 11:51:36 peter
  921. * browser updates from gabor
  922. Revision 1.18 1999/02/22 02:15:13 peter
  923. + default extension for save in the editor
  924. + Separate Text to Find for the grep dialog
  925. * fixed redir crash with tp7
  926. Revision 1.17 1999/02/20 15:18:30 peter
  927. + ctrl-c capture with confirm dialog
  928. + ascii table in the tools menu
  929. + heapviewer
  930. * empty file fixed
  931. * fixed callback routines in fpdebug to have far for tp7
  932. Revision 1.16 1999/02/18 13:44:31 peter
  933. * search fixed
  934. + backward search
  935. * help fixes
  936. * browser updates
  937. Revision 1.15 1999/02/16 10:43:55 peter
  938. * use -dGDB for the compiler
  939. * only use gdb_file when -dDEBUG is used
  940. * profiler switch is now a toggle instead of radiobutton
  941. Revision 1.14 1999/02/11 19:07:22 pierre
  942. * GDBWindow redesigned :
  943. normal editor apart from
  944. that any kbEnter will send the line (for begin to cursor)
  945. to GDB command !
  946. GDBWindow opened in Debugger Menu
  947. still buggy :
  948. -echo should not be present if at end of text
  949. -GDBWindow becomes First after each step (I don't know why !)
  950. Revision 1.13 1999/02/10 09:54:11 pierre
  951. * cmSourceWindowClosing resets Debugger LastSource field to avoid problems
  952. Revision 1.12 1999/02/08 17:43:44 pierre
  953. * RestDebugger or multiple running of debugged program now works
  954. + added DoContToCursor(F4)
  955. * Breakpoints are now inserted correctly (was mainlyy a problem
  956. of directories)
  957. Revision 1.11 1999/02/08 10:37:44 peter
  958. + html helpviewer
  959. Revision 1.7 1999/02/04 13:32:03 pierre
  960. * Several things added (I cannot commit them independently !)
  961. + added TBreakpoint and TBreakpointCollection
  962. + added cmResetDebugger,cmGrep,CmToggleBreakpoint
  963. + Breakpoint list in INIFile
  964. * Select items now also depend of SwitchMode
  965. * Reading of option '-g' was not possible !
  966. + added search for -Fu args pathes in TryToOpen
  967. + added code for automatic opening of FileDialog
  968. if source not found
  969. Revision 1.6 1999/02/02 16:41:39 peter
  970. + automatic .pas/.pp adding by opening of file
  971. * better debuggerscreen changes
  972. Revision 1.5 1999/01/22 18:13:22 pierre
  973. * DoneScreen Removed I did not find any such proc ??
  974. Revision 1.4 1999/01/22 10:24:03 peter
  975. * first debugger things
  976. Revision 1.3 1999/01/21 11:54:14 peter
  977. + tools menu
  978. + speedsearch in symbolbrowser
  979. * working run command
  980. Revision 1.2 1999/01/14 21:42:20 peter
  981. * source tracking from Gabor
  982. Revision 1.1 1999/01/12 14:29:34 peter
  983. + Implemented still missing 'switch' entries in Options menu
  984. + Pressing Ctrl-B sets ASCII mode in editor, after which keypresses (even
  985. ones with ASCII < 32 ; entered with Alt+<###>) are interpreted always as
  986. ASCII chars and inserted directly in the text.
  987. + Added symbol browser
  988. * splitted fp.pas to fpide.pas
  989. Revision 1.4 1999/01/04 11:49:41 peter
  990. * 'Use tab characters' now works correctly
  991. + Syntax highlight now acts on File|Save As...
  992. + Added a new class to syntax highlight: 'hex numbers'.
  993. * There was something very wrong with the palette managment. Now fixed.
  994. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  995. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  996. process revised
  997. Revision 1.2 1998/12/28 15:47:40 peter
  998. + Added user screen support, display & window
  999. + Implemented Editor,Mouse Options dialog
  1000. + Added location of .INI and .CFG file
  1001. + Option (INI) file managment implemented (see bottom of Options Menu)
  1002. + Switches updated
  1003. + Run program
  1004. Revision 1.3 1998/12/22 10:39:38 peter
  1005. + options are now written/read
  1006. + find and replace routines
  1007. }