Text Surrounding
Thiago Milczarek Sayão
thiago.sayao at gmail.com
Fri Jun 9 10:53:45 UTC 2023
Hi Andy,
I understand you're working on a Rich Text control.
While working on IME (Input Method Editor) for Linux, I noticed that there
is a feature called "surrounding"
that it supports to give the IME information about the text being inputted.
More info here:
https://docs.gtk.org/gtk3/class.IMContext.html
It works like this:
When user is typing using an IME language, the underlying IME (for example
https://github.com/tlwg/ibus-libthai)
may ask the Toolkit for the surrounding text and it should reply with:
https://docs.gtk.org/gtk3/method.IMContext.set_surrounding.html
That contains:
- The text
- The length
- The cursor position within the text
So this way the underlying IME can provide accurate suggestions using the
user context.
That would be a nice feature to have but it requires some work to retrieve
it from the text-based control.
Just letting you know about this, it may be out of the scope of your rich
text work for now.
-- Thiago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230609/b037bf29/attachment-0001.htm>
More information about the openjfx-dev
mailing list