「App:Library:LVGL:docs:Others:Grid navigation」の版間の差分
12行目: | 12行目: | ||
= Grid navigation = | = Grid navigation = | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
Grid navigation (gridnav for short) is a feature that changes the currently focused child object as arrow keys are pressed. | Grid navigation (gridnav for short) is a feature that changes the currently focused child object as arrow keys are pressed. | ||
30行目: | 35行目: | ||
If the container is scrollable and the focused child is out of the view, gridnav will automatically scroll the child into view. | If the container is scrollable and the focused child is out of the view, gridnav will automatically scroll the child into view. | ||
+ | | | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
+ | |||
== Usage == | == Usage == | ||
42行目: | 51行目: | ||
<code style="color: #bb0000;">lv_gridnav_remove(cont)</code> Removes gridnav from an object. | <code style="color: #bb0000;">lv_gridnav_remove(cont)</code> Removes gridnav from an object. | ||
− | + | | | |
− | + | |} | |
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
== Focusable objects == | == Focusable objects == | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
An object needs to be clickable or click focusable (<code style="color: #bb0000;">LV_OBJ_FLAG_CLICKABLE</code> or <code style="color: #bb0000;">LV_OBJ_FLAG_CLICK_FOCUSABLE</code>) and not hidden (<code style="color: #bb0000;">LV_OBJ_FLAG_HIDDEN</code>) to be focusable by gridnav. | An object needs to be clickable or click focusable (<code style="color: #bb0000;">LV_OBJ_FLAG_CLICKABLE</code> or <code style="color: #bb0000;">LV_OBJ_FLAG_CLICK_FOCUSABLE</code>) and not hidden (<code style="color: #bb0000;">LV_OBJ_FLAG_HIDDEN</code>) to be focusable by gridnav. | ||
+ | | | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
54行目: | 72行目: | ||
=== Basic grid navigation === | === Basic grid navigation === | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
[[file:LVGL docs others gridnav 01.png|link=https://docs.lvgl.io/8.2/others/gridnav.html]] | [[file:LVGL docs others gridnav 01.png|link=https://docs.lvgl.io/8.2/others/gridnav.html]] | ||
66行目: | 89行目: | ||
---- | ---- | ||
+ | | | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
== API == | == API == | ||
===== Typedefs ===== | ===== Typedefs ===== | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
<span style="background-color: #e7f2fa; color: #2980b9;">typedef int _keep_pedantic_happy </span> | <span style="background-color: #e7f2fa; color: #2980b9;">typedef int _keep_pedantic_happy </span> | ||
: | : | ||
+ | | | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
+ | |||
===== Enums ===== | ===== Enums ===== | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
<span style="background-color: #e7f2fa; color: #2980b9;">enum lv_gridnav_ctrl_t </span> | <span style="background-color: #e7f2fa; color: #2980b9;">enum lv_gridnav_ctrl_t </span> | ||
: ''Values:'' | : ''Values:'' | ||
82行目: | 122行目: | ||
:<span style="background-color: #eeeeee;">enumerator LV_GRIDNAV_CTRL_SCROLL_FIRST </span> | :<span style="background-color: #eeeeee;">enumerator LV_GRIDNAV_CTRL_SCROLL_FIRST </span> | ||
:: If an arrow is pressed and the focused object can be scrolled in that direction then it will be scrolled instead of going to the next/previous object. If there is no more room for scrolling the next/previous object will be focused normally | :: If an arrow is pressed and the focused object can be scrolled in that direction then it will be scrolled instead of going to the next/previous object. If there is no more room for scrolling the next/previous object will be focused normally | ||
+ | | | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
+ | |||
===== Functions ===== | ===== Functions ===== | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
<span style="background-color: #e7f2fa; color: #2980b9;">void lv_gridnav_add(lv_obj_t *obj, lv_gridnav_ctrl_t ctrl) </span> | <span style="background-color: #e7f2fa; color: #2980b9;">void lv_gridnav_add(lv_obj_t *obj, lv_gridnav_ctrl_t ctrl) </span> | ||
: Add grid navigation feature to an object. It expects the children to be arranged into a grid-like layout. Although it's not required to have pixel perfect alignment. This feature makes possible to use keys to navigate among the children and focus them. The keys other than arrows and press/release related events are forwarded to the focused child. | : Add grid navigation feature to an object. It expects the children to be arranged into a grid-like layout. Although it's not required to have pixel perfect alignment. This feature makes possible to use keys to navigate among the children and focus them. The keys other than arrows and press/release related events are forwarded to the focused child. | ||
94行目: | 143行目: | ||
:'''Parameters''' | :'''Parameters''' | ||
:: '''obj''' -- pointer to an object | :: '''obj''' -- pointer to an object | ||
− | + | | | |
− | + | |} | |
:[[App:Library:LVGL:docs:Others|戻る : Previous]] | :[[App:Library:LVGL:docs:Others|戻る : Previous]] |
2022年6月22日 (水) 20:33時点における版
https://docs.lvgl.io/8.2/others/gridnav.html
英文 | 自動翻訳 |
---|---|
英文 | 自動翻訳 |
---|---|
Grid navigation (gridnav for short) is a feature that changes the currently focused child object as arrow keys are pressed.
To move the focus to the next widget of the group use
|
Usage
To add the gridnav feature to an object use lv_gridnav_add(cont, flags)
.
flags
control the behavior of gridnav:
LV_GRIDNAV_CTRL_NONE
Default settingsLV_GRIDNAV_CTRL_ROLLOVER
If there is no next/previous object in a direction, the focus goes to the object in the next/previous row (on left/right keys) or first/last row (on up/down keysLV_GRIDNAV_CTRL_SCROLL_FIRST
If an arrow is pressed and the focused object can be scrolled in that direction then it will be scrolled instead of going to the next/previous object. If there is no more room for scrolling the next/previous object will be focused normally
lv_gridnav_remove(cont)
Removes gridnav from an object.
|
|}
Focusable objects
英文 | 自動翻訳 |
---|---|
An object needs to be clickable or click focusable ( |
Example
英文 | 自動翻訳 |
---|---|
Grid navigation on a list
Nested grid navigations
|
API
Typedefs
英文 | 自動翻訳 |
---|---|
typedef int _keep_pedantic_happy |
Enums
英文 | 自動翻訳 |
---|---|
enum lv_gridnav_ctrl_t
|
Functions
英文 | 自動翻訳 |
---|---|
void lv_gridnav_add(lv_obj_t *obj, lv_gridnav_ctrl_t ctrl)
void lv_gridnav_remove(lv_obj_t *obj)
|