fpide.pas 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591
  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,WCEdit,{$endif}
  18. Comphook,Browcol,
  19. WHTMLScn,
  20. FPViews,FPSymbol,fpstring;
  21. type
  22. TExecType = (exNormal,exNoSwap,exDosShell);
  23. TIDEApp = object(TApplication)
  24. constructor Init;
  25. procedure InitDesktop; virtual;
  26. procedure InitMenuBar; virtual;
  27. procedure InitStatusLine; virtual;
  28. procedure Open(FileName: string);
  29. function OpenSearch(FileName: string) : boolean;
  30. function AskSaveAll: boolean;
  31. function SaveAll: boolean;
  32. function AutoSave: boolean;
  33. procedure Idle; virtual;
  34. procedure Update;
  35. procedure UpdateMode;
  36. procedure UpdateTarget;
  37. procedure GetEvent(var Event: TEvent); virtual;
  38. procedure HandleEvent(var Event: TEvent); virtual;
  39. procedure GetTileRect(var R: TRect); virtual;
  40. function GetPalette: PPalette; virtual;
  41. procedure DosShell; {virtual;}
  42. procedure ShowReadme;
  43. destructor Done; virtual;
  44. procedure ShowUserScreen;
  45. procedure ShowIDEScreen;
  46. function IsClosing : boolean;
  47. private
  48. procedure NewEditor;
  49. procedure NewFromTemplate;
  50. procedure OpenRecentFile(RecentIndex: integer);
  51. procedure ChangeDir;
  52. procedure ShowClipboard;
  53. procedure FindProcedure;
  54. procedure Objects;
  55. procedure Modules;
  56. procedure Globals;
  57. procedure SearchSymbol;
  58. procedure Parameters;
  59. procedure DoStepOver;
  60. procedure DoTraceInto;
  61. procedure DoRun;
  62. procedure DoResetDebugger;
  63. procedure DoContToCursor;
  64. procedure DoContUntilReturn;
  65. procedure Target;
  66. procedure DoCompilerMessages;
  67. procedure DoPrimaryFile;
  68. procedure DoClearPrimary;
  69. procedure DoUserScreenWindow;
  70. procedure DoCloseUserScreenWindow;
  71. procedure DoUserScreen;
  72. procedure DoOpenGDBWindow;
  73. procedure DoToggleBreak;
  74. procedure DoShowCallStack;
  75. procedure DoShowBreakpointList;
  76. procedure DoShowWatches;
  77. procedure DoAddWatch;
  78. procedure DoShowRegisters;
  79. procedure DoShowFPU;
  80. function AskRecompileIfModified:boolean;
  81. procedure DoInformation;
  82. procedure Messages;
  83. procedure Calculator;
  84. procedure DoAsciiTable;
  85. procedure ExecuteTool(Idx: integer);
  86. procedure SetSwitchesMode;
  87. procedure DoCompilerSwitch;
  88. procedure MemorySizes;
  89. procedure DoLinkerSwitch;
  90. procedure DoDebuggerSwitch;
  91. procedure Directories;
  92. procedure Tools;
  93. procedure DoGrep;
  94. procedure Preferences;
  95. procedure EditorOptions(Editor: PEditor);
  96. procedure CodeComplete;
  97. procedure CodeTemplates;
  98. procedure BrowserOptions(Browser: PBrowserWindow);
  99. procedure DesktopOptions;
  100. procedure Mouse;
  101. procedure StartUp;
  102. procedure Colors;
  103. procedure OpenINI;
  104. procedure SaveINI;
  105. procedure SaveAsINI;
  106. procedure CloseAll;
  107. procedure WindowList;
  108. procedure HelpContents;
  109. procedure HelpHelpIndex;
  110. procedure HelpTopicSearch;
  111. procedure HelpPrevTopic;
  112. procedure HelpUsingHelp;
  113. procedure HelpFiles;
  114. procedure About;
  115. procedure CreateAnsiFile;
  116. public
  117. procedure SourceWindowClosed;
  118. private
  119. SaveCancelled: boolean;
  120. InsideDone : boolean;
  121. LastEvent: longint;
  122. function DoExecute(ProgramPath, Params, InFile, OutFile, ErrFile: string; ExecType: TExecType): boolean;
  123. procedure AddRecentFile(AFileName: string; CurX, CurY: integer);
  124. function SearchRecentFile(AFileName: string): integer;
  125. procedure RemoveRecentFile(Index: integer);
  126. procedure CurDirChanged;
  127. procedure UpdatePrimaryFile;
  128. procedure UpdateINIFile;
  129. procedure UpdateRecentFileList;
  130. procedure UpdateTools;
  131. end;
  132. procedure PutEvent(TargetView: PView; E: TEvent);
  133. procedure PutCommand(TargetView: PView; What, Command: Word; InfoPtr: Pointer);
  134. var
  135. IDEApp: TIDEApp;
  136. implementation
  137. uses
  138. {$ifdef HasSignal}
  139. fpcatch,
  140. {$endif HasSignal}
  141. {$ifdef WinClipSupported}
  142. WinClip,
  143. {$endif WinClipSupported}
  144. {$ifdef Unix}
  145. fpKeys,
  146. {$endif Unix}
  147. FpDpAnsi,WConsts,
  148. Video,Mouse,Keyboard,
  149. Compiler,Version,
  150. Dos,Memory,Menus,Dialogs,StdDlg,ColorSel,Commands,HelpCtx,
  151. Systems,
  152. WUtils,WHlpView,WViews,WHTMLHlp,
  153. FPConst,FPVars,FPUtils,FPSwitch,FPIni,FPIntf,FPCompil,FPHelp,
  154. FPTemplt,FPCalc,FPUsrScr,FPTools,{$ifndef NODEBUG}FPDebug,{$endif}FPRedir,
  155. FPDesk,FPCodCmp,FPCodTmp;
  156. type
  157. TTargetedEvent = record
  158. Target: PView;
  159. Event: TEvent;
  160. end;
  161. const
  162. TargetedEventHead : integer = 0;
  163. TargetedEventTail : integer = 0;
  164. var
  165. TargetedEvents : array[0..10] of TTargetedEvent;
  166. function IncTargetedEventPtr(I: integer): integer;
  167. begin
  168. Inc(I);
  169. if I>High(TargetedEvents) then I:=Low(TargetedEvents);
  170. IncTargetedEventPtr:=I;
  171. end;
  172. procedure PutEvent(TargetView: PView; E: TEvent);
  173. begin
  174. if IncTargetedEventPtr(TargetedEventHead)=TargetedEventTail then Exit;
  175. with TargetedEvents[TargetedEventHead] do
  176. begin
  177. Target:=TargetView;
  178. Event:=E;
  179. end;
  180. TargetedEventHead:=IncTargetedEventPtr(TargetedEventHead);
  181. end;
  182. procedure PutCommand(TargetView: PView; What, Command: Word; InfoPtr: Pointer);
  183. var E: TEvent;
  184. begin
  185. FillChar(E,Sizeof(E),0);
  186. E.What:=What;
  187. E.Command:=Command;
  188. E.InfoPtr:=InfoPtr;
  189. PutEvent(TargetView,E);
  190. end;
  191. function GetTargetedEvent(var P: PView; var E: TEvent): boolean;
  192. var OK: boolean;
  193. begin
  194. OK:=TargetedEventHead<>TargetedEventTail;
  195. if OK then
  196. begin
  197. with TargetedEvents[TargetedEventTail] do
  198. begin
  199. P:=Target;
  200. E:=Event;
  201. end;
  202. TargetedEventTail:=IncTargetedEventPtr(TargetedEventTail);
  203. end;
  204. GetTargetedEvent:=OK;
  205. end;
  206. function IDEUseSyntaxHighlight(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
  207. begin
  208. IDEUseSyntaxHighlight:=(Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts);
  209. end;
  210. function IDEUseTabsPattern(Editor: PFileEditor): boolean; {$ifndef FPC}far;{$endif}
  211. begin
  212. { the commented code lead all new files
  213. to become with TAB use enabled which is wrong in my opinion PM }
  214. IDEUseTabsPattern:={(Editor^.FileName='') or }MatchesFileList(NameAndExtOf(Editor^.FileName),TabsPattern);
  215. end;
  216. constructor TIDEApp.Init;
  217. var R: TRect;
  218. begin
  219. {$ifndef EDITORS}
  220. {$ifdef TP}
  221. UseSyntaxHighlight:=IDEUseSyntaxHighlight;
  222. UseTabsPattern:=IDEUseTabsPattern;
  223. {$else TP}
  224. UseSyntaxHighlight:=@IDEUseSyntaxHighlight;
  225. UseTabsPattern:=@IDEUseTabsPattern;
  226. {$endif TP}
  227. {$endif}
  228. inherited Init;
  229. InitAdvMsgBox;
  230. InsideDone:=false;
  231. MenuBar^.GetBounds(R); R.A.X:=R.B.X-8;
  232. New(ClockView, Init(R));
  233. ClockView^.GrowMode:=gfGrowLoX+gfGrowHiX;
  234. Application^.Insert(ClockView);
  235. New(ClipboardWindow, Init);
  236. Desktop^.Insert(ClipboardWindow);
  237. New(CalcWindow, Init); CalcWindow^.Hide;
  238. Desktop^.Insert(CalcWindow);
  239. New(CompilerMessageWindow, Init);
  240. CompilerMessageWindow^.Hide;
  241. Desktop^.Insert(CompilerMessageWindow);
  242. Message(@Self,evBroadcast,cmUpdate,nil);
  243. CurDirChanged;
  244. { heap viewer }
  245. GetExtent(R); Dec(R.B.X); R.A.X:=R.B.X-9; R.A.Y:=R.B.Y-1;
  246. New(HeapView, InitKb(R));
  247. if (StartupOptions and soHeapMonitor)=0 then HeapView^.Hide;
  248. Insert(HeapView);
  249. Drivers.ShowMouse;
  250. {$ifdef win32}
  251. Win32ShowMouse;
  252. {$endif win32}
  253. end;
  254. procedure TIDEApp.InitDesktop;
  255. var
  256. R: TRect;
  257. begin
  258. GetExtent(R);
  259. Inc(R.A.Y);
  260. Dec(R.B.Y);
  261. Desktop:=New(PFPDesktop, Init(R));
  262. end;
  263. procedure TIDEApp.InitMenuBar;
  264. var R: TRect;
  265. WinPMI : PMenuItem;
  266. begin
  267. GetExtent(R); R.B.Y:=R.A.Y+1;
  268. WinPMI:=nil;
  269. {$ifdef WinClipSupported}
  270. if WinClipboardSupported then
  271. WinPMI:=NewLine(
  272. NewItem(menu_edit_copywin,'', kbNoKey, cmCopyWin, hcCopyWin,
  273. NewItem(menu_edit_pastewin,'', kbNoKey, cmPasteWin, hcPasteWin,
  274. nil)));
  275. {$endif WinClipSupported}
  276. MenuBar:=New(PAdvancedMenuBar, Init(R, NewMenu(
  277. NewSubMenu(menu_file,hcFileMenu, NewMenu(
  278. NewItem(menu_file_new,'',kbNoKey,cmNew,hcNew,
  279. NewItem(menu_file_template,'',kbNoKey,cmNewFromTemplate,hcNewFromTemplate,
  280. NewItem(menu_file_open,menu_key_file_open,kbF3,cmOpen,hcOpen,
  281. NewItem(menu_file_save,menu_key_file_save,kbF2,cmSave,hcSave,
  282. NewItem(menu_file_saveas,'',kbNoKey,cmSaveAs,hcSaveAs,
  283. NewItem(menu_file_saveall,'',kbNoKey,cmSaveAll,hcSaveAll,
  284. NewLine(
  285. NewItem(menu_file_changedir,'',kbNoKey,cmChangeDir,hcChangeDir,
  286. NewItem(menu_file_dosshell,'',kbNoKey,cmDOSShell,hcDOSShell,
  287. NewItem(menu_file_exit,menu_key_file_exit,kbNoKey,cmQuit,hcQuit,
  288. nil))))))))))),
  289. NewSubMenu(menu_edit,hcEditMenu, NewMenu(
  290. NewItem(menu_edit_undo,menu_key_edit_undo, kbAltBack, cmUndo, hcUndo,
  291. NewItem(menu_edit_redo,'', kbNoKey, cmRedo, hcRedo,
  292. {$ifdef DebugUndo}
  293. NewItem('~D~ump Undo','', kbNoKey, cmDumpUndo, hcUndo,
  294. NewItem('U~n~do All','', kbNoKey, cmUndoAll, hcUndo,
  295. NewItem('R~e~do All','', kbNoKey, cmRedoAll, hcRedo,
  296. {$endif DebugUndo}
  297. NewLine(
  298. NewItem(menu_edit_cut,menu_key_edit_cut, kbShiftDel, cmCut, hcCut,
  299. NewItem(menu_edit_copy,menu_key_edit_copy, kbCtrlIns, cmCopy, hcCut,
  300. NewItem(menu_edit_paste,menu_key_edit_paste, kbShiftIns, cmPaste, hcPaste,
  301. NewItem(menu_edit_clear,menu_key_edit_clear, kbCtrlDel, cmClear, hcClear,
  302. NewLine(
  303. NewItem(menu_edit_showclipboard,'', kbNoKey, cmShowClipboard, hcShowClipboard,
  304. WinPMI))))))
  305. {$ifdef DebugUndo}))){$endif DebugUndo}
  306. )))),
  307. NewSubMenu(menu_search,hcSearchMenu, NewMenu(
  308. NewItem(menu_search_find,'', kbNoKey, cmFind, hcFind,
  309. NewItem(menu_search_replace,'', kbNoKey, cmReplace, hcReplace,
  310. NewItem(menu_search_searchagain,'', kbNoKey, cmSearchAgain, hcSearchAgain,
  311. NewLine(
  312. NewItem(menu_search_jumpline,'', kbNoKey, cmJumpLine, hcGotoLine,
  313. NewItem(menu_search_findproc,'', kbNoKey, cmFindProcedure, hcFindProcedure,
  314. NewLine(
  315. NewItem(menu_search_objects,'', kbNoKey, cmObjects, hcObjects,
  316. NewItem(menu_search_modules,'', kbNoKey, cmModules, hcModules,
  317. NewItem(menu_search_globals,'', kbNoKey, cmGlobals, hcGlobals,
  318. NewLine(
  319. NewItem(menu_search_symbol,'', kbNoKey, cmSymbol, hcSymbol,
  320. nil))))))))))))),
  321. NewSubMenu(menu_run,hcRunMenu, NewMenu(
  322. NewItem(menu_run_run,menu_key_run_run, kbCtrlF9, cmRun, hcRun,
  323. NewItem(menu_run_stepover,menu_key_run_stepover, kbF8, cmStepOver, hcRun,
  324. NewItem(menu_run_traceinto,menu_key_run_traceinto, kbF7, cmTraceInto, hcRun,
  325. NewItem(menu_run_conttocursor,menu_key_run_conttocursor, kbF4, cmContToCursor, hcContToCursor,
  326. NewItem(menu_run_untilreturn,'', kbNoKey,cmUntilReturn,hcUntilReturn,
  327. NewItem(menu_run_parameters,'', kbNoKey, cmParameters, hcParameters,
  328. NewItem(menu_run_resetdebugger,menu_key_run_resetdebugger, kbCtrlF2, cmResetDebugger, hcResetDebugger,
  329. nil)))))))),
  330. NewSubMenu(menu_compile,hcCompileMenu, NewMenu(
  331. NewItem(menu_compile_compile,menu_key_compile_compile, kbAltF9, cmCompile, hcCompile,
  332. NewItem(menu_compile_make,menu_key_compile_make, kbF9, cmMake, hcMake,
  333. NewItem(menu_compile_build,'', kbNoKey, cmBuild, hcBuild,
  334. NewLine(
  335. NewItem(menu_compile_target,'', kbNoKey, cmTarget, hcTarget,
  336. NewItem(menu_compile_primaryfile,'', kbNoKey, cmPrimaryFile, hcPrimaryFile,
  337. NewItem(menu_compile_clearprimaryfile,'', kbNoKey, cmClearPrimary, hcClearPrimary,
  338. NewLine(
  339. NewItem(menu_compile_information,'', kbNoKey, cmInformation, hcInformation,
  340. NewItem(menu_compile_compilermessages,menu_key_compile_compilermessages, kbF12, cmCompilerMessages, hcCompilerMessages,
  341. nil))))))))))),
  342. NewSubMenu(menu_debug, hcDebugMenu, NewMenu(
  343. NewItem(menu_debug_output,'', kbNoKey, cmUserScreenWindow, hcUserScreenWindow,
  344. NewItem(menu_debug_userscreen,menu_key_debug_userscreen, kbAltF5, cmUserScreen, hcUserScreen,
  345. NewLine(
  346. NewItem(menu_debug_registers,'', kbNoKey, cmRegisters, hcRegistersWindow,
  347. NewItem(menu_debug_fpu_registers,'', kbNoKey, cmFPURegisters, hcRegistersWindow,
  348. NewItem(menu_debug_addwatch,menu_key_debug_addwatch, kbCtrlF7, cmAddWatch, hcAddWatch,
  349. NewItem(menu_debug_watches,'', kbNoKey, cmWatches, hcWatchesWindow,
  350. NewItem(menu_debug_breakpoint,menu_key_debug_breakpoint, kbCtrlF8, cmToggleBreakpoint, hcToggleBreakpoint,
  351. NewItem(menu_debug_breakpointlist,'', kbNoKey, cmBreakpointList, hcBreakpointList,
  352. NewItem(menu_debug_callstack,menu_key_debug_callstack, kbCtrlF3, cmStack, hcStackWindow,
  353. NewLine(
  354. NewItem(menu_debug_gdbwindow,'', kbNoKey, cmOpenGDBWindow, hcOpenGDBWindow,
  355. nil))))))))))))),
  356. NewSubMenu(menu_tools, hcToolsMenu, NewMenu(
  357. NewItem(menu_tools_messages,menu_key_tools_messages, kbF11, cmToolsMessages, hcToolsMessages,
  358. NewItem(menu_tools_msgnext,menu_key_tools_msgnext, kbAltF8, cmToolsMsgNext, hcToolsMsgNext,
  359. NewItem(menu_tools_msgprev,menu_key_tools_msgprev, kbAltF7, cmToolsMsgPrev, hcToolsMsgPrev,
  360. NewLine(
  361. NewItem(menu_tools_grep,menu_key_tools_grep, kbShiftF2, cmGrep, hcGrep,
  362. NewItem(menu_tools_calculator, '', kbNoKey, cmCalculator, hcCalculator,
  363. NewItem(menu_tools_asciitable, '', kbNoKey, cmAsciiTable, hcAsciiTable,
  364. nil)))))))),
  365. NewSubMenu(menu_options, hcOptionsMenu, NewMenu(
  366. NewItem(menu_options_mode,'', kbNoKey, cmSwitchesMode, hcSwitchesMode,
  367. NewItem(menu_options_compiler,'', kbNoKey, cmCompiler, hcCompiler,
  368. NewItem(menu_options_memory,'', kbNoKey, cmMemorySizes, hcMemorySizes,
  369. NewItem(menu_options_linker,'', kbNoKey, cmLinker, hcLinker,
  370. NewItem(menu_options_debugger,'', kbNoKey, cmDebugger, hcDebugger,
  371. NewItem(menu_options_directories,'', kbNoKey, cmDirectories, hcDirectories,
  372. NewItem(menu_options_browser,'',kbNoKey, cmBrowser, hcBrowser,
  373. NewItem(menu_options_tools,'', kbNoKey, cmTools, hcTools,
  374. NewLine(
  375. NewSubMenu(menu_options_env, hcEnvironmentMenu, NewMenu(
  376. NewItem(menu_options_env_preferences,'', kbNoKey, cmPreferences, hcPreferences,
  377. NewItem(menu_options_env_editor,'', kbNoKey, cmEditor, hcEditor,
  378. NewItem(menu_options_env_codecomplete,'', kbNoKey, cmCodeCompleteOptions, hcCodeCompleteOptions,
  379. NewItem(menu_options_env_codetemplates,'', kbNoKey, cmCodeTemplateOptions, hcCodeTemplateOptions,
  380. NewItem(menu_options_env_desktop,'', kbNoKey, cmDesktopOptions, hcDesktopOptions,
  381. NewItem(menu_options_env_mouse,'', kbNoKey, cmMouse, hcMouse,
  382. NewItem(menu_options_env_startup,'', kbNoKey, cmStartup, hcStartup,
  383. NewItem(menu_options_env_colors,'', kbNoKey, cmColors, hcColors,
  384. {$ifdef Unix}
  385. NewItem(menu_options_learn_keys,'', kbNoKey, cmKeys, hcKeys,
  386. {$endif Unix}
  387. nil{$ifdef Unix}){$endif Unix}))))))))),
  388. NewLine(
  389. NewItem(menu_options_open,'', kbNoKey, cmOpenINI, hcOpenINI,
  390. NewItem(menu_options_save,'', kbNoKey, cmSaveINI, hcSaveINI,
  391. NewItem(menu_options_saveas,'', kbNoKey, cmSaveAsINI, hcSaveAsINI,
  392. nil))))))))))))))),
  393. NewSubMenu(menu_window, hcWindowMenu, NewMenu(
  394. NewItem(menu_window_tile,'', kbNoKey, cmTile, hcTile,
  395. NewItem(menu_window_cascade,'', kbNoKey, cmCascade, hcCascade,
  396. NewItem(menu_window_closeall,'', kbNoKey, cmCloseAll, hcCloseAll,
  397. NewLine(
  398. NewItem(menu_window_resize,menu_key_window_resize, kbCtrlF5, cmResize, hcResize,
  399. NewItem(menu_window_zoom,menu_key_window_zoom, kbF5, cmZoom, hcZoom,
  400. NewItem(menu_window_next,menu_key_window_next, kbF6, cmNext, hcNext,
  401. NewItem(menu_window_previous,menu_key_window_previous, kbShiftF6, cmPrev, hcPrev,
  402. NewItem(menu_window_hide,menu_key_window_hide, kbCtrlF6, cmHide, hcHide,
  403. NewItem(menu_window_close,menu_key_window_close, kbAltF3, cmClose, hcClose,
  404. NewLine(
  405. NewItem(menu_window_list,menu_key_window_list, kbAlt0, cmWindowList, hcWindowList,
  406. NewItem(menu_window_update,'', kbNoKey, cmUpdate, hcUpdate,
  407. nil)))))))))))))),
  408. NewSubMenu(menu_help, hcHelpMenu, NewMenu(
  409. NewItem(menu_help_contents,'', kbNoKey, cmHelpContents, hcHelpContents,
  410. NewItem(menu_help_index,menu_key_help_helpindex, kbShiftF1, cmHelpIndex, hcHelpIndex,
  411. NewItem(menu_help_topicsearch,menu_key_help_topicsearch, kbCtrlF1, cmHelpTopicSearch, hcHelpTopicSearch,
  412. NewItem(menu_help_prevtopic,menu_key_help_prevtopic, kbAltF1, cmHelpPrevTopic, hcHelpPrevTopic,
  413. NewItem(menu_help_using,'',kbNoKey, cmHelpUsingHelp, hcHelpUsingHelp,
  414. NewItem(menu_help_files,'',kbNoKey, cmHelpFiles, hcHelpFiles,
  415. NewLine(
  416. NewItem(menu_help_about,'',kbNoKey, cmAbout, hcAbout,
  417. nil))))))))),
  418. nil)))))))))))));
  419. DisableCommands(EditorCmds+SourceCmds+CompileCmds);
  420. Update;
  421. end;
  422. procedure TIDEApp.InitStatusLine;
  423. var
  424. R: TRect;
  425. begin
  426. GetExtent(R);
  427. R.A.Y := R.B.Y - 1;
  428. StatusLine:=New(PIDEStatusLine, Init(R,
  429. NewStatusDef(hcDragging, hcDragging,
  430. NewStatusKey(status_help, kbF1, cmHelp,
  431. StdStatusKeys(
  432. NewStatusKey('~'#24#25#26#27+'~ Move', kbNoKey, 65535,
  433. NewStatusKey('~Shift+'#24#25#26#27+'~ Size', kbNoKey, 65535,
  434. NewStatusKey('~'#17+'ÄÙ~ Done', kbNoKey, 65535,
  435. NewStatusKey('~Esc~ Cancel', kbNoKey, 65535,
  436. nil)))))),
  437. NewStatusDef(hcFirstCommand, hcLastCommand,
  438. NewStatusKey(status_help, kbF1, cmHelp,
  439. NewStatusKey('', kbF10, cmMenu,
  440. NewStatusKey('', kbAltF3, cmClose,
  441. NewStatusKey('', kbF5, cmZoom,
  442. NewStatusKey('', kbCtrlF5, cmResize,
  443. NewStatusKey('', kbF6, cmNext,
  444. NewStatusKey('', kbShiftF6, cmPrev,
  445. nil))))))),
  446. NewStatusDef(hcHelpWindow, hcHelpWindow,
  447. NewStatusKey(status_help_on_help, kbF1, cmHelpUsingHelp,
  448. NewStatusKey(status_help_previoustopic, kbAltF1, cmHelpPrevTopic,
  449. NewStatusKey(status_help_index, kbShiftF1, cmHelpIndex,
  450. NewStatusKey(status_help_close, kbEsc, cmClose,
  451. StdStatusKeys(
  452. nil))))),
  453. NewStatusDef(hcSourceWindow, hcSourceWindow,
  454. NewStatusKey(status_help, kbF1, cmHelp,
  455. NewStatusKey(status_save, kbF2, cmSave,
  456. NewStatusKey(status_open, kbF3, cmOpen,
  457. NewStatusKey(status_compile, kbAltF9, cmCompile,
  458. NewStatusKey(status_make, kbF9, cmMake,
  459. NewStatusKey(status_localmenu, kbAltF10, cmLocalMenu,
  460. StdStatusKeys(
  461. nil))))))),
  462. NewStatusDef(hcASCIITableWindow, hcASCIITableWindow,
  463. NewStatusKey(status_help, kbF1, cmHelp,
  464. NewStatusKey(status_transferchar, kbCtrlEnter, cmTransfer,
  465. StdStatusKeys(
  466. nil))),
  467. NewStatusDef(hcMessagesWindow, hcMessagesWindow,
  468. NewStatusKey(status_help, kbF1, cmHelp,
  469. NewStatusKey(status_msggotosource, kbEnter, cmMsgGotoSource,
  470. NewStatusKey(status_msgtracksource, kbNoKey, cmMsgTrackSource,
  471. NewStatusKey(status_localmenu, kbAltF10, cmLocalMenu,
  472. NewStatusKey('', kbEsc, cmClose,
  473. StdStatusKeys(
  474. nil)))))),
  475. NewStatusDef(hcCalcWindow, hcCalcWindow,
  476. NewStatusKey(status_help, kbF1, cmHelp,
  477. NewStatusKey(status_close, kbEsc, cmClose,
  478. NewStatusKey(status_calculatorpaste, kbCtrlEnter, cmCalculatorPaste,
  479. StdStatusKeys(
  480. nil)))),
  481. NewStatusDef(0, $FFFF,
  482. NewStatusKey(status_help, kbF1, cmHelp,
  483. NewStatusKey(status_open, kbF3, cmOpen,
  484. NewStatusKey(status_compile, kbAltF9, cmCompile,
  485. NewStatusKey(status_make, kbF9, cmMake,
  486. NewStatusKey(status_localmenu, kbAltF10, cmLocalMenu,
  487. StdStatusKeys(
  488. nil)))))),
  489. nil))))))))));
  490. end;
  491. procedure TIDEApp.Idle;
  492. begin
  493. inherited Idle;
  494. Message(Application,evIdle,0,nil);
  495. GiveUpTimeSlice;
  496. end;
  497. procedure TIDEApp.GetEvent(var Event: TEvent);
  498. var P: PView;
  499. begin
  500. { first of all dispatch queued targeted events }
  501. while GetTargetedEvent(P,Event) do
  502. P^.HandleEvent(Event);
  503. inherited GetEvent(Event);
  504. if (Event.What=evKeyDown) and (Event.KeyCode=kbAltF12) then
  505. begin
  506. CreateAnsiFile;
  507. ClearEvent(Event);
  508. end;
  509. if Event.What<>evNothing then
  510. LastEvent:=GetDosTicks
  511. else
  512. begin
  513. if abs(GetDosTicks-LastEvent)>SleepTimeOut then
  514. GiveUpTimeSlice;
  515. end;
  516. end;
  517. procedure TIDEApp.HandleEvent(var Event: TEvent);
  518. var DontClear: boolean;
  519. TempS: string;
  520. ForceDlg: boolean;
  521. {$ifdef HasSignal}
  522. CtrlCCatched : boolean;
  523. {$endif HasSignal}
  524. begin
  525. {$ifdef HasSignal}
  526. if (Event.What=evKeyDown) and (Event.keyCode=kbCtrlC) and
  527. (CtrlCPressed) then
  528. begin
  529. CtrlCCatched:=true;
  530. {$ifdef DEBUG}
  531. Writeln(stderr,'One CtrlC caught');
  532. {$endif DEBUG}
  533. end
  534. else
  535. CtrlCCatched:=false;
  536. {$endif HasSignal}
  537. case Event.What of
  538. evKeyDown :
  539. begin
  540. DontClear:=true;
  541. { just for debugging purposes }
  542. end;
  543. evCommand :
  544. begin
  545. DontClear:=false;
  546. case Event.Command of
  547. cmUpdate : Message(Application,evBroadcast,cmUpdate,nil);
  548. { -- File menu -- }
  549. cmNew : NewEditor;
  550. cmNewFromTemplate: NewFromTemplate;
  551. cmOpen : begin
  552. ForceDlg:=false;
  553. if (OpenFileName<>'') and
  554. ((DirOf(OpenFileName)='') or (Pos(ListSeparator,OpenFileName)<>0)) then
  555. begin
  556. TempS:=LocateSourceFile(OpenFileName,false);
  557. if TempS='' then
  558. ForceDlg:=true
  559. else
  560. OpenFileName:=TempS;
  561. end;
  562. if ForceDlg then
  563. OpenSearch(OpenFileName)
  564. else
  565. Open(OpenFileName);
  566. OpenFileName:='';
  567. end;
  568. cmSaveAll : SaveAll;
  569. cmChangeDir : ChangeDir;
  570. cmDOSShell : DOSShell;
  571. cmRecentFileBase..
  572. cmRecentFileBase+10
  573. : OpenRecentFile(Event.Command-cmRecentFileBase);
  574. { -- Edit menu -- }
  575. cmShowClipboard : ShowClipboard;
  576. { -- Search menu -- }
  577. cmFindProcedure : FindProcedure;
  578. cmObjects : Objects;
  579. cmModules : Modules;
  580. cmGlobals : Globals;
  581. cmSymbol : SearchSymbol;
  582. { -- Run menu -- }
  583. cmParameters : Parameters;
  584. cmStepOver : DoStepOver;
  585. cmTraceInto : DoTraceInto;
  586. cmRun : DoRun;
  587. cmResetDebugger : DoResetDebugger;
  588. cmContToCursor : DoContToCursor;
  589. cmUntilReturn : DoContUntilReturn;
  590. { -- Compile menu -- }
  591. cmCompile : DoCompile(cCompile);
  592. cmBuild : DoCompile(cBuild);
  593. cmMake : DoCompile(cMake);
  594. cmTarget : Target;
  595. cmPrimaryFile : DoPrimaryFile;
  596. cmClearPrimary : DoClearPrimary;
  597. cmInformation : DoInformation;
  598. cmCompilerMessages : DoCompilerMessages;
  599. { -- Debug menu -- }
  600. cmUserScreen : DoUserScreen;
  601. cmToggleBreakpoint : DoToggleBreak;
  602. cmStack : DoShowCallStack;
  603. cmBreakpointList : DoShowBreakpointList;
  604. cmWatches : DoShowWatches;
  605. cmAddWatch : DoAddWatch;
  606. cmOpenGDBWindow : DoOpenGDBWindow;
  607. cmRegisters : DoShowRegisters;
  608. cmFPURegisters : DoShowFPU;
  609. { -- Options menu -- }
  610. cmSwitchesMode : SetSwitchesMode;
  611. cmCompiler : DoCompilerSwitch;
  612. cmMemorySizes : MemorySizes;
  613. cmLinker : DoLinkerSwitch;
  614. cmDebugger : DoDebuggerSwitch;
  615. cmDirectories : Directories;
  616. cmTools : Tools;
  617. cmPreferences : Preferences;
  618. cmEditor : EditorOptions(nil);
  619. cmEditorOptions : EditorOptions(Event.InfoPtr);
  620. cmCodeTemplateOptions: CodeTemplates;
  621. cmCodeCompleteOptions: CodeComplete;
  622. cmBrowser : BrowserOptions(nil);
  623. cmBrowserOptions : BrowserOptions(Event.InfoPtr);
  624. cmMouse : Mouse;
  625. cmStartup : StartUp;
  626. cmDesktopOptions: DesktopOptions;
  627. cmColors : Colors;
  628. {$ifdef Unix}
  629. cmKeys : LearnKeysDialog;
  630. {$endif Unix}
  631. cmOpenINI : OpenINI;
  632. cmSaveINI : SaveINI;
  633. cmSaveAsINI : SaveAsINI;
  634. { -- Tools menu -- }
  635. cmToolsMessages : Messages;
  636. cmCalculator : Calculator;
  637. cmAsciiTable : DoAsciiTable;
  638. cmGrep : DoGrep;
  639. cmToolsBase+1..
  640. cmToolsBase+MaxToolCount
  641. : ExecuteTool(Event.Command-cmToolsBase);
  642. { -- Window menu -- }
  643. cmCloseAll : CloseAll;
  644. cmWindowList : WindowList;
  645. cmUserScreenWindow: DoUserScreenWindow;
  646. { -- Help menu -- }
  647. cmHelp,
  648. cmHelpContents : HelpContents;
  649. cmHelpIndex : HelpHelpIndex;
  650. { cmHelpTopicSearch: HelpTopicSearch;}
  651. cmHelpPrevTopic : HelpPrevTopic;
  652. cmHelpUsingHelp : HelpUsingHelp;
  653. cmHelpFiles : HelpFiles;
  654. cmAbout : About;
  655. cmShowReadme : ShowReadme;
  656. else DontClear:=true;
  657. end;
  658. if DontClear=false then ClearEvent(Event);
  659. end;
  660. evBroadcast :
  661. case Event.Command of
  662. cmSaveCancelled :
  663. SaveCancelled:=true;
  664. cmUpdateTools :
  665. UpdateTools;
  666. cmCommandSetChanged :
  667. UpdateMenu(MenuBar^.Menu);
  668. cmUpdate :
  669. Update;
  670. cmSourceWndClosing :
  671. begin
  672. with PSourceWindow(Event.InfoPtr)^ do
  673. if Editor^.FileName<>'' then
  674. AddRecentFile(Editor^.FileName,Editor^.CurPos.X,Editor^.CurPos.Y);
  675. {$ifndef NODEBUG}
  676. if assigned(Debugger) and (PView(Event.InfoPtr)=Debugger^.LastSource) then
  677. Debugger^.LastSource:=nil;
  678. {$endif}
  679. end;
  680. end;
  681. end;
  682. inherited HandleEvent(Event);
  683. {$ifdef HasSignal}
  684. { Reset flag if CrtlC was handled }
  685. if CtrlCCatched and (Event.What=evNothing) then
  686. begin
  687. CtrlCPressed:=false;
  688. {$ifdef DEBUG}
  689. Writeln(stderr,'One CtrlC handled');
  690. {$endif DEBUG}
  691. end;
  692. {$endif HasSignal}
  693. end;
  694. procedure TIDEApp.GetTileRect(var R: TRect);
  695. begin
  696. Desktop^.GetExtent(R);
  697. { Leave the compiler messages window in the bottom }
  698. if assigned(CompilerMessageWindow) and (CompilerMessageWindow^.GetState(sfVisible)) then
  699. R.B.Y:=Min(CompilerMessageWindow^.Origin.Y,R.B.Y);
  700. { Leave the messages window in the bottom }
  701. if assigned(MessagesWindow) and (MessagesWindow^.GetState(sfVisible)) then
  702. R.B.Y:=Min(MessagesWindow^.Origin.Y,R.B.Y);
  703. { Leave the watch window in the bottom }
  704. if assigned(WatchesWindow) and (WatchesWindow^.GetState(sfVisible)) then
  705. R.B.Y:=Min(WatchesWindow^.Origin.Y,R.B.Y);
  706. end;
  707. {****************************************************************************
  708. Switch Screens
  709. ****************************************************************************}
  710. procedure TIDEApp.ShowUserScreen;
  711. begin
  712. if Assigned(UserScreen) then
  713. UserScreen^.SaveIDEScreen;
  714. DoneSysError;
  715. DoneEvents;
  716. { DoneKeyboard should be called last to
  717. restore the keyboard correctly PM }
  718. {$ifndef go32v2}
  719. DoneScreen;
  720. {$endif ndef go32v2}
  721. DoneKeyboard;
  722. If UseMouse then
  723. DoneMouse
  724. else
  725. ButtonCount:=0;
  726. DoneDosMem;
  727. if Assigned(UserScreen) then
  728. UserScreen^.SwitchToConsoleScreen;
  729. end;
  730. procedure TIDEApp.ShowIDEScreen;
  731. begin
  732. if Assigned(UserScreen) then
  733. UserScreen^.SaveConsoleScreen;
  734. InitDosMem;
  735. InitKeyboard;
  736. If UseMouse then
  737. InitMouse
  738. else
  739. ButtonCount:=0;
  740. {$ifndef go32v2}
  741. InitScreen;
  742. {$endif ndef go32v2}
  743. InitEvents;
  744. InitSysError;
  745. CurDirChanged;
  746. Message(Application,evBroadcast,cmUpdate,nil);
  747. if Assigned(UserScreen) then
  748. UserScreen^.SwitchBackToIDEScreen;
  749. {$ifdef Unix}
  750. SetKnownKeys;
  751. {$endif Unix}
  752. {$ifndef go32v2}
  753. UpdateScreen(true);
  754. {$endif go32v2}
  755. {$ifdef win32}
  756. Win32ShowMouse;
  757. {$endif win32}
  758. end;
  759. function TIDEApp.AutoSave: boolean;
  760. var IOK,SOK,DOK: boolean;
  761. begin
  762. IOK:=true; SOK:=true; DOK:=true;
  763. if (AutoSaveOptions and asEnvironment)<>0 then
  764. begin
  765. IOK:=WriteINIFile(false);
  766. if IOK=false then
  767. ErrorBox(error_saving_cfg_file,nil);
  768. end;
  769. if (AutoSaveOptions and asEditorFiles)<>0 then { was a typo here ("=0") - Gabor }
  770. SOK:=SaveAll;
  771. if (AutoSaveOptions and asDesktop)<>0 then
  772. begin
  773. { destory all help & browser windows - we don't want to store them }
  774. { UserScreenWindow is also not registered PM }
  775. DoCloseUserScreenWindow;
  776. DoneDisassemblyWindow;
  777. CloseHelpWindows;
  778. CloseAllBrowsers;
  779. DOK:=SaveDesktop;
  780. if DOK=false then
  781. ErrorBox(error_saving_dsk_file,nil);
  782. end;
  783. AutoSave:=IOK and SOK and DOK;
  784. end;
  785. function TIDEApp.DoExecute(ProgramPath, Params, InFile,OutFile,ErrFile: string; ExecType: TExecType): boolean;
  786. var CanRun: boolean;
  787. {$ifndef Unix}
  788. PosExe: sw_integer;
  789. {$endif Unix}
  790. begin
  791. SaveCancelled:=false;
  792. CanRun:=AutoSave;
  793. if (CanRun=false) and (SaveCancelled=false) then
  794. CanRun:=true; { do not care about .DSK or .INI saving problems - just like TP }
  795. if CanRun then
  796. begin
  797. if UserScreen=nil then
  798. begin
  799. ErrorBox(error_user_screen_not_avail,nil);
  800. Exit;
  801. end;
  802. if ExecType<>exNoSwap then
  803. ShowUserScreen;
  804. if ExecType=exDosShell then
  805. WriteShellMsg;
  806. { DO NOT use COMSPEC for exe files as the
  807. ExitCode is lost in those cases PM }
  808. {$ifndef Unix}
  809. posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
  810. { if programpath was three char long => bug }
  811. if (posexe>0) and (posexe=Length(ProgramPath)-3) then
  812. begin
  813. {$endif Unix}
  814. if (InFile='') and (OutFile='') and (ErrFile='') then
  815. DosExecute(ProgramPath,Params)
  816. else
  817. begin
  818. if ErrFile='' then
  819. ErrFile:='stderr';
  820. ExecuteRedir(ProgramPath,Params,InFile,OutFile,ErrFile);
  821. end;
  822. {$ifndef Unix}
  823. end
  824. else if (InFile='') and (OutFile='') and (ErrFile='') then
  825. DosExecute(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params)
  826. else
  827. begin
  828. if ErrFile='' then
  829. ErrFile:='stderr';
  830. ExecuteRedir(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params,
  831. InFile,OutFile,ErrFile);
  832. end;
  833. {$endif Unix}
  834. {$ifdef Unix}
  835. if (DebuggeeTTY='') and (OutFile='') and (ExecType<>exDosShell) then
  836. begin
  837. Write(' Press any key to return to IDE');
  838. InitKeyBoard;
  839. Keyboard.GetKeyEvent;
  840. while (Keyboard.PollKeyEvent<>0) do
  841. Keyboard.GetKeyEvent;
  842. DoneKeyboard;
  843. end;
  844. {$endif}
  845. if ExecType<>exNoSwap then
  846. ShowIDEScreen;
  847. end;
  848. DoExecute:=CanRun;
  849. end;
  850. procedure TIDEApp.Update;
  851. begin
  852. SetCmdState([cmSaveAll],IsThereAnyEditor);
  853. SetCmdState([cmCloseAll,cmWindowList],IsThereAnyWindow);
  854. SetCmdState([cmTile,cmCascade],IsThereAnyVisibleWindow);
  855. SetCmdState([cmFindProcedure,cmObjects,cmModules,cmGlobals,cmSymbol{,cmInformation}],IsSymbolInfoAvailable);
  856. {$ifndef NODEBUG}
  857. SetCmdState([cmResetDebugger,cmUntilReturn],assigned(debugger) and debugger^.debuggee_started);
  858. {$endif}
  859. SetCmdState([cmToolsMsgNext,cmToolsMsgPrev],MessagesWindow<>nil);
  860. UpdateTools;
  861. UpdateRecentFileList;
  862. UpdatePrimaryFile;
  863. UpdateINIFile;
  864. Message(Application,evBroadcast,cmCommandSetChanged,nil);
  865. end;
  866. procedure TIDEApp.SourceWindowClosed;
  867. begin
  868. if not IsClosing then
  869. Update;
  870. end;
  871. procedure TIDEApp.CurDirChanged;
  872. begin
  873. Message(Application,evBroadcast,cmUpdateTitle,nil);
  874. UpdatePrimaryFile;
  875. UpdateINIFile;
  876. UpdateMenu(MenuBar^.Menu);
  877. end;
  878. procedure TIDEApp.UpdatePrimaryFile;
  879. begin
  880. SetMenuItemParam(SearchMenuItem(MenuBar^.Menu,cmPrimaryFile),SmartPath(PrimaryFile));
  881. SetCmdState([cmClearPrimary],PrimaryFile<>'');
  882. if PrimaryFile<>'' then
  883. SetCmdState(CompileCmds,true);
  884. UpdateMenu(MenuBar^.Menu);
  885. Message(ProgramInfoWindow,evBroadcast,cmUpdate,nil);
  886. end;
  887. procedure TIDEApp.UpdateINIFile;
  888. begin
  889. SetMenuItemParam(SearchMenuItem(MenuBar^.Menu,cmSaveINI),SmartPath(IniFileName));
  890. end;
  891. procedure TIDEApp.UpdateRecentFileList;
  892. var P: PMenuItem;
  893. {ID,}I: word;
  894. FileMenu: PMenuItem;
  895. begin
  896. { ID:=cmRecentFileBase;}
  897. FileMenu:=SearchSubMenu(MenuBar^.Menu,menuFile);
  898. repeat
  899. { Inc(ID);
  900. P:=SearchMenuItem(FileMenu^.SubMenu,ID);
  901. if FileMenu^.SubMenu^.Default=P then
  902. FileMenu^.SubMenu^.Default:=FileMenu^.SubMenu^.Items;
  903. if P<>nil then RemoveMenuItem(FileMenu^.SubMenu,P);}
  904. P:=GetMenuItemBefore(FileMenu^.SubMenu,nil);
  905. if (P<>nil) then
  906. begin
  907. if (cmRecentFileBase<P^.Command) and (P^.Command<=cmRecentFileBase+MaxRecentFileCount) then
  908. begin
  909. RemoveMenuItem(FileMenu^.SubMenu,P);
  910. if FileMenu^.SubMenu^.Default=P then
  911. FileMenu^.SubMenu^.Default:=FileMenu^.SubMenu^.Items;
  912. end
  913. else
  914. P:=nil;
  915. end;
  916. until P=nil;
  917. P:=GetMenuItemBefore(FileMenu^.SubMenu,nil);
  918. if (P<>nil) and IsSeparator(P) then
  919. RemoveMenuItem(FileMenu^.SubMenu,P);
  920. if RecentFileCount>0 then
  921. AppendMenuItem(FileMenu^.SubMenu,NewLine(nil));
  922. for I:=1 to RecentFileCount do
  923. begin
  924. P:=NewItem('~'+IntToStr(I)+'~ '+ShrinkPath(SmartPath(RecentFiles[I].FileName),27),' ',
  925. kbNoKey,cmRecentFileBase+I,hcRecentFileBase+I,nil);
  926. AppendMenuItem(FileMenu^.SubMenu,P);
  927. end;
  928. end;
  929. procedure TIDEApp.UpdateTools;
  930. var P: PMenuItem;
  931. { ID,}I: word;
  932. ToolsMenu: PMenuItem;
  933. S1,S2,S3: string;
  934. W: word;
  935. begin
  936. { ID:=cmToolsBase;}
  937. ToolsMenu:=SearchSubMenu(MenuBar^.Menu,menuTools);
  938. repeat
  939. P:=GetMenuItemBefore(ToolsMenu^.SubMenu,nil);
  940. if (P<>nil) then
  941. begin
  942. if (cmToolsBase<P^.Command) and (P^.Command<=cmToolsBase+MaxToolCount) then
  943. begin
  944. RemoveMenuItem(ToolsMenu^.SubMenu,P);
  945. if ToolsMenu^.SubMenu^.Default=P then
  946. ToolsMenu^.SubMenu^.Default:=ToolsMenu^.SubMenu^.Items;
  947. end
  948. else
  949. P:=nil;
  950. end;
  951. until P=nil;
  952. P:=GetMenuItemBefore(ToolsMenu^.SubMenu,nil);
  953. if (P<>nil) and IsSeparator(P) then
  954. RemoveMenuItem(ToolsMenu^.SubMenu,P);
  955. if GetToolCount>0 then
  956. AppendMenuItem(ToolsMenu^.SubMenu,NewLine(nil));
  957. for I:=1 to GetToolCount do
  958. begin
  959. GetToolParams(I-1,S1,S2,S3,W);
  960. P:=NewItem(S1,KillTilde(GetHotKeyName(W)),W,cmToolsBase+I,hcToolsBase+I,nil);
  961. AppendMenuItem(ToolsMenu^.SubMenu,P);
  962. end;
  963. end;
  964. procedure TIDEApp.DosShell;
  965. var
  966. s : string;
  967. begin
  968. {$ifdef Unix}
  969. s:=GetEnv('SHELL');
  970. if s='' then
  971. if ExistsFile('/bin/sh') then
  972. s:='/bin/sh';
  973. {$else}
  974. s:=GetEnv('COMSPEC');
  975. if s='' then
  976. if ExistsFile('c:\command.com') then
  977. s:='c:\command.com'
  978. else
  979. begin
  980. s:='command.com';
  981. if Not LocateExeFile(s) then
  982. s:='';
  983. end;
  984. {$endif}
  985. if s='' then
  986. ErrorBox(msg_errorexecutingshell,nil)
  987. else
  988. DoExecute(s, '', '', '', '', exDosShell);
  989. { In case we have something that the compiler touched }
  990. AskToReloadAllModifiedFiles;
  991. end;
  992. procedure TIDEApp.ShowReadme;
  993. var R,R2: TRect;
  994. D: PCenterDialog;
  995. M: PFPMemo;
  996. VSB: PScrollBar;
  997. S: PBufStream;
  998. begin
  999. New(S, Init(ReadmeName, stOpenRead, 4096));
  1000. if S^.Status=stOK then
  1001. begin
  1002. R.Assign(0,0,63,18);
  1003. New(D, Init(R, 'Free Pascal IDE'));
  1004. with D^ do
  1005. begin
  1006. GetExtent(R);
  1007. R.Grow(-2,-2); Inc(R.B.Y);
  1008. R2.Copy(R); R2.Move(1,0); R2.A.X:=R2.B.X-1;
  1009. New(VSB, Init(R2)); VSB^.GrowMode:=0; Insert(VSB);
  1010. New(M, Init(R,nil,VSB,nil));
  1011. M^.LoadFromStream(S);
  1012. M^.ReadOnly:=true;
  1013. Insert(M);
  1014. end;
  1015. InsertOK(D);
  1016. ExecuteDialog(D,nil);
  1017. end;
  1018. Dispose(S, Done);
  1019. end;
  1020. {$I FPMFILE.INC}
  1021. {$I FPMEDIT.INC}
  1022. {$I FPMSRCH.INC}
  1023. {$I FPMRUN.INC}
  1024. {$I FPMCOMP.INC}
  1025. {$I FPMDEBUG.INC}
  1026. {$I FPMTOOLS.INC}
  1027. {$I FPMOPTS.INC}
  1028. {$I FPMWND.INC}
  1029. {$I FPMHELP.INC}
  1030. {$I fpmansi.inc}
  1031. procedure TIDEApp.AddRecentFile(AFileName: string; CurX, CurY: integer);
  1032. begin
  1033. if SearchRecentFile(AFileName)<>-1 then Exit;
  1034. if RecentFileCount>0 then
  1035. Move(RecentFiles[1],RecentFiles[2],SizeOf(RecentFiles[1])*Min(RecentFileCount,High(RecentFiles)-1));
  1036. if RecentFileCount<High(RecentFiles) then Inc(RecentFileCount);
  1037. with RecentFiles[1] do
  1038. begin
  1039. FileName:=AFileName;
  1040. LastPos.X:=CurX; LastPos.Y:=CurY;
  1041. end;
  1042. UpdateRecentFileList;
  1043. end;
  1044. function TIDEApp.SearchRecentFile(AFileName: string): integer;
  1045. var Idx,I: integer;
  1046. begin
  1047. Idx:=-1;
  1048. for I:=1 to RecentFileCount do
  1049. if UpcaseStr(AFileName)=UpcaseStr(RecentFiles[I].FileName) then
  1050. begin Idx:=I; Break; end;
  1051. SearchRecentFile:=Idx;
  1052. end;
  1053. procedure TIDEApp.RemoveRecentFile(Index: integer);
  1054. begin
  1055. if Index<RecentFileCount then
  1056. Move(RecentFiles[Index+1],RecentFiles[Index],SizeOf(RecentFiles[1])*(RecentFileCount-Index));
  1057. Dec(RecentFileCount);
  1058. end;
  1059. function TIDEApp.GetPalette: PPalette;
  1060. var P: string;
  1061. begin
  1062. P:=AppPalette;
  1063. GetPalette:=@P;
  1064. end;
  1065. function TIDEApp.IsClosing: Boolean;
  1066. begin
  1067. IsClosing:=InsideDone;
  1068. end;
  1069. destructor TIDEApp.Done;
  1070. begin
  1071. InsideDone:=true;
  1072. inherited Done;
  1073. RemoveBrowsersCollection;
  1074. DoneHelpSystem;
  1075. end;
  1076. END.
  1077. {
  1078. $Log$
  1079. Revision 1.1 2001-08-04 11:30:23 peter
  1080. * ide works now with both compiler versions
  1081. Revision 1.1.2.30 2001/06/14 09:15:48 pierre
  1082. * adapted to new fpusrscr methods
  1083. Revision 1.1.2.29 2001/03/14 17:57:07 pierre
  1084. * fix invisible mouse problem for win32 on win9X
  1085. Revision 1.1.2.28 2001/03/13 16:19:15 pierre
  1086. + syntax highligh in disassembly window
  1087. Revision 1.1.2.27 2001/03/09 15:05:24 pierre
  1088. + Floating point Unit added to Debug menu
  1089. Revision 1.1.2.26 2001/02/19 10:40:50 pierre
  1090. * Check for changed files after Running tool or shell
  1091. Revision 1.1.2.25 2000/12/30 22:52:27 peter
  1092. * check modified while in debug mode. But placed it between a
  1093. conditional again as it reports also if the file was already modified
  1094. before the first compile.
  1095. * remove unsaved file checks when compiling without primary file so it
  1096. works the same as with a primary file set.
  1097. Revision 1.1.2.24 2000/12/20 14:27:48 pierre
  1098. * fp.ini for unix
  1099. Revision 1.1.2.23 2000/12/16 23:29:49 pierre
  1100. + Restore special keys correctly
  1101. Revision 1.1.2.22 2000/12/13 16:59:09 pierre
  1102. * ErrFile filed added to DoExecute method
  1103. Revision 1.1.2.21 2000/12/11 00:46:38 pierre
  1104. * missing uses fpkeys added
  1105. Revision 1.1.2.20 2000/12/11 00:41:42 pierre
  1106. * start of LearnKey dialog implementation
  1107. Revision 1.1.2.19 2000/12/07 16:11:06 pierre
  1108. * fix the wrong terminal settings in unixy shell mode
  1109. Revision 1.1.2.18 2000/11/29 11:26:00 pierre
  1110. + TFPDlgWindow that handles cmSearchWindow
  1111. Revision 1.1.2.17 2000/11/29 00:54:44 pierre
  1112. + preserve window number and save special windows
  1113. Revision 1.1.2.16 2000/11/27 12:05:41 pierre
  1114. Dump Ansi released
  1115. Revision 1.1.2.15 2000/11/23 16:33:30 pierre
  1116. * fix Alt-X problem and set HelpCtx for most dialogs
  1117. Revision 1.1.2.14 2000/11/21 17:43:23 pierre
  1118. + first version of dump ansi file
  1119. Revision 1.1.2.13 2000/11/19 00:23:33 pierre
  1120. Task 23: nicer error message when trying to run unit or library
  1121. Revision 1.1.2.12 2000/11/14 09:23:55 marco
  1122. * Second batch
  1123. Revision 1.1.2.11 2000/10/18 21:53:27 pierre
  1124. * several Gabor fixes
  1125. Revision 1.1.2.10 2000/10/09 16:28:25 pierre
  1126. * several linux enhancements
  1127. Revision 1.1.2.9 2000/10/04 13:30:50 pierre
  1128. * DosShell for linux
  1129. Revision 1.1.2.8 2000/09/22 15:19:04 jonas
  1130. * Linux now also uses the DosExecute and ExecuteRedir procedures
  1131. Revision 1.1.2.7 2000/08/21 12:10:19 jonas
  1132. * fixed errors in my previous commit, it now works properly
  1133. Revision 1.1.2.5 2000/08/16 18:46:14 peter
  1134. [*] double clicking on a droplistbox caused GPF (due to invalid recurson)
  1135. [*] Make, Build now possible even in Compiler Messages Window
  1136. [+] when started in a new dir the IDE now ask whether to create a local
  1137. config, or to use the one located in the IDE dir
  1138. Revision 1.1.2.4 2000/08/15 03:40:53 peter
  1139. [*] no more fatal exits when the IDE can't find the error file (containing
  1140. the redirected assembler/linker output) after compilation
  1141. [*] hidden windows are now added always at the end of the Window List
  1142. [*] TINIFile parsed entries encapsulated in string delimiters incorrectly
  1143. [*] selection was incorrectly adjusted when typing in overwrite mode
  1144. [*] the line wasn't expanded when it's end was reached in overw. mode
  1145. [*] the IDE now tries to locate source files also in the user specified
  1146. unit dirs (for ex. as a response to 'Open at cursor' (Ctrl+Enter) )
  1147. [*] 'Open at cursor' is now aware of the extension (if specified)
  1148. Revision 1.1.2.3 2000/08/10 07:10:37 michael
  1149. * 'Auto save editor files' option did the opposite than expected, due
  1150. to a typo in FPIDE.PAS
  1151. + saving of source files before compilation is no longer neccessary.
  1152. When a modified editor file is involved in the compilation, then the
  1153. IDE saves it's contents to a memory stream and passes this to the
  1154. compiler (instead of the file on the disk)
  1155. Revision 1.1.2.2 2000/08/04 14:05:18 michael
  1156. * Fixes from Gabor:
  1157. [*] the IDE now doesn't disable Compile|Make & Build when all windows
  1158. are closed, but there's still a primary file set
  1159. (set bug 1059 to fixed!)
  1160. [*] the IDE didn't read some compiler options correctly back from the
  1161. FP.CFG file, for ex. the linker options. Now it read everything
  1162. correctly, and also automatically handles smartlinking option synch-
  1163. ronization.
  1164. (set bug 1048 to fixed!)
  1165. Revision 1.1.2.1 2000/07/18 05:50:22 michael
  1166. + Merged Gabors fixes
  1167. Revision 1.1 2000/07/13 09:48:34 michael
  1168. + Initial import
  1169. Revision 1.65 2000/06/22 09:07:12 pierre
  1170. * Gabor changes: see fixes.txt
  1171. Revision 1.64 2000/06/16 21:19:41 pierre
  1172. * Use Open instead of OpenSearch if OpenFileName is empty
  1173. Revision 1.63 2000/06/16 08:50:40 pierre
  1174. + new bunch of Gabor's changes
  1175. Revision 1.62 2000/06/11 07:01:33 peter
  1176. * give watches window also a number
  1177. * leave watches window in the bottom when cascading windows
  1178. Revision 1.61 2000/05/17 09:51:11 pierre
  1179. Disable/Enable keyboard on UserScreen
  1180. Revision 1.60 2000/05/02 10:20:40 pierre
  1181. * fix a small problem when deciding to call DosExecute directly
  1182. Revision 1.59 2000/05/02 08:42:27 pierre
  1183. * new set of Gabor changes: see fixes.txt
  1184. Revision 1.58 2000/04/25 08:42:33 pierre
  1185. * New Gabor changes : see fixes.txt
  1186. Revision 1.57 2000/04/18 11:42:37 pierre
  1187. lot of Gabor changes : see fixes.txt
  1188. Revision 1.56 2000/03/21 23:30:49 pierre
  1189. adapted to wcedit addition by Gabor
  1190. Revision 1.55 2000/03/13 20:41:35 pierre
  1191. + option -S to disable the mouse
  1192. * adapted to changes in fpusrscr for DOS
  1193. Revision 1.54 2000/03/07 21:57:59 pierre
  1194. + CtrlC handling
  1195. + UpdateMode method
  1196. Revision 1.53 2000/03/06 11:31:30 pierre
  1197. * Do not use COMSPEC to Run files with .EXE suffix
  1198. because Command.com at least does not return the errorcode
  1199. of the program called
  1200. Revision 1.52 2000/02/07 12:02:32 pierre
  1201. Gabor's changes
  1202. Revision 1.51 2000/01/23 21:25:17 florian
  1203. + start of internationalization support
  1204. Revision 1.50 2000/01/08 18:26:20 florian
  1205. + added a register window, doesn't work yet
  1206. Revision 1.49 2000/01/05 00:31:50 pierre
  1207. * avoid new files to use TABS
  1208. Revision 1.48 2000/01/03 11:38:33 michael
  1209. Changes from Gabor
  1210. Revision 1.47 1999/12/20 14:23:17 pierre
  1211. * MyApp renamed IDEApp
  1212. * TDebugController.ResetDebuggerRows added to
  1213. get resetting of debugger rows
  1214. Revision 1.46 1999/12/17 15:07:01 florian
  1215. + TIDEApp.Idle does always call GiveUpTimeSlice
  1216. Revision 1.45 1999/12/10 13:02:05 pierre
  1217. + VideoMode save/restore
  1218. Revision 1.44 1999/11/25 00:26:49 pierre
  1219. * RecentFiles missed the last char
  1220. Revision 1.43 1999/11/10 17:19:06 pierre
  1221. * Use DosExecute from Fpredir unit
  1222. Revision 1.42 1999/10/27 12:10:42 pierre
  1223. + With DebugUndo added 3 menu items
  1224. "Dump Undo" "Undo All" and "Redo All"
  1225. for Undo checks
  1226. Revision 1.41 1999/09/22 16:21:41 pierre
  1227. * Use ShrinkPas for RecentFiles
  1228. Revision 1.40 1999/09/22 13:04:31 pierre
  1229. + Close UserScreen to avoid store crash
  1230. Revision 1.39 1999/09/21 17:09:00 pierre
  1231. + Windows clipboard for win32
  1232. Revision 1.38 1999/09/13 16:24:43 peter
  1233. + clock
  1234. * backspace unident like tp7
  1235. Revision 1.37 1999/09/13 11:44:00 peter
  1236. * fixes from gabor, idle event, html fix
  1237. Revision 1.36 1999/09/09 14:15:27 pierre
  1238. + cmCopyWin,cmPasteWin
  1239. Revision 1.35 1999/08/16 18:25:19 peter
  1240. * Adjusting the selection when the editor didn't contain any line.
  1241. * Reserved word recognition redesigned, but this didn't affect the overall
  1242. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  1243. The syntax scanner loop is a bit slow but the main problem is the
  1244. recognition of special symbols. Switching off symbol processing boosts
  1245. the performance up to ca. 200%...
  1246. * The editor didn't allow copying (for ex to clipboard) of a single character
  1247. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  1248. * Compiler Messages window (actually the whole desktop) did not act on any
  1249. keypress when compilation failed and thus the window remained visible
  1250. + Message windows are now closed upon pressing Esc
  1251. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  1252. only when neccessary
  1253. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  1254. + LineSelect (Ctrl+K+L) implemented
  1255. * The IDE had problems closing help windows before saving the desktop
  1256. Revision 1.34 1999/08/03 20:22:32 peter
  1257. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  1258. + Desktop saving should work now
  1259. - History saved
  1260. - Clipboard content saved
  1261. - Desktop saved
  1262. - Symbol info saved
  1263. * syntax-highlight bug fixed, which compared special keywords case sensitive
  1264. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  1265. * with 'whole words only' set, the editor didn't found occourences of the
  1266. searched text, if the text appeared previously in the same line, but didn't
  1267. satisfied the 'whole-word' condition
  1268. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  1269. (ie. the beginning of the selection)
  1270. * when started typing in a new line, but not at the start (X=0) of it,
  1271. the editor inserted the text one character more to left as it should...
  1272. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  1273. * Shift shouldn't cause so much trouble in TCodeEditor now...
  1274. * Syntax highlight had problems recognizing a special symbol if it was
  1275. prefixed by another symbol character in the source text
  1276. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  1277. Revision 1.33 1999/07/12 13:14:18 pierre
  1278. * LineEnd bug corrected, now goes end of text even if selected
  1279. + Until Return for debugger
  1280. + Code for Quit inside GDB Window
  1281. Revision 1.32 1999/07/10 01:24:17 pierre
  1282. + First implementation of watches window
  1283. Revision 1.31 1999/06/29 22:50:14 peter
  1284. * more fixes from gabor
  1285. Revision 1.30 1999/06/28 19:32:20 peter
  1286. * fixes from gabor
  1287. Revision 1.29 1999/06/28 12:40:19 pierre
  1288. + RemoveBrowsersCollection in TIDEApp.Done
  1289. Revision 1.28 1999/06/25 00:46:33 pierre
  1290. + UpdateTarget to show current target
  1291. + SearchSymbol, not scope aware (this will need a PPU change !)
  1292. Revision 1.27 1999/05/22 13:44:30 peter
  1293. * fixed couple of bugs
  1294. Revision 1.26 1999/04/07 21:55:47 peter
  1295. + object support for browser
  1296. * html help fixes
  1297. * more desktop saving things
  1298. * NODEBUG directive to exclude debugger
  1299. Revision 1.25 1999/03/23 15:11:29 peter
  1300. * desktop saving things
  1301. * vesa mode
  1302. * preferences dialog
  1303. Revision 1.24 1999/03/19 16:04:29 peter
  1304. * new compiler dialog
  1305. Revision 1.23 1999/03/16 12:38:10 peter
  1306. * tools macro fixes
  1307. + tph writer
  1308. + first things for resource files
  1309. Revision 1.22 1999/03/12 01:13:57 peter
  1310. * flag if trytoopen should look for other extensions
  1311. + browser tab in the tools-compiler
  1312. Revision 1.21 1999/03/02 13:48:29 peter
  1313. * fixed far problem is fpdebug
  1314. * tile/cascading with message window
  1315. * grep fixes
  1316. Revision 1.20 1999/03/01 15:41:54 peter
  1317. + Added dummy entries for functions not yet implemented
  1318. * MenuBar didn't update itself automatically on command-set changes
  1319. * Fixed Debugging/Profiling options dialog
  1320. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is
  1321. set
  1322. * efBackSpaceUnindents works correctly
  1323. + 'Messages' window implemented
  1324. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  1325. + Added TP message-filter support (for ex. you can call GREP thru
  1326. GREP2MSG and view the result in the messages window - just like in TP)
  1327. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  1328. so topic search didn't work...
  1329. * In FPHELP.PAS there were still context-variables defined as word instead
  1330. of THelpCtx
  1331. * StdStatusKeys() was missing from the statusdef for help windows
  1332. + Topic-title for index-table can be specified when adding a HTML-files
  1333. Revision 1.19 1999/02/22 11:51:36 peter
  1334. * browser updates from gabor
  1335. Revision 1.18 1999/02/22 02:15:13 peter
  1336. + default extension for save in the editor
  1337. + Separate Text to Find for the grep dialog
  1338. * fixed redir crash with tp7
  1339. Revision 1.17 1999/02/20 15:18:30 peter
  1340. + ctrl-c capture with confirm dialog
  1341. + ascii table in the tools menu
  1342. + heapviewer
  1343. * empty file fixed
  1344. * fixed callback routines in fpdebug to have far for tp7
  1345. Revision 1.16 1999/02/18 13:44:31 peter
  1346. * search fixed
  1347. + backward search
  1348. * help fixes
  1349. * browser updates
  1350. Revision 1.15 1999/02/16 10:43:55 peter
  1351. * use -dGDB for the compiler
  1352. * only use gdb_file when -dDEBUG is used
  1353. * profiler switch is now a toggle instead of radiobutton
  1354. Revision 1.14 1999/02/11 19:07:22 pierre
  1355. * GDBWindow redesigned :
  1356. normal editor apart from
  1357. that any kbEnter will send the line (for begin to cursor)
  1358. to GDB command !
  1359. GDBWindow opened in Debugger Menu
  1360. still buggy :
  1361. -echo should not be present if at end of text
  1362. -GDBWindow becomes First after each step (I don't know why !)
  1363. Revision 1.13 1999/02/10 09:54:11 pierre
  1364. * cmSourceWindowClosing resets Debugger LastSource field to avoid problems
  1365. Revision 1.12 1999/02/08 17:43:44 pierre
  1366. * RestDebugger or multiple running of debugged program now works
  1367. + added DoContToCursor(F4)
  1368. * Breakpoints are now inserted correctly (was mainlyy a problem
  1369. of directories)
  1370. Revision 1.11 1999/02/08 10:37:44 peter
  1371. + html helpviewer
  1372. Revision 1.7 1999/02/04 13:32:03 pierre
  1373. * Several things added (I cannot commit them independently !)
  1374. + added TBreakpoint and TBreakpointCollection
  1375. + added cmResetDebugger,cmGrep,CmToggleBreakpoint
  1376. + Breakpoint list in INIFile
  1377. * Select items now also depend of SwitchMode
  1378. * Reading of option '-g' was not possible !
  1379. + added search for -Fu args pathes in TryToOpen
  1380. + added code for automatic opening of FileDialog
  1381. if source not found
  1382. Revision 1.6 1999/02/02 16:41:39 peter
  1383. + automatic .pas/.pp adding by opening of file
  1384. * better debuggerscreen changes
  1385. Revision 1.5 1999/01/22 18:13:22 pierre
  1386. * DoneScreen Removed I did not find any such proc ??
  1387. Revision 1.4 1999/01/22 10:24:03 peter
  1388. * first debugger things
  1389. Revision 1.3 1999/01/21 11:54:14 peter
  1390. + tools menu
  1391. + speedsearch in symbolbrowser
  1392. * working run command
  1393. Revision 1.2 1999/01/14 21:42:20 peter
  1394. * source tracking from Gabor
  1395. Revision 1.1 1999/01/12 14:29:34 peter
  1396. + Implemented still missing 'switch' entries in Options menu
  1397. + Pressing Ctrl-B sets ASCII mode in editor, after which keypresses (even
  1398. ones with ASCII < 32 ; entered with Alt+<###>) are interpreted always as
  1399. ASCII chars and inserted directly in the text.
  1400. + Added symbol browser
  1401. * splitted fp.pas to fpide.pas
  1402. Revision 1.4 1999/01/04 11:49:41 peter
  1403. * 'Use tab characters' now works correctly
  1404. + Syntax highlight now acts on File|Save As...
  1405. + Added a new class to syntax highlight: 'hex numbers'.
  1406. * There was something very wrong with the palette managment. Now fixed.
  1407. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  1408. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  1409. process revised
  1410. Revision 1.2 1998/12/28 15:47:40 peter
  1411. + Added user screen support, display & window
  1412. + Implemented Editor,Mouse Options dialog
  1413. + Added location of .INI and .CFG file
  1414. + Option (INI) file managment implemented (see bottom of Options Menu)
  1415. + Switches updated
  1416. + Run program
  1417. Revision 1.3 1998/12/22 10:39:38 peter
  1418. + options are now written/read
  1419. + find and replace routines
  1420. }