using cache in build_file, ui metaprogram and generating stacks
This commit is contained in:
22
src/ui/ui.h
22
src/ui/ui.h
@@ -25,13 +25,14 @@ typedef enum {
|
||||
} ui_text_align_t;
|
||||
|
||||
typedef enum {
|
||||
ui_op_cut_top,
|
||||
ui_op_cut_bottom,
|
||||
ui_op_cut_left,
|
||||
ui_op_cut_right,
|
||||
ui_op_idle,
|
||||
} ui_op_t;
|
||||
ui_lop_cut_top,
|
||||
ui_lop_cut_bottom,
|
||||
ui_lop_cut_left,
|
||||
ui_lop_cut_right,
|
||||
ui_lop_idle,
|
||||
} ui_lop_t;
|
||||
|
||||
#include "ui.gen.h"
|
||||
typedef struct ui_box_t ui_box_t;
|
||||
struct ui_box_t {
|
||||
ui_box_t *next;
|
||||
@@ -46,9 +47,8 @@ struct ui_box_t {
|
||||
|
||||
ui_box_flags_t flags;
|
||||
b8 created_new;
|
||||
ui_text_align_t text_align;
|
||||
UI_DECL_BOX_MEMBERS
|
||||
|
||||
ui_op_t op;
|
||||
r2f32_t full_rect;
|
||||
r2f32_t rect;
|
||||
|
||||
@@ -71,12 +71,14 @@ struct ui_signal_t {
|
||||
|
||||
typedef struct ui_t ui_t;
|
||||
struct ui_t {
|
||||
app_frame_t *frame;
|
||||
|
||||
// building
|
||||
ui_box_t root;
|
||||
ui_box_t *top;
|
||||
app_event_t *event;
|
||||
stack_t(ui_id_t, 32) id_stack;
|
||||
ui_text_align_t pref_text_align;
|
||||
|
||||
UI_DECL_STACKS
|
||||
|
||||
// allocation
|
||||
ma_arena_t *box_arena;
|
||||
|
||||
Reference in New Issue
Block a user