Flipper Developer Docs
Loading...
Searching...
No Matches
widget_element_i.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include "
../widget.h
"
9
#include "widget_element.h"
10
#include <furi.h>
11
#include <
gui/view.h
>
12
#include <
input/input.h
>
13
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
17
18
typedef
struct
WidgetElement
WidgetElement
;
19
typedef
struct
Widget
Widget
;
20
21
struct
WidgetElement
{
22
// generic draw and input callbacks
23
void (*draw)(
Canvas
* canvas,
WidgetElement
* element);
24
bool (*input)(
InputEvent
* event,
WidgetElement
* element);
25
26
// free callback
27
void (*free)(
WidgetElement
* element);
28
29
// generic model holder
30
void
* model;
31
FuriMutex
* model_mutex;
32
33
// pointer to widget that hold our element
34
Widget
* parent;
35
};
36
38
WidgetElement
*
widget_element_string_multiline_create
(
39
uint8_t x,
40
uint8_t y,
41
Align
horizontal,
42
Align
vertical,
43
Font
font,
44
const
char
* text);
45
47
WidgetElement
*
widget_element_string_create
(
48
uint8_t x,
49
uint8_t y,
50
Align
horizontal,
51
Align
vertical,
52
Font
font,
53
const
char
* text);
54
56
WidgetElement
*
widget_element_text_box_create
(
57
uint8_t x,
58
uint8_t y,
59
uint8_t width,
60
uint8_t height,
61
Align
horizontal,
62
Align
vertical,
63
const
char
* text,
64
bool
strip_to_dots);
65
67
WidgetElement
*
widget_element_button_create
(
68
GuiButtonType button_type,
69
const
char
* text,
70
ButtonCallback callback,
71
void
* context);
72
74
WidgetElement
*
widget_element_icon_create
(uint8_t x, uint8_t y,
const
Icon
* icon);
75
77
WidgetElement
*
widget_element_frame_create
(
78
uint8_t x,
79
uint8_t y,
80
uint8_t width,
81
uint8_t height,
82
uint8_t radius);
83
84
WidgetElement
* widget_element_text_scroll_create(
85
uint8_t x,
86
uint8_t y,
87
uint8_t width,
88
uint8_t height,
89
const
char
* text);
90
91
#ifdef __cplusplus
92
}
93
#endif
Font
Font
Fonts enumeration.
Definition
canvas.h:25
Align
Align
Alignment enumeration.
Definition
canvas.h:36
input.h
Input: main API.
Canvas
Canvas structure.
Definition
canvas_i.h:40
FuriMutex
Definition
mutex.c:13
Icon
Definition
icon_i.h:9
InputEvent
Input Event, dispatches with FuriPubSub.
Definition
input.h:31
WidgetElement
Definition
widget_element_i.h:21
Widget
Definition
widget.c:8
view.h
GUI: View API.
widget.h
GUI: Widget view module API.
widget_element_button_create
WidgetElement * widget_element_button_create(GuiButtonType button_type, const char *text, ButtonCallback callback, void *context)
Create button element.
Definition
widget_element_button.c:57
widget_element_text_box_create
WidgetElement * widget_element_text_box_create(uint8_t x, uint8_t y, uint8_t width, uint8_t height, Align horizontal, Align vertical, const char *text, bool strip_to_dots)
Create text box element.
Definition
widget_element_text_box.c:43
widget_element_string_multiline_create
WidgetElement * widget_element_string_multiline_create(uint8_t x, uint8_t y, Align horizontal, Align vertical, Font font, const char *text)
Create multi string element.
Definition
widget_element_string_multiline.c:39
widget_element_icon_create
WidgetElement * widget_element_icon_create(uint8_t x, uint8_t y, const Icon *icon)
Create icon element.
Definition
widget_element_icon.c:26
widget_element_string_create
WidgetElement * widget_element_string_create(uint8_t x, uint8_t y, Align horizontal, Align vertical, Font font, const char *text)
Create string element.
Definition
widget_element_string.c:38
widget_element_frame_create
WidgetElement * widget_element_frame_create(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t radius)
Create frame element.
Definition
widget_element_frame.c:25
applications
services
gui
modules
widget_elements
widget_element_i.h
Generated by
1.12.0