editor part

John Birch jbb at kdevelop.org
Mon Sep 11 14:43:07 UTC 2000


Hi,

Well, I not so sure it's that fatal afterall.

The font size is needed (Simon, told you I'd forgotten stuff :-) And the icon 
class needs to be re-written. But that's okay. Needs to hold textline, 
wrapped line and folded line. Folded line contains a list of textlines. 
Wrapped and text lines contain a list of anotations. (Well I can fiddle with 
this idea some more - something might fall out. Other interface stuff needed 
will be fold() and unfold(), unwrap(), setTextline(). hmmm some more there I 
sure. Any other Major Flaws you can see?

An alternative could be to implement a setAnnotation(type, textLineNumber) 
and removeAnnotation(type, textLineNumber) and let the editor sort it out. 
BP's could be a different coloured line rather than a pixmap on a border 
depending on the editor implementation. It would be easier for us to 
implement and general enough for the editor people not to balk at doing it. 
I'm leaning toward this implementation at the moment.

Any votes? Thoughts? Especially you, Christian (me old mate who has an 
interest in supporting the editor stuff :-)

jbb


On Mon, 11 Sep 2000, you wrote:
> On Sun, 10 Sep 2000, you wrote:
> > I've taken a short look at the editor part and was quite surprised that
> > it loads a nested KTextEditor. A potential problem I see here is that
> > the editor part needs to have a deep knowledge about the editor itself
> > (for the breakpoint/bookmark bar). First, it certainly needs the font
> > size - not a problem I guess. But then it also assumes that the line
> > number is linear in the y coordinate. This is not the case for
> > folding editors. It isn't even the case for editors who wrap around
> > lines longer than the window, e.g. emacs.
>
> Yes - hmmm
>
> > An alternative may be to implement the breakpoint bar directly in the
> > editor. As kvim seems to be the only kwrite replacement in sight
> > (from hearsay), the interesting question is whether it already
> > supports something like this?
>
> Don't forget kfte. And this is the problem - We could restrict the editor
> to only a select few, and add the code for the icon border to those. But
> that really doesn't seem right to me. Why should an editor have the baggage
> of the icon boarder and breakpoint code.
>
> You're right though - there's some serious sh*t here. Don't tell me I'm
> going to have to think...
>
> jbb




More information about the KDevelop-devel mailing list