/* * Copyright (C) Artsiom D. * Copyright (C) shit-co.de */ #pragma once #include "ui.h" enum box_type { BOX_VERTICAL, BOX_HORIZONTAL, BOX_BUTTON, }; struct box { enum box_type type; enum ui_color color; double fills; union { /* button */ struct { char *name; }; /* container boxes */ struct { struct box **children; size_t length; }; }; }; struct box *new_button_box(char *name); struct box *new_vertical_box(void); struct box *new_horizontal_box(void); void draw_box(struct box *, size_t x, size_t y, size_t width, size_t height);