Framework, stijl en cutting-edge UI

This commit is contained in:
2025-10-17 18:01:57 +02:00
parent eeee5aba7d
commit e958fcdafe
5 changed files with 180 additions and 47 deletions

21
box.h
View File

@@ -14,6 +14,7 @@
enum box_type {
BOX_VERTICAL,
BOX_HORIZONTAL,
BOX_CHART,
BOX_BUTTON,
};
@@ -24,14 +25,20 @@ struct box {
union {
/* button */
struct {
char *name;
};
char *name;
/* container boxes */
/* chart and vertical/horizontal box */
struct {
struct box **children;
/* chart and vertical/horizontal box */
size_t length;
union {
/* vertical/horizontal box */
struct box **children;
/* chart */
double *prices;
};
};
};
};
@@ -40,5 +47,7 @@ struct box {
struct box *new_button_box(char *name);
struct box *new_vertical_box(void);
struct box *new_horizontal_box(void);
struct box *new_chart_box(void);
void draw_box(struct box *, size_t x, size_t y, size_t width, size_t height);
void draw_box(struct box *, double x, double y, double width, double height);