Re: Editor component



Marco van de Voort wrote:

The final controls most probably will be distributed under the MPL,


Dual license MPL-LGPL and you save a lot of people (lazarus inclusive) a lot
of trouble.

No problem, so far. I've implemented the base classes almost from scratch, so that I think that I'm not bound to any license myself, on that part.


Btw, I saw your Unicode wish, are you planning to avoid widestring? This
due to the relative slowliness under Delphi (as opposed to e.g. Kylix, where
it is ref counted, but not COM).

The display string type is subject to conditional compilation. I already had a discussion about the implementation of Unicode, and FreePascal seems to vote for UTF-8. I for my part want to use WideStrings and TextOutW, because they allow for a simplified handling of tab expansion and character substition in the visualization of whitespace and control characters. Speed should not matter in the GUI, and the storage of the text is not affected, as long as the text for a line can be retrieved in the display string type.

I hear people so often ask for more "Unicode" support in Delphi, and since an editor of course is affected by such support, I'd like to hear what they really miss?

With regards to an source code editor, the compiler and his acceptable file formats comes into play. Most compilers will accept Unicode only inside string literals, and possibly in comments. Newer Delphi versions can process UTF-8 source files, but other compilers are more restrictive, and will require an ASCII replacement for non-ASCII characters. Because I'm not familiar with international issues, like IMO and right-to-left entry of text, my basic controls leave all that to derived classes.

A pure RTL display, with a reversed horizontal display and scroll bar orientation, is not intended, but it may be added by accordingly skilled people. I've tried to separate all tasks, related to scrolling and caret movement, so that it should be possible to extend the related methods safely.

DoDi
.