blob: ef1369b92816ea86dd786621777004dc31942043 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef MGUI_LABEL_H
#define MGUI_LABEL_H
#include "widget.h"
#include <stddef.h>
#include <mgl/graphics/text.h>
typedef struct {
mgui_widget widget;
char *str;
size_t str_size;
mgl_text text;
} mgui_label;
mgui_label* mgui_label_create(const char *str, size_t size, unsigned char character_size);
void mgui_label_destroy(mgui_label *label);
mgui_widget* mgui_label_to_widget(mgui_label *list);
mgui_label* mgui_widget_to_label(mgui_widget *widget);
void mgui_label_set_position(mgui_label *self, mgl_vec2i position);
void mgui_label_calculate_size(mgui_label *self, mgl_vec2i max_size);
void mgui_label_on_event(mgui_label *self, mgl_window *window, mgl_event *event);
void mgui_label_draw(mgui_label *self, mgl_window *window);
#endif /* MGUI_LABEL_H */
|