jkrumbiegel / MakieLayout.jl

Layouting for Makie.jl
https://jkrumbiegel.github.io/MakieLayout.jl/stable/
MIT License
50 stars 9 forks source link

Textbox observable widget? #52

Open Datseris opened 4 years ago

Datseris commented 4 years ago

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?

asinghvi17 commented 4 years ago

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.

Datseris commented 4 years ago

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:

jkrumbiegel commented 4 years ago

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

SimonDanisch commented 4 years ago

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 ;)

SimonDanisch commented 4 years ago

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 ;)

grero commented 4 years ago

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.

jkrumbiegel commented 4 years ago

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