cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.31k stars 71 forks source link

Add GoString code generation for widgets #167

Open rcoreilly opened 5 years ago

rcoreilly commented 5 years ago

probably the most useful output format for the widgets is code generation, rather than the json state -- should be able to do this at any level via context menu in GoGiEditor -- then you can just quickly mock something up and get the code to recreate that, and add your methods etc from there.

rcoreilly commented 6 months ago

This would be part of a broader interactive GUI designer project -- not planned for V2 at this point.

kkoreilly commented 2 weeks ago

GoString is the standard method for this, and we could probably implement a basic version of this relatively easily just based on the already existing json:"-" struct tags. However, there would definitely be issues with closures and tree nesting. Regardless, this is not a high priority as stated above, and will probably be developed as part of some interactive GUI editor app at some point later on.