fpide.pas 42 KB

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