From: <mi...@el...> - 2004-03-08 19:40:07
|
> figured I'd do it in a simple format of if the current line is more > indented > than the previous line then it should be foldable. Then the foldblock > function would go from the indention of the previous line till it = finds > the > next line with the same indention level. =20 I don't like that approach. I think we should fold a) either by = selection or/and b) by keywords (begin / end etc). BTW, you should contact Dean, because he wanted to work on folding too = and perhaps sync with him. Michael > -----Original Message----- > From: syn...@li... [mailto:synedit-devel- > ad...@li...] On Behalf Of Ackbar > Sent: Monday, March 08, 2004 6:24 PM > To: syn...@li... > Subject: [Synedit-devel] Folding Code Blocks... >=20 > Hi all. I've been kinda working on folding blocks for about an hour = now. > I > figured I'd do it in a simple format of if the current line is more > indented > than the previous line then it should be foldable. Then the foldblock > function would go from the indention of the previous line till it = finds > the > next line with the same indention level. I've included the = synedit.pas > and > res file which has the code that paints a glyph to the gutter. Please > note > it won't work properly if wordwrap is on, so it should probably be > disabled > if wordwrap is on. Now where I run into trouble is a bit of a lack of > understanding of synedit. So I have two questions. First off is = there a > line type anywhere or is it just utilizing the standard stringlist = lines. > If there is a type it would be easy to add a visible or folded boolean = to > that type which could easily be set to true or false and affect if the > line > is painted or not. And secondly where exactly are the line's painted. = I > checked paintline in synedit.pas but couldn't find any actual output = to > explain how I'd go about preventing a folded line from painting. = Thanks > for > any suggestions and or help. If you download the pas file and res = file > tell > me what you think. >=20 > _________________________________________________________________ > FREE pop-up blocking with the new MSN Toolbar =96 get it now! > http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/ |