[Gambas-user] [Gambas Bug Tracker] Bug #753: Rich text editor

Fabien Bodard gambas.fr at ...626...
Tue Sep 22 18:22:06 CEST 2015


2015-09-22 18:08 GMT+02:00 Benoît Minisini <gambas at ...1...>:
> Le 22/09/2015 18:03, Benoît Minisini a écrit :
>> Le 22/09/2015 17:49, Moviga Technologies a écrit :
>>>> yes :-)... and maybe with a better synthax. But for that i think you
>>>> will wait or do it yourself.
>>>
>>> (Since you reply by mail, and not in the bugtracker, I reply you also by
>>> mail)
>>>
>>> I am afraid my competence is not enough to undertake such a task. I have
>>> been trying to look at the gb.form.editor code, and it is a bit hard to
>>> get a hold on, and there are very few comments explaining what is going
>>> on.
>>>
>>
>> It won't help you a lot. TextEditor is really made and optimized for
>> displaying and editing text using a monospace font. Automatic
>> line-breaking was added recently, and is a sort of hack.
>>
>> Making a rich-text editor is a bit like programming something like
>> LibreOffice Writer, with less features.
>>
>> You must have paragraphs, using any font, size, colours, style...
>> applied to any group of characters in the paragraph.
>>
>> Then you need a layouting routine that handle where and how to display
>> paragraph.
>>
>> Then you need to display a cursor, the selected text.
>>
>> You need to be able to transform any mouse position in the editor window
>> into a position in the text.
>>
>> You have to implement an undo/redo system.
>>
>> Only the rest is similar to what exists in TextEditor: keyboard
>> handling, shortcuts, saving and loading. It's the simpler.
>>
>> Maybe if I have time I will make a library that implement the paragraph
>> stuff on top of a vectorial canvas (i.e. a sort of DrawingArea that
>> contains vectorial objects).
>>
>> It's interesting to have a "canvas" layer between the paragraphs and the
>> final ScrollArea. Because after you can "easily" add other objects, like
>> images, tables, vectorial drawings... until you have a real text processor.
>>
>> Interesting project if you have at least six months.
>>
5 years for me
>
> And there is (of course) many technical problems like : displaying fonts
> correctly in all situations when format changes. LibreOffice is now able
> to do that yet.
>
> For example, Gambas paint methods need more feature to be able to
> displaying text using no hinting whatever how the font system is configured.
>
> And you need handle right-to-left languages too!
>
> And you need to handle paragraphs having left-to-right and right-to-left
> languages mixed!
>
> ...etc.
Well i will concentrate my effort on my term :-) for now.

... and grappe cutting because it's time... 3 weeks of hard work at least.
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Term.png
Type: image/png
Size: 123448 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150922/d5581176/attachment.png>


More information about the User mailing list