aboutsummaryrefslogtreecommitdiffstats
path: root/code/4ed_text_layout.h
blob: b37ed963aad6cb4020d4891581db4fbd8ce23d93 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Mr. 4th Dimention - Allen Webster
 *
 * 31.03.2019
 *
 * Text layout representation
 *
 */

// TOP

#if !defined(FRED_TEXT_LAYOUT_H)
#define FRED_TEXT_LAYOUT_H

union Text_Layout{
    Text_Layout *next;
    struct{
        Arena *arena;
        Buffer_ID buffer_id;
        Buffer_Point point;
        Range_i64 visible_range;
        Range_i64 visible_line_number_range;
        Rect_f32 rect;
        ARGB_Color *item_colors;
        Layout_Function *layout_func;
    };
};

struct Text_Layout_Container{
    Arena node_arena;
    Text_Layout *free_nodes;
    Table_u64_u64 table;
    Text_Layout_ID id_counter;
};

#endif

// BOTTOM