Flipper Zero Firmware
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
15extern "C" {
16#endif
17
18typedef struct WidgetElement WidgetElement;
19typedef struct Widget Widget;
20
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
39 uint8_t x,
40 uint8_t y,
41 Align horizontal,
42 Align vertical,
43 Font font,
44 const char* text);
45
48 uint8_t x,
49 uint8_t y,
50 Align horizontal,
51 Align vertical,
52 Font font,
53 const char* text);
54
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
68 GuiButtonType button_type,
69 const char* text,
70 ButtonCallback callback,
71 void* context);
72
74WidgetElement* widget_element_icon_create(uint8_t x, uint8_t y, const Icon* icon);
75
78 uint8_t x,
79 uint8_t y,
80 uint8_t width,
81 uint8_t height,
82 uint8_t radius);
83
84WidgetElement* 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
Fonts enumeration.
Definition canvas.h:25
Align
Alignment enumeration.
Definition canvas.h:36
Input: main API.
Canvas structure.
Definition canvas_i.h:40
Definition mutex.c:11
Definition icon_i.h:9
Input Event, dispatches with FuriPubSub.
Definition input.h:31
Definition widget_element_i.h:21
Definition widget.c:8
GUI: View API.
GUI: Widget view module API.
WidgetElement * widget_element_button_create(GuiButtonType button_type, const char *text, ButtonCallback callback, void *context)
Create button element.
Definition widget_element_button.c:57
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
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
WidgetElement * widget_element_icon_create(uint8_t x, uint8_t y, const Icon *icon)
Create icon element.
Definition widget_element_icon.c:26
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
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