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
Derive all classes from lv_obj
#19
Comments
I will look into this; I think there are some functions that aren't passed down to the youngest object type. |
Not exactly. Only to those functions which makes sense for the object. For example |
@kisvegabor You are right.
@embeddedt In such case, maybe the best thing would be to add such (static inline) functions for the relevant classes. |
Yes, every object type should know the lv_obj_set_click(page, false);
lv_obj_set_click(lv_page_get_scrl(page), false); It'd be nice to have |
Done. Closing. |
Awesome! |
@kisvegabor does this still stand for v8? In Micropython on v6 and v7 we inherit all objects from the base But now, with revised LVGL inheritance on v8, should we keep the current inheritance model in Python, or move to full inheritance that follows LVGL class inheritance? Here are the quotes for the rational behind inheriting everything from
|
The new inheritance "model" is manly only an internal thing. The concept from the outside hasn't changed much. Therefore the 3 points from the quote still stand:
So IMO this part should remain the same. Or do you see some optimization/improvement options? |
This issue continues the discussion we started on #18.
To summarise it:
lvgl provides C functions per class, including all functions of the class's parents, excluding
lv_obj
.For example,
btn
class provideslv_btn_set_fit
which calls internally tolv_cont_set_fit
. Therefore there is no need to inherit classes according to class hierarchy. Instead, all classes should inherit directly fromlv_obj
.The text was updated successfully, but these errors were encountered: