2024-07-16 12:34:51 +00:00
|
|
|
struct Viewer {
|
|
|
|
MemoryEditor mem_edit;
|
|
|
|
|
2024-07-25 15:01:08 +00:00
|
|
|
// Imgui colors
|
2024-07-25 10:25:05 +00:00
|
|
|
f32 col_section[Sec_COUNT][3];
|
2024-07-16 10:04:38 +00:00
|
|
|
f32 col_key[3];
|
|
|
|
f32 col_checksum[3];
|
2024-07-19 14:31:48 +00:00
|
|
|
f32 col_highlight[3];
|
2024-07-25 10:25:05 +00:00
|
|
|
f32 col_page_start[3];
|
2024-07-12 08:07:27 +00:00
|
|
|
|
|
|
|
u64 base_display_addr;
|
2024-07-19 14:31:48 +00:00
|
|
|
|
|
|
|
b8 highlight_cluster;
|
|
|
|
u64 highlighted_cluster;
|
|
|
|
|
2024-07-15 16:02:55 +00:00
|
|
|
u64 latest_page_gone_to;
|
2024-07-18 15:43:44 +00:00
|
|
|
u64 latest_key_gone_to;
|
|
|
|
u64 latest_checksum_gone_to;
|
|
|
|
u64 latest_page_list_gone_to;
|
2024-07-11 12:27:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Edit_Bg_Color_Data {
|
2024-07-12 09:58:55 +00:00
|
|
|
RNTuple_Data *rndata;
|
2024-07-16 12:34:51 +00:00
|
|
|
Viewer viewer;
|
2024-07-11 12:27:19 +00:00
|
|
|
};
|
|
|
|
|
2024-07-25 15:01:08 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------
|
|
|
|
// TERMINAL VIEW
|
|
|
|
// ----------------------------------------------------
|
|
|
|
enum Ansi_Color {
|
|
|
|
ACol_None,
|
|
|
|
ACol_Red,
|
|
|
|
ACol_Green,
|
|
|
|
ACol_Yellow,
|
|
|
|
ACol_Blue,
|
|
|
|
ACol_Magenta,
|
|
|
|
ACol_Cyan,
|
|
|
|
ACol_White,
|
|
|
|
ACol_Grey,
|
|
|
|
ACol_Bright_Red,
|
|
|
|
ACol_Bright_Green,
|
|
|
|
ACol_Bright_Yellow,
|
|
|
|
ACol_Bright_Blue,
|
|
|
|
ACol_Bright_Magenta,
|
|
|
|
ACol_Bright_Cyan,
|
|
|
|
ACol_Bright_White,
|
|
|
|
ACol_COUNT
|
|
|
|
};
|
|
|
|
const u64 ACOL_MAX_LEN = 6;
|
|
|
|
internal String8 ansi_color_table[ACol_COUNT] = {
|
|
|
|
str8("\033[0m"),
|
|
|
|
str8("\033[31m"),
|
|
|
|
str8("\033[32m"),
|
|
|
|
str8("\033[33m"),
|
|
|
|
str8("\033[34m"),
|
|
|
|
str8("\033[35m"),
|
|
|
|
str8("\033[36m"),
|
|
|
|
str8("\033[37m"),
|
|
|
|
str8("\033[90m"),
|
|
|
|
str8("\033[91m"),
|
|
|
|
str8("\033[92m"),
|
|
|
|
str8("\033[93m"),
|
|
|
|
str8("\033[94m"),
|
|
|
|
str8("\033[95m"),
|
|
|
|
str8("\033[96m"),
|
|
|
|
str8("\033[97m")
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Term_Viewer {
|
|
|
|
Ansi_Color col_section[Sec_COUNT];
|
|
|
|
Ansi_Color col_key;
|
|
|
|
Ansi_Color col_checksum;
|
|
|
|
Ansi_Color col_highlight;
|
|
|
|
Ansi_Color col_page_start;
|
|
|
|
|
|
|
|
// How many bytes to render per line
|
|
|
|
u16 max_cols;
|
|
|
|
};
|