GUI: ButtonMenu view module API. More...
Go to the source code of this file.
Typedefs | |
typedef struct ButtonMenu | ButtonMenu |
ButtonMenu anonymous structure. | |
typedef struct ButtonMenuItem | ButtonMenuItem |
ButtonMenuItem anonymous structure. | |
typedef void(* | ButtonMenuItemCallback) (void *context, int32_t index, InputType type) |
Callback for any button menu actions. | |
Enumerations | |
enum | ButtonMenuItemType { ButtonMenuItemTypeCommon , ButtonMenuItemTypeControl } |
Type of button. More... | |
Functions | |
View * | button_menu_get_view (ButtonMenu *button_menu) |
Get button menu view. | |
void | button_menu_reset (ButtonMenu *button_menu) |
Clean button menu. | |
ButtonMenuItem * | button_menu_add_item (ButtonMenu *button_menu, const char *label, int32_t index, ButtonMenuItemCallback callback, ButtonMenuItemType type, void *callback_context) |
Add item to button menu instance. | |
ButtonMenu * | button_menu_alloc (void) |
Allocate and initialize new instance of ButtonMenu model. | |
void | button_menu_free (ButtonMenu *button_menu) |
Free ButtonMenu element. | |
void | button_menu_set_header (ButtonMenu *button_menu, const char *header) |
Set ButtonMenu header on top of canvas. | |
void | button_menu_set_selected_item (ButtonMenu *button_menu, uint32_t index) |
Set selected item. | |
GUI: ButtonMenu view module API.
enum ButtonMenuItemType |
Type of button.
Difference in drawing buttons.
ButtonMenuItem * button_menu_add_item | ( | ButtonMenu * | button_menu, |
const char * | label, | ||
int32_t | index, | ||
ButtonMenuItemCallback | callback, | ||
ButtonMenuItemType | type, | ||
void * | callback_context ) |
Add item to button menu instance.
button_menu | ButtonMenu instance |
label | text inside new button |
index | value to distinct between buttons inside ButtonMenuItemCallback |
callback | The callback |
type | type of button to create. Differ by button drawing. Control buttons have no frames, and have more squared borders. |
callback_context | The callback context |
ButtonMenu * button_menu_alloc | ( | void | ) |
Allocate and initialize new instance of ButtonMenu model.
void button_menu_free | ( | ButtonMenu * | button_menu | ) |
Free ButtonMenu element.
button_menu | ButtonMenu instance |
View * button_menu_get_view | ( | ButtonMenu * | button_menu | ) |
Get button menu view.
button_menu | ButtonMenu instance |
void button_menu_reset | ( | ButtonMenu * | button_menu | ) |
Clean button menu.
button_menu | ButtonMenu instance |
void button_menu_set_header | ( | ButtonMenu * | button_menu, |
const char * | header ) |
Set ButtonMenu header on top of canvas.
button_menu | ButtonMenu instance |
header | header on the top of button menu |
void button_menu_set_selected_item | ( | ButtonMenu * | button_menu, |
uint32_t | index ) |
Set selected item.
button_menu | ButtonMenu instance |
index | index of ButtonMenu to be selected |