setting for preferring displaying pointer addresses before contents

This commit is contained in:
Ryan Fleury committed 2026-04-20 09:57:32 -07:00
1 parent 2bf57c065a
commit 6764e1281e
9 files changed
+68 -26

No files matched your search

@@ -1812,6 +1812,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
B32 did_prefix_content;
B32 did_prefix_string;
B32 did_redirect;
B32 did_pre_prefix_ptr;
};
EV_StringPtrData *ptr_data = it->top_task->user_data;
if(ptr_data == 0)
@@ -1833,10 +1834,29 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
{
default:{}break;
//- rjf: step 0 -> try "prefix content", which we want to print before the pointer value,
// like strings or symbol names
//- rjf: step 0: do pre-prefix pointer value if requested
case 0:
{
if(!(params->flags & EV_StringFlag_DisableAddresses) &&
params->flags & EV_StringFlag_AddressesBeforeContent)
{
*out_string = str8_from_u64(arena, ptr_data->value_eval.value.u64, 16, 0, 0);
ptr_data->did_pre_prefix_ptr = 1;
}
need_pop = 0;
}break;
//- rjf: step 1 -> try "prefix content", which we want to print before the pointer value,
// like strings or symbol names
case 1:
{
// rjf: choose prefix
String8 pre_prefix = {0};
if(ptr_data->did_pre_prefix_ptr)
{
pre_prefix = str8_lit(" -> ");
}
// rjf: try strings
if(!(ptr_data->type->flags & E_TypeFlag_IsNotText) &&
!ptr_data->did_prefix_content && ptr_data->ptee_has_string &&
@@ -1899,7 +1919,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
}
// rjf: report
*out_string = push_str8_copy(arena, string__escaped_and_quoted);
*out_string = str8f(arena, "%S%S", pre_prefix, string__escaped_and_quoted);
ptr_data->did_prefix_content = 1;
ptr_data->did_prefix_string = 1;
@@ -2017,11 +2037,12 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
e_type_lhs_string_from_key(scratch.arena, type, &list, 0, 0);
str8_list_push(scratch.arena, &list, name);
e_type_rhs_string_from_key(scratch.arena, type, &list, 0);
*out_string = str8_list_join(arena, &list, 0);
String8 joined = str8_list_join(scratch.arena, &list, 0);
*out_string = str8f(arena, "%S%S", pre_prefix, joined);
}
else
{
*out_string = push_str8_copy(arena, name);
*out_string = str8f(arena, "%S%S", pre_prefix, name);
}
good_symbol_match = (out_string->size != 0);
@@ -2031,7 +2052,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
// rjf: if we have a function type, but we did not generate any name, then just put a ???
if(out_string->size == 0 && e_type_kind_from_key(ptr_data->type->direct_type_key) == E_TypeKind_Function)
{
*out_string = str8_lit("???");
*out_string = str8f(arena, "%S???", pre_prefix);
good_symbol_match = 1;
}
}
@@ -2048,7 +2069,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
String8 procedure_name = {0};
procedure_name.str = rdi_name_from_procedure(rdi, procedure, &procedure_name.size);
*out_string = procedure_name;
*out_string = str8f(arena, "%S%S", pre_prefix, procedure_name);
good_symbol_match = (procedure_name.size != 0);
}
@@ -2081,8 +2102,8 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
}
}break;
//- rjf: step 1 -> do pointer value + descend if needed
case 1:
//- rjf: step 2 -> do pointer value + descend if needed
case 2:
{
Temp scratch = scratch_begin(&arena, 1);
String8 ptr_value_string = str8_from_u64(scratch.arena, ptr_data->value_eval.value.u64, 16, 0, 0);
@@ -2093,7 +2114,8 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
//
// rjf: [read only] if we did prefix content, do a parenthesized pointer value
if(!(params->flags & EV_StringFlag_DisableAddresses) && params->flags & EV_StringFlag_ReadOnlyDisplayRules &&
if(!ptr_data->did_pre_prefix_ptr &&
!(params->flags & EV_StringFlag_DisableAddresses) && params->flags & EV_StringFlag_ReadOnlyDisplayRules &&
ptr_data->did_prefix_content)
{
*out_string = push_str8f(arena, " (%S)", ptr_value_string);
@@ -2101,7 +2123,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
// rjf: [read only] if we did *not* do any prefix content, but we have content,
// do "<pointer value> -> " then descend
else if(params->flags & EV_StringFlag_ReadOnlyDisplayRules && !ptr_data->did_prefix_content && ptr_data->ptee_has_content)
else if(!ptr_data->did_pre_prefix_ptr && params->flags & EV_StringFlag_ReadOnlyDisplayRules && !ptr_data->did_prefix_content && ptr_data->ptee_has_content)
{
if(!(params->flags & EV_StringFlag_DisableAddresses))
{
@@ -2126,7 +2148,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
}
// rjf: [writeable, catchall] if we did *not* do any prefix content, do "<pointer value>"
else if(!ptr_data->did_prefix_content)
else if(!ptr_data->did_pre_prefix_ptr && !ptr_data->did_prefix_content)
{
*out_string = push_str8_copy(arena, ptr_value_string);
}
@@ -227,12 +227,13 @@ struct EV_WindowedRowList
typedef U32 EV_StringFlags;
enum
{
EV_StringFlag_ReadOnlyDisplayRules = (1<<0),
EV_StringFlag_PrettyNames = (1<<1),
EV_StringFlag_DisableAddresses = (1<<2),
EV_StringFlag_DisableStrings = (1<<3),
EV_StringFlag_DisableChars = (1<<4),
EV_StringFlag_DisableStringQuotes = (1<<5),
EV_StringFlag_ReadOnlyDisplayRules = (1<<0),
EV_StringFlag_PrettyNames = (1<<1),
EV_StringFlag_DisableAddresses = (1<<2),
EV_StringFlag_DisableStrings = (1<<3),
EV_StringFlag_DisableChars = (1<<4),
EV_StringFlag_DisableStringQuotes = (1<<5),
EV_StringFlag_AddressesBeforeContent = (1<<6),
};
typedef struct EV_StringParams EV_StringParams;
+11
View File
@@ -404,6 +404,15 @@ few_params1(Pair *pairs, int count, Function_No_Params_Type *no_params_type){
}
//
// NOTE(rjf): this doesn't work because MSVC - despite GENERATING DEBUG INFO
// FOR THE MyByte TYPEDEF - does not actually *reference* this typedef
// anywhere, and instead treats all `MyByte *`s as `char *`s, thus completely
// eliminating the point of the typedef and view. :(
//
typedef char MyByte;
raddbg_type_view(MyByte *, no_string($));
static void
type_coverage_eval_tests(void)
{
@@ -440,6 +449,8 @@ type_coverage_eval_tests(void)
const char const_string_array[] = "Hello, World!";
const char *const const_ptr_const_string = "Hello, World!";
MyByte *non_string_byte_ptr = "Hello, World!";
void *pointer = &basics;
Basics *pointer_to_basics = &basics;
Basics **pointer_to_pointer_to_basics = &pointer_to_basics;
+1 -1
View File
@@ -429,7 +429,7 @@ RD_VocabInfo rd_vocab_info_table[360] =
RD_NameSchemaInfo rd_name_schema_info_table[26] =
{
{str8_lit_comp("user"), str8_lit_comp("@expand_commands(edit_user_theme) x:\n{\n //- rjf: animations\n @display_name('Animations') @description(\"Enables animations.\")\n @default(1) 'animations': bool,\n @display_name('Scrolling Animations') @description(\"Enables scrolling animations.\")\n @expand_if(\"$.animations\") @default(1) 'scrolling_animations': bool,\n @display_name('Tooltip Animations') @description(\"Enables tooltip animations.\")\n @expand_if(\"$.animations\") @default(1) 'tooltip_animations': bool,\n @display_name('Menu Animations') @description(\"Enables menu animations.\")\n @expand_if(\"$.animations\") @default(1) 'menu_animations': bool,\n\n //- rjf: fonts\n @display_name('UI Font') @description(\"The name of, or path to, the font used when displaying non-code UI elements.\")\n @default('') 'main_font': string,\n @display_name('Code Font') @description(\"The name of, or path to, the font used when displaying code.\")\n @default('') 'code_font': string,\n\n //- rjf: theme\n @default(\"Default (Dark)\") @display_name('User Theme')\n @description(\"The user's theme, which describes all colors used throughout the UI.\")\n 'theme': string,\n @no_expand @display_name('User Theme')\n 'theme_colors': query,\n\n //- rjf: autocompletion\n @display_name('Autocompletion Lister') @description(\"Enables the autocompletion lister while typing expressions.\") @default(1)\n 'autocompletion_lister': bool,\n @display_name('View Call Argument Helper') @description(\"Enables the view call argument helper, which shows view arguments and documentation, while typing expressions.\") @default(1)\n 'view_call_argument_helper': bool,\n\n //- rjf: scope decorations\n @default(1) @display_name('Cursor Scope Lines') @description(\"Controls whether or not scopes containing the cursor in text views are drawn.\")\n 'cursor_scope_lines': bool,\n\n //- rjf: cursor decorations\n @default(1) @display_name('Cursor Trail') @description(\"Controls whether or not a movement trail of the cursor is drawn.\")\n 'cursor_trail': 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: appearance settings\n @default(1) @display_name('Drop Shadows') @description(\"Controls whether or not drop shadows are drawn.\")\n 'drop_shadows': bool,\n @default(1.f) @display_name('Rounded Corner Amount') @description(\"Controls the degree to which UI corners are rounded.\")\n 'rounded_corner_amount': @range[0, 1] f32,\n\n //- rjf: code formatting settings\n @default(2) @display_name('User Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: windows style menu bar\n @default(1) @display_name('Focus Menu Bar With Alt') @description(\"Mimics standard Windows behavior of focusing the menu bar using the Alt key.\")\n 'focus_menu_bar_with_alt': bool,\n\n //- rjf: native filesystem dialogues\n @default(0) @display_name('Use Native File System Dialog') @description(\"Uses the operating system's file system dialog box, rather than the debugger's built-in UI.\")\n 'use_native_file_system_dialog': bool,\n}\n")},
{str8_lit_comp("project"), str8_lit_comp("@expand_commands(edit_project_theme) x:\n{\n @display_name('Project Name') 'name': string,\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: visualizers\n @display_name('Use Default C++ STL Type Visualizers') @description(\"Enables the built-in type views for C++ STL types.\")\n @default(1) use_default_stl_type_views: bool,\n @display_name('Use Default Unreal Engine Type Visualizers') @description(\"Enables the built-in type views for Unreal Engine types.\")\n @default(1) use_default_ue_type_views: bool,\n\n //- rjf: theme\n @default(\"None\") @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme': string,\n @no_expand @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme_colors': query,\n\n //- rjf: exception settings\n @default(1) @display_name(\"Break On Win32 Control-C Exceptions\") @description(\"Code: 0x40010005\")\n win32_ctrl_c: bool;\n @default(1) @display_name(\"Break On Win32 Control-Break Exceptions\") @description(\"Code: 0x40010008\")\n win32_ctrl_break: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Originate Error Exceptions\") @description(\"Code: 0x40080201\")\n win32_win_rt_originate_error: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Transform Error Exceptions\") @description(\"Code: 0x40080202\")\n win32_win_rt_transform_error: bool;\n @default(0) @display_name(\"Break On Win32 RPC Call Cancelled Exceptions\") @description(\"Code: 0x0000071a\")\n win32_rpc_call_cancelled: bool;\n @default(0) @display_name(\"Break On Win32 Data Type Misalignment Exceptions\") @description(\"Code: 0x80000002\")\n win32_datatype_misalignment: bool;\n @default(1) @display_name(\"Break On Win32 Access Violation Exceptions\") @description(\"Code: 0xc0000005\")\n win32_access_violation: bool;\n @default(0) @display_name(\"Break On Win32 In Page Error Exceptions\") @description(\"Code: 0xc0000006\")\n win32_in_page_error: bool;\n @default(1) @display_name(\"Break On Win32 Invalid Handle Specified Exceptions\") @description(\"Code: 0xc0000008\")\n win32_invalid_handle: bool;\n @default(0) @display_name(\"Break On Win32 Not Enough Quota Exceptions\") @description(\"Code: 0xc0000017\")\n win32_not_enough_quota: bool;\n @default(0) @display_name(\"Break On Win32 Illegal Instruction Exceptions\") @description(\"Code: 0xc000001d\")\n win32_illegal_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Cannot Continue From Exception Exceptions\") @description(\"Code: 0xc0000025\")\n win32_cannot_continue_exception: bool;\n @default(0) @display_name(\"Break On Win32 Invalid Exception Disposition Returned By Handler Exceptions\") @description(\"Code: 0xc0000026\")\n win32_invalid_exception_disposition: bool;\n @default(0) @display_name(\"Break On Win32 Array Bounds Exceeded Exceptions\") @description(\"Code: 0xc000008c\")\n win32_array_bounds_exceeded: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Denormal Operand Exceptions\") @description(\"Code: 0xc000008d\")\n win32_floating_point_denormal_operand: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Division By Zero Exceptions\") @description(\"Code: 0xc000008e\")\n win32_floating_point_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Inexact Result Exceptions\") @description(\"Code: 0xc000008f\")\n win32_floating_point_inexact_result: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Invalid Operation Exceptions\") @description(\"Code: 0xc0000090\")\n win32_floating_point_invalid_operation: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Overflow Exceptions\") @description(\"Code: 0xc0000091\")\n win32_floating_point_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Stack Check Exceptions\") @description(\"Code: 0xc0000092\")\n win32_floating_point_stack_check: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Underflow Exceptions\") @description(\"Code: 0xc0000093\")\n win32_floating_point_underflow: bool;\n @default(0) @display_name(\"Break On Win32 Integer Division By Zero Exceptions\") @description(\"Code: 0xc0000094\")\n win32_integer_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Integer Overflow Exceptions\") @description(\"Code: 0xc0000095\")\n win32_integer_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Privileged Instruction Exceptions\") @description(\"Code: 0xc0000096\")\n win32_privileged_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Stack Overflow Exceptions\") @description(\"Code: 0xc00000fd\")\n win32_stack_overflow: bool;\n @default(0) @display_name(\"BreakLine truncated
{str8_lit_comp("project"), str8_lit_comp("@expand_commands(edit_project_theme) x:\n{\n @display_name('Project Name') 'name': string,\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: visualizers\n @display_name('Display Pointer Addresses Before Contents') @description(\"When visualizing pointers, always shows the address first, before showing contents at the pointer's address.\")\n @default(0) display_pointer_addresses_before_contents: bool,\n @display_name('Use Default C++ STL Type Visualizers') @description(\"Enables the built-in type views for C++ STL types.\")\n @default(1) use_default_stl_type_views: bool,\n @display_name('Use Default Unreal Engine Type Visualizers') @description(\"Enables the built-in type views for Unreal Engine types.\")\n @default(1) use_default_ue_type_views: bool,\n\n //- rjf: theme\n @default(\"None\") @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme': string,\n @no_expand @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme_colors': query,\n\n //- rjf: exception settings\n @default(1) @display_name(\"Break On Win32 Control-C Exceptions\") @description(\"Code: 0x40010005\")\n win32_ctrl_c: bool;\n @default(1) @display_name(\"Break On Win32 Control-Break Exceptions\") @description(\"Code: 0x40010008\")\n win32_ctrl_break: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Originate Error Exceptions\") @description(\"Code: 0x40080201\")\n win32_win_rt_originate_error: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Transform Error Exceptions\") @description(\"Code: 0x40080202\")\n win32_win_rt_transform_error: bool;\n @default(0) @display_name(\"Break On Win32 RPC Call Cancelled Exceptions\") @description(\"Code: 0x0000071a\")\n win32_rpc_call_cancelled: bool;\n @default(0) @display_name(\"Break On Win32 Data Type Misalignment Exceptions\") @description(\"Code: 0x80000002\")\n win32_datatype_misalignment: bool;\n @default(1) @display_name(\"Break On Win32 Access Violation Exceptions\") @description(\"Code: 0xc0000005\")\n win32_access_violation: bool;\n @default(0) @display_name(\"Break On Win32 In Page Error Exceptions\") @description(\"Code: 0xc0000006\")\n win32_in_page_error: bool;\n @default(1) @display_name(\"Break On Win32 Invalid Handle Specified Exceptions\") @description(\"Code: 0xc0000008\")\n win32_invalid_handle: bool;\n @default(0) @display_name(\"Break On Win32 Not Enough Quota Exceptions\") @description(\"Code: 0xc0000017\")\n win32_not_enough_quota: bool;\n @default(0) @display_name(\"Break On Win32 Illegal Instruction Exceptions\") @description(\"Code: 0xc000001d\")\n win32_illegal_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Cannot Continue From Exception Exceptions\") @description(\"Code: 0xc0000025\")\n win32_cannot_continue_exception: bool;\n @default(0) @display_name(\"Break On Win32 Invalid Exception Disposition Returned By Handler Exceptions\") @description(\"Code: 0xc0000026\")\n win32_invalid_exception_disposition: bool;\n @default(0) @display_name(\"Break On Win32 Array Bounds Exceeded Exceptions\") @description(\"Code: 0xc000008c\")\n win32_array_bounds_exceeded: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Denormal Operand Exceptions\") @description(\"Code: 0xc000008d\")\n win32_floating_point_denormal_operand: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Division By Zero Exceptions\") @description(\"Code: 0xc000008e\")\n win32_floating_point_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Inexact Result Exceptions\") @description(\"Code: 0xc000008f\")\n win32_floating_point_inexact_result: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Invalid Operation Exceptions\") @description(\"Code: 0xc0000090\")\n win32_floating_point_invalid_operation: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Overflow Exceptions\") @description(\"Code: 0xc0000091\")\n win32_floating_point_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Stack Check Exceptions\") @description(\"Code: 0xc0000092\")\n win32_floating_point_stack_check: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Underflow Exceptions\") @description(\"Code: 0xc0000093\")\n win32_floating_point_underflow: bool;\n @default(0) @display_name(\"Break On Win32 Integer Division By Zero Exceptions\") @description(\"Code: 0xc0000094\")\n win32_integer_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Integer Overflow Exceptions\") @description(\"Code: 0xc0000095\")\n win32_integer_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Privileged Instruction Exceptions\"Line truncated
{str8_lit_comp("theme_color"), str8_lit_comp("@collection_commands(add_theme_color, fork_theme, save_theme, save_and_set_theme)\n@row_commands(duplicate_cfg, remove_cfg)\nx:\n{\n @display_name('Tags') tags: string,\n @display_name('Value') value: @color @hex u32,\n}\n")},
{str8_lit_comp("window"), str8_lit_comp("x:\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 //- rjf: theme settings\n @default(1) @display_name('Use Project Theme') @description(\"Prefer using the project theme for this window, if any. If off, only the user's theme settings will be used.\")\n 'use_project_theme': bool,\n}\n")},
{str8_lit_comp("tab"), str8_lit_comp("@row_commands(@file copy_tab_full_path, @file show_file_in_explorer, duplicate_tab, close_tab)\nx:\n{\n @override @display_name('Tab Font Size') @description(\"Controls the tab's font size.\") @no_callee_helper\n 'font_size': @range[6, 72] u64,\n}\n")},
+4 -2
View File
@@ -228,8 +228,8 @@ RD_VocabTable:
{
//- rjf: users / projects
{
user
```
user,
```
@expand_commands(edit_user_theme) x:
{
//- rjf: animations
@@ -317,6 +317,8 @@ RD_VocabTable:
@default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,
//- rjf: visualizers
@display_name('Display Pointer Addresses Before Contents') @description("When visualizing pointers, always shows the address first, before showing contents at the pointer's address.")
@default(0) display_pointer_addresses_before_contents: bool,
@display_name('Use Default C++ STL Type Visualizers') @description("Enables the built-in type views for C++ STL types.")
@default(1) use_default_stl_type_views: bool,
@display_name('Use Default Unreal Engine Type Visualizers') @description("Enables the built-in type views for Unreal Engine types.")
+8 -3
View File
@@ -1972,7 +1972,7 @@ rd_view_ui(Rng2F32 rect)
F32 row_height_px = ui_top_px_height();
S64 num_possible_visible_rows = (S64)(dim_2f32(rect).y/row_height_px);
F32 row_string_max_size_px = dim_2f32(rect).x;
EV_StringFlags string_flags = EV_StringFlag_ReadOnlyDisplayRules;
EV_StringFlags string_flags = EV_StringFlag_ReadOnlyDisplayRules|rd_state->eval_viz_base_string_flags;
String8 filter = rd_view_query_input();
Vec4F32 pop_background_rgba = {0};
UI_TagF("pop") pop_background_rgba = ui_color_from_name(str8_lit("background"));
@@ -5559,7 +5559,7 @@ rd_window_frame(void)
{
ui_spacer(ui_em(1.5f, 1.f));
}
EV_StringParams string_params = {EV_StringFlag_ReadOnlyDisplayRules, .radix = 16};
EV_StringParams string_params = {EV_StringFlag_ReadOnlyDisplayRules|rd_state->eval_viz_base_string_flags, .radix = 16};
String8 thread_handle_string = ctrl_string_from_handle(scratch.arena, ctrl_entity->handle);
for(U64 idx = 0; idx < 16; idx += 1)
{
@@ -5589,7 +5589,7 @@ rd_window_frame(void)
E_Eval eval = e_eval_from_string(rd_state->drag_drop_regs->expr);
if(eval.irtree.mode != E_Mode_Null)
{
EV_StringParams string_params = {.flags = EV_StringFlag_ReadOnlyDisplayRules, .radix = 10};
EV_StringParams string_params = {.flags = EV_StringFlag_ReadOnlyDisplayRules|rd_state->eval_viz_base_string_flags, .radix = 10};
String8 value_string = rd_value_string_from_eval(scratch.arena, str8_zero(), &string_params, ui_top_font(), ui_top_font_size(), ui_top_font_size()*20.f, eval);
if(value_string.size != 0)
{
@@ -12013,6 +12013,11 @@ rd_frame(void)
rd_state->alt_menu_bar_enabled = rd_setting_b32_from_name(str8_lit("focus_menu_bar_with_alt"));
rd_state->use_default_stl_type_views = rd_setting_b32_from_name(str8_lit("use_default_stl_type_views"));
rd_state->use_default_ue_type_views = rd_setting_b32_from_name(str8_lit("use_default_ue_type_views"));
rd_state->eval_viz_base_string_flags = 0;
if(rd_setting_b32_from_name(str8_lit("display_pointer_addresses_before_contents")))
{
rd_state->eval_viz_base_string_flags |= EV_StringFlag_AddressesBeforeContent;
}
////////////////////////////
//- rjf: autosave if needed
+1
View File
@@ -403,6 +403,7 @@ struct RD_State
B32 alt_menu_bar_enabled;
B32 use_default_stl_type_views;
B32 use_default_ue_type_views;
EV_StringFlags eval_viz_base_string_flags;
// rjf: animation rates
F32 catchall_animation_rate;
+1 -1
View File
@@ -3778,7 +3778,7 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
{
EV_StringParams params =
{
.flags = EV_StringFlag_ReadOnlyDisplayRules,
.flags = EV_StringFlag_ReadOnlyDisplayRules|rd_state->eval_viz_base_string_flags,
.radix = rd_view_setting_u64_from_name(str8_lit("default_radix")),
};
String8 value_string = rd_value_string_from_eval(scratch.arena, str8_zero(), &params, ui_top_font(), ui_top_font_size(), ui_top_font_size()*40.f, peek_eval);
+1 -1
View File
@@ -2119,7 +2119,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
String8 eval_string = {0};
if(!e_type_key_match(e_type_key_zero(), eval.irtree.type_key))
{
EV_StringParams string_params = {.flags = EV_StringFlag_ReadOnlyDisplayRules, .radix = 10};
EV_StringParams string_params = {.flags = EV_StringFlag_ReadOnlyDisplayRules|rd_state->eval_viz_base_string_flags, .radix = 10};
eval_string = rd_value_string_from_eval(scratch.arena, str8_zero(), &string_params, params->font, params->font_size, params->font_size*60.f, eval);
}
ui_spacer(ui_em(1.5f, 1.f));