2018-03-24 10:06:45 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* 17.07.2017
|
|
|
|
*
|
|
|
|
* File editing view for 4coder.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FRED_VIEW_H)
|
|
|
|
#define FRED_VIEW_H
|
|
|
|
|
2019-10-13 20:17:22 +00:00
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Co_Out{
|
|
|
|
Co_Request request;
|
|
|
|
union{
|
|
|
|
struct{
|
|
|
|
Event_Property get_flags;
|
|
|
|
Event_Property abort_flags;
|
|
|
|
};
|
|
|
|
struct{
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2019-02-10 09:18:34 +00:00
|
|
|
struct View{
|
2019-09-02 21:32:52 +00:00
|
|
|
View *next;
|
|
|
|
View *prev;
|
2018-03-24 10:06:45 +00:00
|
|
|
struct Panel *panel;
|
|
|
|
b32 in_use;
|
|
|
|
|
2019-02-27 05:49:35 +00:00
|
|
|
Editing_File *file;
|
2018-08-12 03:45:09 +00:00
|
|
|
Lifetime_Object *lifetime_object;
|
2018-03-24 10:06:45 +00:00
|
|
|
|
2019-02-09 22:48:53 +00:00
|
|
|
File_Edit_Positions edit_pos_;
|
2019-06-20 23:43:27 +00:00
|
|
|
i64 mark;
|
2019-02-10 09:18:34 +00:00
|
|
|
f32 preferred_x;
|
2018-03-24 10:06:45 +00:00
|
|
|
|
2019-09-02 18:59:36 +00:00
|
|
|
b8 new_scroll_target;
|
|
|
|
|
2019-10-13 20:17:22 +00:00
|
|
|
Coroutine *co;
|
|
|
|
Co_Out co_out;
|
|
|
|
|
2019-09-02 18:59:36 +00:00
|
|
|
b8 ui_mode;
|
2019-10-10 18:21:47 +00:00
|
|
|
Command_Map_ID ui_map_id;
|
2019-09-02 18:59:36 +00:00
|
|
|
Basic_Scroll ui_scroll;
|
2019-02-26 19:59:57 +00:00
|
|
|
UI_Quit_Function_Type *ui_quit;
|
|
|
|
|
2019-09-02 18:59:36 +00:00
|
|
|
b8 hide_scrollbar;
|
|
|
|
b8 hide_file_bar;
|
|
|
|
b8 show_whitespace;
|
2018-03-24 10:06:45 +00:00
|
|
|
|
|
|
|
Query_Set query_set;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Live_Views{
|
|
|
|
View *views;
|
|
|
|
View free_sentinel;
|
2018-09-22 00:29:32 +00:00
|
|
|
i32 count;
|
|
|
|
i32 max;
|
2018-03-24 10:06:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|