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

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
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. May be NULL. When NULL main is cleared along with the menu history.

lv_menu_set_page_title

Set menu page title

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
void lv_menu_set_page_title(lv_obj_t *page_obj, char const *const title)
Parameters
NameTypeDescription
page_objlv_obj_t *pointer to the menu page
titlechar const *constpointer to text for title in header. May be NULL. When NULL no title is displayed.

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.

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
void lv_menu_set_page_title_static(lv_obj_t *page_obj, char const *const title)
Parameters
NameTypeDescription
page_objlv_obj_t *pointer to the menu page
titlechar const *constpointer to text for title in header. May be NULL. When NULL no title is displayed.

lv_menu_set_sidebar_page

Set menu page to display in sidebar

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
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. May be NULL. When NULL the sidebar is cleared.

lv_menu_set_mode_header

Set the how the header should behave and its position

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
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

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
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

> Deprecated: The lv_menu widget is deprecated. See lv_example_menu_navigation.

 
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

Macros

LV_MENU_DEPRECATED_MSG

 
#define LV_MENU_DEPRECATED_MSG "lv_menu is deprecated; build menu navigation from base widgets instead. See the lv_example_menu_navigation example."

> Deprecated: The lv_menu widget is deprecated and kept only for backward compatibility. A menu is page navigation over base widgets: pages built from lv_obj and a back button that swaps the visible page. Build it directly instead. See the lv_example_menu_navigation example. All lv_menu_* functions below are deprecated.

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

Last updated on

On this page