imguin icon indicating copy to clipboard operation
imguin copied to clipboard

[Suggestion] Code editor

Open system64MC opened this issue 1 year ago • 10 comments

Hi! I just found this : https://github.com/BalazsJako/ImGuiColorTextEdit Do you think this is a good idea to implement this into Imguin?

Thanks for your answer! Also big thanks for your library! Here is what I'm developing with it :

Image

system64MC avatar Mar 13 '25 09:03 system64MC

Hi, probably updated and implemented for C language version is here
https://github.com/cimgui/cimCTE
I will try implement it for Nim language.

Your application is very cool!

dinau avatar Mar 13 '25 13:03 dinau

That implementation has been done in my local repository.
I'll upload it later.

Image

dinau avatar Mar 14 '25 11:03 dinau

Push has been done.

Update imguin and imguin_examples repository then please try this
https://github.com/dinau/imguin_examples/tree/main/glfw_opengl3_imColorTextEdit

dinau avatar Mar 14 '25 14:03 dinau

Push has been done.

Update imguin and imguin_examples repository then please try this https://github.com/dinau/imguin_examples/tree/main/glfw_opengl3_imColorTextEdit

Image Tried both the demo and in my software, works pretty nice! Thanks a lot! However, is it possible to know when the text is modified? I need to execute some code when I modify the text. Thanks for your answer!

system64MC avatar Mar 14 '25 15:03 system64MC

It seems the function that checks modification for text doesn't exist,
so you should check it by your program with Hash function so on.

dinau avatar Mar 15 '25 07:03 dinau

It seems the function that checks modification for text doesn't exist,
so you should check it by your program with Hash function so on.

I think I found a much more lightweight solution. I can query the Undo Index. What I do is I query this index before I render the editor, and then I query it again after rendering If the indexes are different, that means some editing was done and thus, the text was changed.

system64MC avatar Mar 15 '25 10:03 system64MC

That's the good idea!

dinau avatar Mar 16 '25 05:03 dinau

Hi! I found a problem.

Seems the ALT GR key (or CTRL + ALT) does't work in the editor. I have an AZERTY keyboard and thus, I can't have the square brackets.

system64MC avatar Mar 17 '25 14:03 system64MC

Hi! So I have more infos about this issue : This bug happens on Linux, but everything works just fine on Windows.

system64MC avatar Mar 30 '25 18:03 system64MC

Could you show the minimal and reproducible sample source ?

dinau avatar Apr 05 '25 04:04 dinau