Prusa MINI Firmware overview
|
#include "window_list.h"
#include "gui.h"
◆ window_list_item()
void window_list_item |
( |
window_list_t * |
pwindow_list, |
|
|
uint16_t |
index, |
|
|
const char ** |
pptext, |
|
|
uint16_t * |
pid_icon |
|
) |
| |
21 *pptext = (
char *)
items[index];
◆ window_list_inc()
122 int visible_count = window->
win.
rect.
h / item_height;
123 int old = window->
index;
124 window->
index += dif;
125 if (window->
index < 0) {
139 if (window->
index != old) {
◆ window_list_dec()
◆ window_list_init()
◆ window_list_done()
◆ window_list_draw()
54 int visible_count = rc_win.
h / item_height;
56 for (
i = 0;
i < visible_count &&
i < window->
count;
i++) {
60 window->
list_item(window, idx, &label, &id_icon);
67 rc_win.
w, item_height };
71 if (window->
index == idx) {
73 color_text = color_back;
91 color_back, color_text,
95 rc_win.
h = rc_win.
h - (
i * item_height);
98 rc_win.
y +=
i * item_height;
◆ window_list_event()
◆ items
Initial value:= {
"item0",
"item1",
"item2",
"item3",
"item4",
"item5",
"item6",
"item7",
"item8",
"item9",
"item10",
}
◆ window_class_list
#define RENDER_FLG(a, r)
Definition: display_helper.h:10
void() window_draw_t(void *window)
Definition: window.h:57
const char items[11][6]
Definition: window_list.c:5
#define WINDOW_EVENT_CAPT_1
Definition: window.h:45
void window_list_done(window_list_t *window)
Definition: window_list.c:42
uint16_t y
Definition: guitypes.h:71
uint8_t h
Definition: guitypes.h:78
int count
Definition: window_list.h:23
uint16_t w
Definition: guitypes.h:72
void window_list_inc(window_list_t *window, int dif)
Definition: window_list.c:120
int16_t id_parent
Definition: window.h:78
uint8_t bottom
Definition: guitypes.h:90
void window_list_init(window_list_t *window)
Definition: window_list.c:28
void window_list_dec(window_list_t *window, int dif)
Definition: window_list.c:145
color_t color_text
Definition: guitypes.h:108
uint8_t top
Definition: guitypes.h:88
struct _window_list_t window_list_t
Definition: window.h:60
#define WINDOW_EVENT_ENC_UP
Definition: window.h:41
#define ALIGN_CENTER
Definition: guitypes.h:19
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
font_t * font
Definition: guitypes.h:110
rect_ui16_t icon_rect
Definition: window_list.h:22
uint8_t i
Definition: screen_test_graph.c:72
color_t color_text
Definition: window_list.h:18
#define WINDOW_FLG_VISIBLE
Definition: window.h:24
static int rect_in_rect_ui16(rect_ui16_t rc, rect_ui16_t rc1)
Definition: guitypes.h:173
display_fill_rect_t * fill_rect
Definition: display.h:33
uint8_t left
Definition: guitypes.h:87
padding_ui8_t padding
Definition: guitypes.h:112
#define WINDOW_CLS_LIST
Definition: window.h:13
void() window_done_t(void *window)
Definition: window.h:56
window_t win
Definition: window_list.h:16
window_list_item_t * list_item
Definition: window_list.h:26
padding_ui8_t padding
Definition: window_list.h:20
void window_list_item(window_list_t *pwindow_list, uint16_t index, const char **pptext, uint16_t *pid_icon)
Definition: window_list.c:19
color_t color_back
Definition: guitypes.h:107
uint8_t alignment
Definition: window_list.h:21
Definition: guitypes.h:86
#define ROPFN_SWAPBW
Definition: guitypes.h:32
void() window_event_t(void *window, uint8_t event, void *param)
Definition: window.h:58
Definition: guitypes.h:69
void render_text_align(rect_ui16_t rc, const char *text, font_t *font, color_t clr0, color_t clr1, padding_ui8_t padding, uint16_t flags)
Definition: display_helper.c:6
const uint8_t[]
Definition: 404_html.c:3
display_t * display
Definition: display.c:6
uint16_t h
Definition: guitypes.h:73
rect_ui16_t rect
Definition: window.h:101
int index
Definition: window_list.h:24
color_t color_back
Definition: window_list.h:17
uint16_t x
Definition: guitypes.h:70
uint32_t color_t
Definition: guitypes.h:62
void() window_init_t(void *window)
Definition: window.h:55
gui_defaults_t gui_defaults
Definition: gui.c:20
void render_icon_align(rect_ui16_t rc, uint16_t id_res, color_t clr0, uint16_t flags)
Definition: display_helper.c:55
#define WINDOW_EVENT_BTN_DN
Definition: window.h:38
int top_index
Definition: window_list.h:25
uint8_t alignment
Definition: guitypes.h:113
void window_list_draw(window_list_t *window)
Definition: window_list.c:45
uint32_t flg
Definition: window.h:81
font_t * font
Definition: window_list.h:19
#define WINDOW_FLG_INVALID
Definition: window.h:26
#define WINDOW_FLG_ENABLED
Definition: window.h:25
static void _window_invalidate(window_t *window)
Definition: window.h:257
#define WINDOW_EVENT_ENC_DN
Definition: window.h:40
void window_list_event(window_list_t *window, uint8_t event, void *param)
Definition: window_list.c:103