Funky Beast/Tomas/Mattias, I'm very pleased with the discussion on this topic so far. What I would like to add is the following;
- I would like to join in merging the tool that Tomas has made and LazDoc. I think both tools complement each other - I like what Funky Beast is proposing, making a class that parses the FPDoc files. Fortunately LazDoc has a lot of code in already that does the same. Please feel free to take out whatever you need. LazDoc can be changed then to use the new class. Btw there's also code in that extracts all the items in the code. Darius On Tue, 2006-01-17 at 10:33, Tomas Gregorovic wrote: > Funky Beast napsal(a): > > Mattias Gaertner wrote: > > > >> On 16 Jan 2006 21:36:09 +0100 > >> Darius Blaszijk <[EMAIL PROTECTED]> wrote: > >> > >> > >>> On Mon, 2006-01-16 at 19:59, Mattias Gaertner wrote: > >>> > >>>> What we need: > >>>> 1. a hint window to right of the completion box. > >>>> 2. the search for the fpdoc/xml path > >>>> 3. the parsing of the fpdoc xml item and showing as formatted text > >>>> > >>>> If someone implements 1 and 3, I will do 2. > >>> > >>> > >>> The fpdoc/xml path is already known, you set it for LazDoc already, so > >>> perhaps you can use that. > >> > >> > >> > >> I meant the full path. Example > >> > >> docs/xml/lcl/controls.xml#TCustomControl.Paint > >> > >> > >> Mattias > >> > > > > I'll start with 3, 1 & 2 would be meaningless without 3. > > I'll create a class to store the properties of the found element. > > Below is a prototype, do add in if i missed something. > > > > //***************************************************************************** > > > > > > TCompletionItemDesc = class > > sPackage: string; > > sModule: string; > > sShort: string; > > sDescription: string; > > sSeeAlso: string; > > end; > > > > TCompletionItemInfo = class(TComponent) > > private > > //Stores info of currently selected > > FCurrentElement: TCompletionItemDesc; > > //XML FileName (absolute path). > > //If filename different, load slLazDocXML again. > > //If file not found, clear slLazDocXML. > > FXMLFileName: string; > > > > procedure SetXMLFileName(sFileName: string); > > protected > > //Stores Doc XML > > slLazDocXML: TStrings; > > public > > constructor Create(AOwner: TComponent): override; > > destructor Destroy; override; > > > > //Locates and store info into CurrentElement returns true if found > > function Fill_CurrentElement(sElementName: string): Boolean; > > > > //Locate and fill CurrentElement by specifying a path > > //e.g. /usr/local/lazarus/docs/xml/lcl/controls.xml#TCustomControl.Paint > > //Function will parse sPath, > > //load XML file if necessary, file not found -- Exit, > > //locate Element specified at end of path, > > //finally fill up CurrentElement by parsing up to next '</element>' tag. > > //Returns true if successful, clear CurrentElement members if false. > > function Get_Element_from_Path(sPath: string): Boolean; > > > > property CurrentElement: TCompletionItemDesc read FCurrentElement > > write FCurrentElement; > > property XMLFileName: string read FXMLFileName write SetXMLFileName; > > end; > > //***************************************************************************** > > > > > > > > So basically the usage is to invoke function Get_Element_from_Path, > > if it succeeds, get the values from members of CurrentElement property. > > > > If above prototype is correct, i'll start working on the body. > > > > Should the above be placed in the SourceEditProcs.pas? > > > > Any content populated 'controls.xml' files i can test with? > > > > Initially i was planning to have a quick hint of the whole view of the item > > when the mouse moves over an item in the completion box. This can be > > achieved > > by a MouseMove method which calculates the Y value to know which item > > the mouse is pointing at. Then extracting the hint from a 'hint list' which > > is maintained by modifying PaintCompletionItem method to return the > > formated > > string to the hint list base on the index value. So the 'hint list' only > > needs > > to maintain a few number of strings=NBLinesInWindow (i.e. the displayed > > items). > > > > Funky Beast > > > > > > _________________________________________________________________ > > To unsubscribe: mail [EMAIL PROTECTED] with > > "unsubscribe" as the Subject > > archives at http://www.lazarus.freepascal.org/mailarchives > > > > > > Hi, > that idea sounds great. I can help you a bit with the second part of 3rd > statement. I have been developing a viewer for HTML help files that can > also parse and view FPDoc tags (remark, code, link...). The screenshot > is attached. > > Although it is still under construction, I think it evens the IPro HTML > viewer and for this purposes is more suitable. > > So, if you are interested, I can send you the code. > > tombo _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
