mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
single-press-to-activate in text right-click commands menu
This commit is contained in:
+2
-1
@@ -47,7 +47,8 @@ commands =
|
|||||||
{
|
{
|
||||||
//- rjf: [raddbg]
|
//- rjf: [raddbg]
|
||||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg meta telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg meta telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
|
.f1 = { .win = "raddbg_stable --ipc kill_all && build radbin debug", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
|
|
||||||
//- rjf: [raddbg wsl]
|
//- rjf: [raddbg wsl]
|
||||||
// .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
// .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
|
|||||||
@@ -454,7 +454,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[26] =
|
|||||||
{str8_lit_comp("thread"), str8_lit_comp("x:{'label':code_string, 'id':u64, @no_expand 'active':bool, 'call_stack':query}")},
|
{str8_lit_comp("thread"), str8_lit_comp("x:{'label':code_string, 'id':u64, @no_expand 'active':bool, 'call_stack':query}")},
|
||||||
};
|
};
|
||||||
|
|
||||||
String8 rd_reg_slot_code_name_table[48] =
|
String8 rd_reg_slot_code_name_table[49] =
|
||||||
{
|
{
|
||||||
{0},
|
{0},
|
||||||
str8_lit_comp("machine"),
|
str8_lit_comp("machine"),
|
||||||
@@ -500,13 +500,14 @@ str8_lit_comp("do_big_rows"),
|
|||||||
str8_lit_comp("all_windows"),
|
str8_lit_comp("all_windows"),
|
||||||
str8_lit_comp("non_graphical"),
|
str8_lit_comp("non_graphical"),
|
||||||
str8_lit_comp("prefer_new_tab"),
|
str8_lit_comp("prefer_new_tab"),
|
||||||
|
str8_lit_comp("activate_with_single_click"),
|
||||||
str8_lit_comp("dir2"),
|
str8_lit_comp("dir2"),
|
||||||
str8_lit_comp("string"),
|
str8_lit_comp("string"),
|
||||||
str8_lit_comp("cmd_name"),
|
str8_lit_comp("cmd_name"),
|
||||||
str8_lit_comp("os_event"),
|
str8_lit_comp("os_event"),
|
||||||
};
|
};
|
||||||
|
|
||||||
Rng1U64 rd_reg_slot_range_table[48] =
|
Rng1U64 rd_reg_slot_range_table[49] =
|
||||||
{
|
{
|
||||||
{0},
|
{0},
|
||||||
{OffsetOf(RD_Regs, machine), OffsetOf(RD_Regs, machine) + sizeof(CTRL_Handle)},
|
{OffsetOf(RD_Regs, machine), OffsetOf(RD_Regs, machine) + sizeof(CTRL_Handle)},
|
||||||
@@ -552,6 +553,7 @@ Rng1U64 rd_reg_slot_range_table[48] =
|
|||||||
{OffsetOf(RD_Regs, all_windows), OffsetOf(RD_Regs, all_windows) + sizeof(B32)},
|
{OffsetOf(RD_Regs, all_windows), OffsetOf(RD_Regs, all_windows) + sizeof(B32)},
|
||||||
{OffsetOf(RD_Regs, non_graphical), OffsetOf(RD_Regs, non_graphical) + sizeof(B32)},
|
{OffsetOf(RD_Regs, non_graphical), OffsetOf(RD_Regs, non_graphical) + sizeof(B32)},
|
||||||
{OffsetOf(RD_Regs, prefer_new_tab), OffsetOf(RD_Regs, prefer_new_tab) + sizeof(B32)},
|
{OffsetOf(RD_Regs, prefer_new_tab), OffsetOf(RD_Regs, prefer_new_tab) + sizeof(B32)},
|
||||||
|
{OffsetOf(RD_Regs, activate_with_single_click), OffsetOf(RD_Regs, activate_with_single_click) + sizeof(B32)},
|
||||||
{OffsetOf(RD_Regs, dir2), OffsetOf(RD_Regs, dir2) + sizeof(Dir2)},
|
{OffsetOf(RD_Regs, dir2), OffsetOf(RD_Regs, dir2) + sizeof(Dir2)},
|
||||||
{OffsetOf(RD_Regs, string), OffsetOf(RD_Regs, string) + sizeof(String8)},
|
{OffsetOf(RD_Regs, string), OffsetOf(RD_Regs, string) + sizeof(String8)},
|
||||||
{OffsetOf(RD_Regs, cmd_name), OffsetOf(RD_Regs, cmd_name) + sizeof(String8)},
|
{OffsetOf(RD_Regs, cmd_name), OffsetOf(RD_Regs, cmd_name) + sizeof(String8)},
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ RD_RegSlot_DoBigRows,
|
|||||||
RD_RegSlot_AllWindows,
|
RD_RegSlot_AllWindows,
|
||||||
RD_RegSlot_NonGraphical,
|
RD_RegSlot_NonGraphical,
|
||||||
RD_RegSlot_PreferNewTab,
|
RD_RegSlot_PreferNewTab,
|
||||||
|
RD_RegSlot_ActivateWithSingleClick,
|
||||||
RD_RegSlot_Dir2,
|
RD_RegSlot_Dir2,
|
||||||
RD_RegSlot_String,
|
RD_RegSlot_String,
|
||||||
RD_RegSlot_CmdName,
|
RD_RegSlot_CmdName,
|
||||||
@@ -491,6 +492,7 @@ B32 do_big_rows;
|
|||||||
B32 all_windows;
|
B32 all_windows;
|
||||||
B32 non_graphical;
|
B32 non_graphical;
|
||||||
B32 prefer_new_tab;
|
B32 prefer_new_tab;
|
||||||
|
B32 activate_with_single_click;
|
||||||
Dir2 dir2;
|
Dir2 dir2;
|
||||||
String8 string;
|
String8 string;
|
||||||
String8 cmd_name;
|
String8 cmd_name;
|
||||||
@@ -590,6 +592,7 @@ Z(getting_started)\
|
|||||||
.all_windows = rd_regs()->all_windows,\
|
.all_windows = rd_regs()->all_windows,\
|
||||||
.non_graphical = rd_regs()->non_graphical,\
|
.non_graphical = rd_regs()->non_graphical,\
|
||||||
.prefer_new_tab = rd_regs()->prefer_new_tab,\
|
.prefer_new_tab = rd_regs()->prefer_new_tab,\
|
||||||
|
.activate_with_single_click = rd_regs()->activate_with_single_click,\
|
||||||
.dir2 = rd_regs()->dir2,\
|
.dir2 = rd_regs()->dir2,\
|
||||||
.string = rd_regs()->string,\
|
.string = rd_regs()->string,\
|
||||||
.cmd_name = rd_regs()->cmd_name,\
|
.cmd_name = rd_regs()->cmd_name,\
|
||||||
@@ -600,8 +603,8 @@ extern String8 rd_tab_fast_path_view_name_table[25];
|
|||||||
extern String8 rd_tab_fast_path_query_name_table[25];
|
extern String8 rd_tab_fast_path_query_name_table[25];
|
||||||
extern RD_VocabInfo rd_vocab_info_table[358];
|
extern RD_VocabInfo rd_vocab_info_table[358];
|
||||||
extern RD_NameSchemaInfo rd_name_schema_info_table[26];
|
extern RD_NameSchemaInfo rd_name_schema_info_table[26];
|
||||||
extern String8 rd_reg_slot_code_name_table[48];
|
extern String8 rd_reg_slot_code_name_table[49];
|
||||||
extern Rng1U64 rd_reg_slot_range_table[48];
|
extern Rng1U64 rd_reg_slot_range_table[49];
|
||||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||||
extern String8 rd_binding_version_remap_new_name_table[8];
|
extern String8 rd_binding_version_remap_new_name_table[8];
|
||||||
extern String8 rd_icon_kind_text_table[75];
|
extern String8 rd_icon_kind_text_table[75];
|
||||||
|
|||||||
@@ -799,6 +799,7 @@ RD_RegTable:
|
|||||||
{B32 all_windows AllWindows }
|
{B32 all_windows AllWindows }
|
||||||
{B32 non_graphical NonGraphical }
|
{B32 non_graphical NonGraphical }
|
||||||
{B32 prefer_new_tab PreferNewTab }
|
{B32 prefer_new_tab PreferNewTab }
|
||||||
|
{B32 activate_with_single_click ActivateWithSingleClick }
|
||||||
{Dir2 dir2 Dir2 }
|
{Dir2 dir2 Dir2 }
|
||||||
{String8 string String }
|
{String8 string String }
|
||||||
{String8 cmd_name CmdName }
|
{String8 cmd_name CmdName }
|
||||||
|
|||||||
@@ -1998,6 +1998,11 @@ rd_view_ui(Rng2F32 rect)
|
|||||||
//
|
//
|
||||||
B32 implicit_root = (cfg_node_child_from_string(cfg_node_from_id(rd_regs()->view), str8_lit("explicit_root")) == &cfg_nil_node);
|
B32 implicit_root = (cfg_node_child_from_string(cfg_node_from_id(rd_regs()->view), str8_lit("explicit_root")) == &cfg_nil_node);
|
||||||
|
|
||||||
|
//////////////////////////////
|
||||||
|
//- rjf: decide single-click-to-activate preference
|
||||||
|
//
|
||||||
|
B32 prefer_single_click_to_activate = (cfg_node_child_from_string(cfg_node_from_id(rd_regs()->view), str8_lit("activate_with_single_click")) != &cfg_nil_node);
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: determine autocompletion string
|
//- rjf: determine autocompletion string
|
||||||
//
|
//
|
||||||
@@ -4201,6 +4206,7 @@ rd_view_ui(Rng2F32 rect)
|
|||||||
// rjf: activation (double-click normally, or single-clicks with special buttons)
|
// rjf: activation (double-click normally, or single-clicks with special buttons)
|
||||||
if((!(cell_info.flags & RD_WatchCellFlag_ActivateWithSingleClick) && ui_double_clicked(sig)) ||
|
if((!(cell_info.flags & RD_WatchCellFlag_ActivateWithSingleClick) && ui_double_clicked(sig)) ||
|
||||||
((cell_info.flags & RD_WatchCellFlag_ActivateWithSingleClick) && ui_clicked(sig)) ||
|
((cell_info.flags & RD_WatchCellFlag_ActivateWithSingleClick) && ui_clicked(sig)) ||
|
||||||
|
(prefer_single_click_to_activate && ui_pressed(sig)) ||
|
||||||
sig.f & UI_SignalFlag_KeyboardPressed)
|
sig.f & UI_SignalFlag_KeyboardPressed)
|
||||||
{
|
{
|
||||||
// rjf: kill if a double-clickable cell
|
// rjf: kill if a double-clickable cell
|
||||||
@@ -14770,6 +14776,14 @@ rd_frame(void)
|
|||||||
{
|
{
|
||||||
cfg_node_child_from_string_or_alloc(rd_state->cfg, view, str8_lit("lister"));
|
cfg_node_child_from_string_or_alloc(rd_state->cfg, view, str8_lit("lister"));
|
||||||
}
|
}
|
||||||
|
if(!rd_regs()->activate_with_single_click)
|
||||||
|
{
|
||||||
|
cfg_node_release(rd_state->cfg, cfg_node_child_from_string(view, str8_lit("activate_with_single_click")));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cfg_node_child_from_string_or_alloc(rd_state->cfg, view, str8_lit("activate_with_single_click"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// rjf: choose initial input string
|
// rjf: choose initial input string
|
||||||
|
|||||||
@@ -2226,6 +2226,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
|
|||||||
.expr = txt_pt_match(*cursor, *mark) ? str8_lit("query:text_pt_commands") : str8_lit("query:text_range_commands"),
|
.expr = txt_pt_match(*cursor, *mark) ? str8_lit("query:text_pt_commands") : str8_lit("query:text_range_commands"),
|
||||||
.do_implicit_root = 1,
|
.do_implicit_root = 1,
|
||||||
.do_lister = 1,
|
.do_lister = 1,
|
||||||
|
.activate_with_single_click = 1,
|
||||||
.ui_key = ui_get_selected_state()->root->key,
|
.ui_key = ui_get_selected_state()->root->key,
|
||||||
.off_px = ui_mouse(),
|
.off_px = ui_mouse(),
|
||||||
.cursor = *cursor,
|
.cursor = *cursor,
|
||||||
|
|||||||
Reference in New Issue
Block a user