「App:Library:LVGL:docs:Widgets:Base object」の版間の差分
174行目: | 174行目: | ||
=== Flags === | === Flags === | ||
− | {| class="wikitable" | + | <syntaxhighlight lang="C++" style="border" :1px="" dashed="" gray;"=""> |
+ | /*Hide on object*/ | ||
+ | lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN); | ||
+ | |||
+ | /*Make an object non-clickable*/ | ||
+ | lv_obj_clear_flag(obj, LV_OBJ_FLAG_CLICKABLE); | ||
+ | </syntaxhighlight>{| class="wikitable" | ||
!英文 | !英文 | ||
!自動翻訳 | !自動翻訳 | ||
325行目: | 331行目: | ||
'''Enums''' | '''Enums''' | ||
− | <span style="background-color:#e7f2fa;color:#2980b9;">enum [anonymous] </span> | + | <span style="background-color:#e7f2fa;color:#2980b9;">'''enum [anonymous]''' </span> |
: Possible states of a widget. OR-ed values are possible ''Values:'' | : Possible states of a widget. OR-ed values are possible ''Values:'' | ||
:<span style="background-color: #eeeeee;">enumerator LV_STATE_DEFAULT </span> | :<span style="background-color: #eeeeee;">enumerator LV_STATE_DEFAULT </span> | ||
356行目: | 362行目: | ||
:: Special value can be used in some functions to target all states | :: Special value can be used in some functions to target all states | ||
− | <span style="background-color:#e7f2fa;color:#2980b9;">enum [anonymous] </span> | + | <span style="background-color:#e7f2fa;color:#2980b9;">'''enum [anonymous]''' </span> |
: The possible parts of widgets. The parts can be considered as the internal building block of the widgets. E.g. slider = background + indicator + knob Note every part is used by every widget ''Values:'' | : The possible parts of widgets. The parts can be considered as the internal building block of the widgets. E.g. slider = background + indicator + knob Note every part is used by every widget ''Values:'' | ||
:<span style="background-color: #eeeeee;">enumerator LV_PART_MAIN </span> | :<span style="background-color: #eeeeee;">enumerator LV_PART_MAIN </span> | ||
449行目: | 455行目: | ||
:: The scrollbar | :: The scrollbar | ||
− | Functions | + | '''Functions''' |
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_init(void) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void lv_init(void) </span> | ||
462行目: | 468行目: | ||
<span style="background-color:#e7f2fa;color:#2980b9;">lv_obj_t *lv_obj_create(lv_obj_t *parent) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">lv_obj_t *lv_obj_create(lv_obj_t *parent) </span> | ||
: Create a base object (a rectangle) | : Create a base object (a rectangle) | ||
− | :Parameters | + | :'''Parameters''' |
− | :: parent -- pointer to a parent object. If NULL then a screen will be created. | + | :: '''parent''' -- pointer to a parent object. If NULL then a screen will be created. |
− | :Returns | + | :'''Returns''' |
:: pointer to the new object | :: pointer to the new object | ||
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f) </span> | ||
: Set one or more flags | : Set one or more flags | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* f -- R-ed values from <code style="color: #bb0000;">lv_obj_flag_t</code> to set. | + | ::* '''f''' -- R-ed values from <code style="color: #bb0000;">lv_obj_flag_t</code> to set. |
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_clear_flag(lv_obj_t *obj, lv_obj_flag_t f) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_clear_flag(lv_obj_t *obj, lv_obj_flag_t f) </span> | ||
: Clear one or more flags | : Clear one or more flags | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* f -- OR-ed values from <code style="color: #bb0000;">lv_obj_flag_t</code> to set. | + | ::* '''f''' -- OR-ed values from <code style="color: #bb0000;">lv_obj_flag_t</code> to set. |
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_add_state(lv_obj_t *obj, [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] state) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_add_state(lv_obj_t *obj, [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] state) </span> | ||
: Add one or more states to the object. The other state bits will remain unchanged. If specified in the styles, transition animation will be started from the previous state to the current. | : Add one or more states to the object. The other state bits will remain unchanged. If specified in the styles, transition animation will be started from the previous state to the current. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* state -- the states to add. E.g <code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code> | + | ::* '''state''' -- the states to add. E.g <code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code> |
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_clear_state(lv_obj_t *obj, [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] state) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_clear_state(lv_obj_t *obj, [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] state) </span> | ||
: Remove one or more states to the object. The other state bits will remain unchanged. If specified in the styles, transition animation will be started from the previous state to the current. | : Remove one or more states to the object. The other state bits will remain unchanged. If specified in the styles, transition animation will be started from the previous state to the current. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* state -- the states to add. E.g <code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code> | + | ::* '''state''' -- the states to add. E.g <code style="color: #bb0000;">LV_STATE_PRESSED | LV_STATE_FOCUSED</code> |
<span style="background-color:#e7f2fa;color:#2980b9;">static inline void lv_obj_set_user_data(lv_obj_t *obj, void *user_data) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">static inline void lv_obj_set_user_data(lv_obj_t *obj, void *user_data) </span> | ||
: Set the user_data field of the object | : Set the user_data field of the object | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* user_data -- pointer to the new user_data. | + | ::* '''user_data''' -- pointer to the new user_data. |
<span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_flag(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, lv_obj_flag_t f) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_flag(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, lv_obj_flag_t f) </span> | ||
: Check if a given flag or all the given flags are set on an object. | : Check if a given flag or all the given flags are set on an object. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* f -- the flag(s) to check (OR-ed values can be used) | + | ::* '''f''' -- the flag(s) to check (OR-ed values can be used) |
− | :Returns | + | :'''Returns''' |
:: true: all flags are setfalse: not all flags are set | :: true: all flags are setfalse: not all flags are set | ||
<span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_flag_any(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, lv_obj_flag_t f) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_flag_any(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, lv_obj_flag_t f) </span> | ||
: Check if a given flag or any of the flags are set on an object. | : Check if a given flag or any of the flags are set on an object. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* f -- the flag(s) to check (OR-ed values can be used) | + | ::* '''f''' -- the flag(s) to check (OR-ed values can be used) |
− | :Returns | + | :'''Returns''' |
:: true: at lest one flag flag is setfalse: none of the flags are set | :: true: at lest one flag flag is setfalse: none of the flags are set | ||
<span style="background-color:#e7f2fa;color:#2980b9;">[https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] lv_obj_get_state(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">[https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] lv_obj_get_state(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | ||
: Get the state of an object | : Get the state of an object | ||
− | :Parameters | + | :'''Parameters''' |
− | :: obj -- pointer to an object | + | :: '''obj''' -- pointer to an object |
− | :Returns | + | :'''Returns''' |
:: the state (OR-ed values from <code style="color: #bb0000;">[https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t]</code>) | :: the state (OR-ed values from <code style="color: #bb0000;">[https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t]</code>) | ||
<span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_state(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] state) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_state(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv410lv_state_t lv_state_t] state) </span> | ||
: Check if the object is in a given state or not. | : Check if the object is in a given state or not. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* state -- a state or combination of states to check | + | ::* '''state''' -- a state or combination of states to check |
− | :Returns | + | :'''Returns''' |
:: true: <code style="color: #bb0000;">obj</code> is in <code style="color: #bb0000;">state</code>false: <code style="color: #bb0000;">obj</code> is not in <code style="color: #bb0000;">state</code> | :: true: <code style="color: #bb0000;">obj</code> is in <code style="color: #bb0000;">state</code>false: <code style="color: #bb0000;">obj</code> is not in <code style="color: #bb0000;">state</code> | ||
<span style="background-color:#e7f2fa;color:#2980b9;">void *lv_obj_get_group(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void *lv_obj_get_group(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | ||
: Get the group of the object | : Get the group of the object | ||
− | :Parameters | + | :'''Parameters''' |
− | :: obj -- pointer to an object | + | :: '''obj''' -- pointer to an object |
− | :Returns | + | :'''Returns''' |
:: the pointer to group of the object | :: the pointer to group of the object | ||
<span style="background-color:#e7f2fa;color:#2980b9;">static inline void *lv_obj_get_user_data(lv_obj_t *obj) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">static inline void *lv_obj_get_user_data(lv_obj_t *obj) </span> | ||
: Get the user_data field of the object | : Get the user_data field of the object | ||
− | :Parameters | + | :'''Parameters''' |
− | :: obj -- pointer to an object | + | :: '''obj''' -- pointer to an object |
− | :Returns | + | :'''Returns''' |
:: the pointer to the user_data of the object | :: the pointer to the user_data of the object | ||
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_allocate_spec_attr(lv_obj_t *obj) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">void lv_obj_allocate_spec_attr(lv_obj_t *obj) </span> | ||
: Allocate special data for an object if not allocated yet. | : Allocate special data for an object if not allocated yet. | ||
− | :Parameters | + | :'''Parameters''' |
− | :: obj -- pointer to an object | + | :: '''obj''' -- pointer to an object |
<span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_check_type(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, const lv_obj_class_t *class_p) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_check_type(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, const lv_obj_class_t *class_p) </span> | ||
: Check the type of obj. | : Check the type of obj. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* class_p -- a class to check (e.g. <code style="color: #bb0000;">lv_slider_class</code>) | + | ::* '''class_p''' -- a class to check (e.g. <code style="color: #bb0000;">lv_slider_class</code>) |
− | :Returns | + | :'''Returns''' |
:: true: <code style="color: #bb0000;">class_p</code> is the <code style="color: #bb0000;">obj</code> class. | :: true: <code style="color: #bb0000;">class_p</code> is the <code style="color: #bb0000;">obj</code> class. | ||
<span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_class(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, const lv_obj_class_t *class_p) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_has_class(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, const lv_obj_class_t *class_p) </span> | ||
: Check if any object has a given class (type). It checks the ancestor classes too. | : Check if any object has a given class (type). It checks the ancestor classes too. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- pointer to an object | + | ::* '''obj''' -- pointer to an object |
− | ::* class_p -- a class to check (e.g. <code style="color: #bb0000;">lv_slider_class</code>) | + | ::* '''class_p''' -- a class to check (e.g. <code style="color: #bb0000;">lv_slider_class</code>) |
− | :Returns | + | :'''Returns''' |
:: true: <code style="color: #bb0000;">obj</code> has the given class | :: true: <code style="color: #bb0000;">obj</code> has the given class | ||
<span style="background-color:#e7f2fa;color:#2980b9;">const lv_obj_class_t *lv_obj_get_class(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">const lv_obj_class_t *lv_obj_get_class(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | ||
: Get the class (type) of the object | : Get the class (type) of the object | ||
− | :Parameters | + | :'''Parameters''' |
− | :: obj -- pointer to an object | + | :: '''obj''' -- pointer to an object |
− | :Returns | + | :'''Returns''' |
:: the class (type) of the object | :: the class (type) of the object | ||
<span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_is_valid(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">bool lv_obj_is_valid(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj) </span> | ||
: Check if any object is still "alive". | : Check if any object is still "alive". | ||
− | :Parameters | + | :'''Parameters''' |
− | :: obj -- pointer to an object | + | :: '''obj''' -- pointer to an object |
− | :Returns | + | :'''Returns''' |
:: true: valid | :: true: valid | ||
<span style="background-color:#e7f2fa;color:#2980b9;">static inline lv_coord_t lv_obj_dpx(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, lv_coord_t n) </span> | <span style="background-color:#e7f2fa;color:#2980b9;">static inline lv_coord_t lv_obj_dpx(const [https://docs.lvgl.io/8.2/widgets/obj.html#_CPPv48lv_obj_t lv_obj_t] *obj, lv_coord_t n) </span> | ||
: Scale the given number of pixels (a distance or size) relative to a 160 DPI display considering the DPI of the <code style="color: #bb0000;">obj</code>'s display. It ensures that e.g. <code style="color: #bb0000;">lv_dpx(100)</code> will have the same physical size regardless to the DPI of the display. | : Scale the given number of pixels (a distance or size) relative to a 160 DPI display considering the DPI of the <code style="color: #bb0000;">obj</code>'s display. It ensures that e.g. <code style="color: #bb0000;">lv_dpx(100)</code> will have the same physical size regardless to the DPI of the display. | ||
− | :Parameters | + | :'''Parameters''' |
− | ::* obj -- an object whose display's dpi should be considered | + | ::* '''obj''' -- an object whose display's dpi should be considered |
− | ::* n -- the number of pixels to scale | + | ::* '''n''' -- the number of pixels to scale |
− | :Returns | + | :'''Returns''' |
− | :: <code style="color: #bb0000;">n x current_dpi/160</code> | + | ::<code style="color: #bb0000;">n x current_dpi/160</code> |
Variables | Variables |
2022年6月28日 (火) 17:32時点における版
https://docs.lvgl.io/8.2/widgets/index.html
Base object (lv_obj)
Overview
英文 | 自動翻訳 |
---|---|
The 'Base Object' implements the basic properties of widgets on a screen, such as:
The functions and functionalities of the Base object can be used with other widgets too. For example
|
Coordinates
英文 | 自動翻訳 |
---|---|
Only a small subset of coordinate settings is described here. To see all the features of LVGL (padding, coordinates in styles, layouts, etc) visit the Coordinates page. |
Size
英文 | 自動翻訳 |
---|---|
The object size can be modified on individual axes with |
Position
英文 | 自動翻訳 |
---|---|
You can set the position relative to the parent with |
Alignment
英文 | 自動翻訳 |
---|---|
You can align the object on its parent with
lv_obj_set_align(obj, LV_ALIGN_CENTER);
lv_obj_set_pos(obj, 10, 20);
//Or in one function
lv_obj_align(obj, LV_ALIGN_CENTER, 10, 20);
To align one object to another use:
|
Parents and children
英文 | 自動翻訳 |
---|---|
You can set a new parent for an object with
uint32_t i;
for(i = 0i < lv_obj_get_child_cnt(parent)i++) {
lv_obj_t * child = lv_obj_get_child(parent, i);
/*Do something with child*/
}
You can change the index of an object in its parent using
|
Display and Screens
英文 | 自動翻訳 |
---|---|
At the highest level of the LVGL object hierarchy is the display which represents the driver for a display device (physical display or simulator). A display can have one or more screens associated with it. Each screen contains a hierarchy of objects for graphical widgets representing a layout that covers the entire display.
If you have multiple displays, it's important to know that the screen functions operate on the most recently created display or the one explicitly selected with
|
Events
英文 | 自動翻訳 |
---|---|
To set an event callback for an object, use
Read the Event overview to learn more about events. |
Styles
英文 | 自動翻訳 |
---|---|
Be sure to read the Style overview. Here only the most essential functions are described.
The base objects use |
Flags
/*Hide on object*/
lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
/*Make an object non-clickable*/
lv_obj_clear_flag(obj, LV_OBJ_FLAG_CLICKABLE);
{| class="wikitable"
!英文 !自動翻訳 |-
LV_OBJ_FLAG_HIDDEN
Make the object hidden. (Like it wasn't there at all)LV_OBJ_FLAG_CLICKABLE
Make the object clickable by input devicesLV_OBJ_FLAG_CLICK_FOCUSABLE
Add focused state to the object when clickedLV_OBJ_FLAG_CHECKABLE
Toggle checked state when the object is clickedLV_OBJ_FLAG_SCROLLABLE
Make the object scrollableLV_OBJ_FLAG_SCROLL_ELASTIC
Allow scrolling inside but with slower speedLV_OBJ_FLAG_SCROLL_MOMENTUM
Make the object scroll further when "thrown"LV_OBJ_FLAG_SCROLL_ONE
Allow scrolling only one snappable childrenLV_OBJ_FLAG_SCROLL_CHAIN_HOR
Allow propagating the horizontal scroll to a parentLV_OBJ_FLAG_SCROLL_CHAIN_VER
Allow propagating the vertical scroll to a parentLV_OBJ_FLAG_SCROLL_CHAIN
Simple packaging for (LV_OBJ_FLAG_SCROLL_CHAIN_HOR | LV_OBJ_FLAG_SCROLL_CHAIN_VER
)LV_OBJ_FLAG_SCROLL_ON_FOCUS
Automatically scroll object to make it visible when focusedLV_OBJ_FLAG_SCROLL_WITH_ARROW
Allow scrolling the focused object with arrow keysLV_OBJ_FLAG_SNAPPABLE
If scroll snap is enabled on the parent it can snap to this objectLV_OBJ_FLAG_PRESS_LOCK
Keep the object pressed even if the press slid from the objectLV_OBJ_FLAG_EVENT_BUBBLE
Propagate the events to the parent tooLV_OBJ_FLAG_GESTURE_BUBBLE
Propagate the gestures to the parentLV_OBJ_FLAG_ADV_HITTEST
Allow performing more accurate hit (click) test. E.g. accounting for rounded cornersLV_OBJ_FLAG_IGNORE_LAYOUT
Make the object positionable by the layoutsLV_OBJ_FLAG_FLOATING
Do not scroll the object when the parent scrolls and ignore layoutLV_OBJ_FLAG_OVERFLOW_VISIBLE
Do not clip the children's content to the parent's boundaryLV_OBJ_FLAG_LAYOUT_1
Custom flag, free to use by layoutsLV_OBJ_FLAG_LAYOUT_2
Custom flag, free to use by layoutsLV_OBJ_FLAG_WIDGET_1
Custom flag, free to use by widgetLV_OBJ_FLAG_WIDGET_2
Custom flag, free to use by widgetLV_OBJ_FLAG_USER_1
Custom flag, free to use by userLV_OBJ_FLAG_USER_2
Custom flag, free to use by userLV_OBJ_FLAG_USER_3
Custom flag, free to use by userLV_OBJ_FLAG_USER_4
Custom flag, free to use by user
Some examples:
/*Hide on object*/
lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
/*Make an object non-clickable*/
lv_obj_clear_flag(obj, LV_OBJ_FLAG_CLICKABLE);
| |}
Groups
英文 | 自動翻訳 |
---|---|
Read the Input devices overview to learn more about Groups.
|
Extended click area
英文 | 自動翻訳 |
---|---|
By default, the objects can be clicked only within their bounding area. However, this can be extended with |
Events
英文 | 自動翻訳 |
---|---|
Learn more about Events. |
Keys
英文 | 自動翻訳 |
---|---|
If If Learn more about Keys. |
Example
Base objects with custom styles
Make an object draggable
英文 | 自動翻訳 |
---|---|
API
英文 | 自動翻訳 |
---|---|
Typedefs typedef uint16_t lv_state_t typedef uint32_t lv_part_t typedef uint32_t lv_obj_flag_t typedef struct _lv_obj_t lv_obj_t Enums enum [anonymous]
enum [anonymous]
enum [anonymous]
enum lv_obj_draw_part_type_t
Functions void lv_init(void)
void lv_deinit(void)
bool lv_is_initialized(void)
lv_obj_t *lv_obj_create(lv_obj_t *parent)
void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f)
void lv_obj_clear_flag(lv_obj_t *obj, lv_obj_flag_t f)
void lv_obj_add_state(lv_obj_t *obj, lv_state_t state)
void lv_obj_clear_state(lv_obj_t *obj, lv_state_t state)
static inline void lv_obj_set_user_data(lv_obj_t *obj, void *user_data)
bool lv_obj_has_flag(const lv_obj_t *obj, lv_obj_flag_t f)
bool lv_obj_has_flag_any(const lv_obj_t *obj, lv_obj_flag_t f)
lv_state_t lv_obj_get_state(const lv_obj_t *obj)
bool lv_obj_has_state(const lv_obj_t *obj, lv_state_t state)
void *lv_obj_get_group(const lv_obj_t *obj)
static inline void *lv_obj_get_user_data(lv_obj_t *obj)
void lv_obj_allocate_spec_attr(lv_obj_t *obj)
bool lv_obj_check_type(const lv_obj_t *obj, const lv_obj_class_t *class_p)
bool lv_obj_has_class(const lv_obj_t *obj, const lv_obj_class_t *class_p)
const lv_obj_class_t *lv_obj_get_class(const lv_obj_t *obj)
bool lv_obj_is_valid(const lv_obj_t *obj)
static inline lv_coord_t lv_obj_dpx(const lv_obj_t *obj, lv_coord_t n)
Variables const lv_obj_class_t lv_obj_class
struct _lv_obj_spec_attr_t
|