MakieLayout.jl
MakieLayout.jl copied to clipboard
Textbox observable widget?
Hi there, the current interactive widges you guys have are amazing. I am preparing a totally mindblowing interactive application.
In parallel, I also want to port InteractiveChaos here and drop Blink dependencies and usage.
There is only one thing necessary for me to be able to do that: a textbox widget where the observable is the text the user writes, or that the text is updated as an observable via mechanisms during the animation.
Do you think it is possible to implement this here?
It's certainly possible, but hard. We'd need to think about the UI before really implementing it.
Could you give a summary of features you need? It is certainly possible to write a text handler from the keyboard primitives, but it would need to be pretty heavily optimized.
I use the textbox
of Interact.jl so far, and its features are the features I need. I need a textbox whose text is an observable and the following can occur:
- Running my application and updating the observable also updates the visible text
- Deleting the visible text and writing a new text updates the observable and I can use the updated text in the simulation.
With the pending text changes, at least multiline text will actually work. Then the first part will already be covered by LText, the second part will require coding the "interactive" part
I've implemented this multiple times, and it always got lost in the numerous text refactors :D It's not too hard, but a bit finicky here and there ;)
It mainly relies on having a stable mouseposition -> index in character array... Which maybe a lot easier to implement with our new text + boundingbox etc api ;)
Just wanted to ask whether there has been any progress on this? I'm also looking to develop a Interact-type GUI within the Makie framework and having a way to input text is important for such an application.
I didn't continue working on the textbox, but it was relatively usable at the end. I think I stopped after a while because some features one expects textboxes to have are very finicky, plus they would be a bit easier to implement with some changes to the text pipeline that haven't yet been merged. You could look at the textbox branch, copy that code and play with it a bit to see if it's useful to you in its current state