lv_gridnav.h

API reference for lv_gridnav.h

Report on GitHub

Functions

lv_gridnav_set_focused

Manually focus an object on gridnav container

 
void lv_gridnav_set_focused(lv_obj_t *cont, lv_obj_t *to_focus, lv_anim_enable_t anim_en)
Parameters
NameTypeDescription
contlv_obj_t *pointer to a gridnav container
to_focuslv_obj_t *pointer to an object to focus
anim_enlv_anim_enable_tLV_ANIM_ON/OFF

Enums

lv_gridnav_ctrl_t

NameValueDescription
LV_GRIDNAV_CTRL_NONE0x0
LV_GRIDNAV_CTRL_ROLLOVER0x1If 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 keys)
LV_GRIDNAV_CTRL_SCROLL_FIRST0x2If 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_CTRL_HORIZONTAL_MOVE_ONLY0x4Only use left/right keys for grid navigation. Up/down key events will be sent to the focused object.
LV_GRIDNAV_CTRL_VERTICAL_MOVE_ONLY0x8Only use up/down keys for grid navigation. Left/right key events will be sent to the focused object.
Used by 1 function
  • lv_gridnav_add — param ctrl

Dependencies

How is this guide?

Last updated on

On this page