Framework, stijl en cutting-edge UI
This commit is contained in:
21
box.h
21
box.h
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user