Closed yinntian closed 1 month ago
Thank you for such a great improvement.
It's a big PR. I have spent some time to go through the commits. Most of them are straight forward and I'd like to merge them firstly.
The most part I cannot understand for now is commit feat(ui): expose the 'widget_create_methods' API to the global enviro…
, that I would like to discuss it with you further.
Would you like to separate this PR to several small ones.
For example,
feat(sim): adding the lfs module to the simulator
, These commits I think are ready to go.
It's just a wrapper around the 'widget_create_methods' array, I just didn't want to go deep enough to break the original code in the first place.
This caused me to separate the incoming tables, one for the decorator and one for luavgl_obj_create, which is actually quite cumbersome, and the correct way to do it would be to modify the luavgl_obj_create function.
But I don't have any extra time to deal with these submissions yet
Thanks for the fix, I changed too much code and the quality is worrying.
I was wondering if you want to split the luavgl.c
file, all built in via #include "xx.c"
, I think it's more difficult for coding and maintenance.
I think there should be two options
#include
for other luavgl parts, make a header-only library.Thanks for the fix, I changed too much code and the quality is worrying.
This single PR is too large to be safely merged. If you are busy, I can help to prepare several PRs.
I was wondering if you want to split the luavgl.c file, all built in via #include "xx.c", I think it's more difficult for coding and maintenance.
I know that looks different. That's the style luv
uses and thus followed when I learn lua tricks.
I can provide the corresponding xmake build script. If you need cmake and makefile, xmake can generate them directly.
Let's do it!
Exposing the Widgets creation API directly to the global environment creates the UI in the following form.
By encapsulating the creation function of each component of widgets, it intercepts the created property sheet, separates out the fields that belong to the decoration, and then provides the original property sheet to the constructor of the component. After the object has been created, it is loaded with the functions of the decorated fields.
Only some of the popular widgets have been ported, and all of them come with sample programs.