transient tab editing, more work on descriptions/schemas for settings/etc

This commit is contained in:
Ryan Fleury
2025-04-21 11:02:27 -07:00
parent d98ea1cf6f
commit 02dc501547
6 changed files with 75 additions and 46 deletions
+6 -11
View File
@@ -4,7 +4,7 @@
//- GENERATED CODE
C_LINKAGE_BEGIN
RD_VocabInfo rd_vocab_info_table[320] =
RD_VocabInfo rd_vocab_info_table[314] =
{
{str8_lit_comp("auto_view_rule"), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rule"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars},
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
@@ -108,12 +108,6 @@ RD_VocabInfo rd_vocab_info_table[320] =
{str8_lit_comp("pitch"), str8_lit_comp(""), str8_lit_comp("Pitch"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("zoom"), str8_lit_comp(""), str8_lit_comp("Zoom"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("font_size"), str8_lit_comp(""), str8_lit_comp("Font Size"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("smooth_ui_text"), str8_lit_comp(""), str8_lit_comp("Smooth UI Text"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("smooth_code_text"), str8_lit_comp(""), str8_lit_comp("Smooth Code Text"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("hint_ui_text"), str8_lit_comp(""), str8_lit_comp("Hint UI Text"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("hint_code_text"), str8_lit_comp(""), str8_lit_comp("Hint Code Text"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("opaque_backgrounds"), str8_lit_comp(""), str8_lit_comp("Opaque Backgrounds"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("background_blur"), str8_lit_comp(""), str8_lit_comp("Background Blur"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("row_height"), str8_lit_comp(""), str8_lit_comp("Row Height"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("tab_height"), str8_lit_comp(""), str8_lit_comp("Tab Height"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("launch_and_run"), str8_lit_comp(""), str8_lit_comp("Launch and Run"), str8_lit_comp(""), RD_IconKind_Play},
@@ -331,10 +325,10 @@ RD_VocabInfo rd_vocab_info_table[320] =
RD_NameSchemaInfo rd_name_schema_info_table[20] =
{
{str8_lit_comp("settings"), str8_lit_comp("x:\n{\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n @default(1) 'background_blur': bool,\n @default(1) 'thread_lines': bool,\n @default(1) 'breakpoint_lines': bool,\n @default(1) 'thread_glow': bool,\n @default(1) 'breakpoint_glow': bool,\n @default(0) 'opaque_backgrounds': bool,\n @default(1) 'smooth_ui_text': bool,\n @default(0) 'smooth_code_text': bool,\n @default(1) 'hint_ui_text': bool,\n @default(1) 'hint_code_text': bool,\n @default(2) 'tab_width': @range[1, 32] u64,\n @default(11) 'font_size': @range[6, 72] u64,\n @default(3.f) 'row_height': @range[1.75f, 5.f] f32,\n @default(3.f) 'tab_height': @range[1.75f, 5.f] f32,\n}\n")},
{str8_lit_comp("window"), str8_lit_comp("x:\n{\n //- rjf: animations\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n\n //- rjf: thread & breakpoint decorations\n @default(1) 'thread_lines': bool,\n @default(1) 'thread_glow': bool,\n @default(1) 'breakpoint_lines': bool,\n @default(1) 'breakpoint_glow': bool,\n\n //- rjf: occluding background settings\n @default(0) 'opaque_backgrounds': bool,\n @default(1) 'background_blur': bool,\n\n //- rjf: text rasterization settings\n @default(1) 'smooth_ui_text': bool,\n @default(1) 'hint_ui_text': bool,\n @default(0) 'smooth_code_text': bool,\n @default(1) 'hint_code_text': bool,\n @default(11) @display_name('Window Font Size') 'font_size': @range[6, 72] u64,\n\n //- rjf: size settings\n @default(3.f) @display_name('Window Row Height') 'row_height': @range[1.75f, 5.f] f32,\n @default(3.f) 'tab_height': @range[1.75f, 5.f] f32,\n}\n")},
{str8_lit_comp("window"), str8_lit_comp("x:\n{\n //- rjf: animations\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n\n //- rjf: thread & breakpoint decorations\n @default(1) @display_name('Thread Lines') @description(\"Controls whether or not a long horizontal line is drawn before the next line or instruction that the selected thread will execute in source and disassembly views.\")\n 'thread_lines': bool,\n @default(1) @display_name('Thread Glow') @description(\"Controls whether or not a glowing effect is drawn on the selected thread in source and disassembly views.\")\n 'thread_glow': bool,\n @default(1) @display_name('Breakpoint Lines') @description(\"Controls whether or not a long horizontal line is drawn before the line or instruction at which a breakpoint is placed, in source and disassembly views.\")\n 'breakpoint_lines': bool,\n @default(1) @display_name('Breakpoint Glow') @description(\"Controls whether or not a glowing effect is drawn on breakpoints in source and disassembly views.\")\n 'breakpoint_glow': bool,\n\n //- rjf: occluding background settings\n @default(0) @display_name('Opaque Backgrounds') @description(\"Controls whether or not all floating background colors are forced to be fully opaque.\")\n 'opaque_backgrounds': bool,\n @default(1) @display_name('Background Blur') @description(\"Controls whether or not occluded regions behind floating elements are blurred.\")\n 'background_blur': bool,\n\n //- rjf: text rasterization settings\n @default(1) @display_name('Smooth UI Text') @description(\"Controls whether or not UI text is fully anti-aliased, for a smoother appearance.\")\n 'smooth_ui_text': bool,\n @default(1) @display_name('Hint UI Text') @description(\"Controls whether or not UI text is hinted, for better text readability at small sizes.\")\n 'hint_ui_text': bool,\n @default(0) @display_name('Smooth Code Text') @description(\"Controls whether or not code text is fully anti-aliased, for a smoother appearance.\")\n 'smooth_code_text': bool,\n @default(1) @display_name('Hint Code Text') @description(\"Controls whether or not code text is hinted, for better text readability at small sizes.\")\n 'hint_code_text': bool,\n @default(11) @display_name('Window Font Size') @description(\"Controls the window's default font size. Does not apply to tabs with their own font size set.\")\n 'font_size': @range[6, 72] u64,\n\n //- rjf: size settings\n @default(3.f) @display_name('Window Row Height') @description(\"Controls the window's default row height, in multiples of the font size. Does not apply to tabs with their own row height set.\")\n 'row_height': @range[1.75f, 5.f] f32,\n @default(3.f) @description(\"Controls the height of tabs, in multiples of the font size.\")\n 'tab_height': @range[1.75f, 5.f] f32,\n}\n")},
{str8_lit_comp("tab"), str8_lit_comp("x:\n{\n @default(11) @display_name('Tab Font Size') 'font_size': @range[6, 72] u64,\n}\n")},
{str8_lit_comp("watch"), str8_lit_comp("@inherit(tab) x:\n{\n @default(3.f) @display_name('Tab Row Height') 'row_height': @range[1.75f, 5.f] f32,\n}\n")},
{str8_lit_comp("text"), str8_lit_comp("@inherit(tab) x:\n{\n 'lang':lang,\n 'size':code_string,\n @default(1) 'show_line_numbers':bool,\n}\n")},
{str8_lit_comp("text"), str8_lit_comp("@inherit(tab) x:\n{\n 'lang':lang,\n 'size':code_string,\n @default(1) 'show_line_numbers':bool,\n @default(0) @display_name('Transient') 'auto': bool,\n}\n")},
{str8_lit_comp("disasm"), str8_lit_comp("@inherit(tab) x:\n{\n 'arch': arch,\n 'syntax': dasm_syntax,\n 'size': code_string,\n @default(1) 'show_addresses': bool,\n @default(0) 'show_code_bytes': bool,\n @default(1) 'show_source_lines': bool,\n @default(1) 'show_symbol_names': bool,\n @default(1) 'show_line_numbers': bool,\n}\n")},
{str8_lit_comp("memory"), str8_lit_comp("@inherit(tab) x:\n{\n 'size': code_string,\n @default(16) 'num_columns': @range[1, 64] u64,\n @default(1) 'bytes_per_cell': @range[1, 8] u64,\n}\n")},
{str8_lit_comp("bitmap"), str8_lit_comp("@inherit(tab) x:\n{\n @order(0) 'w': u64,\n @order(1) 'h': u64,\n 'fmt': tex2dformat,\n}\n")},
@@ -352,7 +346,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[20] =
{str8_lit_comp("thread"), str8_lit_comp("x:{'label':code_string, 'id':u64, @no_expand 'active':bool, 'call_stack':query}")},
};
Rng1U64 rd_reg_slot_range_table[41] =
Rng1U64 rd_reg_slot_range_table[42] =
{
{0},
{OffsetOf(RD_Regs, machine), OffsetOf(RD_Regs, machine) + sizeof(CTRL_Handle)},
@@ -390,6 +384,7 @@ Rng1U64 rd_reg_slot_range_table[41] =
{OffsetOf(RD_Regs, no_rich_tooltip), OffsetOf(RD_Regs, no_rich_tooltip) + sizeof(B32)},
{OffsetOf(RD_Regs, do_implicit_root), OffsetOf(RD_Regs, do_implicit_root) + sizeof(B32)},
{OffsetOf(RD_Regs, do_lister), OffsetOf(RD_Regs, do_lister) + sizeof(B32)},
{OffsetOf(RD_Regs, do_big_rows), OffsetOf(RD_Regs, do_big_rows) + sizeof(B32)},
{OffsetOf(RD_Regs, dir2), OffsetOf(RD_Regs, dir2) + sizeof(Dir2)},
{OffsetOf(RD_Regs, string), OffsetOf(RD_Regs, string) + sizeof(String8)},
{OffsetOf(RD_Regs, cmd_name), OffsetOf(RD_Regs, cmd_name) + sizeof(String8)},
@@ -487,7 +482,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[211] =
{ str8_lit_comp("switch"), str8_lit_comp("Switches to a recent file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (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_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:recent_files"), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("record_file_in_project"), str8_lit_comp("Records the passed file path as a recent file in the currently loaded project."), str8_lit_comp(""), str8_lit_comp(""), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("show_file_in_explorer"), str8_lit_comp("Opens the operating system's file explorer and shows the selected file."), str8_lit_comp(""), str8_lit_comp("$file,"), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("show_file_in_explorer"), str8_lit_comp("Opens the operating system's file explorer and shows the selected file."), str8_lit_comp(""), str8_lit_comp("$file,"), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("$text_pt,"), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp(""), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp(""), (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_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
+5 -2
View File
@@ -44,6 +44,7 @@ RD_RegSlot_PreferDisasm,
RD_RegSlot_NoRichTooltip,
RD_RegSlot_DoImplicitRoot,
RD_RegSlot_DoLister,
RD_RegSlot_DoBigRows,
RD_RegSlot_Dir2,
RD_RegSlot_String,
RD_RegSlot_CmdName,
@@ -566,6 +567,7 @@ B32 prefer_disasm;
B32 no_rich_tooltip;
B32 do_implicit_root;
B32 do_lister;
B32 do_big_rows;
Dir2 dir2;
String8 string;
String8 cmd_name;
@@ -630,6 +632,7 @@ RD_Query query;
.no_rich_tooltip = rd_regs()->no_rich_tooltip,\
.do_implicit_root = rd_regs()->do_implicit_root,\
.do_lister = rd_regs()->do_lister,\
.do_big_rows = rd_regs()->do_big_rows,\
.dir2 = rd_regs()->dir2,\
.string = rd_regs()->string,\
.cmd_name = rd_regs()->cmd_name,\
@@ -637,9 +640,9 @@ RD_Query query;
.os_event = rd_regs()->os_event,\
C_LINKAGE_BEGIN
extern RD_VocabInfo rd_vocab_info_table[320];
extern RD_VocabInfo rd_vocab_info_table[314];
extern RD_NameSchemaInfo rd_name_schema_info_table[20];
extern Rng1U64 rd_reg_slot_range_table[41];
extern Rng1U64 rd_reg_slot_range_table[42];
extern String8 rd_binding_version_remap_old_name_table[8];
extern String8 rd_binding_version_remap_new_name_table[8];
extern String8 rd_icon_kind_text_table[74];
+29 -20
View File
@@ -121,12 +121,6 @@ RD_VocabTable:
{pitch "" "Pitch" "" Null }
{zoom "" "Zoom" "" Null }
{font_size "" "Font Size" "" Null }
{smooth_ui_text "" "Smooth UI Text" "" Null }
{smooth_code_text "" "Smooth Code Text" "" Null }
{hint_ui_text "" "Hint UI Text" "" Null }
{hint_code_text "" "Hint Code Text" "" Null }
{opaque_backgrounds "" "Opaque Backgrounds" "" Null }
{background_blur "" "Background Blur" "" Null }
{row_height "" "Row Height" "" Null }
{tab_height "" "Tab Height" "" Null }
}
@@ -196,25 +190,38 @@ RD_VocabTable:
@default(1) 'scrolling_animations': bool,
//- rjf: thread & breakpoint decorations
@default(1) 'thread_lines': bool,
@default(1) 'thread_glow': bool,
@default(1) 'breakpoint_lines': bool,
@default(1) 'breakpoint_glow': bool,
@default(1) @display_name('Thread Lines') @description("Controls whether or not a long horizontal line is drawn before the next line or instruction that the selected thread will execute in source and disassembly views.")
'thread_lines': bool,
@default(1) @display_name('Thread Glow') @description("Controls whether or not a glowing effect is drawn on the selected thread in source and disassembly views.")
'thread_glow': bool,
@default(1) @display_name('Breakpoint Lines') @description("Controls whether or not a long horizontal line is drawn before the line or instruction at which a breakpoint is placed, in source and disassembly views.")
'breakpoint_lines': bool,
@default(1) @display_name('Breakpoint Glow') @description("Controls whether or not a glowing effect is drawn on breakpoints in source and disassembly views.")
'breakpoint_glow': bool,
//- rjf: occluding background settings
@default(0) 'opaque_backgrounds': bool,
@default(1) 'background_blur': bool,
@default(0) @display_name('Opaque Backgrounds') @description("Controls whether or not all floating background colors are forced to be fully opaque.")
'opaque_backgrounds': bool,
@default(1) @display_name('Background Blur') @description("Controls whether or not occluded regions behind floating elements are blurred.")
'background_blur': bool,
//- rjf: text rasterization settings
@default(1) 'smooth_ui_text': bool,
@default(1) 'hint_ui_text': bool,
@default(0) 'smooth_code_text': bool,
@default(1) 'hint_code_text': bool,
@default(11) @display_name('Window Font Size') 'font_size': @range[6, 72] u64,
@default(1) @display_name('Smooth UI Text') @description("Controls whether or not UI text is fully anti-aliased, for a smoother appearance.")
'smooth_ui_text': bool,
@default(1) @display_name('Hint UI Text') @description("Controls whether or not UI text is hinted, for better text readability at small sizes.")
'hint_ui_text': bool,
@default(0) @display_name('Smooth Code Text') @description("Controls whether or not code text is fully anti-aliased, for a smoother appearance.")
'smooth_code_text': bool,
@default(1) @display_name('Hint Code Text') @description("Controls whether or not code text is hinted, for better text readability at small sizes.")
'hint_code_text': bool,
@default(11) @display_name('Window Font Size') @description("Controls the window's default font size. Does not apply to tabs with their own font size set.")
'font_size': @range[6, 72] u64,
//- rjf: size settings
@default(3.f) @display_name('Window Row Height') 'row_height': @range[1.75f, 5.f] f32,
@default(3.f) 'tab_height': @range[1.75f, 5.f] f32,
@default(3.f) @display_name('Window Row Height') @description("Controls the window's default row height, in multiples of the font size. Does not apply to tabs with their own row height set.")
'row_height': @range[1.75f, 5.f] f32,
@default(3.f) @description("Controls the height of tabs, in multiples of the font size.")
'tab_height': @range[1.75f, 5.f] f32,
}
```
}
@@ -248,6 +255,7 @@ RD_VocabTable:
'lang':lang,
'size':code_string,
@default(1) 'show_line_numbers':bool,
@default(0) @display_name('Transient') 'auto': bool,
}
```
}
@@ -472,6 +480,7 @@ RD_RegTable:
{B32 no_rich_tooltip NoRichTooltip }
{B32 do_implicit_root DoImplicitRoot}
{B32 do_lister DoLister }
{B32 do_big_rows DoBigRows }
{Dir2 dir2 Dir2 }
{String8 string String }
{String8 cmd_name CmdName }
@@ -598,7 +607,7 @@ RD_CmdTable: // | | | |
{Switch 1 1 "query:recent_files" Cfg null RecentFile Null 0 0 0 0 0 1 1 FileOutline "switch" "Switch" "Switches to a recent file." "code,source,file" "" }
{SwitchToPartnerFile 1 1 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "switch_to_partner_file" "Switch To Partner File" "Switches to the focused file's partner; or from header to implementation or vice versa." "code,source,file" "" }
{RecordFileInProject 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "record_file_in_project" "Record File In Project" "Records the passed file path as a recent file in the currently loaded project." "" "" }
{ShowFileInExplorer 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "show_file_in_explorer" "Show File In Explorer" "Opens the operating system's file explorer and shows the selected file." "" "$file," }
{ShowFileInExplorer 1 1 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "show_file_in_explorer" "Show File In Explorer" "Opens the operating system's file explorer and shows the selected file." "" "$file," }
//- rjf: source <-> disasm
{GoToDisassembly 1 1 "" Null null Nil Null 0 0 0 0 0 0 0 Glasses "go_to_disassembly" "Go To Disassembly" "Goes to the disassembly, if any, for a given source code line." "code,source,disassembly,disasm" "$text_pt," }
+32 -11
View File
@@ -3047,6 +3047,11 @@ rd_view_ui(Rng2F32 rect)
String8 cmd_name = rd_cmd_name_from_eval(eval);
rd_cmd(RD_CmdKind_RunCommand, .cmd_name = cmd_name);
}break;
case RD_EvalSpaceKind_MetaCtrlEntity:
{
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(eval.space);
rd_cmd(RD_CmdKind_PushQuery, .expr = ctrl_string_from_handle(scratch.arena, entity->handle));
}break;
}
if(did_cmd)
{
@@ -4308,7 +4313,7 @@ rd_view_ui(Rng2F32 rect)
B32 cell_has_fancy_editors = (cell->kind != RD_WatchCellKind_Expr || fancy_editors_in_expr);
B32 is_button = !!(cell_info.flags & RD_WatchCellFlag_Button);
B32 has_background = !!(cell_info.flags & RD_WatchCellFlag_Background);
B32 is_toggle_switch = (cell_has_fancy_editors && cell->eval.irtree.mode != E_Mode_Null && cell_type->kind == E_TypeKind_Bool);
B32 is_toggle_switch = (cell_has_fancy_editors && cell->eval.irtree.mode != E_Mode_Null && e_type_kind_from_key(e_type_key_unwrap(cell->eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative)) == E_TypeKind_Bool);
B32 is_slider = (cell_has_fancy_editors && cell->eval.irtree.mode != E_Mode_Null && cell_type->kind == E_TypeKind_Lens && str8_match(cell_type->name, str8_lit("range1"), 0));
B32 is_activated_on_single_click = !!(cell_info.flags & RD_WatchCellFlag_ActivateWithSingleClick);
B32 is_non_code = !!(cell_info.flags & RD_WatchCellFlag_IsNonCode);
@@ -4819,6 +4824,18 @@ rd_view_cfg_value_from_string(String8 string)
return result;
}
internal B32
rd_view_cfg_b32_from_string(String8 string)
{
Temp scratch = scratch_begin(0, 0);
RD_Cfg *root = rd_view_cfg_from_string(string);
String8 expr = push_str8f(scratch.arena, "(bool)(%S)", root->first->string);
E_Eval eval = e_eval_from_string(scratch.arena, expr);
B32 result = !!e_value_eval_from_eval(eval).value.u64;
scratch_end(scratch);
return result;
}
internal U64
rd_view_cfg_u64_from_string(String8 string)
{
@@ -6585,7 +6602,7 @@ rd_window_frame(void)
E_Eval query_eval = e_eval_from_string(scratch.arena, query_expr);
// rjf: determine & store row-height setting
if(!query_is_anchored && cmd_name.size == 0)
if(ws->query_regs->do_big_rows)
{
F32 row_height = 5.f;
F32 row_height_px = row_height * ui_top_font_size();
@@ -8498,7 +8515,7 @@ rd_window_frame(void)
{
// rjf: gather info for this tab
B32 tab_is_selected = (tab == panel->selected_tab);
B32 tab_is_auto = (rd_cfg_child_from_string(tab, str8_lit("auto")) != &rd_nil_cfg);
B32 tab_is_auto = rd_view_cfg_b32_from_string(str8_lit("auto"));
// rjf: begin vertical region for this tab
ui_set_next_child_layout_axis(Axis2_Y);
@@ -12618,8 +12635,8 @@ rd_frame(void)
//- rjf: open lister
case RD_CmdKind_OpenLister:
{
String8 expr = push_str8f(scratch.arena, "query:commands, query:$%I64x, query:$%I64x, query:recent_files, query:recent_projects, query:procedures", rd_regs()->view, rd_regs()->window);
rd_cmd(RD_CmdKind_PushQuery, .expr = expr, .do_implicit_root = 1, .do_lister = 1);
String8 expr = push_str8f(scratch.arena, "query:commands, query:$%I64x, query:$%I64x, query:recent_files, query:recent_projects, query:procedures, query:processes, query:threads, query:modules", rd_regs()->view, rd_regs()->window);
rd_cmd(RD_CmdKind_PushQuery, .expr = expr, .do_implicit_root = 1, .do_lister = 1, .do_big_rows = 1);
}break;
//- rjf: command fast path
@@ -12703,7 +12720,7 @@ rd_frame(void)
case RD_CmdKind_WindowSettings:
{
String8 expr = push_str8f(scratch.arena, "query:$%I64x", rd_regs()->window);
rd_cmd(RD_CmdKind_PushQuery, .expr = expr, .do_implicit_root = 1);
rd_cmd(RD_CmdKind_PushQuery, .expr = expr, .do_implicit_root = 1, .do_big_rows = 1, .do_lister = 1);
}break;
case RD_CmdKind_CloseWindow:
{
@@ -14443,11 +14460,14 @@ Z(getting_started)
{
RD_Cfg *tab = tab_n->v;
if(rd_cfg_is_project_filtered(tab)) { continue; }
if(str8_match(tab->string, str8_lit("text"), 0) &&
rd_cfg_child_from_string(tab, str8_lit("auto")) != &rd_nil_cfg)
RD_RegsScope(.view = tab->id)
{
panel_w_auto = panel;
view_w_auto = tab;
if(str8_match(tab->string, str8_lit("text"), 0) &&
rd_view_cfg_b32_from_string(str8_lit("auto")))
{
panel_w_auto = panel;
view_w_auto = tab;
}
}
}
}
@@ -14658,7 +14678,8 @@ Z(getting_started)
dst_tab = rd_cfg_new(dst_panel->cfg, str8_lit("text"));
RD_Cfg *expr = rd_cfg_new(dst_tab, str8_lit("expression"));
rd_cfg_new(expr, rd_eval_string_from_file_path(scratch.arena, file_path));
rd_cfg_new(dst_tab, str8_lit("auto"));
RD_Cfg *auto_root = rd_cfg_new(dst_tab, str8_lit("auto"));
rd_cfg_new(auto_root, str8_lit("1"));
}
// rjf: determine if we need a contain or center
+1
View File
@@ -944,6 +944,7 @@ internal String8 rd_view_query_cmd(void);
internal String8 rd_view_query_input(void);
internal RD_Cfg *rd_view_cfg_from_string(String8 string);
internal E_Value rd_view_cfg_value_from_string(String8 string);
internal B32 rd_view_cfg_b32_from_string(String8 string);
internal U64 rd_view_cfg_u64_from_string(String8 string);
internal F32 rd_view_cfg_f32_from_string(String8 string);
+2 -2
View File
@@ -1129,7 +1129,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
if(type->kind == E_TypeKind_Set)
{
String8 file_path = e_string_from_id(row->eval.value.u64);
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, row->eval, .edit_string = row->edit_string, .flags = RD_WatchCellFlag_Button|RD_WatchCellFlag_IsNonCode, .pct = 1.f);
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Expr, row->eval, .edit_string = row->edit_string, .flags = RD_WatchCellFlag_Indented|RD_WatchCellFlag_Button|RD_WatchCellFlag_IsNonCode, .pct = 1.f);
if(str8_match(type->name, str8_lit("file"), 0))
{
info.can_expand = 0;
@@ -1320,7 +1320,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
////////////////////////////
//- rjf: @watch_row_build_cells meta-evaluation booleans
//
else if(e_type_kind_from_key(row->eval.irtree.type_key) == E_TypeKind_Bool &&
else if(e_type_kind_from_key(e_type_key_unwrap(row->eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative)) == E_TypeKind_Bool &&
(row->eval.space.kind == RD_EvalSpaceKind_MetaCfg ||
row->eval.space.kind == RD_EvalSpaceKind_MetaCmd ||
row->eval.space.kind == RD_EvalSpaceKind_MetaCtrlEntity))