eliminate old watch view column state; plug in on-the-fly computed per-row cells; eliminate old table helper usage in watch window; plug in visualizers to watch window

This commit is contained in:
Ryan Fleury
2025-02-07 12:45:30 -08:00
parent 412c55a474
commit 3582ab10e2
6 changed files with 1540 additions and 1571 deletions
@@ -950,7 +950,8 @@ ev_windowed_row_list_from_block_range_list(Arena *arena, EV_View *view, String8
{
range_exprs[idx] = &e_expr_nil;
}
if(n->v.block->lookup_rule == &e_lookup_rule__nil)
if(n->v.block->lookup_rule == &e_lookup_rule__nil ||
n->v.block->single_item)
{
is_root = 1;
}
+4 -1
View File
@@ -28,7 +28,7 @@ RD_CmdKind_Null,
RD_CmdKind_Null,
};
RD_VocabularyInfo rd_vocabulary_info_table[57] =
RD_VocabularyInfo rd_vocabulary_info_table[60] =
{
{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},
@@ -87,6 +87,9 @@ RD_VocabularyInfo rd_vocabulary_info_table[57] =
{str8_lit_comp("call_stack"), str8_lit_comp("call_stacks"), str8_lit_comp("Call Stack"), str8_lit_comp("Call Stacks"), RD_IconKind_Thread},
{str8_lit_comp("output"), str8_lit_comp("outputs"), str8_lit_comp("Output"), str8_lit_comp("Outputs"), RD_IconKind_List},
{str8_lit_comp("scheduler"), str8_lit_comp("schedulers"), str8_lit_comp("Scheduler"), str8_lit_comp("Schedulers"), RD_IconKind_Scheduler},
{str8_lit_comp("register"), str8_lit_comp("registers"), str8_lit_comp("Register"), str8_lit_comp("Registers"), RD_IconKind_Null},
{str8_lit_comp("local"), str8_lit_comp("locals"), str8_lit_comp("Local"), str8_lit_comp("Locals"), RD_IconKind_Null},
{str8_lit_comp("memory"), str8_lit_comp("memories"), str8_lit_comp("Memory"), str8_lit_comp("Memories"), RD_IconKind_Grid},
};
RD_NameSchemaInfo rd_name_schema_info_table[10] =
+1 -1
View File
@@ -570,7 +570,7 @@ C_LINKAGE_BEGIN
extern String8 rd_cfg_src_string_table[4];
extern RD_CmdKind rd_cfg_src_load_cmd_kind_table[4];
extern RD_CmdKind rd_cfg_src_write_cmd_kind_table[4];
extern RD_VocabularyInfo rd_vocabulary_info_table[57];
extern RD_VocabularyInfo rd_vocabulary_info_table[60];
extern RD_NameSchemaInfo rd_name_schema_info_table[10];
extern Rng1U64 rd_reg_slot_range_table[38];
extern RD_StringBindingPair rd_default_binding_table[111];
+3
View File
@@ -108,6 +108,9 @@ RD_VocabularyMap:
{call_stack _ "Call Stack" _ Thread }
{output _ "Output" _ List }
{scheduler _ "Scheduler" _ Scheduler }
{register _ "Register" _ Null }
{local _ "Local" _ Null }
{memory memories "Memory" "Memories" Grid }
}
@struct RD_VocabularyInfo:
+1527 -1547
View File
File diff suppressed because it is too large Load Diff
+3 -21
View File
@@ -80,6 +80,7 @@ struct RD_WatchRowInfo
U64 callstack_inline_depth;
RD_WatchCellList cells;
RD_ViewUIRule *view_ui_rule;
E_Expr *view_ui_tag;
};
typedef struct RD_WatchRowCellInfo RD_WatchRowCellInfo;
@@ -91,8 +92,8 @@ struct RD_WatchRowCellInfo
B32 is_errored;
String8 error_tooltip;
String8 inheritance_tooltip;
RD_ViewRuleUIFunctionType *ui;
MD_Node *ui_params;
RD_ViewUIRule *view_ui_rule;
E_Expr *view_ui_tag;
};
typedef enum RD_WatchViewColumnKind
@@ -164,13 +165,6 @@ struct RD_WatchViewState
{
B32 initialized;
// rjf: column state
Arena *column_arena;
RD_WatchViewColumn *first_column;
RD_WatchViewColumn *last_column;
RD_WatchViewColumn *free_column;
U64 column_count;
// rjf; table cursor state
RD_WatchPt cursor;
RD_WatchPt mark;
@@ -200,9 +194,6 @@ internal RD_WatchCell *rd_watch_cell_list_push(Arena *arena, RD_WatchCellList *l
internal RD_WatchCell *rd_watch_cell_list_push_new_(Arena *arena, RD_WatchCellList *list, RD_WatchCell *params);
#define rd_watch_cell_list_push_new(arena, list, kind_, ...) rd_watch_cell_list_push_new_((arena), (list), &(RD_WatchCell){.kind = (kind_), __VA_ARGS__})
//- rjf: index -> column
internal RD_WatchViewColumn *rd_watch_view_column_from_x(RD_WatchViewState *wv, S64 index);
//- rjf: watch view points <-> table coordinates
internal B32 rd_watch_pt_match(RD_WatchPt a, RD_WatchPt b);
internal RD_WatchPt rd_watch_pt_from_tbl(EV_BlockRangeList *block_ranges, Vec2S64 tbl);
@@ -228,15 +219,6 @@ internal String8 rd_string_from_eval_viz_row_column(Arena *arena, EV_Row *row, R
//- rjf: table coordinates -> text edit state
internal RD_WatchViewTextEditState *rd_watch_view_text_edit_state_from_pt(RD_WatchViewState *wv, RD_WatchPt pt);
//- rjf: watch view column state mutation
internal RD_WatchViewColumn *rd_watch_view_column_alloc_(RD_WatchViewState *wv, RD_WatchViewColumnKind kind, F32 pct, RD_WatchViewColumnParams *params);
#define rd_watch_view_column_alloc(wv, kind, pct, ...) rd_watch_view_column_alloc_((wv), (kind), (pct), &(RD_WatchViewColumnParams){.string = str8_zero(), __VA_ARGS__})
internal void rd_watch_view_column_release(RD_WatchViewState *wv, RD_WatchViewColumn *col);
//- rjf: watch view main hooks
internal void rd_watch_view_init(RD_WatchViewState *ewv);
internal void rd_watch_view_build(RD_WatchViewState *ewv, Rng2F32 rect);
////////////////////////////////
//~ rjf: View Hooks