Closed 0-issue closed 8 months ago
@amanvm you can always use style api from imgui (it is called PushStyle/PopStyle)
The reason why I use nested structures instead begin/end is I don't need to remember every pair and avoid crash if I forget a proper end somewhere.
Sure there is a tradeoff, though creating a check for orphaned begin/end is simple in Vim using vim script or even by binding an external sed/awk
command. Power users can create something like that for their work, and newbies code will anyway be short to not have many such errors. If you provide an additional API of the mentioned style, perhaps I can provide a awk command for you to post in the README.md to do such checks.
That's not only pair check, also involve some tricky and inconsistent, for example, some end
should called when begin
return's true, some end
need to be called no matter what, in my past experience, this part drives me crazy.
I think we can close it for now. If you nneed imgui-styled api just use it ;-) (you can use cimgui-go api in your giu app)
Related problem
Deeply nested structures/indents is an anti-pattern in Go:
Your request
Support Being, End style api like of imguiplot:
src: https://github.com/epezent/implot#usage
Alternative solution
No response
Additional context
No response