mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
sketch out meta-evaluation for file path maps; have an extra drop-completion ui step when drag/dropping exes, so you can easily drag/drop exes from explorer and add them as targets (the likely common case), but also allowing viewing them with the memory viewer
This commit is contained in:
@@ -89,6 +89,8 @@ Y(String8, type(CTRL_CodeString8), entry_point, "Custom Entry Point")\
|
||||
Y(String8, type(CTRL_PathString8), source_location, "Source Location")\
|
||||
Y(String8, type(CTRL_CodeString8), function_location, "Function Location")\
|
||||
Y(String8, type(CTRL_CodeString8), address_location, "Address Location")\
|
||||
Y(String8, type(CTRL_PathString8), source_path, "Source Path")\
|
||||
Y(String8, type(CTRL_PathString8), destination_path, "Destination Path")\
|
||||
Y(String8, type(CTRL_CodeString8), condition, "Condition")\
|
||||
X(CTRL_MetaEvalFrameArray, callstack, "Call Stack")
|
||||
#define X(T, name, pretty_name) T name;
|
||||
@@ -138,6 +140,12 @@ struct_members(CTRL_PinMetaEval)
|
||||
member_lit_comp(CTRL_MetaEval, type(CTRL_CodeString8), address_location, .pretty_name = str8_lit_comp("Address Location")),
|
||||
};
|
||||
|
||||
struct_members(CTRL_FilePathMapMetaEval)
|
||||
{
|
||||
member_lit_comp(CTRL_MetaEval, type(CTRL_PathString8), source_path, .pretty_name = str8_lit_comp("Source Path")),
|
||||
member_lit_comp(CTRL_MetaEval, type(CTRL_PathString8), destination_path, .pretty_name = str8_lit_comp("Destination Path")),
|
||||
};
|
||||
|
||||
struct_members(CTRL_MachineMetaEval)
|
||||
{
|
||||
member_lit_comp(CTRL_MetaEval, type(B32), frozen, .pretty_name = str8_lit_comp("Frozen")),
|
||||
@@ -174,6 +182,7 @@ struct_members(CTRL_ThreadMetaEval)
|
||||
named_struct_type(CTRL_BreakpointMetaEval, CTRL_MetaEval, .name = str8_lit_comp("breakpoint"));
|
||||
named_struct_type(CTRL_TargetMetaEval, CTRL_MetaEval, .name = str8_lit_comp("target"));
|
||||
named_struct_type(CTRL_PinMetaEval, CTRL_MetaEval, .name = str8_lit_comp("pin"));
|
||||
named_struct_type(CTRL_FilePathMapMetaEval,CTRL_MetaEval, .name = str8_lit_comp("file_path_map"));
|
||||
named_struct_type(CTRL_MachineMetaEval, CTRL_MetaEval, .name = str8_lit_comp("machine"));
|
||||
named_struct_type(CTRL_ProcessMetaEval, CTRL_MetaEval, .name = str8_lit_comp("process"));
|
||||
named_struct_type(CTRL_ModuleMetaEval, CTRL_MetaEval, .name = str8_lit_comp("module"));
|
||||
|
||||
@@ -552,7 +552,7 @@ os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
U64 name_size = DragQueryFile(drop, idx, 0, 0) + 1;
|
||||
U8 *name_ptr = push_array(os_w32_event_arena, U8, name_size);
|
||||
DragQueryFile(drop, idx, (char *)name_ptr, name_size);
|
||||
str8_list_push(os_w32_event_arena, &event->strings, str8(name_ptr, name_size));
|
||||
str8_list_push(os_w32_event_arena, &event->strings, str8(name_ptr, name_size - 1));
|
||||
}
|
||||
DragFinish(drop);
|
||||
}break;
|
||||
|
||||
@@ -310,10 +310,10 @@ RD_CmdKindInfo rd_cmd_kind_info_table[214] =
|
||||
{ str8_lit_comp("focus_panel_left"), str8_lit_comp("Focuses a panel leftward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Left"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("focus_panel_up"), str8_lit_comp("Focuses a panel upward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Up"), RD_IconKind_UpArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("focus_panel_down"), str8_lit_comp("Focuses a panel downward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Down"), RD_IconKind_DownArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), RD_IconKind_Undo, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), RD_IconKind_Redo, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), RD_IconKind_Undo, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), RD_IconKind_Redo, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("close_panel"), str8_lit_comp("Closes the currently active panel."), str8_lit_comp(""), str8_lit_comp("Close Panel"), RD_IconKind_ClosePanel, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("next_tab"), str8_lit_comp("Focuses the next tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Next Tab"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
{ str8_lit_comp("prev_tab"), str8_lit_comp("Focuses the previous tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Previous Tab"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}},
|
||||
@@ -495,7 +495,7 @@ RD_StringBindingPair rd_default_binding_table[110] =
|
||||
{str8_lit_comp("redo"), {OS_Key_Y, 0 |OS_Modifier_Ctrl }},
|
||||
{str8_lit_comp("go_back"), {OS_Key_Left, 0 |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("go_forward"), {OS_Key_Right, 0 |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("close_panel"), {OS_Key_P, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift }},
|
||||
{str8_lit_comp("close_panel"), {OS_Key_P, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("next_tab"), {OS_Key_PageDown, 0 |OS_Modifier_Ctrl }},
|
||||
{str8_lit_comp("prev_tab"), {OS_Key_PageUp, 0 |OS_Modifier_Ctrl }},
|
||||
{str8_lit_comp("next_tab"), {OS_Key_Tab, 0 |OS_Modifier_Ctrl }},
|
||||
@@ -670,12 +670,13 @@ str8_lit_comp("5"),
|
||||
str8_lit_comp("c"),
|
||||
};
|
||||
|
||||
String8 rd_collection_name_table[12] =
|
||||
String8 rd_collection_name_table[13] =
|
||||
{
|
||||
str8_lit_comp("watches"),
|
||||
str8_lit_comp("targets"),
|
||||
str8_lit_comp("breakpoints"),
|
||||
str8_lit_comp("watch_pins"),
|
||||
str8_lit_comp("file_path_maps"),
|
||||
str8_lit_comp("threads"),
|
||||
str8_lit_comp("modules"),
|
||||
str8_lit_comp("locals"),
|
||||
@@ -686,12 +687,13 @@ str8_lit_comp("types"),
|
||||
str8_lit_comp("procedures"),
|
||||
};
|
||||
|
||||
RD_EntityKind rd_collection_entity_kind_table[12] =
|
||||
RD_EntityKind rd_collection_entity_kind_table[13] =
|
||||
{
|
||||
RD_EntityKind_Watch,
|
||||
RD_EntityKind_Target,
|
||||
RD_EntityKind_Breakpoint,
|
||||
RD_EntityKind_WatchPin,
|
||||
RD_EntityKind_FilePathMap,
|
||||
RD_EntityKind_Nil,
|
||||
RD_EntityKind_Nil,
|
||||
RD_EntityKind_Nil,
|
||||
@@ -702,12 +704,13 @@ RD_EntityKind_Nil,
|
||||
RD_EntityKind_Nil,
|
||||
};
|
||||
|
||||
CTRL_EntityKind rd_collection_ctrl_entity_kind_table[12] =
|
||||
CTRL_EntityKind rd_collection_ctrl_entity_kind_table[13] =
|
||||
{
|
||||
CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Thread,
|
||||
CTRL_EntityKind_Module,
|
||||
CTRL_EntityKind_Null,
|
||||
@@ -718,12 +721,13 @@ CTRL_EntityKind_Null,
|
||||
CTRL_EntityKind_Null,
|
||||
};
|
||||
|
||||
EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[12] =
|
||||
EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[13] =
|
||||
{
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(watches),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(targets),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(breakpoints),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(watch_pins),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(file_path_maps),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(threads),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(modules),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(locals),
|
||||
@@ -734,12 +738,13 @@ EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(types),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(procedures),
|
||||
};
|
||||
|
||||
EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[12] =
|
||||
EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[13] =
|
||||
{
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(watches),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(targets),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(breakpoints),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(watch_pins),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(file_path_maps),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(threads),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(modules),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(locals),
|
||||
@@ -750,12 +755,13 @@ EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(types),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_NAME(procedures),
|
||||
};
|
||||
|
||||
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[12] =
|
||||
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[13] =
|
||||
{
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(watches),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(targets),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(breakpoints),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(watch_pins),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(file_path_maps),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(threads),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(modules),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(identity),
|
||||
@@ -766,12 +772,13 @@ EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(types),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_NAME(procedures),
|
||||
};
|
||||
|
||||
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[12] =
|
||||
EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[13] =
|
||||
{
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(watches),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(targets),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(breakpoints),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(watch_pins),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(file_path_maps),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(threads),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(modules),
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME(identity),
|
||||
|
||||
@@ -648,6 +648,7 @@ EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watches);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(targets);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(breakpoints);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watch_pins);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(file_path_maps);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(threads);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(modules);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(locals);
|
||||
@@ -660,6 +661,7 @@ EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watches);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(targets);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(breakpoints);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watch_pins);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(file_path_maps);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(threads);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(modules);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(locals);
|
||||
@@ -672,6 +674,7 @@ EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watches);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(targets);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(breakpoints);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watch_pins);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(file_path_maps);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(threads);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(modules);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(globals);
|
||||
@@ -682,6 +685,7 @@ EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watches);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(targets);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(breakpoints);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watch_pins);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(file_path_maps);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(threads);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(modules);
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(globals);
|
||||
@@ -743,13 +747,13 @@ extern RD_StringBindingPair rd_default_binding_table[110];
|
||||
extern String8 rd_binding_version_remap_old_name_table[7];
|
||||
extern String8 rd_binding_version_remap_new_name_table[7];
|
||||
extern String8 rd_icon_kind_text_table[69];
|
||||
extern String8 rd_collection_name_table[12];
|
||||
extern RD_EntityKind rd_collection_entity_kind_table[12];
|
||||
extern CTRL_EntityKind rd_collection_ctrl_entity_kind_table[12];
|
||||
extern EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[12];
|
||||
extern EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[12];
|
||||
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[12];
|
||||
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[12];
|
||||
extern String8 rd_collection_name_table[13];
|
||||
extern RD_EntityKind rd_collection_entity_kind_table[13];
|
||||
extern CTRL_EntityKind rd_collection_ctrl_entity_kind_table[13];
|
||||
extern EV_ViewRuleExprExpandInfoHookFunctionType * rd_collection_expr_expand_info_hook_function_table[13];
|
||||
extern EV_ViewRuleExprExpandRangeInfoHookFunctionType * rd_collection_expr_expand_range_info_hook_function_table[13];
|
||||
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_id_from_num_hook_function_table[13];
|
||||
extern EV_ViewRuleExprExpandIDFromNumHookFunctionType * rd_collection_expr_expand_num_from_id_hook_function_table[13];
|
||||
extern RD_ViewRuleInfo rd_view_rule_kind_info_table[34];
|
||||
extern RD_IconKind rd_entity_kind_icon_kind_table[30];
|
||||
extern String8 rd_theme_preset_display_string_table[9];
|
||||
|
||||
@@ -283,12 +283,12 @@ RD_CmdTable: // | | | |
|
||||
{FocusPanelDown 1 1 Null null Nil 0 0 0 0 0 0 DownArrow "focus_panel_down" "Focus Panel Down" "Focuses a panel downward of the currently focused panel." "" }
|
||||
|
||||
//- rjf: undo/redo
|
||||
{Undo 1 1 Null null Nil 0 0 0 0 0 0 Undo "undo" "Undo" "Undoes the previous action." "" }
|
||||
{Redo 1 1 Null null Nil 0 0 0 0 0 0 Redo "redo" "Redo" "Redoes the first previously undone action." "" }
|
||||
{Undo 0 0 Null null Nil 0 0 0 0 0 0 Undo "undo" "Undo" "Undoes the previous action." "" }
|
||||
{Redo 0 0 Null null Nil 0 0 0 0 0 0 Redo "redo" "Redo" "Redoes the first previously undone action." "" }
|
||||
|
||||
//- rjf: focus history
|
||||
{GoBack 1 1 Null null Nil 0 0 0 0 0 0 LeftArrow "go_back" "Go Back" "Returns to the previously selected panel and tab in recorded history." "" }
|
||||
{GoForward 1 1 Null null Nil 0 0 0 0 0 0 RightArrow "go_forward" "Go Forward" "Returns to the next selected panel and tab in recorded history." "" }
|
||||
{GoBack 0 0 Null null Nil 0 0 0 0 0 0 LeftArrow "go_back" "Go Back" "Returns to the previously selected panel and tab in recorded history." "" }
|
||||
{GoForward 0 0 Null null Nil 0 0 0 0 0 0 RightArrow "go_forward" "Go Forward" "Returns to the next selected panel and tab in recorded history." "" }
|
||||
|
||||
//- rjf: panel removal
|
||||
{ClosePanel 1 1 Null null Nil 0 0 0 0 0 0 ClosePanel "close_panel" "Close Panel" "Closes the currently active panel." "" }
|
||||
@@ -587,7 +587,7 @@ RD_DefaultBindingTable:
|
||||
{ "go_forward" Right 0 0 alt }
|
||||
|
||||
//- rjf: panel removal
|
||||
{ "close_panel" P ctrl shift 0 }
|
||||
{ "close_panel" P ctrl shift alt }
|
||||
|
||||
//- rjf: panel tab
|
||||
{ "next_tab" PageDown ctrl 0 0 }
|
||||
@@ -825,6 +825,7 @@ RD_CollectionTable:
|
||||
{targets Target Null x}
|
||||
{breakpoints Breakpoint Null x}
|
||||
{watch_pins WatchPin Null x}
|
||||
{file_path_maps FilePathMap Null x}
|
||||
{threads Nil Thread x}
|
||||
{modules Nil Module x}
|
||||
{locals Nil Null -}
|
||||
|
||||
+99
-30
@@ -3088,6 +3088,7 @@ rd_window_open(Vec2F32 size, OS_Handle preferred_monitor, RD_CfgSrc cfg_src)
|
||||
window->ctx_menu_regs = push_array(window->ctx_menu_arena, RD_Regs, 1);
|
||||
window->ctx_menu_input_buffer_size = KB(4);
|
||||
window->ctx_menu_input_buffer = push_array(window->arena, U8, window->ctx_menu_input_buffer_size);
|
||||
window->drop_completion_arena = arena_alloc();
|
||||
window->hover_eval_arena = arena_alloc();
|
||||
window->autocomp_lister_params_arena = arena_alloc();
|
||||
window->free_panel = &rd_nil_panel;
|
||||
@@ -3757,7 +3758,7 @@ rd_window_frame(RD_Window *ws)
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: top-level context menu
|
||||
//- rjf: top-level registers context menu
|
||||
//
|
||||
RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(rd_state->ctx_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
@@ -4355,6 +4356,47 @@ rd_window_frame(RD_Window *ws)
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: drop-completion context menu
|
||||
//
|
||||
if(ws->drop_completion_paths.node_count != 0)
|
||||
{
|
||||
RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(rd_state->drop_completion_key)
|
||||
RD_Palette(RD_PaletteCode_ImplicitButton)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
{
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
for(String8Node *n = ws->drop_completion_paths.first; n != 0; n = n->next)
|
||||
{
|
||||
UI_Row UI_Padding(ui_em(1.f, 1.f))
|
||||
{
|
||||
UI_PrefWidth(ui_em(2.f, 1.f)) RD_Font(RD_FontSlot_Icons) ui_label(rd_icon_kind_text_table[RD_IconKind_FileOutline]);
|
||||
UI_PrefWidth(ui_text_dim(10, 1)) ui_label(n->string);
|
||||
}
|
||||
}
|
||||
RD_Palette(RD_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f));
|
||||
if(ui_clicked(rd_icon_buttonf(RD_IconKind_Target, 0, "Add File%s As Target%s",
|
||||
(ws->drop_completion_paths.node_count > 1) ? "s" : "",
|
||||
(ws->drop_completion_paths.node_count > 1) ? "s" : "")))
|
||||
{
|
||||
for(String8Node *n = ws->drop_completion_paths.first; n != 0; n = n->next)
|
||||
{
|
||||
rd_cmd(RD_CmdKind_AddTarget, .file_path = n->string);
|
||||
}
|
||||
ui_ctx_menu_close();
|
||||
}
|
||||
if(ui_clicked(rd_icon_buttonf(RD_IconKind_Target, 0, "View File%s",
|
||||
(ws->drop_completion_paths.node_count > 1) ? "s" : "")))
|
||||
{
|
||||
for(String8Node *n = ws->drop_completion_paths.first; n != 0; n = n->next)
|
||||
{
|
||||
rd_cmd(RD_CmdKind_Open, .file_path = n->string);
|
||||
}
|
||||
ui_ctx_menu_close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: popup
|
||||
//
|
||||
@@ -5114,8 +5156,10 @@ rd_window_frame(RD_Window *ws)
|
||||
{
|
||||
String8 cmds[] =
|
||||
{
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewPanelRight].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewPanelUp].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewPanelDown].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewPanelRight].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewPanelLeft].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_ClosePanel].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_RotatePanelColumns].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NextPanel].string,
|
||||
@@ -5130,8 +5174,10 @@ rd_window_frame(RD_Window *ws)
|
||||
};
|
||||
U32 codepoints[] =
|
||||
{
|
||||
'r',
|
||||
'u',
|
||||
'd',
|
||||
'r',
|
||||
'l',
|
||||
'x',
|
||||
'c',
|
||||
'n',
|
||||
@@ -7606,17 +7652,35 @@ rd_window_frame(RD_Window *ws)
|
||||
//////////////////////////
|
||||
//- rjf: accept file drops
|
||||
//
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(evt->kind == UI_EventKind_FileDrop && contains_2f32(content_rect, evt->pos))
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
for(String8Node *n = evt->paths.first; n != 0; n = n->next)
|
||||
if(evt->kind == UI_EventKind_FileDrop && contains_2f32(content_rect, evt->pos))
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
rd_cmd(RD_CmdKind_Open, .file_path = path_normalized_from_string(scratch.arena, n->string));
|
||||
scratch_end(scratch);
|
||||
B32 need_drop_completion = 0;
|
||||
arena_clear(ws->drop_completion_arena);
|
||||
MemoryZeroStruct(&ws->drop_completion_paths);
|
||||
for(String8Node *n = evt->paths.first; n != 0; n = n->next)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
String8 path = path_normalized_from_string(scratch.arena, n->string);
|
||||
if(str8_match(str8_skip_last_dot(path), str8_lit("exe"), StringMatchFlag_CaseInsensitive))
|
||||
{
|
||||
str8_list_push(ws->drop_completion_arena, &ws->drop_completion_paths, push_str8_copy(ws->drop_completion_arena, path));
|
||||
need_drop_completion = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
rd_cmd(RD_CmdKind_Open, .file_path = path);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
if(need_drop_completion)
|
||||
{
|
||||
ui_ctx_menu_open(rd_state->drop_completion_key, ui_key_zero(), evt->pos);
|
||||
}
|
||||
ui_eat_event(evt);
|
||||
}
|
||||
ui_eat_event(evt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8299,27 +8363,28 @@ struct RD_CtrlEntityExpandAccel
|
||||
CTRL_EntityArray entities;
|
||||
};
|
||||
|
||||
//- rjf: watches
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_Watch); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_Watch, 0); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_Watch, 0); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_Watch, 0); }
|
||||
|
||||
//- rjf: meta entities
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_Target); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_Target, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_Target, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_Target, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(breakpoints) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_Breakpoint); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(breakpoints) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_Breakpoint, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(breakpoints){ return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_Breakpoint, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(breakpoints){ return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_Breakpoint, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_WatchPin); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_WatchPin, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_WatchPin, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_WatchPin, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_Watch); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_Watch, 0); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_Watch, 0); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watches) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_Watch, 0); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_Target); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_Target, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_Target, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(targets) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_Target, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(breakpoints) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_Breakpoint); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(breakpoints) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_Breakpoint, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(breakpoints) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_Breakpoint, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(breakpoints) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_Breakpoint, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_WatchPin); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_WatchPin, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_WatchPin, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(watch_pins) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_WatchPin, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(file_path_maps) { return rd_ev_view_rule_expr_expand_info__meta_entities(arena, view, filter, expr, params, RD_EntityKind_FilePathMap); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(file_path_maps) { return rd_ev_view_rule_expr_expand_range_info__meta_entities(arena, view, filter, expr, params, idx_range, user_data, RD_EntityKind_FilePathMap, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(file_path_maps) { return rd_ev_view_rule_expr_id_from_num__meta_entities(num, user_data, RD_EntityKind_FilePathMap, 1); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(file_path_maps) { return rd_ev_view_rule_expr_num_from_id__meta_entities(id, user_data, RD_EntityKind_FilePathMap, 1); }
|
||||
|
||||
//- rjf: meta ctrl entities
|
||||
|
||||
@@ -10778,7 +10843,8 @@ rd_init(CmdLine *cmdln)
|
||||
rd_state->entities_root = rd_entity_alloc(&d_nil_entity, RD_EntityKind_Root);
|
||||
rd_state->key_map_arena = arena_alloc();
|
||||
rd_state->popup_arena = arena_alloc();
|
||||
rd_state->ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("top_level_ctx_menu"));
|
||||
rd_state->ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("top_level_ctx_menu"));
|
||||
rd_state->drop_completion_key = ui_key_from_string(ui_key_zero(), str8_lit("drop_completion_ctx_menu"));
|
||||
rd_state->string_search_arena = arena_alloc();
|
||||
rd_state->eval_viz_view_cache_slots_count = 1024;
|
||||
rd_state->eval_viz_view_cache_slots = push_array(arena, RD_EvalVizViewCacheSlot, rd_state->eval_viz_view_cache_slots_count);
|
||||
@@ -11352,12 +11418,14 @@ rd_frame(void)
|
||||
RD_EntityKind_Breakpoint,
|
||||
RD_EntityKind_WatchPin,
|
||||
RD_EntityKind_Target,
|
||||
RD_EntityKind_FilePathMap,
|
||||
};
|
||||
E_TypeKey evallable_kind_types[] =
|
||||
{
|
||||
e_type_key_cons_base(type(CTRL_BreakpointMetaEval)),
|
||||
e_type_key_cons_base(type(CTRL_PinMetaEval)),
|
||||
e_type_key_cons_base(type(CTRL_TargetMetaEval)),
|
||||
e_type_key_cons_base(type(CTRL_FilePathMapMetaEval)),
|
||||
};
|
||||
for EachElement(idx, evallable_kinds)
|
||||
{
|
||||
@@ -11701,6 +11769,7 @@ rd_frame(void)
|
||||
os_window_close(ws->os);
|
||||
arena_release(ws->query_cmd_arena);
|
||||
arena_release(ws->ctx_menu_arena);
|
||||
arena_release(ws->drop_completion_arena);
|
||||
arena_release(ws->hover_eval_arena);
|
||||
arena_release(ws->autocomp_lister_params_arena);
|
||||
arena_release(ws->arena);
|
||||
|
||||
@@ -674,6 +674,10 @@ struct RD_Window
|
||||
TxtPt ctx_menu_input_cursor;
|
||||
TxtPt ctx_menu_input_mark;
|
||||
|
||||
// rjf: drop-completion state
|
||||
Arena *drop_completion_arena;
|
||||
String8List drop_completion_paths;
|
||||
|
||||
// rjf: autocomplete lister state
|
||||
U64 autocomp_last_frame_idx;
|
||||
B32 autocomp_input_dirty;
|
||||
@@ -838,6 +842,7 @@ struct RD_State
|
||||
String8 current_path;
|
||||
|
||||
// rjf: fixed ui keys
|
||||
UI_Key drop_completion_key;
|
||||
UI_Key ctx_menu_key;
|
||||
|
||||
// rjf: drag/drop state
|
||||
|
||||
@@ -5034,6 +5034,22 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(targets)
|
||||
////////////////////////////////
|
||||
//~ rjf: file_path_map @view_hook_impl
|
||||
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(file_path_map)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
RD_WatchViewState *wv = rd_view_state(RD_WatchViewState);
|
||||
if(!wv->initialized)
|
||||
{
|
||||
rd_watch_view_init(wv);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f);
|
||||
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.75f, .dequote_string = 1);
|
||||
}
|
||||
rd_watch_view_build(wv, RD_WatchViewFlag_NoHeader|RD_WatchViewFlag_PrettyNameMembers|RD_WatchViewFlag_PrettyEntityRows|RD_WatchViewFlag_DisableCacheLines,
|
||||
str8_lit("file_path_maps"), str8_lit("only: source_path destination_path str"), 0, 10, rect);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
#if 0 // TODO(rjf): @msgs
|
||||
typedef struct RD_FilePathMapViewState RD_FilePathMapViewState;
|
||||
struct RD_FilePathMapViewState
|
||||
{
|
||||
@@ -5364,6 +5380,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(file_path_map)
|
||||
scratch_end(scratch);
|
||||
ProfEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: auto_view_rules @view_hook_impl
|
||||
|
||||
Reference in New Issue
Block a user