Open PavelTurk opened 2 years ago
PRs are welcome for new features :-)
@Jugen I suggested to use RichTextFX for terminalFX - https://github.com/javaterminal/TerminalFX/issues/58 It seems to me, that this issue (caret support absence) can be the only problem.
I had a quick look at terminalFX and I don't think it'll be able to use RichTextFX because it just uses JavaFX as a view wrapper for the Javascript hterm library.
@Jugen Yes, you are right. I didn't expect that they use JavaScript. It seems that JS becomes more popular in Java project (for example https://github.com/nidi3/graphviz-java) but it is not what I like. Have you ever come across a JavaFX terminal with RichTextFX? It is what I need, and I don't want to do :)
Sorry, haven't seen a JavaFX terminal :-(
@Jugen This is a link to a pure JavaFX terminal. But it wasn't made with RichTextFX as it was found out it was impossible. The main component is .. Canvas
But this issue is still actual because setting caret shape, color etc can be used in many other situations.
For anyone interested RichTextFX currently gets its caret shape from the JavaFX TextFlow control via the caretShape
method:
This is invoked for each caret in ParagraphText updateSingleCaret
, where the RichTextFX CaretNode
is an extension of Path:
This the place where the caret's visible shape could be altered depending on any caret features added to CaretNode.
Note that doing this may have side affects to how RichTextFX behaves as the main caret's bounds are used in other places.
RichTextFX is also used for building terminal emulator applications. At the same time, currently it is not possible to style caret to look like in terminals. This problem was also discussed in https://github.com/FXMisc/RichTextFX/issues/397 , but later the issue was closed without resolving.
I suggest to support the following caret features: