GUI: Menu view module API. More...
#include <gui/view.h>
Go to the source code of this file.
Typedefs | |
typedef struct Menu | Menu |
Menu anonymous structure. | |
typedef void(* | MenuItemCallback) (void *context, uint32_t index) |
Menu Item Callback. | |
Functions | |
Menu * | menu_alloc (void) |
Menu allocation and initialization. | |
void | menu_free (Menu *menu) |
Free menu. | |
View * | menu_get_view (Menu *menu) |
Get Menu view. | |
void | menu_add_item (Menu *menu, const char *label, const Icon *icon, uint32_t index, MenuItemCallback callback, void *context) |
Add item to menu. | |
void | menu_reset (Menu *menu) |
Clean menu. | |
void | menu_set_selected_item (Menu *menu, uint32_t index) |
Set current menu item. | |
GUI: Menu view module API.
void menu_add_item | ( | Menu * | menu, |
const char * | label, | ||
const Icon * | icon, | ||
uint32_t | index, | ||
MenuItemCallback | callback, | ||
void * | context ) |
Add item to menu.
menu | Menu instance |
label | menu item string label |
icon | IconAnimation instance |
index | menu item index |
callback | MenuItemCallback instance |
context | pointer to context |
Menu * menu_alloc | ( | void | ) |
Menu allocation and initialization.
void menu_free | ( | Menu * | menu | ) |
Free menu.
menu | Menu instance |
Get Menu view.
menu | Menu instance |
void menu_reset | ( | Menu * | menu | ) |
Clean menu.
menu | Menu instance |
void menu_set_selected_item | ( | Menu * | menu, |
uint32_t | index ) |
Set current menu item.
menu | Menu instance |
index | The index |