fpsymbol.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Symbol browse support 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 FPSymbol;
  13. interface
  14. uses Objects,Drivers,Views,Dialogs,Outline,
  15. BrowCol,
  16. FPViews;
  17. const
  18. { Browser tab constants }
  19. btScope = 0;
  20. btReferences = 1;
  21. btInheritance = 2;
  22. btMemInfo = 3;
  23. btBreakWatch = 4;
  24. type
  25. PSymbolView = ^TSymbolView;
  26. TSymbolView = object(TListBox)
  27. constructor Init(var Bounds: TRect; AHScrollBar, AVScrollBar: PScrollBar);
  28. procedure HandleEvent(var Event: TEvent); virtual;
  29. procedure GotoItem(Item: sw_integer); virtual;
  30. procedure TrackItem(Item: sw_integer); virtual;
  31. function GetPalette: PPalette; virtual;
  32. private
  33. function TrackReference(R: PReference): boolean; virtual;
  34. function GotoReference(R: PReference): boolean; virtual;
  35. end;
  36. PSymbolScopeView = ^TSymbolScopeView;
  37. TSymbolScopeView = object(TSymbolView)
  38. constructor Init(var Bounds: TRect; ASymbols: PSymbolCollection; AHScrollBar, AVScrollBar: PScrollBar);
  39. destructor Done; virtual;
  40. function GetText(Item,MaxLen: Sw_Integer): String; virtual;
  41. procedure HandleEvent(var Event: TEvent); virtual;
  42. procedure Draw; virtual;
  43. procedure LookUp(S: string); virtual;
  44. procedure GotoItem(Item: sw_integer); virtual;
  45. procedure TrackItem(Item: sw_integer); virtual;
  46. private
  47. Symbols: PSymbolCollection;
  48. LookupStr: string;
  49. end;
  50. PSymbolReferenceView = ^TSymbolReferenceView;
  51. TSymbolReferenceView = object(TSymbolView)
  52. constructor Init(var Bounds: TRect; AReferences: PReferenceCollection; AHScrollBar, AVScrollBar: PScrollBar);
  53. destructor Done; virtual;
  54. procedure HandleEvent(var Event: TEvent); virtual;
  55. function GetText(Item,MaxLen: Sw_Integer): String; virtual;
  56. procedure SelectItem(Item: Sw_Integer); virtual;
  57. procedure GotoItem(Item: sw_integer); virtual;
  58. procedure TrackItem(Item: sw_integer); virtual;
  59. private
  60. References: PReferenceCollection;
  61. end;
  62. PSymbolMemInfoView = ^TSymbolMemInfoView;
  63. TSymbolMemInfoView = object(TStaticText)
  64. constructor Init(var Bounds: TRect; AMemInfo: PSymbolMemInfo);
  65. destructor Done; virtual;
  66. procedure GetText(var S: String); virtual;
  67. function GetPalette: PPalette; virtual;
  68. private
  69. MemInfo: PSymbolMemInfo;
  70. end;
  71. PSymbolInheritanceView = ^TSymbolInheritanceView;
  72. TSymbolInheritanceView = object(TOutlineViewer)
  73. constructor Init(var Bounds: TRect; AHScrollBar, AVScrollBar: PScrollBar; ARoot: PObjectSymbol);
  74. destructor Done; virtual;
  75. function GetRoot: Pointer; virtual;
  76. function HasChildren(Node: Pointer): Boolean; virtual;
  77. function GetChild(Node: Pointer; I: Integer): Pointer; virtual;
  78. function GetNumChildren(Node: Pointer): Integer; virtual;
  79. function GetText(Node: Pointer): String; virtual;
  80. procedure Adjust(Node: Pointer; Expand: Boolean); virtual;
  81. function IsExpanded(Node: Pointer): Boolean; virtual;
  82. procedure Selected(I: Integer); virtual;
  83. function GetPalette: PPalette; virtual;
  84. private
  85. Root: PObjectSymbol;
  86. end;
  87. PBrowserTabItem = ^TBrowserTabItem;
  88. TBrowserTabItem = record
  89. Sign : char;
  90. Link : PView;
  91. Next : PBrowserTabItem;
  92. end;
  93. PBrowserTab = ^TBrowserTab;
  94. TBrowserTab = object(TView)
  95. Items: PBrowserTabItem;
  96. constructor Init(var Bounds: TRect; AItems: PBrowserTabItem);
  97. function GetItemCount: sw_integer; virtual;
  98. function GetItem(Index: sw_integer): PBrowserTabItem; virtual;
  99. procedure SetParams(AFlags: word; ACurrent: Sw_integer); virtual;
  100. procedure SelectItem(Index: Sw_integer); virtual;
  101. procedure Draw; virtual;
  102. function GetPalette: PPalette; virtual;
  103. procedure HandleEvent(var Event: TEvent); virtual;
  104. destructor Done; virtual;
  105. private
  106. Flags : word;
  107. Current : Sw_integer;
  108. end;
  109. PBrowserWindow = ^TBrowserWindow;
  110. TBrowserWindow = object(TFPWindow)
  111. constructor Init(var Bounds: TRect; ATitle: TTitleStr; ANumber: Sw_Integer;ASym : PSymbol;
  112. const AName: string; ASymbols: PSymbolCollection; AReferences: PReferenceCollection;
  113. AInheritance: PObjectSymbol; AMemInfo: PSymbolMemInfo);
  114. procedure HandleEvent(var Event: TEvent); virtual;
  115. procedure SetState(AState: Word; Enable: Boolean); virtual;
  116. procedure Close; virtual;
  117. procedure SelectTab(BrowserTab: Sw_integer); virtual;
  118. function GetPalette: PPalette; virtual;
  119. private
  120. PageTab : PBrowserTab;
  121. Sym : PSymbol;
  122. ScopeView : PSymbolScopeView;
  123. ReferenceView : PSymbolReferenceView;
  124. InheritanceView: PSymbolInheritanceView;
  125. MemInfoView : PSymbolMemInfoView;
  126. end;
  127. procedure OpenSymbolBrowser(X,Y: Sw_integer;const Name,Line: string;S : PSymbol;
  128. Symbols: PSymbolCollection; References: PReferenceCollection;
  129. Inheritance: PObjectSymbol; MemInfo: PSymbolMemInfo);
  130. function IsSymbolInfoAvailable: boolean;
  131. procedure OpenOneSymbolBrowser(Name : String);
  132. procedure CloseAllBrowsers;
  133. procedure RemoveBrowsersCollection;
  134. const
  135. GlobalsCollection : PSortedCollection = nil;
  136. ModulesCollection : PSortedCollection = nil;
  137. implementation
  138. uses Commands,App,
  139. WEditor,WViews,
  140. FPConst,FPUtils,FPVars,{$ifndef FPDEBUG}FPDebug{$endif};
  141. procedure CloseAllBrowsers;
  142. procedure SendCloseIfBrowser(P: PView); {$ifndef FPC}far;{$endif}
  143. begin
  144. if assigned(P) and
  145. ((TypeOf(P^)=TypeOf(TBrowserWindow)) or
  146. (TypeOf(P^)=TypeOf(TSymbolView)) or
  147. (TypeOf(P^)=TypeOf(TSymbolScopeView)) or
  148. (TypeOf(P^)=TypeOf(TSymbolReferenceView)) or
  149. (TypeOf(P^)=TypeOf(TSymbolMemInfoView)) or
  150. (TypeOf(P^)=TypeOf(TSymbolInheritanceView))) then
  151. Message(P,evCommand,cmClose,nil);
  152. end;
  153. begin
  154. Desktop^.ForEach(@SendCloseIfBrowser);
  155. end;
  156. procedure RemoveBrowsersCollection;
  157. begin
  158. if assigned(GlobalsCollection) then
  159. begin
  160. GlobalsCollection^.deleteAll;
  161. Dispose(GlobalsCollection,done);
  162. GlobalsCollection:=nil;
  163. end;
  164. if assigned(ModulesCollection) then
  165. begin
  166. ModulesCollection^.deleteAll;
  167. Dispose(ModulesCollection,done);
  168. ModulesCollection:=nil;
  169. end;
  170. end;
  171. function NewBrowserTabItem(ASign: char; ALink: PView; ANext: PBrowserTabItem): PBrowserTabItem;
  172. var P: PBrowserTabItem;
  173. begin
  174. New(P); FillChar(P^,SizeOf(P^),0);
  175. with P^ do begin Sign:=ASign; Link:=ALink; Next:=ANext; end;
  176. NewBrowserTabItem:=P;
  177. end;
  178. procedure DisposeBrowserTabItem(P: PBrowserTabItem);
  179. begin
  180. if P<>nil then Dispose(P);
  181. end;
  182. procedure DisposeBrowserTabList(P: PBrowserTabItem);
  183. begin
  184. if P<>nil then
  185. begin
  186. if P^.Next<>nil then DisposeBrowserTabList(P^.Next);
  187. DisposeBrowserTabItem(P);
  188. end;
  189. end;
  190. function IsSymbolInfoAvailable: boolean;
  191. begin
  192. IsSymbolInfoAvailable:=BrowCol.Modules<>nil;
  193. end;
  194. procedure OpenOneSymbolBrowser(Name : String);
  195. var Index : sw_integer;
  196. PS : PSymbol;
  197. P : Pstring;
  198. function Search(P : PSymbol) : boolean;
  199. begin
  200. Search:=UpcaseStr(P^.Items^.LookUp(Name,Index))=Name;
  201. end;
  202. begin
  203. Name:=UpcaseStr(Name);
  204. If BrowCol.Modules<>nil then
  205. begin
  206. PS:=BrowCol.Modules^.FirstThat(@Search);
  207. If assigned(PS) then
  208. OpenSymbolBrowser(0,20,
  209. PS^.Items^.At(Index)^.GetName,'',PS^.Items^.At(Index),
  210. PS^.Items^.At(Index)^.Items,PS^.Items^.At(Index)^.References,nil,PS^.MemInfo)
  211. else
  212. begin
  213. P:=@Name;
  214. ErrorBox(#3'Symbol %s not found',@P);
  215. end;
  216. end
  217. else
  218. ErrorBox('No Browser info available',nil);
  219. end;
  220. (*procedure ReadBrowseLog(FileName: string);
  221. var f: text;
  222. IOOK,EndOfFile: boolean;
  223. Line: string;
  224. procedure NextLine;
  225. begin
  226. readln(f,Line);
  227. EndOfFile:=Eof(f);
  228. end;
  229. var Level: integer;
  230. procedure ProcessSymTable(Indent: integer; Owner: PSymbolCollection);
  231. var IndentS,S,Source: string;
  232. Sym: PSymbol;
  233. Ref: PSymbolReference;
  234. P: byte;
  235. PX: TPoint;
  236. PS: PString;
  237. PCount: integer;
  238. Params: array[0..30] of PString;
  239. Typ: tsymtyp;
  240. ExitBack: boolean;
  241. begin
  242. Inc(Level);
  243. IndentS:=CharStr(' ',Indent); ExitBack:=false;
  244. Sym:=nil;
  245. repeat
  246. if copy(Line,1,length(IndentS))<>IndentS then ExitBack:=true else
  247. if copy(Line,Indent+1,3)='***' then
  248. { new symbol }
  249. begin
  250. S:=copy(Line,Indent+1+3,255);
  251. P:=Pos('***',S); if P=0 then P:=length(S)+1;
  252. S:=Trim(copy(S,1,P-1));
  253. if (copy(S,1,1)='_') and (Pos('$$',S)>0) then
  254. begin
  255. repeat
  256. P:=Pos('$$',S);
  257. if P>0 then Delete(S,1,P+1);
  258. until P=0;
  259. P:=Pos('$',S);
  260. Delete(S,1,P);
  261. PCount:=0;
  262. repeat
  263. P:=Pos('$',S); if P=0 then P:=length(S)+1;
  264. Params[PCount]:=TypeNames^.Add(copy(S,1,P-1));
  265. Inc(PCount);
  266. Delete(S,1,P);
  267. until S='';
  268. Sym^.Typ:=procsym;
  269. Sym^.SetParams(PCount,@Params);
  270. end
  271. else
  272. New(Sym, Init(S, varsym, 0, nil));
  273. Owner^.Insert(Sym);
  274. NextLine;
  275. end else
  276. if copy(Line,Indent+1,3)='---' then
  277. { child symtable }
  278. begin
  279. S:=Trim(copy(Line,Indent+1+12,255));
  280. if Level=1 then Typ:=unitsym else
  281. Typ:=typesym;
  282. if (Sym<>nil) and (Sym^.GetName=S) then
  283. else
  284. begin
  285. New(Sym, Init(S, Typ, 0, nil));
  286. Owner^.Insert(Sym);
  287. end;
  288. Sym^.Typ:=Typ;
  289. NextLine;
  290. New(Sym^.Items, Init(0,50));
  291. ProcessSymTable(Indent+2,Sym^.Items);
  292. end else
  293. { if Sym<>nil then}
  294. if copy(Line,Indent+1,1)=' ' then
  295. { reference }
  296. begin
  297. S:=copy(Line,Indent+1+2,255);
  298. P:=Pos('(',S); if P=0 then P:=length(S)+1;
  299. Source:=Trim(copy(S,1,P-1)); Delete(S,1,P);
  300. P:=Pos(',',S); if P=0 then P:=length(S)+1;
  301. PX.Y:=StrToInt(copy(S,1,P-1)); Delete(S,1,P);
  302. P:=Pos(')',S); if P=0 then P:=length(S)+1;
  303. PX.X:=StrToInt(copy(S,1,P-1)); Delete(S,1,P);
  304. PS:=ModuleNames^.Add(Source);
  305. New(Ref, Init(PS, PX));
  306. if Sym^.References=nil then
  307. New(Sym^.References, Init(10,50));
  308. Sym^.References^.Insert(Ref);
  309. end;
  310. if ExitBack=false then
  311. NextLine;
  312. until EndOfFile or ExitBack;
  313. Dec(Level);
  314. end;
  315. begin
  316. DoneSymbolBrowser;
  317. InitSymbolBrowser;
  318. {$I-}
  319. Assign(f,FileName);
  320. Reset(f);
  321. Level:=0;
  322. NextLine;
  323. while (IOResult=0) and (EndOfFile=false) do
  324. ProcessSymTable(0,Modules);
  325. Close(f);
  326. EatIO;
  327. {$I+}
  328. end;*)
  329. {****************************************************************************
  330. TSymbolView
  331. ****************************************************************************}
  332. constructor TSymbolView.Init(var Bounds: TRect; AHScrollBar, AVScrollBar: PScrollBar);
  333. begin
  334. inherited Init(Bounds,1,AVScrollBar);
  335. HScrollBar:=AHScrollBar;
  336. if assigned(HScrollBar) then
  337. HScrollBar^.SetRange(1,80);
  338. Options:=Options or (ofSelectable+ofTopSelect);
  339. end;
  340. procedure TSymbolView.HandleEvent(var Event: TEvent);
  341. var DontClear: boolean;
  342. begin
  343. case Event.What of
  344. evKeyDown :
  345. begin
  346. DontClear:=false;
  347. case Event.KeyCode of
  348. kbEnter :
  349. GotoItem(Focused);
  350. kbSpaceBar :
  351. TrackItem(Focused);
  352. kbRight,kbLeft :
  353. if HScrollBar<>nil then
  354. HScrollBar^.HandleEvent(Event);
  355. else DontClear:=true;
  356. end;
  357. if DontClear=false then ClearEvent(Event);
  358. end;
  359. evMouseDown :
  360. if Event.double then
  361. GotoItem(Focused);
  362. end;
  363. inherited HandleEvent(Event);
  364. end;
  365. function TSymbolView.GetPalette: PPalette;
  366. const
  367. P: string[length(CBrowserListBox)] = CBrowserListBox;
  368. begin
  369. GetPalette:=@P;
  370. end;
  371. procedure TSymbolView.GotoItem(Item: sw_integer);
  372. begin
  373. SelectItem(Item);
  374. end;
  375. procedure TSymbolView.TrackItem(Item: sw_integer);
  376. begin
  377. SelectItem(Item);
  378. end;
  379. function LastBrowserWindow: PBrowserWindow;
  380. var BW: PBrowserWindow;
  381. procedure IsBW(P: PView); {$ifndef FPC}far;{$endif}
  382. begin
  383. if (P^.HelpCtx=hcBrowserWindow) then
  384. BW:=pointer(P);
  385. end;
  386. begin
  387. BW:=nil;
  388. Desktop^.ForEach(@IsBW);
  389. LastBrowserWindow:=BW;
  390. end;
  391. function TSymbolView.TrackReference(R: PReference): boolean;
  392. var W: PSourceWindow;
  393. BW: PBrowserWindow;
  394. P: TPoint;
  395. begin
  396. Message(Desktop,evBroadcast,cmClearLineHighlights,nil);
  397. Desktop^.Lock;
  398. P.X:=R^.Position.X-1; P.Y:=R^.Position.Y-1;
  399. W:=TryToOpenFile(nil,R^.GetFileName,P.X,P.Y,true);
  400. if W<>nil then
  401. begin
  402. BW:=LastBrowserWindow;
  403. if BW=nil then
  404. W^.Select
  405. else
  406. begin
  407. Desktop^.Delete(W);
  408. Desktop^.InsertBefore(W,BW^.NextView);
  409. end;
  410. W^.Editor^.SetHighlightRow(P.Y);
  411. end;
  412. Desktop^.UnLock;
  413. TrackReference:=W<>nil;
  414. end;
  415. function TSymbolView.GotoReference(R: PReference): boolean;
  416. var W: PSourceWindow;
  417. begin
  418. Desktop^.Lock;
  419. W:=TryToOpenFile(nil,R^.GetFileName,R^.Position.X-1,R^.Position.Y-1,true);
  420. if W<>nil then W^.Select;
  421. Desktop^.UnLock;
  422. GotoReference:=W<>nil;
  423. end;
  424. {****************************************************************************
  425. TSymbolScopeView
  426. ****************************************************************************}
  427. constructor TSymbolScopeView.Init(var Bounds: TRect; ASymbols: PSymbolCollection; AHScrollBar, AVScrollBar: PScrollBar);
  428. begin
  429. inherited Init(Bounds,AHScrollBar, AVScrollBar);
  430. Symbols:=ASymbols;
  431. NewList(ASymbols);
  432. SetRange(Symbols^.Count);
  433. end;
  434. destructor TSymbolScopeView.Done;
  435. begin
  436. {if assigned(Symbols) then
  437. begin
  438. the elements belong to other lists
  439. Symbols^.DeleteAll;
  440. dispose(Symbols,done);
  441. end;}
  442. Inherited Done;
  443. end;
  444. procedure TSymbolScopeView.HandleEvent(var Event: TEvent);
  445. var OldFocus: sw_integer;
  446. begin
  447. case Event.What of
  448. evKeyDown :
  449. case Event.KeyCode of
  450. kbBack :
  451. begin
  452. LookUp(copy(LookUpStr,1,length(LookUpStr)-1));
  453. ClearEvent(Event);
  454. end;
  455. else
  456. if Event.CharCode in[#33..#255] then
  457. begin
  458. LookUp(LookUpStr+Event.CharCode);
  459. ClearEvent(Event);
  460. end;
  461. end;
  462. end;
  463. OldFocus:=Focused;
  464. inherited HandleEvent(Event);
  465. if OldFocus<>Focused then
  466. Lookup('');
  467. end;
  468. procedure TSymbolScopeView.Draw;
  469. begin
  470. inherited Draw;
  471. SetCursor(2+SymbolTypLen+length(LookUpStr),Focused-TopItem);
  472. end;
  473. procedure TSymbolScopeView.LookUp(S: string);
  474. var Idx,Slength: Sw_integer;
  475. NS: string;
  476. begin
  477. NS:=LookUpStr;
  478. Slength:=Length(S);
  479. if (Symbols=nil) or (S='') then NS:='' else
  480. begin
  481. S:=Symbols^.LookUp(S,Idx);
  482. if Idx<>-1 then
  483. begin
  484. NS:=S;
  485. FocusItem(Idx);
  486. end;
  487. end;
  488. LookUpStr:=Copy(NS,1,Slength);
  489. SetState(sfCursorVis,LookUpStr<>'');
  490. DrawView;
  491. end;
  492. procedure TSymbolScopeView.GotoItem(Item: sw_integer);
  493. begin
  494. SelectItem(Item);
  495. end;
  496. procedure TSymbolScopeView.TrackItem(Item: sw_integer);
  497. var S: PSymbol;
  498. begin
  499. if Range=0 then Exit;
  500. S:=List^.At(Focused);
  501. if (S^.References<>nil) and (S^.References^.Count>0) then
  502. TrackReference(S^.References^.At(0));
  503. end;
  504. function TSymbolScopeView.GetText(Item,MaxLen: Sw_Integer): String;
  505. var S: string;
  506. begin
  507. S:=Symbols^.At(Item)^.GetText;
  508. GetText:=copy(S,1,MaxLen);
  509. end;
  510. {****************************************************************************
  511. TSymbolReferenceView
  512. ****************************************************************************}
  513. constructor TSymbolReferenceView.Init(var Bounds: TRect; AReferences: PReferenceCollection;
  514. AHScrollBar, AVScrollBar: PScrollBar);
  515. begin
  516. inherited Init(Bounds,AHScrollBar, AVScrollBar);
  517. References:=AReferences;
  518. NewList(AReferences);
  519. SetRange(References^.Count);
  520. end;
  521. destructor TSymbolReferenceView.Done;
  522. begin
  523. Inherited Done;
  524. end;
  525. procedure TSymbolReferenceView.HandleEvent(var Event: TEvent);
  526. var OldFocus: sw_integer;
  527. begin
  528. OldFocus:=Focused;
  529. inherited HandleEvent(Event);
  530. if OldFocus<>Focused then
  531. Message(Desktop,evBroadcast,cmClearLineHighlights,nil);
  532. end;
  533. function TSymbolReferenceView.GetText(Item,MaxLen: Sw_Integer): String;
  534. var S: string;
  535. P: PReference;
  536. begin
  537. P:=References^.At(Item);
  538. S:=P^.GetFileName+'('+IntToStr(P^.Position.Y)+','+IntToStr(P^.Position.X)+')';
  539. GetText:=copy(S,1,MaxLen);
  540. end;
  541. procedure TSymbolReferenceView.GotoItem(Item: sw_integer);
  542. begin
  543. if Range=0 then Exit;
  544. GotoReference(List^.At(Item));
  545. end;
  546. procedure TSymbolReferenceView.TrackItem(Item: sw_integer);
  547. begin
  548. if Range=0 then Exit;
  549. TrackReference(List^.At(Item));
  550. end;
  551. procedure TSymbolReferenceView.SelectItem(Item: Sw_Integer);
  552. begin
  553. GotoItem(Item);
  554. end;
  555. constructor TSymbolMemInfoView.Init(var Bounds: TRect; AMemInfo: PSymbolMemInfo);
  556. begin
  557. inherited Init(Bounds,'');
  558. Options:=Options or (ofSelectable+ofTopSelect);
  559. MemInfo:=AMemInfo;
  560. end;
  561. destructor TSymbolMemInfoView.Done;
  562. begin
  563. { if assigned(MemInfo) then
  564. dispose(MemInfo);}
  565. Inherited Done;
  566. end;
  567. procedure TSymbolMemInfoView.GetText(var S: String);
  568. function SizeStr(Size: longint): string;
  569. var S: string[40];
  570. begin
  571. S:=IntToStrL(Size,7);
  572. S:=S+' byte';
  573. if Size>1 then S:=S+'s';
  574. SizeStr:=S;
  575. end;
  576. function AddrStr(Addr: longint): string;
  577. { Warning this is endian specific code !! (PM) }
  578. type TLongint = record LoW,HiW: word; end;
  579. begin
  580. with TLongint(Addr) do
  581. AddrStr:='$'+IntToHexL(HiW,4)+IntToHexL(HiW,4);
  582. end;
  583. begin
  584. S:=
  585. #13+
  586. { ' Memory location: '+AddrStr(MemInfo^.Addr)+#13+
  587. ' Local address: '+AddrStr(MemInfo^.LocalAddr)+#13+}
  588. { ??? internal linker ??? }
  589. ' Size in memory: '+SizeStr(MemInfo^.Size)+#13+
  590. ' Size on stack: '+SizeStr(MemInfo^.PushSize)+#13+
  591. ''
  592. ;
  593. end;
  594. function TSymbolMemInfoView.GetPalette: PPalette;
  595. begin
  596. GetPalette:=inherited GetPalette;
  597. end;
  598. {****************************************************************************
  599. TSymbolInheritanceView
  600. ****************************************************************************}
  601. constructor TSymbolInheritanceView.Init(var Bounds: TRect; AHScrollBar, AVScrollBar: PScrollBar; ARoot: PObjectSymbol);
  602. begin
  603. inherited Init(Bounds,AHScrollBar,AVScrollBar);
  604. Options:=Options or (ofSelectable+ofTopSelect);
  605. Root:=ARoot;
  606. ExpandAll(GetRoot); Update;
  607. end;
  608. destructor TSymbolInheritanceView.Done;
  609. begin
  610. { do not dispose,
  611. belongs to a symbolcollection (PM)
  612. if assigned(Root) then
  613. dispose(Root,done); }
  614. Inherited Done;
  615. end;
  616. function TSymbolInheritanceView.GetRoot: Pointer;
  617. begin
  618. GetRoot:=Root;
  619. end;
  620. function TSymbolInheritanceView.HasChildren(Node: Pointer): Boolean;
  621. begin
  622. HasChildren:=GetNumChildren(Node)>0;
  623. end;
  624. function TSymbolInheritanceView.GetChild(Node: Pointer; I: Integer): Pointer;
  625. begin
  626. GetChild:=PObjectSymbol(Node)^.GetDescendant(I);
  627. end;
  628. function TSymbolInheritanceView.GetNumChildren(Node: Pointer): Integer;
  629. begin
  630. GetNumChildren:=PObjectSymbol(Node)^.GetDescendantCount;
  631. end;
  632. function TSymbolInheritanceView.GetText(Node: Pointer): String;
  633. begin
  634. GetText:=PObjectSymbol(Node)^.GetName;
  635. end;
  636. procedure TSymbolInheritanceView.Adjust(Node: Pointer; Expand: Boolean);
  637. begin
  638. PObjectSymbol(Node)^.Expanded:=Expand;
  639. end;
  640. function TSymbolInheritanceView.IsExpanded(Node: Pointer): Boolean;
  641. begin
  642. IsExpanded:=PObjectSymbol(Node)^.Expanded;
  643. end;
  644. function TSymbolInheritanceView.GetPalette: PPalette;
  645. const P: string[length(CBrowserOutline)] = CBrowserOutline;
  646. begin
  647. GetPalette:=@P;
  648. end;
  649. procedure TSymbolInheritanceView.Selected(I: Integer);
  650. var P: pointer;
  651. S: PSymbol;
  652. Anc: PObjectSymbol;
  653. begin
  654. P:=GetNode(I);
  655. if P=nil then Exit;
  656. S:=PObjectSymbol(P)^.Symbol;
  657. { this happens for the top objects view (PM) }
  658. if S=nil then exit;
  659. if S^.Ancestor=nil then Anc:=nil else
  660. Anc:=SearchObjectForSymbol(S^.Ancestor);
  661. OpenSymbolBrowser(Origin.X-1,FOC-Delta.Y+1,
  662. S^.GetName,
  663. S^.GetText,S,
  664. S^.Items,S^.References,Anc,S^.MemInfo);
  665. end;
  666. {****************************************************************************
  667. TBrowserTab
  668. ****************************************************************************}
  669. constructor TBrowserTab.Init(var Bounds: TRect; AItems: PBrowserTabItem);
  670. begin
  671. inherited Init(Bounds);
  672. Options:=Options or ofPreProcess;
  673. Items:=AItems;
  674. SetParams(0,0);
  675. end;
  676. procedure TBrowserTab.SetParams(AFlags: word; ACurrent: Sw_integer);
  677. begin
  678. Flags:=AFlags;
  679. SelectItem(ACurrent);
  680. end;
  681. procedure TBrowserTab.SelectItem(Index: Sw_integer);
  682. var P: PBrowserTabItem;
  683. begin
  684. Current:=Index;
  685. P:=GetItem(Current);
  686. if (P<>nil) and (P^.Link<>nil) then
  687. P^.Link^.Focus;
  688. DrawView;
  689. end;
  690. function TBrowserTab.GetItemCount: sw_integer;
  691. var Count: integer;
  692. P: PBrowserTabItem;
  693. begin
  694. Count:=0; P:=Items;
  695. while (P<>nil) do
  696. begin
  697. Inc(Count);
  698. P:=P^.Next;
  699. end;
  700. GetItemCount:=Count;
  701. end;
  702. function TBrowserTab.GetItem(Index: sw_integer): PBrowserTabItem;
  703. var Counter: integer;
  704. P: PBrowserTabItem;
  705. begin
  706. P:=Items; Counter:=0;
  707. while (P<>nil) and (Counter<Index) do
  708. begin
  709. P:=P^.Next;
  710. Inc(Counter);
  711. end;
  712. GetItem:=P;
  713. end;
  714. procedure TBrowserTab.Draw;
  715. var B: TDrawBuffer;
  716. SelColor, NormColor, C: word;
  717. I,CurX,Count: Sw_integer;
  718. function Names(Idx: integer): char;
  719. begin
  720. Names:=GetItem(Idx)^.Sign;
  721. end;
  722. begin
  723. NormColor:=GetColor(1); SelColor:=GetColor(2);
  724. MoveChar(B,'Ä',SelColor,Size.X);
  725. CurX:=0; Count:=0;
  726. for I:=0 to GetItemCount-1 do
  727. if (Flags and (1 shl I))<>0 then
  728. begin
  729. Inc(Count);
  730. if Current=I then C:=SelColor
  731. else C:=NormColor;
  732. if Count=1 then MoveChar(B[CurX],'´',SelColor,1)
  733. else MoveChar(B[CurX],'³',SelColor,1);
  734. MoveCStr(B[CurX+1],' '+Names(I)+' ',C);
  735. Inc(CurX,4);
  736. end;
  737. if Count>0 then
  738. MoveChar(B[CurX],'Ã',SelColor,1);
  739. WriteLine(0,0,Size.X,Size.Y,B);
  740. end;
  741. procedure TBrowserTab.HandleEvent(var Event: TEvent);
  742. var I,Idx: integer;
  743. DontClear: boolean;
  744. P: TPoint;
  745. function GetItemForCoord(X: integer): integer;
  746. var I,CurX,Idx: integer;
  747. begin
  748. CurX:=0; Idx:=-1;
  749. for I:=0 to GetItemCount-1 do
  750. if (Flags and (1 shl I))<>0 then
  751. begin
  752. if (CurX+1<=X) and (X<=CurX+3) then
  753. begin Idx:=I; Break; end;
  754. Inc(CurX,4);
  755. end;
  756. GetItemForCoord:=Idx;
  757. end;
  758. begin
  759. case Event.What of
  760. evMouseDown :
  761. if MouseInView(Event.Where) then
  762. begin
  763. repeat
  764. MakeLocal(Event.Where,P);
  765. Idx:=GetItemForCoord(P.X);
  766. if Idx<>-1 then
  767. SelectItem(Idx);
  768. until not MouseEvent(Event, evMouseMove);
  769. ClearEvent(Event);
  770. end;
  771. evKeyDown :
  772. begin
  773. DontClear:=false; Idx:=-1;
  774. for I:=0 to GetItemCount-1 do
  775. if GetCtrlCode(GetItem(I)^.Sign)=Event.KeyCode then
  776. begin
  777. Idx:=I;
  778. Break;
  779. end;
  780. if Idx=-1 then
  781. DontClear:=true
  782. else
  783. SelectItem(Idx);
  784. if DontClear=false then ClearEvent(Event);
  785. end;
  786. end;
  787. inherited HandleEvent(Event);
  788. end;
  789. function TBrowserTab.GetPalette: PPalette;
  790. const P: string[length(CBrowserTab)] = CBrowserTab;
  791. begin
  792. GetPalette:=@P;
  793. end;
  794. destructor TBrowserTab.Done;
  795. begin
  796. if Items<>nil then DisposeBrowserTabList(Items);
  797. inherited Done;
  798. end;
  799. constructor TBrowserWindow.Init(var Bounds: TRect; ATitle: TTitleStr; ANumber: Sw_Integer;ASym : PSymbol;
  800. const AName: string; ASymbols: PSymbolCollection; AReferences: PReferenceCollection;
  801. AInheritance: PObjectSymbol; AMemInfo: PSymbolMemINfo);
  802. var R: TRect;
  803. ST: PStaticText;
  804. HSB,VSB: PScrollBar;
  805. function CreateVSB(R: TRect): PScrollBar;
  806. var R2: TRect;
  807. SB: PScrollBar;
  808. begin
  809. Sym:=ASym;
  810. R2.Copy(R); R2.Move(1,0); R2.A.X:=R2.B.X-1;
  811. New(SB, Init(R2)); SB^.GrowMode:=gfGrowLoX+gfGrowHiX+gfGrowHiY;
  812. CreateVSB:=SB;
  813. end;
  814. function CreateHSB(R: TRect): PScrollBar;
  815. var R2: TRect;
  816. SB: PScrollBar;
  817. begin
  818. R2.Copy(R); R2.Move(0,1); R2.A.Y:=R2.B.Y-1;
  819. New(SB, Init(R2)); SB^.GrowMode:=gfGrowLoY+gfGrowHiX+gfGrowHiY;
  820. CreateHSB:=SB;
  821. end;
  822. begin
  823. inherited Init(Bounds, ATitle, ANumber);
  824. HelpCtx:=hcBrowserWindow;
  825. GetExtent(R); R.Grow(-1,-1); R.B.Y:=R.A.Y+1;
  826. New(ST, Init(R, ' '+AName)); ST^.GrowMode:=gfGrowHiX;
  827. Insert(ST);
  828. GetExtent(R); R.Grow(-1,-1); Inc(R.A.Y,2);
  829. if assigned(ASymbols) and (ASymbols^.Count>0) then
  830. begin
  831. HSB:=CreateHSB(R); Insert(HSB);
  832. VSB:=CreateVSB(R); Insert(VSB);
  833. New(ScopeView, Init(R, ASymbols, HSB, VSB));
  834. ScopeView^.GrowMode:=gfGrowHiX+gfGrowHiY;
  835. Insert(ScopeView);
  836. end;
  837. if assigned(AReferences) and (AReferences^.Count>0) then
  838. begin
  839. HSB:=CreateHSB(R); Insert(HSB);
  840. VSB:=CreateVSB(R); Insert(VSB);
  841. New(ReferenceView, Init(R, AReferences, HSB, VSB));
  842. ReferenceView^.GrowMode:=gfGrowHiX+gfGrowHiY;
  843. Insert(ReferenceView);
  844. end;
  845. if assigned(AInheritance) then
  846. begin
  847. New(InheritanceView, Init(R, nil,nil, AInheritance));
  848. InheritanceView^.GrowMode:=gfGrowHiX+gfGrowHiY;
  849. Insert(InheritanceView);
  850. end;
  851. if assigned(AMemInfo) then
  852. begin
  853. New(MemInfoView, Init(R, AMemInfo));
  854. MemInfoView^.GrowMode:=gfGrowHiX+gfGrowHiY;
  855. Insert(MemInfoView);
  856. end;
  857. GetExtent(R); R.Grow(-1,-1); R.Move(0,1); R.B.Y:=R.A.Y+1;
  858. New(PageTab, Init(R,
  859. NewBrowserTabItem('S',ScopeView,
  860. NewBrowserTabItem('R',ReferenceView,
  861. NewBrowserTabItem('I',InheritanceView,
  862. NewBrowserTabItem('M',MemInfoView,
  863. nil))
  864. ))));
  865. PageTab^.GrowMode:=gfGrowHiX;
  866. Insert(PageTab);
  867. if assigned(ScopeView) then
  868. SelectTab(btScope)
  869. else
  870. if assigned(ReferenceView) then
  871. SelectTab(btReferences)
  872. else
  873. if assigned(InheritanceView) then
  874. SelectTab(btInheritance);
  875. end;
  876. procedure TBrowserWindow.HandleEvent(var Event: TEvent);
  877. var DontClear: boolean;
  878. S: PSymbol;
  879. Anc: PObjectSymbol;
  880. P: TPoint;
  881. begin
  882. case Event.What of
  883. evBroadcast :
  884. case Event.Command of
  885. cmSearchWindow :
  886. ClearEvent(Event);
  887. cmListItemSelected :
  888. if Event.InfoPtr=ScopeView then
  889. begin
  890. S:=ScopeView^.Symbols^.At(ScopeView^.Focused);
  891. MakeGlobal(ScopeView^.Origin,P);
  892. Desktop^.MakeLocal(P,P); Inc(P.Y,ScopeView^.Focused-ScopeView^.TopItem);
  893. Inc(P.Y);
  894. if S^.Ancestor=nil then Anc:=nil else
  895. Anc:=SearchObjectForSymbol(S^.Ancestor);
  896. if (S^.GetReferenceCount>0) or (S^.GetItemCount>0) or (Anc<>nil) then
  897. OpenSymbolBrowser(Origin.X-1,P.Y,
  898. S^.GetName,
  899. ScopeView^.GetText(ScopeView^.Focused,255),S,
  900. S^.Items,S^.References,Anc,S^.MemInfo);
  901. end;
  902. end;
  903. { evCommand :
  904. begin
  905. DontClear:=false;
  906. case Event.Command of
  907. cmGotoSymbol :
  908. if Event.InfoPtr=ScopeView then
  909. if ReferenceView<>nil then
  910. if ReferenceView^.Range>0 then
  911. ReferenceView^.GotoItem(0);
  912. cmTrackSymbol :
  913. if Event.InfoPtr=ScopeView then
  914. if (ScopeView<>nil) and (ScopeView^.Range>0) then
  915. begin
  916. S:=ScopeView^.At(ScopeView^.Focused);
  917. if (S^.References<>nil) and (S^.References^.Count>0) then
  918. TrackItem(S^.References^.At(0));
  919. else DontClear:=true;
  920. end;
  921. if DontClear=false then ClearEvent(Event);
  922. end;}
  923. evKeyDown :
  924. begin
  925. DontClear:=false;
  926. case Event.KeyCode of
  927. kbEsc :
  928. Close;
  929. else DontClear:=true;
  930. end;
  931. if DontClear=false then ClearEvent(Event);
  932. end;
  933. end;
  934. inherited HandleEvent(Event);
  935. end;
  936. procedure TBrowserWindow.SetState(AState: Word; Enable: Boolean);
  937. var OldState: word;
  938. begin
  939. OldState:=State;
  940. inherited SetState(AState,Enable);
  941. if ((State xor OldState) and sfActive)<>0 then
  942. if GetState(sfActive)=false then
  943. Message(Desktop,evBroadcast,cmClearLineHighlights,nil);
  944. end;
  945. procedure TBrowserWindow.Close;
  946. begin
  947. Message(Desktop,evBroadcast,cmClearLineHighlights,nil);
  948. inherited Close;
  949. end;
  950. procedure TBrowserWindow.SelectTab(BrowserTab: Sw_integer);
  951. var Tabs: Sw_integer;
  952. { PB : PBreakpoint;
  953. PS :PString;
  954. l : longint; }
  955. begin
  956. (* case BrowserTab of
  957. btScope :
  958. if assigned(ScopeView) then
  959. ScopeView^.Select;
  960. btReferences :
  961. if assigned(ReferenceView) then
  962. ReferenceView^.Select;
  963. btBreakWatch :
  964. begin
  965. if Assigned(Sym) then
  966. begin
  967. if Pos('proc',Sym^.GetText)>0 then
  968. { insert function breakpoint }
  969. begin
  970. { make it visible }
  971. PS:=Sym^.Name;
  972. l:=Length(PS^);
  973. If PS^[l]='*' then
  974. begin
  975. PB:=BreakpointsCollection^.GetType(bt_function,copy(GetStr(PS),1,l-1));
  976. If Assigned(PB) then
  977. BreakpointsCollection^.Delete(PB);
  978. Sym^.Name:=NewStr(copy(GetStr(PS),1,l-1));
  979. DrawView;
  980. DisposeStr(PS);
  981. end
  982. else
  983. begin
  984. Sym^.Name:=NewStr(GetStr(PS)+'*');
  985. DrawView;
  986. New(PB,init_function(GetStr(PS)));
  987. DisposeStr(PS);
  988. BreakpointsCollection^.Insert(PB);
  989. BreakpointsCollection^.Update;
  990. end;
  991. end
  992. else if pos('var',Sym^.GetText)>0 then
  993. { insert watch point }
  994. begin
  995. { make it visible }
  996. PS:=Sym^.Name;
  997. l:=Length(PS^);
  998. If PS^[l]='*' then
  999. begin
  1000. PB:=BreakpointsCollection^.GetType(bt_awatch,copy(PS^,1,l-1));
  1001. If Assigned(PB) then
  1002. BreakpointsCollection^.Delete(PB);
  1003. Sym^.Name:=NewStr(copy(PS^,1,l-1));
  1004. DrawView;
  1005. DisposeStr(PS);
  1006. end
  1007. else
  1008. begin
  1009. Sym^.Name:=NewStr(GetStr(PS)+'*');
  1010. DrawView;
  1011. New(PB,init_type(bt_awatch,GetStr(PS)));
  1012. DisposeStr(PS);
  1013. BreakpointsCollection^.Insert(PB);
  1014. BreakpointsCollection^.Update;
  1015. end;
  1016. end;
  1017. end;
  1018. end;
  1019. end;*)
  1020. Tabs:=0;
  1021. if assigned(ScopeView) then
  1022. Tabs:=Tabs or (1 shl btScope);
  1023. if assigned(ReferenceView) then
  1024. Tabs:=Tabs or (1 shl btReferences);
  1025. if assigned(InheritanceView) then
  1026. Tabs:=Tabs or (1 shl btInheritance);
  1027. if assigned(MemInfoView) then
  1028. Tabs:=Tabs or (1 shl btMemInfo);
  1029. if Assigned(Sym) then
  1030. if (Pos('proc',Sym^.GetText)>0) or (Pos('var',Sym^.GetText)>0) then
  1031. Tabs:=Tabs or (1 shl btBreakWatch);
  1032. if PageTab<>nil then PageTab^.SetParams(Tabs,BrowserTab);
  1033. end;
  1034. function TBrowserWindow.GetPalette: PPalette;
  1035. const S: string[length(CBrowserWindow)] = CBrowserWindow;
  1036. begin
  1037. GetPalette:=@S;
  1038. end;
  1039. procedure OpenSymbolBrowser(X,Y: Sw_integer;const Name,Line: string;S : PSymbol;
  1040. Symbols: PSymbolCollection; References: PReferenceCollection;
  1041. Inheritance: PObjectSymbol; MemInfo: PSymbolMemInfo);
  1042. var R: TRect;
  1043. begin
  1044. if X=0 then X:=Desktop^.Size.X-35;
  1045. R.A.X:=X; R.A.Y:=Y;
  1046. R.B.X:=R.A.X+35; R.B.Y:=R.A.Y+15;
  1047. while (R.B.Y>Desktop^.Size.Y) do R.Move(0,-1);
  1048. Desktop^.Insert(New(PBrowserWindow, Init(R,
  1049. 'Browse: '+Name,SearchFreeWindowNo,S,Line,Symbols,References,Inheritance,MemInfo)));
  1050. end;
  1051. END.
  1052. {
  1053. $Log$
  1054. Revision 1.20 1999-11-10 00:42:42 pierre
  1055. * LookUp function now returns the complete name in browcol
  1056. and fpsymbol only yakes a part of LoopUpStr
  1057. Revision 1.19 1999/09/16 14:34:59 pierre
  1058. + TBreakpoint and TWatch registering
  1059. + WatchesCollection and BreakpointsCollection stored in desk file
  1060. * Syntax highlighting was broken
  1061. Revision 1.18 1999/07/28 23:11:22 peter
  1062. * fixes from gabor
  1063. Revision 1.17 1999/06/28 12:35:05 pierre
  1064. + CloseAllBrowsers needed before compilation to avoid problems
  1065. + ModulesCollection and GlobalsCollection to avoid memory leaks
  1066. Revision 1.16 1999/06/17 23:44:01 pierre
  1067. * problem with Inheritance list
  1068. Revision 1.15 1999/04/15 08:58:06 peter
  1069. * syntax highlight fixes
  1070. * browser updates
  1071. Revision 1.14 1999/04/07 21:55:53 peter
  1072. + object support for browser
  1073. * html help fixes
  1074. * more desktop saving things
  1075. * NODEBUG directive to exclude debugger
  1076. Revision 1.13 1999/03/16 00:44:44 peter
  1077. * forgotten in last commit :(
  1078. Revision 1.12 1999/03/01 15:42:02 peter
  1079. + Added dummy entries for functions not yet implemented
  1080. * MenuBar didn't update itself automatically on command-set changes
  1081. * Fixed Debugging/Profiling options dialog
  1082. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is
  1083. set
  1084. * efBackSpaceUnindents works correctly
  1085. + 'Messages' window implemented
  1086. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  1087. + Added TP message-filter support (for ex. you can call GREP thru
  1088. GREP2MSG and view the result in the messages window - just like in TP)
  1089. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  1090. so topic search didn't work...
  1091. * In FPHELP.PAS there were still context-variables defined as word instead
  1092. of THelpCtx
  1093. * StdStatusKeys() was missing from the statusdef for help windows
  1094. + Topic-title for index-table can be specified when adding a HTML-files
  1095. Revision 1.11 1999/02/22 11:51:38 peter
  1096. * browser updates from gabor
  1097. Revision 1.9 1999/02/18 13:44:34 peter
  1098. * search fixed
  1099. + backward search
  1100. * help fixes
  1101. * browser updates
  1102. Revision 1.7 1999/02/16 12:44:20 pierre
  1103. * DoubleClick works now
  1104. Revision 1.6 1999/02/10 09:44:59 pierre
  1105. + added B tab for functions and vars for break/watch
  1106. TBrowserWindow also stores the symbol itself for break/watchpoints
  1107. Revision 1.5 1999/02/04 17:53:47 pierre
  1108. + OpenOneSymbolBrowser
  1109. Revision 1.4 1999/02/04 13:16:14 pierre
  1110. + column info added
  1111. Revision 1.3 1999/01/21 11:54:23 peter
  1112. + tools menu
  1113. + speedsearch in symbolbrowser
  1114. * working run command
  1115. Revision 1.2 1999/01/14 21:42:24 peter
  1116. * source tracking from Gabor
  1117. Revision 1.1 1999/01/12 14:29:40 peter
  1118. + Implemented still missing 'switch' entries in Options menu
  1119. + Pressing Ctrl-B sets ASCII mode in editor, after which keypresses (even
  1120. ones with ASCII < 32 ; entered with Alt+<###>) are interpreted always as
  1121. ASCII chars and inserted directly in the text.
  1122. + Added symbol browser
  1123. * splitted fp.pas to fpide.pas
  1124. Revision 1.0 1999/01/09 11:49:41 gabor
  1125. Original implementation
  1126. }