Prusa MINI Firmware overview
window_text.c File Reference
#include "window_text.h"
#include "gui.h"

Functions

void window_text_init (window_text_t *window)
 
void window_text_draw (window_text_t *window)
 

Variables

const window_class_text_t window_class_text
 

Function Documentation

◆ window_text_init()

void window_text_init ( window_text_t window)
5  {
8  window->font = gui_defaults.font;
9  window->text = 0;
10  window->padding = gui_defaults.padding;
12 }

◆ window_text_draw()

void window_text_draw ( window_text_t window)
14  {
16  render_text_align(window->win.rect,
17  window->text,
18  window->font,
19  (window->win.flg & WINDOW_FLG_FOCUSED) ? window->color_text : window->color_back,
20  (window->win.flg & WINDOW_FLG_FOCUSED) ? window->color_back : window->color_text,
21  window->padding,
22  window->alignment);
23  window->win.flg &= ~WINDOW_FLG_INVALID;
24  }
25 }
Here is the call graph for this function:

Variable Documentation

◆ window_class_text

const window_class_text_t window_class_text
window_draw_t
void() window_draw_t(void *window)
Definition: window.h:57
window_text_t
struct _window_text_t window_text_t
_gui_defaults_t::color_text
color_t color_text
Definition: guitypes.h:108
_window_text_t::color_back
color_t color_back
Definition: window_text.h:17
window_text_init
void window_text_init(window_text_t *window)
Definition: window_text.c:5
_gui_defaults_t::font
font_t * font
Definition: guitypes.h:110
WINDOW_FLG_VISIBLE
#define WINDOW_FLG_VISIBLE
Definition: window.h:24
_window_text_t::text
char * text
Definition: window_text.h:20
_gui_defaults_t::padding
padding_ui8_t padding
Definition: guitypes.h:112
_window_text_t::padding
padding_ui8_t padding
Definition: window_text.h:21
_gui_defaults_t::color_back
color_t color_back
Definition: guitypes.h:107
render_text_align
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
_window_t::rect
rect_ui16_t rect
Definition: window.h:101
WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT
Definition: window.h:10
WINDOW_FLG_FOCUSED
#define WINDOW_FLG_FOCUSED
Definition: window.h:27
_window_text_t::font
font_t * font
Definition: window_text.h:19
window_init_t
void() window_init_t(void *window)
Definition: window.h:55
_window_text_t::color_text
color_t color_text
Definition: window_text.h:18
gui_defaults
gui_defaults_t gui_defaults
Definition: gui.c:20
_gui_defaults_t::alignment
uint8_t alignment
Definition: guitypes.h:113
_window_t::flg
uint32_t flg
Definition: window.h:81
WINDOW_FLG_INVALID
#define WINDOW_FLG_INVALID
Definition: window.h:26
window_text_draw
void window_text_draw(window_text_t *window)
Definition: window_text.c:14
_window_text_t::win
window_t win
Definition: window_text.h:16
_window_text_t::alignment
uint8_t alignment
Definition: window_text.h:22