-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML - like layout language? #65
Comments
So a kind of xaml for mGui? |
yeah, that's the basic idea. Or more like QT uic files. I'm not sure how I feel about it though, it's good separation of concerns but the handshake between code and content gets messy. There's an old thread on TAO about this; Rob G is very anti 'gui as data' . I'm not sure how I feel. |
How would you like to handle event and callback binding? Would that happen inside the python code proper, after the ui is being serialized into python class? (I.e, like what we are doing now with pyside/pyqt)? |
in the menuloader, I use fully qualifies names (see https://github.com/theodox/mGui/blob/master/mGui/menu_loader.py) to bind functions to events. That seems to work pretty well, although I'm sure you'd get some edge cases if there were a lot of dynamic loading going on |
another possible GUI language reference: https://kivy.org/docs/api-kivy.lang.html |
This looks like a promising YAML alternative https://code.google.com/archive/p/rson/ Rson is a syntax transform of Json, so it's just a formatting thing which I like |
I like the simple syntax, but we do lose a few features from yaml.
Of course the downside is it being a large-ish dependency, but its been pretty stable the last few years (one bugfix release?) and is thankfully pure python. |
Looking at That would sidestep both syntax wars and dependency management. It would probably also support xml as an alternative format for free. Thoughts? |
A definite possibility. Required fairly minimal changes from the yaml version. |
I think this might be the way to go, and then we can apply the same change to the menu loader and sorta-kinda get the gui layout language for free. |
What do people think about a Yaml-like declarative layout format for saving GUI as data? Is that a step forward or back?
mGui.MenuLoader
is great for menus, since there's a lot of boilerplate in making menus. Is it worth extending as whole layouts?The text was updated successfully, but these errors were encountered: