forked from 4coder-archive/4coder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
4ed_view.h
99 lines (80 loc) · 1.6 KB
/
4ed_view.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
* Mr. 4th Dimention - Allen Webster
*
* 17.07.2017
*
* File editing view for 4coder.
*
*/
// TOP
#if !defined(FRED_VIEW_H)
#define FRED_VIEW_H
struct Co_In{
union{
struct{
struct Models *models;
Custom_Command_Function *event_context_base;
};
User_Input user_input;
Face_ID face_id;
b32 success;
};
};
typedef i32 Co_Request;
enum{
CoRequest_None = 0,
CoRequest_NewFontFace = 1,
CoRequest_ModifyFace = 2,
CoRequest_AcquireGlobalFrameMutex = 3,
CoRequest_ReleaseGlobalFrameMutex = 4,
};
struct Co_Out{
Co_Request request;
Face_Description *face_description;
Face_ID face_id;
};
struct Query_Slot{
Query_Slot *next;
Query_Bar *query_bar;
};
struct Query_Set{
Query_Slot slots[8];
Query_Slot *free_slot;
Query_Slot *used_slot;
};
struct View_Context_Node{
View_Context_Node *next;
Temp_Memory pop_me;
View_Context ctx;
void *delta_rule_memory;
};
struct View{
View *next;
View *prev;
struct Panel *panel;
b32 in_use;
Editing_File *file;
Lifetime_Object *lifetime_object;
File_Edit_Positions edit_pos_;
i64 mark;
f32 preferred_x;
Vec2_f32 cursor_margin;
Vec2_f32 cursor_push_in_multiplier;
b8 new_scroll_target;
b8 hide_scrollbar;
b8 hide_file_bar;
b8 show_whitespace;
Coroutine *co;
Co_Out co_out;
Arena node_arena;
View_Context_Node *ctx;
Query_Set query_set;
};
struct Live_Views{
View *views;
View free_sentinel;
i32 count;
i32 max;
};
#endif
// BOTTOM