lv_menu.h

API reference for lv_menu.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_menu_private.h

Functions

lv_menu_set_page

Set menu page to display in main

 
void lv_menu_set_page(lv_obj_t *obj, lv_obj_t *page)
Parameters
NameTypeDescription
objlv_obj_t *pointer to the menu
pagelv_obj_t *pointer to the menu page to set (NULL to clear main and clear menu history)

lv_menu_set_page_title

Set menu page title

 
void lv_menu_set_page_title(lv_obj_t *page, char const *const title)
Parameters
NameTypeDescription
pagelv_obj_t *pointer to the menu page
titlechar const *constpointer to text for title in header (NULL to not display title)

lv_menu_set_page_title_static

Set menu page title with a static text. It will not be saved by the label so the 'text' variable has to be 'alive' while the page exists.

 
void lv_menu_set_page_title_static(lv_obj_t *page, char const *const title)
Parameters
NameTypeDescription
pagelv_obj_t *pointer to the menu page
titlechar const *constpointer to text for title in header (NULL to not display title)

lv_menu_set_sidebar_page

Set menu page to display in sidebar

 
void lv_menu_set_sidebar_page(lv_obj_t *obj, lv_obj_t *page)
Parameters
NameTypeDescription
objlv_obj_t *pointer to the menu
pagelv_obj_t *pointer to the menu page to set (NULL to clear sidebar)

lv_menu_set_mode_header

Set the how the header should behave and its position

 
void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a menu
modelv_menu_mode_header_tLV_MENU_HEADER_TOP_FIXED/TOP_UNFIXED/BOTTOM_FIXED

lv_menu_set_mode_root_back_button

Set whether back button should appear at root

 
void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a menu
modelv_menu_mode_root_back_button_tLV_MENU_ROOT_BACK_BUTTON_DISABLED/ENABLED

lv_menu_set_load_page_event

Add menu to the menu item

 
void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page)
Parameters
NameTypeDescription
menulv_obj_t *pointer to the menu
objlv_obj_t *pointer to the obj
pagelv_obj_t *pointer to the page to load when obj is clicked

Enums

lv_menu_mode_header_t

NameDescription
LV_MENU_HEADER_TOP_FIXEDHeader is positioned at the top
LV_MENU_HEADER_TOP_UNFIXEDHeader is positioned at the top and can be scrolled out of view
LV_MENU_HEADER_BOTTOM_FIXEDHeader is positioned at the bottom
Used by 1 function
  • lv_menu_set_mode_header — param mode

lv_menu_mode_root_back_button_t

Name
LV_MENU_ROOT_BACK_BUTTON_DISABLED
LV_MENU_ROOT_BACK_BUTTON_ENABLED
Used by 1 function
  • lv_menu_set_mode_root_back_button — param mode

__lv_property_menu_id_t

NameValue
LV_PROPERTY_MENU_MODE_HEADER(LV_PROPERTY_MENU_START + ((int) 0 )) | (( 1 ) << 28 )
LV_PROPERTY_MENU_MODE_ROOT_BACK_BUTTON(LV_PROPERTY_MENU_START + ((int) 1 )) | (( 1 ) << 28 )
LV_PROPERTY_MENU_END

Variables

lv_menu_class

 
const lv_obj_class_t lv_menu_class

lv_menu_page_class

 
const lv_obj_class_t lv_menu_page_class

lv_menu_cont_class

 
const lv_obj_class_t lv_menu_cont_class

lv_menu_section_class

 
const lv_obj_class_t lv_menu_section_class

lv_menu_separator_class

 
const lv_obj_class_t lv_menu_separator_class

lv_menu_sidebar_cont_class

 
const lv_obj_class_t lv_menu_sidebar_cont_class

lv_menu_main_cont_class

 
const lv_obj_class_t lv_menu_main_cont_class

lv_menu_sidebar_header_cont_class

 
const lv_obj_class_t lv_menu_sidebar_header_cont_class

lv_menu_main_header_cont_class

 
const lv_obj_class_t lv_menu_main_header_cont_class

Dependencies

How is this guide?

Last updated on

On this page