fphelp.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Help routines for the IDE
  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 FPHelp;
  13. interface
  14. uses
  15. Drivers,HelpCtx,
  16. WHelp,WHlpView,WHTML,
  17. {$ifdef EDITORS}
  18. Editors,
  19. {$else}
  20. WEditor,WCEdit,
  21. {$endif}
  22. WViews,WHTMLScn,
  23. FPViews;
  24. type
  25. PIDEStatusLine = ^TIDEStatusLine;
  26. TIDEStatusLine = object(TAdvancedStatusLine)
  27. function Hint(AHelpCtx: Word): String; virtual;
  28. procedure HandleEvent(var Event: TEvent); virtual;
  29. end;
  30. PFPHTMLFileLinkScanner = ^TFPHTMLFileLinkScanner;
  31. TFPHTMLFileLinkScanner = object(THTMLFileLinkScanner)
  32. function CheckURL(const URL: string): boolean; virtual;
  33. function CheckText(const Text: string): boolean; virtual;
  34. procedure ProcessDoc(Doc: PHTMLLinkScanFile); virtual;
  35. end;
  36. procedure Help(FileID, Context: THelpCtx; Modal: boolean);
  37. procedure HelpIndex(Keyword: string);
  38. procedure HelpTopicSearch(Editor: PEditor);
  39. procedure HelpTopic(const S: string);
  40. procedure CloseHelpWindows;
  41. procedure InitHelpSystem;
  42. procedure DoneHelpSystem;
  43. procedure InitHelpFiles;
  44. procedure DoneHelpFiles;
  45. procedure PushStatus(S: string);
  46. procedure SetStatus(S: string);
  47. procedure ClearStatus;
  48. procedure PopStatus;
  49. const
  50. HelpWindow : PFPHelpWindow = nil;
  51. HelpInited : boolean = false;
  52. implementation
  53. uses Objects,Views,App,MsgBox,Commands,
  54. WUtils,WHTMLHlp,WNGHelp,WOS2Help,
  55. FPString,FPConst,FPVars,FPUtils;
  56. const
  57. MaxStatusLevel = {$ifdef FPC}10{$else}1{$endif};
  58. var StatusStack : array[0..MaxStatusLevel] of string[MaxViewWidth];
  59. const
  60. StatusStackPtr : integer = 0;
  61. procedure TIDEStatusLine.HandleEvent(var Event: TEvent);
  62. begin
  63. case Event.What of
  64. evBroadcast :
  65. case Event.Command of
  66. cmUpdate : Update;
  67. end;
  68. end;
  69. inherited HandleEvent(Event);
  70. end;
  71. function TIDEStatusLine.Hint(AHelpCtx: Word): String;
  72. var S: string;
  73. begin
  74. case AHelpCtx of
  75. hcNoContext : S:='';
  76. hcDragging : S:='';
  77. hcSourceWindow : S:='';
  78. hcHelpWindow : S:='';
  79. hcCalcWindow : S:='';
  80. hcInfoWindow : S:='';
  81. hcClipboardWindow:S:='';
  82. hcBrowserWindow : S:='';
  83. hcMessagesWindow: S:='';
  84. hcASCIITableWindow: S:='';
  85. hcGDBWindow : S:=hint_rawgdbwindow;
  86. hcBreakpointListWindow : S:=hint_allbreakpoints;
  87. hcSystemMenu : S:=hint_systemmenu;
  88. hcUpdate : S:=hint_update;
  89. hcAbout : S:=hint_about;
  90. hcFileMenu : S:=hint_filemenu;
  91. hcNew : S:=hint_filenew;
  92. hcNewFromTemplate:S:=hint_filenewfromtemplate;
  93. hcOpen : S:=hint_fileopen;
  94. hcSave : S:=hint_filesave;
  95. hcSaveAs : S:=hint_filesaveas;
  96. hcSaveAll : S:=hint_filesaveall;
  97. hcChangeDir : S:=hint_changedir;
  98. hcDOSShell : S:=hint_dosshell;
  99. hcQuit : S:=hint_exit;
  100. hcRecentFileBase..hcRecentFileBase+10
  101. : S:=hint_openrecentfile;
  102. hcEditMenu : S:=hint_editmenu;
  103. hcUndo : S:=hint_editundo;
  104. hcRedo : S:=hint_editredo;
  105. hcCut : S:=hint_editcut;
  106. hcCopy : S:=hint_editcopy;
  107. hcPaste : S:=hint_editpaste;
  108. hcCopyWin : S:=hint_editcopywin;
  109. hcPasteWin : S:=hint_editpastewin;
  110. hcClear : S:=hint_editclear;
  111. hcShowClipboard : S:=hint_showclipboard;
  112. hcSearchMenu : S:=hint_searchmenu;
  113. hcFind : S:=hint_searchfind;
  114. hcReplace : S:=hint_searchreplace;
  115. hcSearchAgain : S:=hint_searchagain;
  116. hcGotoLine : S:=hint_gotoline;
  117. hcObjects : S:=hint_objects;
  118. hcModules : S:=hint_modules;
  119. hcGlobals : S:=hint_globals;
  120. hcSymbol : S:=hint_symbol;
  121. hcRunMenu : S:=hint_runmenu;
  122. hcRun : S:=hint_run;
  123. hcParameters : S:=hint_runparameters;
  124. hcResetDebugger : S:=hint_resetprogram;
  125. hcContToCursor : S:=hint_rununtilcursor;
  126. hcUntilReturn : S:=hint_rununtilreturn;
  127. hcUserScreen : S:=hint_userscreen;
  128. hcCompileMenu : S:=hint_compilemenu;
  129. hcCompile : S:=hint_compile;
  130. hcMake : S:=hint_make;
  131. hcBuild : S:=hint_build;
  132. hcTarget : S:=hint_target;
  133. hcPrimaryFile : S:=hint_primaryfile;
  134. hcClearPrimary : S:=hint_clearprimaryfile;
  135. hcInformation : S:=hint_information;
  136. hcCompilerMessages:S:=hint_showmessages;
  137. hcDebugMenu : S:=hint_debugmenu;
  138. hcToggleBreakpoint : S:=hint_togglebreakpoint;
  139. hcNewBreakpoint : S:=hint_createnewbreakpoint;
  140. hcEditBreakpoint : S:=hint_editbreakpoint;
  141. hcDeleteBreakpoint : S:=hint_deletebreakpoint;
  142. hcOpenGDBWindow : S:=hint_opengdbwindow;
  143. hcAddWatch : S:=hint_addwatch;
  144. hcWatches : S:=hint_watches;
  145. hcStack : S:=hint_callstack;
  146. hcBreakpointList : S:=hint_editbreakpoints;
  147. hcToolsMenu : S:=hint_toolsmenu;
  148. hcCalculator : S:=hint_calculator;
  149. hcGrep : S:=hint_grep;
  150. hcMsgGotoSource : S:=hint_gotosource;
  151. hcRegisters : S:=hint_registers;
  152. hcToolsMessages : S:=hint_messageswindow;
  153. hcToolsBase..
  154. hcToolsBase+MaxToolCount
  155. : S:=hint_usertool;
  156. hcASCIITable : S:=hint_asciitable;
  157. hcOptionsMenu : S:=hint_optionsmenu;
  158. hcSwitchesMode : S:=hint_switchesmode;
  159. hcCompiler : S:=hint_compiler;
  160. hcMemorySizes : S:=hint_memorysizes;
  161. hcLinker : S:=hint_linkeroptions;
  162. hcDebugger : S:=hint_debugoptions;
  163. hcDirectories : S:=hint_directories;
  164. hcBrowser : S:=hint_browser;
  165. hcTools : S:=hint_tools;
  166. hcEnvironmentMenu:S:=hint_environmentmenu;
  167. hcPreferences : S:=hint_preferences;
  168. hcEditor : S:=hint_editoroptions;
  169. hcCodeCompleteOptions:S:=hint_codecomplete;
  170. hcCodeTemplateOptions:S:=hint_codetemplates;
  171. hcMouse : S:=hint_mouseoptions;
  172. hcDesktopOptions: S:=hint_desktopoptions;
  173. hcStartup : S:=hint_startup;
  174. hcColors : S:=hint_colors;
  175. hcOpenINI : S:=hint_openini;
  176. hcSaveINI : S:=hint_saveini;
  177. hcSaveAsINI : S:=hint_saveasini;
  178. hcWindowMenu : S:=hint_windowmenu;
  179. hcTile : S:=hint_tile;
  180. hcCascade : S:=hint_cascade;
  181. hcCloseAll : S:=hint_closeall;
  182. hcResize : S:=hint_resize;
  183. hcZoom : S:=hint_zoom;
  184. hcNext : S:=hint_next;
  185. hcPrev : S:=hint_prev;
  186. hcClose : S:=hint_closewindow;
  187. hcWindowList : S:=hint_windowlist;
  188. hcUserScreenWindow:S:=hint_userscreenwindow;
  189. hcHelpMenu : S:=hint_helpmenu;
  190. hcHelpContents : S:=hint_helpcontents;
  191. hcHelpIndex : S:=hint_helpindex;
  192. hcHelpTopicSearch:S:=hint_helptopicsearch;
  193. hcHelpPrevTopic : S:=hint_helpprevtopic;
  194. hcHelpUsingHelp : S:=hint_helphowtouse;
  195. hcHelpFiles : S:=hint_helpfiles;
  196. hcOpenAtCursor : S:=hint_openatcursor;
  197. hcBrowseAtCursor: S:=hint_browseatcursor;
  198. hcEditorOptions : S:=hint_editoroptionscur;
  199. else S:='???';
  200. end;
  201. Hint:=S;
  202. end;
  203. procedure TFPHTMLFileLinkScanner.ProcessDoc(Doc: PHTMLLinkScanFile);
  204. begin
  205. PushStatus(FormatStrStr(msg_indexingfile,Doc^.GetDocumentURL));
  206. inherited ProcessDoc(Doc);
  207. PopStatus;
  208. end;
  209. function TFPHTMLFileLinkScanner.CheckURL(const URL: string): boolean;
  210. var OK: boolean;
  211. const HTTPPrefix = 'http:';
  212. FTPPrefix = 'ftp:';
  213. begin
  214. OK:=inherited CheckURL(URL);
  215. if OK then OK:=DirAndNameOf(URL)<>'';
  216. if OK then OK:=CompareText(copy(ExtOf(URL),1,4),'.HTM')=0;
  217. if OK then OK:=CompareText(copy(URL,1,length(HTTPPrefix)),HTTPPrefix)<>0;
  218. if OK then OK:=CompareText(copy(URL,1,length(FTPPrefix)),FTPPrefix)<>0;
  219. CheckURL:=OK;
  220. end;
  221. function TFPHTMLFileLinkScanner.CheckText(const Text: string): boolean;
  222. var OK: boolean;
  223. S: string;
  224. begin
  225. S:=Trim(Text);
  226. OK:=(S<>'') and (copy(S,1,1)<>'[');
  227. CheckText:=OK;
  228. end;
  229. procedure InitHelpSystem;
  230. procedure AddOAFile(HelpFile: string);
  231. begin
  232. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  233. if HelpFacility^.AddOAHelpFile(HelpFile)=false then
  234. ErrorBox(FormatStrStr(msg_failedtoloadhelpfile,HelpFile),nil);
  235. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile);{$ENDIF}
  236. end;
  237. procedure AddHTMLFile(TOCEntry,HelpFile: string);
  238. begin
  239. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  240. if HelpFacility^.AddHTMLHelpFile(HelpFile, TOCEntry)=false then
  241. ErrorBox(FormatStrStr(msg_failedtoloadhelpfile,HelpFile),nil);
  242. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile);{$ENDIF}
  243. end;
  244. procedure AddNGFile(HelpFile: string);
  245. begin
  246. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  247. if HelpFacility^.AddNGHelpFile(HelpFile)=false then
  248. ErrorBox(FormatStrStr(msg_failedtoloadhelpfile,HelpFile),nil);
  249. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile);{$ENDIF}
  250. end;
  251. procedure AddOS2File(HelpFile: string);
  252. begin
  253. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  254. if HelpFacility^.AddOS2HelpFile(HelpFile)=false then
  255. ErrorBox(FormatStrStr(msg_failedtoloadhelpfile,HelpFile),nil);
  256. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile);{$ENDIF}
  257. end;
  258. procedure AddWinHelpFile(HelpFile: string);
  259. begin
  260. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  261. if HelpFacility^.AddWinHelpFile(HelpFile)=false then
  262. ErrorBox(FormatStrStr(msg_failedtoloadhelpfile,HelpFile),nil);
  263. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile);{$ENDIF}
  264. end;
  265. procedure AddHTMLIndexFile(HelpFile: string);
  266. begin
  267. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  268. if HelpFacility^.AddHTMLIndexHelpFile(HelpFile)=false then
  269. ErrorBox(FormatStrStr(msg_failedtoloadhelpfile,HelpFile),nil);
  270. {$IFDEF DEBUG}SetStatus(msg_LoadingHelpFile);{$ENDIF}
  271. end;
  272. var I,P: sw_integer;
  273. S: string;
  274. TopicTitle: string;
  275. begin
  276. New(HelpFacility, Init);
  277. PushStatus(msg_LoadingHelpFiles);
  278. for I:=0 to HelpFiles^.Count-1 do
  279. begin
  280. S:=HelpFiles^.At(I)^; TopicTitle:='';
  281. P:=Pos('|',S);
  282. if P>0 then
  283. begin TopicTitle:=copy(S,P+1,High(S)); S:=copy(S,1,P-1); end;
  284. if TopicTitle='' then TopicTitle:=S;
  285. if copy(UpcaseStr(ExtOf(S)),1,length(HTMLExt))=UpcaseStr(HTMLExt) then { this recognizes both .htm and .html }
  286. AddHTMLFile(TopicTitle,S) else
  287. if UpcaseStr(ExtOf(S))=UpcaseStr(HTMLIndexExt) then
  288. AddHTMLIndexFile(S) else
  289. if UpcaseStr(ExtOf(S))=UpcaseStr(NGExt) then
  290. AddNGFile(S) else
  291. if UpcaseStr(ExtOf(S))=UpcaseStr(INFExt) then
  292. AddOS2File(S) else
  293. if UpcaseStr(ExtOf(S))=UpcaseStr(WinHelpExt) then
  294. AddWinHelpFile(S) else
  295. AddOAFile(S);
  296. end;
  297. PopStatus;
  298. end;
  299. procedure CheckHelpSystem;
  300. begin
  301. if HelpInited then Exit;
  302. InitHelpSystem;
  303. HelpInited:=true;
  304. end;
  305. procedure DoneHelpSystem;
  306. begin
  307. if assigned(HelpFacility) then
  308. begin
  309. Dispose(HelpFacility, Done);
  310. HelpFacility:=nil;
  311. end;
  312. HelpInited:=false;
  313. end;
  314. procedure HelpCreateWindow;
  315. var R: TRect;
  316. begin
  317. CheckHelpSystem;
  318. if HelpWindow=nil then
  319. begin
  320. Desktop^.GetExtent(R); R.Grow(-15,-3); Dec(R.A.Y);
  321. New(HelpWindow, Init(R, dialog_help, 0, 0, SearchFreeWindowNo));
  322. if HelpWindow<>nil then
  323. begin
  324. HelpWindow^.Hide;
  325. Desktop^.Insert(HelpWindow);
  326. end;
  327. end;
  328. end;
  329. procedure Help(FileID, Context: THelpCtx; Modal: boolean);
  330. begin
  331. if Modal then
  332. begin MessageBox(msg_modalhelpnotimplemented,nil,mfInformation+mfInsertInApp+mfOKButton); Exit; end;
  333. HelpCreateWindow;
  334. with HelpWindow^ do
  335. begin
  336. HelpWindow^.ShowTopic(0,Context);
  337. if GetState(sfVisible)=false then Show;
  338. MakeFirst;
  339. end;
  340. Message(Application,evCommand,cmUpdate,nil);
  341. end;
  342. procedure HelpTopicSearch(Editor: PEditor);
  343. var S: string;
  344. begin
  345. if Editor=nil then S:='' else
  346. S:=GetEditorCurWord(Editor,[]);
  347. HelpTopic(S);
  348. end;
  349. procedure HelpTopic(const S: string);
  350. var FileID: word;
  351. Ctx : THelpCtx;
  352. var Found: boolean;
  353. begin
  354. CheckHelpSystem;
  355. PushStatus(msg_LocatingTopic);
  356. Found:=HelpFacility^.TopicSearch(S,FileID,Ctx);
  357. PopStatus;
  358. if Found then
  359. Help(FileID,Ctx,false)
  360. else
  361. HelpIndex(S);
  362. end;
  363. procedure HelpIndex(Keyword: string);
  364. begin
  365. HelpCreateWindow;
  366. with HelpWindow^ do
  367. begin
  368. PushStatus(msg_BuildingHelpIndex);
  369. HelpWindow^.ShowIndex;
  370. if Keyword<>'' then
  371. HelpWindow^.HelpView^.Lookup(Keyword);
  372. PopStatus;
  373. if GetState(sfVisible)=false then Show;
  374. MakeFirst;
  375. end;
  376. Message(Application,evCommand,cmUpdate,nil);
  377. end;
  378. procedure PushStatus(S: string);
  379. begin
  380. if StatusLine=nil then
  381. Exit;
  382. If StatusStackPtr<=MaxStatusLevel then
  383. StatusStack[StatusStackPtr]:=PAdvancedStatusLine(StatusLine)^.GetStatusText
  384. else
  385. StatusStack[MaxStatusLevel]:=PAdvancedStatusLine(StatusLine)^.GetStatusText;
  386. SetStatus(S);
  387. Inc(StatusStackPtr);
  388. end;
  389. procedure PopStatus;
  390. begin
  391. if StatusLine=nil then
  392. Exit;
  393. Dec(StatusStackPtr);
  394. If StatusStackPtr<=MaxStatusLevel then
  395. SetStatus(StatusStack[StatusStackPtr])
  396. else
  397. SetStatus(StatusStack[MaxStatusLevel]);
  398. end;
  399. procedure SetStatus(S: string);
  400. begin
  401. if StatusLine=nil then
  402. Exit;
  403. PAdvancedStatusLine(StatusLine)^.SetStatusText(S);
  404. end;
  405. procedure ClearStatus;
  406. begin
  407. PAdvancedStatusLine(StatusLine)^.ClearStatusText;
  408. end;
  409. function FPHTMLGetSectionColor(Section: THTMLSection; var Color: byte): boolean;
  410. var OK: boolean;
  411. S: string;
  412. begin
  413. Color:=0;
  414. OK:=(ord(Section) in [1..length(CHTMLSectionAttrs)]);
  415. if OK then
  416. begin
  417. S:=#0;
  418. S:=copy(CHTMLSectionAttrs,ord(Section),1);
  419. if Assigned(Application)=false then Color:=0 else
  420. Color:=Application^.GetColor(ord(S[1]));
  421. if (Color and $0f) = ((Color and $f0) shr 4) then { same color ? }
  422. OK:=false;
  423. end;
  424. FPHTMLGetSectionColor:=OK;
  425. end;
  426. function FPNGGetAttrColor(Attr: char; var Color: byte): boolean;
  427. var OK: boolean;
  428. begin
  429. OK:=false;
  430. case Attr of
  431. 'A' : OK:=FPHTMLGetSectionColor(hsHeading1,Color);
  432. 'B' : OK:=FPHTMLGetSectionColor(hsHeading2,Color);
  433. 'b' : OK:=FPHTMLGetSectionColor(hsHeading5,Color);
  434. 'U' : OK:=FPHTMLGetSectionColor(hsHeading3,Color);
  435. 'N' : OK:=FPHTMLGetSectionColor(hsHeading4,Color);
  436. {$ifdef DEBUGMSG}
  437. else ErrorBox('Unknown attr encountered : "'+Attr+'"',nil);
  438. {$endif}
  439. end;
  440. FPNGGetAttrColor:=OK;
  441. end;
  442. function FPINFGetAttrColor(TextStyle, TextColor: byte; var Color: byte): boolean;
  443. var OK: boolean;
  444. begin
  445. OK:=false;
  446. case TextColor of
  447. 1 : OK:=FPHTMLGetSectionColor(hsHeading1,Color);
  448. 2 : OK:=FPHTMLGetSectionColor(hsHeading2,Color);
  449. 3 : OK:=FPHTMLGetSectionColor(hsHeading3,Color);
  450. end;
  451. FPINFGetAttrColor:=OK;
  452. end;
  453. procedure InitHelpFiles;
  454. begin
  455. HTMLGetSectionColor:={$ifdef FPC}@{$endif}FPHTMLGetSectionColor;
  456. NGGetAttrColor:={$ifdef FPC}@{$endif}FPNGGetAttrColor;
  457. INFGetAttrColor:={$ifdef FPC}@{$endif}FPINFGetAttrColor;
  458. New(HelpFiles, Init(10,10));
  459. end;
  460. procedure DoneHelpFiles;
  461. begin
  462. if assigned(HelpFiles) then
  463. Dispose(HelpFiles, Done);
  464. end;
  465. procedure CloseHelpWindows;
  466. procedure CloseIfHelpWindow(P: PView); {$ifndef FPC}far;{$endif}
  467. begin
  468. if P^.HelpCtx=hcHelpWindow then
  469. begin
  470. Message(P,evCommand,cmClose,nil);
  471. Dispose(P, Done); { help windows are only hidden on close so we've
  472. to destroy them manually }
  473. end;
  474. end;
  475. begin
  476. Desktop^.ForEach(@CloseIfHelpWindow);
  477. end;
  478. END.
  479. {
  480. $Log$
  481. Revision 1.3 2000-10-31 22:35:54 pierre
  482. * New big merge from fixes branch
  483. Revision 1.1.2.2 2000/09/18 13:20:54 pierre
  484. New bunch of Gabor changes
  485. Revision 1.2 2000/08/22 09:41:39 pierre
  486. * first big merge from fixes branch
  487. Revision 1.1.2.1 2000/08/15 03:40:53 peter
  488. [*] no more fatal exits when the IDE can't find the error file (containing
  489. the redirected assembler/linker output) after compilation
  490. [*] hidden windows are now added always at the end of the Window List
  491. [*] TINIFile parsed entries encapsulated in string delimiters incorrectly
  492. [*] selection was incorrectly adjusted when typing in overwrite mode
  493. [*] the line wasn't expanded when it's end was reached in overw. mode
  494. [*] the IDE now tries to locate source files also in the user specified
  495. unit dirs (for ex. as a response to 'Open at cursor' (Ctrl+Enter) )
  496. [*] 'Open at cursor' is now aware of the extension (if specified)
  497. Revision 1.1 2000/07/13 09:48:34 michael
  498. + Initial import
  499. Revision 1.35 2000/06/26 07:29:23 pierre
  500. * new bunch of Gabor's changes
  501. Revision 1.34 2000/06/22 09:07:12 pierre
  502. * Gabor changes: see fixes.txt
  503. Revision 1.33 2000/06/16 08:50:40 pierre
  504. + new bunch of Gabor's changes
  505. Revision 1.32 2000/05/30 07:18:33 pierre
  506. + colors for HTML help by Gabor
  507. Revision 1.31 2000/05/29 10:44:56 pierre
  508. + New bunch of Gabor's changes: see fixes.txt
  509. Revision 1.30 2000/05/02 08:42:27 pierre
  510. * new set of Gabor changes: see fixes.txt
  511. Revision 1.29 2000/04/25 08:42:33 pierre
  512. * New Gabor changes : see fixes.txt
  513. Revision 1.28 2000/03/21 23:31:14 pierre
  514. adapted to wcedit addition by Gabor
  515. Revision 1.27 2000/02/07 11:58:01 pierre
  516. Gabor's code inserted
  517. Revision 1.26 2000/01/08 18:26:20 florian
  518. + added a register window, doesn't work yet
  519. Revision 1.25 2000/01/05 17:25:26 pierre
  520. * typo error corrected
  521. Revision 1.24 2000/01/03 11:38:33 michael
  522. Changes from Gabor
  523. Revision 1.23 1999/09/09 16:31:45 pierre
  524. * some breakpoint related fixes and Help contexts
  525. Revision 1.22 1999/09/09 14:15:27 pierre
  526. + cmCopyWin,cmPasteWin
  527. Revision 1.21 1999/08/16 18:25:17 peter
  528. * Adjusting the selection when the editor didn't contain any line.
  529. * Reserved word recognition redesigned, but this didn't affect the overall
  530. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  531. The syntax scanner loop is a bit slow but the main problem is the
  532. recognition of special symbols. Switching off symbol processing boosts
  533. the performance up to ca. 200%...
  534. * The editor didn't allow copying (for ex to clipboard) of a single character
  535. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  536. * Compiler Messages window (actually the whole desktop) did not act on any
  537. keypress when compilation failed and thus the window remained visible
  538. + Message windows are now closed upon pressing Esc
  539. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  540. only when neccessary
  541. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  542. + LineSelect (Ctrl+K+L) implemented
  543. * The IDE had problems closing help windows before saving the desktop
  544. Revision 1.20 1999/08/03 20:22:31 peter
  545. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  546. + Desktop saving should work now
  547. - History saved
  548. - Clipboard content saved
  549. - Desktop saved
  550. - Symbol info saved
  551. * syntax-highlight bug fixed, which compared special keywords case sensitive
  552. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  553. * with 'whole words only' set, the editor didn't found occourences of the
  554. searched text, if the text appeared previously in the same line, but didn't
  555. satisfied the 'whole-word' condition
  556. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  557. (ie. the beginning of the selection)
  558. * when started typing in a new line, but not at the start (X=0) of it,
  559. the editor inserted the text one character more to left as it should...
  560. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  561. * Shift shouldn't cause so much trouble in TCodeEditor now...
  562. * Syntax highlight had problems recognizing a special symbol if it was
  563. prefixed by another symbol character in the source text
  564. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  565. Revision 1.19 1999/07/12 13:14:17 pierre
  566. * LineEnd bug corrected, now goes end of text even if selected
  567. + Until Return for debugger
  568. + Code for Quit inside GDB Window
  569. Revision 1.18 1999/07/10 01:24:16 pierre
  570. + First implementation of watches window
  571. Revision 1.17 1999/06/30 23:58:14 pierre
  572. + BreakpointsList Window implemented
  573. with Edit/New/Delete functions
  574. + Individual breakpoint dialog with support for all types
  575. ignorecount and conditions
  576. (commands are not yet implemented, don't know if this wolud be useful)
  577. awatch and rwatch have problems because GDB does not annotate them
  578. I fixed v4.16 for this
  579. Revision 1.16 1999/06/28 19:32:19 peter
  580. * fixes from gabor
  581. Revision 1.15 1999/06/25 00:39:58 pierre
  582. help for cmSymbol,cmAddWatch,cmStack and cmBreakpoint list
  583. Revision 1.14 1999/04/07 21:55:46 peter
  584. + object support for browser
  585. * html help fixes
  586. * more desktop saving things
  587. * NODEBUG directive to exclude debugger
  588. Revision 1.13 1999/03/23 15:11:28 peter
  589. * desktop saving things
  590. * vesa mode
  591. * preferences dialog
  592. Revision 1.12 1999/03/16 12:38:09 peter
  593. * tools macro fixes
  594. + tph writer
  595. + first things for resource files
  596. Revision 1.11 1999/03/01 15:41:53 peter
  597. + Added dummy entries for functions not yet implemented
  598. * MenuBar didn't update itself automatically on command-set changes
  599. * Fixed Debugging/Profiling options dialog
  600. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is set
  601. * efBackSpaceUnindents works correctly
  602. + 'Messages' window implemented
  603. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  604. + Added TP message-filter support (for ex. you can call GREP thru
  605. GREP2MSG and view the result in the messages window - just like in TP)
  606. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  607. so topic search didn't work...
  608. * In FPHELP.PAS there were still context-variables defined as word instead
  609. of THelpCtx
  610. * StdStatusKeys() was missing from the statusdef for help windows
  611. + Topic-title for index-table can be specified when adding a HTML-files
  612. Revision 1.10 1999/02/22 11:51:35 peter
  613. * browser updates from gabor
  614. Revision 1.9 1999/02/19 18:43:45 peter
  615. + open dialog supports mask list
  616. Revision 1.8 1999/02/11 19:07:21 pierre
  617. * GDBWindow redesigned :
  618. normal editor apart from
  619. that any kbEnter will send the line (for begin to cursor)
  620. to GDB command !
  621. GDBWindow opened in Debugger Menu
  622. still buggy :
  623. -echo should not be present if at end of text
  624. -GDBWindow becomes First after each step (I don't know why !)
  625. Revision 1.7 1999/02/08 17:40:01 pierre
  626. + cmContToCursor added
  627. Revision 1.6 1999/02/08 10:37:43 peter
  628. + html helpviewer
  629. Revision 1.5 1999/02/04 12:23:44 pierre
  630. + cmResetDebugger and cmGrep
  631. * Avoid StatusStack overflow
  632. Revision 1.4 1999/01/21 11:54:13 peter
  633. + tools menu
  634. + speedsearch in symbolbrowser
  635. * working run command
  636. Revision 1.3 1999/01/04 11:49:44 peter
  637. * 'Use tab characters' now works correctly
  638. + Syntax highlight now acts on File|Save As...
  639. + Added a new class to syntax highlight: 'hex numbers'.
  640. * There was something very wrong with the palette managment. Now fixed.
  641. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  642. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  643. process revised
  644. Revision 1.2 1998/12/28 15:47:44 peter
  645. + Added user screen support, display & window
  646. + Implemented Editor,Mouse Options dialog
  647. + Added location of .INI and .CFG file
  648. + Option (INI) file managment implemented (see bottom of Options Menu)
  649. + Switches updated
  650. + Run program
  651. Revision 1.3 1998/12/22 10:39:42 peter
  652. + options are now written/read
  653. + find and replace routines
  654. }