>
> Congratulations on scraping the paint on the most complex and convoluted 
> widget in FLTK (besides HelpView, maybe) ;-)

Quite complex indeed...

>
> TextDisplay and TextEdit are based on an old version of NEdit with permission 
> of the authors. Originally it was a source code editor wfor ASCII characters 
> and monospaced fonts. Proportional font support was added later and has 
> generated a lot of special cases and places where we need to measure and 
> count instead of just ,ultiplying the number of bytes by a character width to 
> get pixel positions.

I was using NEdit original code, and port some of it to FLTK.
So I have seen that Fl_Text_Editor was a port of testDisp/textBuf from 
NEdit.


> A couple of years ago, I made it worse by adding UTF8 support to this widget, 
> generating a lot of byte counting on top of pixel counting. You are welcome 
> ;-)

A great job.

>
> What I want to say is, that a lot of interfaces or non obvious, and a lot of 
> methods may take more time than it is obvious. However, I think that there is 
> a pretty complete set of methods for this class. You are probably looking for 
> this function:

Yes, I have found these, too:
int     position_to_line (int pos, int *lineNum) const
int     position_to_linecol (int pos, int *lineNum, int *column) const

but they are protected and not public...(I am using fltk 1.3.0 only at 
this time)


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to