Loading...
Searching...
No Matches
button_panel.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <gui/view.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15typedef struct ButtonPanel ButtonPanel;
16
18typedef void (*ButtonItemCallback)(void* context, uint32_t index);
19
25
30void button_panel_free(ButtonPanel* button_panel);
31
36void button_panel_reset(ButtonPanel* button_panel);
37
47void button_panel_reserve(ButtonPanel* button_panel, size_t reserve_x, size_t reserve_y);
48
69 ButtonPanel* button_panel,
70 uint32_t index,
71 uint16_t matrix_place_x,
72 uint16_t matrix_place_y,
73 uint16_t x,
74 uint16_t y,
75 const Icon* icon_name,
76 const Icon* icon_name_selected,
77 ButtonItemCallback callback,
78 void* callback_context);
79
87
97 ButtonPanel* button_panel,
98 uint16_t x,
99 uint16_t y,
100 Font font,
101 const char* label_str);
102
111 ButtonPanel* button_panel,
112 uint16_t x,
113 uint16_t y,
114 const Icon* icon_name);
115
116#ifdef __cplusplus
117}
118#endif
void button_panel_add_icon(ButtonPanel *button_panel, uint16_t x, uint16_t y, const Icon *icon_name)
Add a non-button icon to button_panel module.
Definition button_panel.c:424
void button_panel_reset(ButtonPanel *button_panel)
Free items from button_panel module.
Definition button_panel.c:134
ButtonPanel * button_panel_alloc(void)
Allocate new button_panel module.
Definition button_panel.c:70
View * button_panel_get_view(ButtonPanel *button_panel)
Get button_panel view.
Definition button_panel.c:202
void button_panel_reserve(ButtonPanel *button_panel, size_t reserve_x, size_t reserve_y)
Reserve space for adding items.
Definition button_panel.c:95
void button_panel_add_label(ButtonPanel *button_panel, uint16_t x, uint16_t y, Font font, const char *label_str)
Add label to button_panel module.
Definition button_panel.c:402
void button_panel_free(ButtonPanel *button_panel)
Free button_panel module.
Definition button_panel.c:116
void button_panel_add_item(ButtonPanel *button_panel, uint32_t index, uint16_t matrix_place_x, uint16_t matrix_place_y, uint16_t x, uint16_t y, const Icon *icon_name, const Icon *icon_name_selected, ButtonItemCallback callback, void *callback_context)
Add item to button_panel module.
Definition button_panel.c:169
void(* ButtonItemCallback)(void *context, uint32_t index)
Callback type to call for handling selecting button_panel items.
Definition button_panel.h:18
Font
Fonts enumeration.
Definition canvas.h:25
Definition button_panel.c:47
Definition icon_i.h:9
Definition view_i.h:16
GUI: View API.