Flipper Developer Docs
Loading...
Searching...
No Matches
widget.h
Go to the documentation of this file.
1
6
#pragma once
7
#include <
gui/view.h
>
8
#include "widget_elements/widget_element.h"
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
14
typedef
struct
Widget
Widget
;
15
typedef
struct
WidgetElement
WidgetElement
;
16
21
Widget
*
widget_alloc
(
void
);
22
28
void
widget_free
(
Widget
* widget);
29
34
void
widget_reset
(
Widget
* widget);
35
42
View
*
widget_get_view
(
Widget
* widget);
43
54
void
widget_add_string_multiline_element
(
55
Widget
* widget,
56
uint8_t x,
57
uint8_t y,
58
Align
horizontal,
59
Align
vertical,
60
Font
font,
61
const
char
* text);
62
73
void
widget_add_string_element
(
74
Widget
* widget,
75
uint8_t x,
76
uint8_t y,
77
Align
horizontal,
78
Align
vertical,
79
Font
font,
80
const
char
* text);
81
97
void
widget_add_text_box_element
(
98
Widget
* widget,
99
uint8_t x,
100
uint8_t y,
101
uint8_t width,
102
uint8_t height,
103
Align
horizontal,
104
Align
vertical,
105
const
char
* text,
106
bool
strip_to_dots);
107
122
void
widget_add_text_scroll_element
(
123
Widget
* widget,
124
uint8_t x,
125
uint8_t y,
126
uint8_t width,
127
uint8_t height,
128
const
char
* text);
129
138
void
widget_add_button_element
(
139
Widget
* widget,
140
GuiButtonType button_type,
141
const
char
* text,
142
ButtonCallback callback,
143
void
* context);
144
152
void
widget_add_icon_element
(
Widget
* widget, uint8_t x, uint8_t y,
const
Icon
* icon);
153
163
void
widget_add_frame_element
(
164
Widget
* widget,
165
uint8_t x,
166
uint8_t y,
167
uint8_t width,
168
uint8_t height,
169
uint8_t radius);
170
171
#ifdef __cplusplus
172
}
173
#endif
Font
Font
Fonts enumeration.
Definition
canvas.h:25
Align
Align
Alignment enumeration.
Definition
canvas.h:36
Icon
Definition
icon_i.h:9
View
Definition
view_i.h:16
WidgetElement
Definition
widget_element_i.h:21
Widget
Definition
widget.c:8
view.h
GUI: View API.
widget_add_string_multiline_element
void widget_add_string_multiline_element(Widget *widget, uint8_t x, uint8_t y, Align horizontal, Align vertical, Font font, const char *text)
Add Multi String Element.
Definition
widget.c:122
widget_add_text_scroll_element
void widget_add_text_scroll_element(Widget *widget, uint8_t x, uint8_t y, uint8_t width, uint8_t height, const char *text)
Add Text Scroll Element.
Definition
widget.c:166
widget_add_icon_element
void widget_add_icon_element(Widget *widget, uint8_t x, uint8_t y, const Icon *icon)
Add Icon Element.
Definition
widget.c:191
widget_add_frame_element
void widget_add_frame_element(Widget *widget, uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t radius)
Add Frame Element.
Definition
widget.c:198
widget_get_view
View * widget_get_view(Widget *widget)
Get Widget view.
Definition
widget.c:103
widget_free
void widget_free(Widget *widget)
Free Widget.
Definition
widget.c:91
widget_add_button_element
void widget_add_button_element(Widget *widget, GuiButtonType button_type, const char *text, ButtonCallback callback, void *context)
Add Button Element.
Definition
widget.c:179
widget_add_string_element
void widget_add_string_element(Widget *widget, uint8_t x, uint8_t y, Align horizontal, Align vertical, Font font, const char *text)
Add String Element.
Definition
widget.c:136
widget_reset
void widget_reset(Widget *widget)
Reset Widget.
Definition
widget.c:71
widget_alloc
Widget * widget_alloc(void)
Allocate Widget that holds Widget Elements.
Definition
widget.c:57
widget_add_text_box_element
void widget_add_text_box_element(Widget *widget, uint8_t x, uint8_t y, uint8_t width, uint8_t height, Align horizontal, Align vertical, const char *text, bool strip_to_dots)
Add Text Box Element.
Definition
widget.c:150
applications
services
gui
modules
widget.h
Generated by
1.12.0