feat(event, widgets) improve the paramter of LV_EVENT_DRAW_PART_BEGIN/END

Add lv_<widget>_draw_part_type_t to widgets to precisly describe the hooked drawings.
Also add class_p element to lv_obj_draw_part_dsc_t to show what widgets lv_<widget>_draw_part_type_t needs to be used.

Related to: https://forum.lvgl.io/t/how-to-add-minor-division-lines-to-a-chart/5366/
This commit is contained in:
Gabor Kiss-Vamosi
2021-07-07 16:18:56 +02:00
parent f172eb3fd7
commit 88c485949f
46 changed files with 712 additions and 349 deletions

View File

@@ -149,6 +149,19 @@ By default, the objects can be clicked only on their coordinates, however, this
## Events
- `LV_EVENT_VALUE_CHANGED` when the `LV_OBJ_FLAG_CHECKABLE` flag is enabled and the object clicked (on transition to/from the checked state)
- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` is sent for the following types:
- `LV_OBJ_DRAW_PART_RECTANGLE` The main rectangle
- `part`: `LV_PART_MAIN`
- `rect_dsc`
- `draw_area`: the area of the rectangle
- `LV_OBJ_DRAW_PART_BORDER_POST` The border if the `border_post` style property is `true`
- `part`: `LV_PART_MAIN`
- `rect_dsc`
- `draw_area`: the area of the rectangle
- `LV_OBJ_DRAW_PART_SCROLLBAR` the scrollbars
- `part`: `LV_PART_SCROLLBAR`
- `rect_dsc`
- `draw_area`: the area of the rectangle
Learn more about [Events](/overview/event).