stub out visualizer tab view hooks for bitmap, geo, text, disasm viewers; pass down cfg node trees for open-tab command; visualize query string in tab titles

This commit is contained in:
Ryan Fleury
2024-04-02 10:35:19 -07:00
parent 546c544ae0
commit 1b95eacd08
9 changed files with 91 additions and 39 deletions
+1
View File
@@ -88,6 +88,7 @@ DF_CmdParamSlotTable:
{TextPoint text_point `TxtPt`} {TextPoint text_point `TxtPt`}
{CmdSpec cmd_spec `struct DF_CmdSpec *`} {CmdSpec cmd_spec `struct DF_CmdSpec *`}
{ViewSpec view_spec `struct DF_ViewSpec *`} {ViewSpec view_spec `struct DF_ViewSpec *`}
{CfgNode cfg_node `struct DF_CfgNode *`}
{VirtualAddr vaddr `U64`} {VirtualAddr vaddr `U64`}
{VirtualOff voff `U64`} {VirtualOff voff `U64`}
{Index index `U64`} {Index index `U64`}
+2 -1
View File
@@ -4,7 +4,7 @@
//- GENERATED CODE //- GENERATED CODE
C_LINKAGE_BEGIN C_LINKAGE_BEGIN
Rng1U64 df_g_cmd_param_slot_range_table[19] = Rng1U64 df_g_cmd_param_slot_range_table[20] =
{ {
{0}, {0},
{OffsetOf(DF_CmdParams, window), OffsetOf(DF_CmdParams, window) + sizeof(DF_Handle)}, {OffsetOf(DF_CmdParams, window), OffsetOf(DF_CmdParams, window) + sizeof(DF_Handle)},
@@ -19,6 +19,7 @@ Rng1U64 df_g_cmd_param_slot_range_table[19] =
{OffsetOf(DF_CmdParams, text_point), OffsetOf(DF_CmdParams, text_point) + sizeof(TxtPt)}, {OffsetOf(DF_CmdParams, text_point), OffsetOf(DF_CmdParams, text_point) + sizeof(TxtPt)},
{OffsetOf(DF_CmdParams, cmd_spec), OffsetOf(DF_CmdParams, cmd_spec) + sizeof(struct DF_CmdSpec *)}, {OffsetOf(DF_CmdParams, cmd_spec), OffsetOf(DF_CmdParams, cmd_spec) + sizeof(struct DF_CmdSpec *)},
{OffsetOf(DF_CmdParams, view_spec), OffsetOf(DF_CmdParams, view_spec) + sizeof(struct DF_ViewSpec *)}, {OffsetOf(DF_CmdParams, view_spec), OffsetOf(DF_CmdParams, view_spec) + sizeof(struct DF_ViewSpec *)},
{OffsetOf(DF_CmdParams, cfg_node), OffsetOf(DF_CmdParams, cfg_node) + sizeof(struct DF_CfgNode *)},
{OffsetOf(DF_CmdParams, vaddr), OffsetOf(DF_CmdParams, vaddr) + sizeof(U64)}, {OffsetOf(DF_CmdParams, vaddr), OffsetOf(DF_CmdParams, vaddr) + sizeof(U64)},
{OffsetOf(DF_CmdParams, voff), OffsetOf(DF_CmdParams, voff) + sizeof(U64)}, {OffsetOf(DF_CmdParams, voff), OffsetOf(DF_CmdParams, voff) + sizeof(U64)},
{OffsetOf(DF_CmdParams, index), OffsetOf(DF_CmdParams, index) + sizeof(U64)}, {OffsetOf(DF_CmdParams, index), OffsetOf(DF_CmdParams, index) + sizeof(U64)},
+3 -1
View File
@@ -371,6 +371,7 @@ DF_CmdParamSlot_FilePath,
DF_CmdParamSlot_TextPoint, DF_CmdParamSlot_TextPoint,
DF_CmdParamSlot_CmdSpec, DF_CmdParamSlot_CmdSpec,
DF_CmdParamSlot_ViewSpec, DF_CmdParamSlot_ViewSpec,
DF_CmdParamSlot_CfgNode,
DF_CmdParamSlot_VirtualAddr, DF_CmdParamSlot_VirtualAddr,
DF_CmdParamSlot_VirtualOff, DF_CmdParamSlot_VirtualOff,
DF_CmdParamSlot_Index, DF_CmdParamSlot_Index,
@@ -396,6 +397,7 @@ String8 file_path;
TxtPt text_point; TxtPt text_point;
struct DF_CmdSpec * cmd_spec; struct DF_CmdSpec * cmd_spec;
struct DF_ViewSpec * view_spec; struct DF_ViewSpec * view_spec;
struct DF_CfgNode * cfg_node;
U64 vaddr; U64 vaddr;
U64 voff; U64 voff;
U64 index; U64 index;
@@ -1511,7 +1513,7 @@ struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =
{&DEV_updating_indicator, str8_lit_comp("updating_indicator")}, {&DEV_updating_indicator, str8_lit_comp("updating_indicator")},
}; };
C_LINKAGE_BEGIN C_LINKAGE_BEGIN
extern Rng1U64 df_g_cmd_param_slot_range_table[19]; extern Rng1U64 df_g_cmd_param_slot_range_table[20];
extern DF_IconKind df_g_entity_kind_icon_kind_table[27]; extern DF_IconKind df_g_entity_kind_icon_kind_table[27];
extern String8 df_g_entity_kind_display_string_table[27]; extern String8 df_g_entity_kind_display_string_table[27];
extern String8 df_g_entity_kind_name_label_table[27]; extern String8 df_g_entity_kind_name_label_table[27];
+15 -2
View File
@@ -529,8 +529,10 @@ df_cmd_params_copy(Arena *arena, DF_CmdParams *src)
dst.entity_list = df_push_handle_list_copy(arena, src->entity_list); dst.entity_list = df_push_handle_list_copy(arena, src->entity_list);
dst.string = push_str8_copy(arena, src->string); dst.string = push_str8_copy(arena, src->string);
dst.file_path = push_str8_copy(arena, src->file_path); dst.file_path = push_str8_copy(arena, src->file_path);
if(src->cfg_node != 0) {dst.cfg_node = df_cfg_tree_copy(arena, src->cfg_node);}
if(dst.cmd_spec == 0) {dst.cmd_spec = &df_g_nil_cmd_spec;} if(dst.cmd_spec == 0) {dst.cmd_spec = &df_g_nil_cmd_spec;}
if(dst.view_spec == 0) {dst.view_spec = &df_g_nil_view_spec;} if(dst.view_spec == 0) {dst.view_spec = &df_g_nil_view_spec;}
if(dst.cfg_node == 0) {dst.cfg_node = &df_g_nil_cfg_node;}
return dst; return dst;
} }
@@ -1777,7 +1779,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
if(!df_panel_is_nil(panel) && spec != &df_g_nil_view_spec) if(!df_panel_is_nil(panel) && spec != &df_g_nil_view_spec)
{ {
DF_View *view = df_view_alloc(); DF_View *view = df_view_alloc();
df_view_equip_spec(view, spec, entity, str8_lit(""), &df_g_nil_cfg_node); df_view_equip_spec(view, spec, entity, params.string, params.cfg_node);
df_panel_insert_tab_view(panel, panel->last_tab_view, view); df_panel_insert_tab_view(panel, panel->last_tab_view, view);
df_panel_notify_mutation(ws, panel); df_panel_notify_mutation(ws, panel);
} }
@@ -5855,6 +5857,8 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
// rjf: build tab contents // rjf: build tab contents
UI_Parent(tab_box) UI_Parent(tab_box)
{
UI_WidthFill UI_Row
{ {
if(icon_kind != DF_IconKind_Null) if(icon_kind != DF_IconKind_Null)
{ {
@@ -5866,8 +5870,17 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
ui_label(df_g_icon_kind_text_table[icon_kind]); ui_label(df_g_icon_kind_text_table[icon_kind]);
} }
UI_TextColor(df_rgba_from_theme_color(view_is_selected ? DF_ThemeColor_PlainText : DF_ThemeColor_WeakText)) UI_TextColor(df_rgba_from_theme_color(view_is_selected ? DF_ThemeColor_PlainText : DF_ThemeColor_WeakText))
UI_WidthFill UI_PrefWidth(ui_text_dim(10, 1))
ui_label(label); ui_label(label);
if(view->query_string_size != 0)
{
UI_Font(df_font_from_slot(DF_FontSlot_Code))
UI_FontSize(ui_top_font_size()*0.8f)
UI_TextColor(df_rgba_from_theme_color(DF_ThemeColor_WeakText))
UI_PrefWidth(ui_text_dim(10, 0))
ui_label(str8(view->query_buffer, view->query_string_size));
}
}
UI_PrefWidth(ui_em(2.35f, 1.f)) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(2.35f, 1.f)) UI_TextAlignment(UI_TextAlign_Center)
UI_Font(df_font_from_slot(DF_FontSlot_Icons)) UI_Font(df_font_from_slot(DF_FontSlot_Icons))
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons)*0.75f) UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons)*0.75f)
+17 -18
View File
@@ -182,7 +182,6 @@ DF_NameKindTable:
{ {
{Null} {Null}
{EntityName} {EntityName}
{EntityKindName}
} }
@table(name, name_lower, display_string, name_kind, icon, parameterized_by_entity, can_serialize, can_serialize_entity_path, can_filter, filter_is_code, typing_automatically_filters, inc_in_docs, docs_desc) @table(name, name_lower, display_string, name_kind, icon, parameterized_by_entity, can_serialize, can_serialize_entity_path, can_filter, filter_is_code, typing_automatically_filters, inc_in_docs, docs_desc)
@@ -193,7 +192,7 @@ DF_GfxViewTable:
{ Commands "commands" "Commands" Null List 0 0 0 0 0 0 0 "" } { Commands "commands" "Commands" Null List 0 0 0 0 0 0 0 "" }
{ FileSystem "file_system" "File System" Null FileOutline 0 0 0 0 0 0 0 "" } { FileSystem "file_system" "File System" Null FileOutline 0 0 0 0 0 0 0 "" }
{ SystemProcesses "system_processes" "System Processes" Null Null 0 0 0 0 0 0 0 "" } { SystemProcesses "system_processes" "System Processes" Null Null 0 0 0 0 0 0 0 "" }
{ EntityLister "entity_lister" "Entity List" EntityKindName Null 0 0 0 0 0 0 0 "" } { EntityLister "entity_lister" "Entity List" Null Null 0 0 0 0 0 0 0 "" }
{ SymbolLister "symbol_lister" "Symbols" Null Null 0 0 0 0 0 0 0 "" } { SymbolLister "symbol_lister" "Symbols" Null Null 0 0 0 0 0 0 0 "" }
{ Target "target" "Target" EntityName Target 1 0 0 0 0 0 0 "" } { Target "target" "Target" EntityName Target 1 0 0 0 0 0 0 "" }
{ Targets "targets" "Targets" Null Target 0 1 0 1 0 1 1 "Displays a list of all targets, as well as controls for enabling, disabling, launching, editing, or deleting each target. For more information on targets, read the `Targets` section." } { Targets "targets" "Targets" Null Target 0 1 0 1 0 1 1 "Displays a list of all targets, as well as controls for enabling, disabling, launching, editing, or deleting each target. For more information on targets, read the `Targets` section." }
@@ -240,23 +239,23 @@ DF_CmdParamSlot2ViewSpecMap:
// //
// NOTE(rjf): see @view_rule_info // NOTE(rjf): see @view_rule_info
@table(string vr ls ru bu tu) @table(string vr ls ru bu tu tab_display_string)
DF_GfxViewRuleTable: DF_GfxViewRuleTable:
{ {
{"array" - - - - - } {"array" - - - - - "" }
{"list" x - - - - } {"list" x - - - - "" }
{"dec" - x - - - } {"dec" - x - - - "" }
{"bin" - x - - - } {"bin" - x - - - "" }
{"oct" - x - - - } {"oct" - x - - - "" }
{"hex" - x - - - } {"hex" - x - - - "" }
{"only" x x - - - } {"only" x x - - - "" }
{"omit" x x - - - } {"omit" x x - - - "" }
{"no_addr" - x - - - } {"no_addr" - x - - - "" }
{"rgba" - - x x - } {"rgba" - - x x - "" }
{"text" - - - x - } {"text" - - - x x "Text" }
{"disasm" - - - x - } {"disasm" - - - x x "Disassembly" }
{"bitmap" - - x x x } {"bitmap" - - x x x "Bitmap" }
{"geo" - - x x - } {"geo" - - x x x "Geometry" }
} }
//////////////////////////////// ////////////////////////////////
@@ -577,7 +576,7 @@ DF_ThemePresetColorTable:
@data(DF_ViewSpecInfo) @c_file df_g_gfx_view_rule_tab_view_spec_info_table: @data(DF_ViewSpecInfo) @c_file df_g_gfx_view_rule_tab_view_spec_info_table:
{ {
@expand(DF_GfxViewRuleTable a) @expand(DF_GfxViewRuleTable a)
```$(a.tu == "x" -> '{ DF_ViewSpecFlag_CanSerialize, str8_lit_comp("' .. a.string .. '_view_rule"), str8_lit_comp("' .. a.string .. '"), DF_NameKind_Null, DF_IconKind_Binoculars, ' .. 'DF_VIEW_SETUP_FUNCTION_NAME(' .. a.string .. '), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(' .. a.string .. '), DF_VIEW_CMD_FUNCTION_NAME(' .. a.string .. '), DF_VIEW_UI_FUNCTION_NAME(' .. a.string .. ') }')```; ```$(a.tu == "x" -> '{ DF_ViewSpecFlag_CanSerialize, str8_lit_comp("' .. a.string .. '_view_rule"), str8_lit_comp("' .. a.tab_display_string .. '"), DF_NameKind_Null, DF_IconKind_Binoculars, ' .. 'DF_VIEW_SETUP_FUNCTION_NAME(' .. a.string .. '), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(' .. a.string .. '), DF_VIEW_CMD_FUNCTION_NAME(' .. a.string .. '), DF_VIEW_UI_FUNCTION_NAME(' .. a.string .. ') }')```;
} }
//- rjf: default view spec info table //- rjf: default view spec info table
+21 -1
View File
@@ -782,6 +782,13 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text)
scratch_end(scratch); scratch_end(scratch);
} }
DF_VIEW_SETUP_FUNCTION_DEF(text) {}
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(text) { return str8_lit(""); }
DF_VIEW_CMD_FUNCTION_DEF(text) {}
DF_VIEW_UI_FUNCTION_DEF(text)
{
}
//////////////////////////////// ////////////////////////////////
//~ rjf: "disasm" //~ rjf: "disasm"
@@ -897,6 +904,13 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm)
scratch_end(scratch); scratch_end(scratch);
} }
DF_VIEW_SETUP_FUNCTION_DEF(disasm) {}
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(disasm) { return str8_lit(""); }
DF_VIEW_CMD_FUNCTION_DEF(disasm) {}
DF_VIEW_UI_FUNCTION_DEF(disasm)
{
}
//////////////////////////////// ////////////////////////////////
//~ rjf: "bitmap" //~ rjf: "bitmap"
@@ -1141,7 +1155,6 @@ DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(bitmap) { return str8_lit(""); }
DF_VIEW_CMD_FUNCTION_DEF(bitmap) {} DF_VIEW_CMD_FUNCTION_DEF(bitmap) {}
DF_VIEW_UI_FUNCTION_DEF(bitmap) DF_VIEW_UI_FUNCTION_DEF(bitmap)
{ {
} }
//////////////////////////////// ////////////////////////////////
@@ -1322,3 +1335,10 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo)
geo_scope_close(geo_scope); geo_scope_close(geo_scope);
scratch_end(scratch); scratch_end(scratch);
} }
DF_VIEW_SETUP_FUNCTION_DEF(geo) {}
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(geo) { return str8_lit(""); }
DF_VIEW_CMD_FUNCTION_DEF(geo) {}
DF_VIEW_UI_FUNCTION_DEF(geo)
{
}
+2
View File
@@ -1076,8 +1076,10 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); DF_CmdParams p = df_cmd_params_from_view(ws, panel, view);
p.string = row->edit_expr; p.string = row->edit_expr;
p.view_spec = df_tab_view_spec_from_gfx_view_rule_spec(row->expand_ui_rule_spec); p.view_spec = df_tab_view_spec_from_gfx_view_rule_spec(row->expand_ui_rule_spec);
p.cfg_node = row->expand_ui_rule_node;
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String); df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String);
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_ViewSpec); df_cmd_params_mark_slot(&p, DF_CmdParamSlot_ViewSpec);
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_CfgNode);
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenTab)); df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_OpenTab));
} }
} }
+9 -6
View File
@@ -725,15 +725,18 @@ DF_GfxViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[14] =
{ str8_lit_comp("omit"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(omit) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(omit) , 0, 0, str8_lit_comp("") }, { str8_lit_comp("omit"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(omit) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(omit) , 0, 0, str8_lit_comp("") },
{ str8_lit_comp("no_addr"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(no_addr) , 0, 0, str8_lit_comp("") }, { str8_lit_comp("no_addr"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(no_addr) , 0, 0, str8_lit_comp("") },
{ str8_lit_comp("rgba"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(rgba) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(rgba) , str8_lit_comp("") }, { str8_lit_comp("rgba"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(rgba) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(rgba) , str8_lit_comp("") },
{ str8_lit_comp("text"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(text) , str8_lit_comp("") }, { str8_lit_comp("text"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(text) , str8_lit_comp("text_view_rule") },
{ str8_lit_comp("disasm"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(disasm) , str8_lit_comp("") }, { str8_lit_comp("disasm"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(disasm) , str8_lit_comp("disasm_view_rule") },
{ str8_lit_comp("bitmap"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(bitmap) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(bitmap) , str8_lit_comp("bitmap_view_rule") }, { str8_lit_comp("bitmap"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(bitmap) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(bitmap) , str8_lit_comp("bitmap_view_rule") },
{ str8_lit_comp("geo"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(geo) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(geo) , str8_lit_comp("") }, { str8_lit_comp("geo"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(geo) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(geo) , str8_lit_comp("geo_view_rule") },
}; };
DF_ViewSpecInfo df_g_gfx_view_rule_tab_view_spec_info_table[1] = DF_ViewSpecInfo df_g_gfx_view_rule_tab_view_spec_info_table[4] =
{ {
{ DF_ViewSpecFlag_CanSerialize, str8_lit_comp("bitmap_view_rule"), str8_lit_comp("bitmap"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(bitmap), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(bitmap), DF_VIEW_CMD_FUNCTION_NAME(bitmap), DF_VIEW_UI_FUNCTION_NAME(bitmap) }, { DF_ViewSpecFlag_CanSerialize, str8_lit_comp("text_view_rule"), str8_lit_comp("Text"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(text), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(text), DF_VIEW_CMD_FUNCTION_NAME(text), DF_VIEW_UI_FUNCTION_NAME(text) },
{ DF_ViewSpecFlag_CanSerialize, str8_lit_comp("disasm_view_rule"), str8_lit_comp("Disassembly"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(disasm), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(disasm), DF_VIEW_CMD_FUNCTION_NAME(disasm), DF_VIEW_UI_FUNCTION_NAME(disasm) },
{ DF_ViewSpecFlag_CanSerialize, str8_lit_comp("bitmap_view_rule"), str8_lit_comp("Bitmap"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(bitmap), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(bitmap), DF_VIEW_CMD_FUNCTION_NAME(bitmap), DF_VIEW_UI_FUNCTION_NAME(bitmap) },
{ DF_ViewSpecFlag_CanSerialize, str8_lit_comp("geo_view_rule"), str8_lit_comp("Geometry"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(geo), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(geo), DF_VIEW_CMD_FUNCTION_NAME(geo), DF_VIEW_UI_FUNCTION_NAME(geo) },
}; };
DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[30] = DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[30] =
@@ -743,7 +746,7 @@ DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[30] =
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), DF_NameKind_Null, DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Commands), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Commands), DF_VIEW_CMD_FUNCTION_NAME(Commands), DF_VIEW_UI_FUNCTION_NAME(Commands)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), DF_NameKind_Null, DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Commands), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Commands), DF_VIEW_CMD_FUNCTION_NAME(Commands), DF_VIEW_UI_FUNCTION_NAME(Commands)},
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), DF_NameKind_Null, DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(FileSystem), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(FileSystem), DF_VIEW_CMD_FUNCTION_NAME(FileSystem), DF_VIEW_UI_FUNCTION_NAME(FileSystem)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), DF_NameKind_Null, DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(FileSystem), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(FileSystem), DF_VIEW_CMD_FUNCTION_NAME(FileSystem), DF_VIEW_UI_FUNCTION_NAME(FileSystem)},
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(SystemProcesses), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(SystemProcesses), DF_VIEW_CMD_FUNCTION_NAME(SystemProcesses), DF_VIEW_UI_FUNCTION_NAME(SystemProcesses)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(SystemProcesses), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(SystemProcesses), DF_VIEW_CMD_FUNCTION_NAME(SystemProcesses), DF_VIEW_UI_FUNCTION_NAME(SystemProcesses)},
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), DF_NameKind_EntityKindName, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(EntityLister), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(EntityLister), DF_VIEW_CMD_FUNCTION_NAME(EntityLister), DF_VIEW_UI_FUNCTION_NAME(EntityLister)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(EntityLister), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(EntityLister), DF_VIEW_CMD_FUNCTION_NAME(EntityLister), DF_VIEW_UI_FUNCTION_NAME(EntityLister)},
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(SymbolLister), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(SymbolLister), DF_VIEW_CMD_FUNCTION_NAME(SymbolLister), DF_VIEW_UI_FUNCTION_NAME(SymbolLister)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(SymbolLister), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(SymbolLister), DF_VIEW_CMD_FUNCTION_NAME(SymbolLister), DF_VIEW_UI_FUNCTION_NAME(SymbolLister)},
{(0|1*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), DF_NameKind_EntityName, DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(Target), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Target), DF_VIEW_CMD_FUNCTION_NAME(Target), DF_VIEW_UI_FUNCTION_NAME(Target)}, {(0|1*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), DF_NameKind_EntityName, DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(Target), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Target), DF_VIEW_CMD_FUNCTION_NAME(Target), DF_VIEW_UI_FUNCTION_NAME(Target)},
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), DF_NameKind_Null, DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(Targets), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Targets), DF_VIEW_CMD_FUNCTION_NAME(Targets), DF_VIEW_UI_FUNCTION_NAME(Targets)}, {(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), DF_NameKind_Null, DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(Targets), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Targets), DF_VIEW_CMD_FUNCTION_NAME(Targets), DF_VIEW_UI_FUNCTION_NAME(Targets)},
+12 -1
View File
@@ -10,7 +10,6 @@ typedef enum DF_NameKind
{ {
DF_NameKind_Null, DF_NameKind_Null,
DF_NameKind_EntityName, DF_NameKind_EntityName,
DF_NameKind_EntityKindName,
DF_NameKind_COUNT, DF_NameKind_COUNT,
} DF_NameKind; } DF_NameKind;
@@ -261,10 +260,22 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text);
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm); DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm);
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap); DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap);
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo); DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo);
DF_VIEW_SETUP_FUNCTION_DEF(text);
DF_VIEW_SETUP_FUNCTION_DEF(disasm);
DF_VIEW_SETUP_FUNCTION_DEF(bitmap); DF_VIEW_SETUP_FUNCTION_DEF(bitmap);
DF_VIEW_SETUP_FUNCTION_DEF(geo);
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(text);
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(disasm);
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(bitmap); DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(bitmap);
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(geo);
DF_VIEW_CMD_FUNCTION_DEF(text);
DF_VIEW_CMD_FUNCTION_DEF(disasm);
DF_VIEW_CMD_FUNCTION_DEF(bitmap); DF_VIEW_CMD_FUNCTION_DEF(bitmap);
DF_VIEW_CMD_FUNCTION_DEF(geo);
DF_VIEW_UI_FUNCTION_DEF(text);
DF_VIEW_UI_FUNCTION_DEF(disasm);
DF_VIEW_UI_FUNCTION_DEF(bitmap); DF_VIEW_UI_FUNCTION_DEF(bitmap);
DF_VIEW_UI_FUNCTION_DEF(geo);
C_LINKAGE_BEGIN C_LINKAGE_BEGIN
extern String8 df_g_theme_preset_display_string_table[9]; extern String8 df_g_theme_preset_display_string_table[9];
extern String8 df_g_theme_preset_code_string_table[9]; extern String8 df_g_theme_preset_code_string_table[9];