「App:Library:LVGL:docs:Overview:Objects」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動 (ページの作成:「https://docs.lvgl.io/8.2/overview/object.html __NOTOC__ {| class="wikitable" !英文 !自動翻訳 |- | | |} :戻る : Previous」) |
|||
9行目: | 9行目: | ||
|} | |} | ||
+ | = Objects = | ||
+ | In LVGL the basic building blocks of a user interface are the objects, also called ''Widgets''. For example a Button, Label, Image, List, Chart or Text area. | ||
+ | |||
+ | You can see all the Object types here. | ||
+ | |||
+ | All objects are referenced using an <code>lv_obj_t</code> pointer as a handle. This pointer can later be used to set or get the attributes of the object. | ||
+ | |||
+ | == Attributes == | ||
+ | |||
+ | === Basic attributes === | ||
+ | All object types share some basic attributes: | ||
+ | |||
+ | * Position | ||
+ | * Size | ||
+ | * Parent | ||
+ | * Styles | ||
+ | * Event handlers | ||
+ | * Etc | ||
+ | |||
+ | You can set/get these attributes with <code>lv_obj_set_...</code> and <code>lv_obj_get_...</code> functions. For example: | ||
+ | /*Set basic object attributes*/ | ||
+ | lv_obj_set_size(btn1, 100, 50); /*Set a button's size*/ | ||
+ | lv_obj_set_pos(btn1, 20,30); /*Set a button's position*/ | ||
+ | To see all the available functions visit the Base object's documentation. | ||
2022年6月22日 (水) 23:00時点における版
https://docs.lvgl.io/8.2/overview/object.html
英文 | 自動翻訳 |
---|---|
Objects
In LVGL the basic building blocks of a user interface are the objects, also called Widgets. For example a Button, Label, Image, List, Chart or Text area.
You can see all the Object types here.
All objects are referenced using an lv_obj_t
pointer as a handle. This pointer can later be used to set or get the attributes of the object.
Attributes
Basic attributes
All object types share some basic attributes:
- Position
- Size
- Parent
- Styles
- Event handlers
- Etc
You can set/get these attributes with lv_obj_set_...
and lv_obj_get_...
functions. For example:
/*Set basic object attributes*/ lv_obj_set_size(btn1, 100, 50); /*Set a button's size*/ lv_obj_set_pos(btn1, 20,30); /*Set a button's position*/
To see all the available functions visit the Base object's documentation.