Prusa MINI Firmware overview
|
#include "window_menu.h"
#include "gui.h"
|
#define | WIO_MIN 0 |
|
#define | WIO_MAX 1 |
|
#define | WIO_STEP 2 |
|
#define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
|
#define | MAX(a, b) (((a) > (b)) ? (a) : (b)) |
|
|
void | window_menu_inc (window_menu_t *window, int dif) |
|
void | window_menu_dec (window_menu_t *window, int dif) |
|
void | window_menu_item_spin (window_menu_t *window, int dif) |
|
void | window_menu_item_spin_fl (window_menu_t *window, int dif) |
|
void | window_menu_item_switch (window_menu_t *window) |
|
void | window_menu_item_select (window_menu_t *window, int dif) |
|
void | window_menu_items (window_menu_t *pwindow_menu, uint16_t index, window_menu_item_t **ppitem, void *data) |
|
void | window_menu_init (window_menu_t *window) |
|
void | window_menu_done (window_menu_t *window) |
|
void | window_menu_calculate_spin (WI_SPIN_t *item, char *value) |
|
void | _window_menu_draw_value (window_menu_t *window, const char *value, rect_ui16_t *p_rc, color_t color_text_option, color_t color_back) |
|
void | window_menu_draw (window_menu_t *window) |
|
void | window_menu_event (window_menu_t *window, uint8_t event, void *param) |
|
◆ WIO_MIN
◆ WIO_MAX
◆ WIO_STEP
◆ MIN
#define MIN |
( |
|
a, |
|
|
|
b |
|
) |
| (((a) < (b)) ? (a) : (b)) |
◆ MAX
#define MAX |
( |
|
a, |
|
|
|
b |
|
) |
| (((a) > (b)) ? (a) : (b)) |
◆ window_menu_inc()
282 switch (window->
mode) {
296 int visible_count = window->
win.
rect.
h / item_height;
297 int old = window->
index;
298 window->
index += dif;
299 if (window->
index < 0)
309 if (window->
index != old)
◆ window_menu_dec()
◆ window_menu_item_spin()
◆ window_menu_item_spin_fl()
◆ window_menu_item_switch()
◆ window_menu_item_select()
◆ window_menu_items()
◆ window_menu_init()
◆ window_menu_done()
◆ window_menu_calculate_spin()
void window_menu_calculate_spin |
( |
WI_SPIN_t * |
item, |
|
|
char * |
value |
|
) |
| |
59 sprintf(value, format, item->
value * 0.001);
◆ _window_menu_draw_value()
◆ window_menu_draw()
82 int visible_count = rc_win.
h / item_height;
84 for (
i = 0;
i < visible_count &&
i < window->
count;
i++) {
94 rc_win.
w, item_height };
104 color_text = color_back;
109 color_t color_option = color_text;
110 if (window->
mode && swap) {
114 switch (item->
type & 0xff)
118 char value[20] = {
'\0' };
149 color_back, color_text,
153 rc_win.
h = rc_win.
h - (
i * item_height);
156 rc_win.
y +=
i * item_height;
◆ window_menu_event()
◆ displayTaskHandle
◆ undefined
◆ window_class_menu
#define RENDER_FLG(a, r)
Definition: display_helper.h:10
void() window_draw_t(void *window)
Definition: window.h:57
#define WINDOW_EVENT_CAPT_1
Definition: window.h:45
const float * range
Definition: window_menu.h:46
const char ** strings
Definition: window_menu.h:55
uint16_t y
Definition: guitypes.h:71
uint8_t h
Definition: guitypes.h:78
uint16_t w
Definition: guitypes.h:72
uint8_t bottom
Definition: guitypes.h:90
color_t color_text
Definition: guitypes.h:108
uint8_t top
Definition: guitypes.h:88
uint8_t right
Definition: guitypes.h:89
#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
uint8_t i
Definition: screen_test_graph.c:72
#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
color_t color_disabled
Definition: guitypes.h:109
#define WINDOW_EVENT_CHANGE
Definition: window.h:47
#define NULL
Definition: usbd_def.h:53
const int32_t * range
Definition: window_menu.h:38
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
void() window_done_t(void *window)
Definition: window.h:56
#define COLOR_ORANGE
Definition: guitypes.h:57
color_t color_back
Definition: guitypes.h:107
#define WINDOW_CLS_MENU
Definition: window.h:18
uint8_t w
Definition: guitypes.h:77
int32_t value
Definition: window_menu.h:37
float value
Definition: window_menu.h:44
Definition: guitypes.h:86
#define ROPFN_SWAPBW
Definition: guitypes.h:32
const char * prt_format
Definition: window_menu.h:45
#define WINDOW_EVENT_CHANGING
Definition: window.h:48
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
#define WINDOW_EVENT_CLICK
Definition: window.h:46
#define WINDOW_FLG_FOCUSED
Definition: window.h:27
uint16_t x
Definition: guitypes.h:70
int32_t index
Definition: window_menu.h:54
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
uint8_t alignment
Definition: guitypes.h:113
uint32_t flg
Definition: window.h:81
void screen_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: screen.c:103
#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
static png_bytep size_t size
Definition: pngwrite.c:2170