Flipper Developer Docs
Loading...
Searching...
No Matches
submenu.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <
gui/view.h
>
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
15
typedef
struct
Submenu
Submenu
;
16
typedef
void (*SubmenuItemCallback)(
void
* context, uint32_t index);
17
24
Submenu
*
submenu_alloc
(
void
);
25
30
void
submenu_free
(
Submenu
* submenu);
31
38
View
*
submenu_get_view
(
Submenu
* submenu);
39
49
void
submenu_add_item
(
50
Submenu
* submenu,
51
const
char
* label,
52
uint32_t index,
53
SubmenuItemCallback callback,
54
void
* callback_context);
55
62
void
submenu_change_item_label
(
Submenu
* submenu, uint32_t index,
const
char
* label);
63
68
void
submenu_reset
(
Submenu
* submenu);
69
76
uint32_t
submenu_get_selected_item
(
Submenu
* submenu);
77
83
void
submenu_set_selected_item
(
Submenu
* submenu, uint32_t index);
84
90
void
submenu_set_header
(
Submenu
* submenu,
const
char
* header);
91
92
#ifdef __cplusplus
93
}
94
#endif
Submenu
Definition
services/gui/modules/submenu.c:7
View
Definition
view_i.h:16
submenu_free
void submenu_free(Submenu *submenu)
Deinitialize and free submenu.
Definition
services/gui/modules/submenu.c:175
submenu_get_selected_item
uint32_t submenu_get_selected_item(Submenu *submenu)
Get submenu selected item index.
Definition
services/gui/modules/submenu.c:253
submenu_alloc
Submenu * submenu_alloc(void)
Allocate and initialize submenu.
Definition
services/gui/modules/submenu.c:153
submenu_set_header
void submenu_set_header(Submenu *submenu, const char *header)
Set optional header for submenu.
Definition
services/gui/modules/submenu.c:379
submenu_get_view
View * submenu_get_view(Submenu *submenu)
Get submenu view.
Definition
services/gui/modules/submenu.c:190
submenu_change_item_label
void submenu_change_item_label(Submenu *submenu, uint32_t index, const char *label)
Change label of an existing item.
Definition
services/gui/modules/submenu.c:218
submenu_reset
void submenu_reset(Submenu *submenu)
Remove all items from submenu.
Definition
services/gui/modules/submenu.c:238
submenu_add_item
void submenu_add_item(Submenu *submenu, const char *label, uint32_t index, SubmenuItemCallback callback, void *callback_context)
Add item to submenu.
Definition
services/gui/modules/submenu.c:195
submenu_set_selected_item
void submenu_set_selected_item(Submenu *submenu, uint32_t index)
Set submenu selected item by index.
Definition
services/gui/modules/submenu.c:272
view.h
GUI: View API.
applications
services
gui
modules
submenu.h
Generated by
1.12.0