Rich Text Support

Robert Lichtenberger r.lichtenberger at gmail.com
Tue Oct 9 05:28:59 UTC 2018


Am 08.10.2018 um 19:54 schrieb Tom Schindl:
> Hi,
>
> as someone who has written a Code-Editor-Control (I don't talk about
> RichText) I can say that what Robert says is wrong and other examples
> like all Web-Based code editors (Monaco, Orion) show us it is perfectly
> possible implement well performing Code editor using a Scene-Graph.
>
> The trick is as always you need to be virtual (ideally in both
> directions but as a minimum vertically). 
That is the "trick". However the fact that you need such a trick goes to
show that it is _harder_ to implement text editors with a scene graph.
You have to know that it is impossible to have your whole text in the
scene. Whereas the framework as such suggests you should do so.

But I admit it is not impossible.

> For code-editors an
> optimization you can use is that often you have monospaced fonts so you
> can very easily interpolate stuff.
Personally I always (yes, even in the IDE) prefer proportional fonts, as
they use less screen space and are easier to read.
But yes, it gets a whole lot easier when you don't have to calculate
variable line heights.

>
> As I said above ListView like support at minimum but ideally you are
> virtual in both directions - something our rebuild code-editor control
> is going to support.
Having virtualization in both directions will certainly help if you open
that file with X MB all in one line, something that most editors / list
views choke upon.

Thanks for the input (especially about the virtualization part), I'll
try to study this in more detail, maybe I'll be able to resurrect my old
editor code with that.

Robert



More information about the openjfx-discuss mailing list