fpide.pas 39 KB

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