mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-17 17:42:22 -07:00
begin eliminating separate hook system for view rule uis; shift over to regular views, so there is just one codepath for all visualizers; move ui to event pump system, with permissions stack, so that callers of sub-ui-codepaths can mask off event consumption as needed
This commit is contained in:
+75
-13
@@ -3912,7 +3912,7 @@ df_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range)
|
||||
//- rjf: asynchronous streamed reads -> hashes from spaces
|
||||
|
||||
internal U128
|
||||
df_key_from_eval_space_range(E_Space space, Rng1U64 range)
|
||||
df_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated)
|
||||
{
|
||||
U128 result = {0};
|
||||
DF_Entity *entity = df_entity_from_eval_space(space);
|
||||
@@ -3927,7 +3927,7 @@ df_key_from_eval_space_range(E_Space space, Rng1U64 range)
|
||||
//- rjf: process space -> query
|
||||
case DF_EntityKind_Process:
|
||||
{
|
||||
result = ctrl_hash_store_key_from_process_vaddr_range(entity->ctrl_machine_id, entity->ctrl_handle, range, 0);
|
||||
result = ctrl_hash_store_key_from_process_vaddr_range(entity->ctrl_machine_id, entity->ctrl_handle, range, zero_terminated);
|
||||
}break;
|
||||
}
|
||||
return result;
|
||||
@@ -5193,7 +5193,7 @@ df_eval_viz_row_list_push_new(Arena *arena, DF_EvalView *eval_view, DF_EvalVizWi
|
||||
for(DF_CfgVal *val = cfg_table->first_val; val != 0 && val != &df_g_nil_cfg_val; val = val->linear_next)
|
||||
{
|
||||
DF_GfxViewRuleSpec *spec = df_gfx_view_rule_spec_from_string(val->string);
|
||||
if(spec->info.flags & DF_GfxViewRuleSpecInfoFlag_BlockUI)
|
||||
if(spec->info.flags & DF_GfxViewRuleSpecInfoFlag_ViewUI)
|
||||
{
|
||||
expand_ui_rule_spec = spec;
|
||||
expand_ui_rule_node = val->last;
|
||||
@@ -5409,22 +5409,55 @@ df_viz_row_is_editable(DF_EvalVizRow *row)
|
||||
|
||||
//- rjf: view rule config tree info extraction
|
||||
|
||||
internal U64
|
||||
df_base_offset_from_eval(E_Eval eval)
|
||||
{
|
||||
if(e_type_kind_is_pointer_or_ref(e_type_kind_from_key(eval.type_key)))
|
||||
{
|
||||
eval = e_value_eval_from_eval(eval);
|
||||
}
|
||||
return eval.value.u64;
|
||||
}
|
||||
|
||||
internal E_Value
|
||||
df_value_from_cfg_key(DF_CfgNode *cfg, String8 key)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
DF_CfgNode *key_cfg = df_cfg_node_child_from_string(cfg, key, 0);
|
||||
String8 expr = df_string_from_cfg_node_children(scratch.arena, key_cfg);
|
||||
E_Eval eval = e_eval_from_string(scratch.arena, expr);
|
||||
E_Eval value_eval = e_value_eval_from_eval(eval);
|
||||
scratch_end(scratch);
|
||||
return value_eval.value;
|
||||
}
|
||||
|
||||
internal Rng1U64
|
||||
df_range_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
E_Eval value_eval = e_value_eval_from_eval(eval);
|
||||
DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0);
|
||||
String8 size_expr = df_string_from_cfg_node_children(scratch.arena, size_cfg);
|
||||
E_Eval size_eval = e_eval_from_string(scratch.arena, size_expr);
|
||||
E_Eval size_value_eval = e_value_eval_from_eval(size_eval);
|
||||
Rng1U64 result = {0};
|
||||
result.min = value_eval.value.u64;
|
||||
result.max = max_U64;
|
||||
if(size_eval.msgs.max_kind == E_MsgKind_Null)
|
||||
U64 size = df_value_from_cfg_key(cfg, str8_lit("size")).u64;
|
||||
if(size == 0 &&
|
||||
(e_type_kind_from_key(eval.type_key) == E_TypeKind_Array ||
|
||||
e_type_kind_from_key(e_type_direct_from_key(eval.type_key)) == E_TypeKind_Array))
|
||||
{
|
||||
result.max = result.min + size_value_eval.value.u64;
|
||||
E_Type *type = e_type_from_key(scratch.arena, eval.type_key);
|
||||
E_Type *array_type = type;
|
||||
if(array_type->kind != E_TypeKind_Array)
|
||||
{
|
||||
array_type = e_type_from_key(scratch.arena, array_type->direct_type_key);
|
||||
}
|
||||
if(array_type->kind != E_TypeKind_Array)
|
||||
{
|
||||
size = array_type->count;
|
||||
}
|
||||
}
|
||||
if(size == 0)
|
||||
{
|
||||
size = 16384;
|
||||
}
|
||||
Rng1U64 result = {0};
|
||||
result.min = df_base_offset_from_eval(eval);
|
||||
result.max = result.min + size;
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
@@ -5446,6 +5479,35 @@ df_lang_kind_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg)
|
||||
return lang_kind;
|
||||
}
|
||||
|
||||
internal Vec2S32
|
||||
df_dim2s32_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg)
|
||||
{
|
||||
Vec2S32 dim = v2s32(1, 1);
|
||||
{
|
||||
dim.x = df_value_from_cfg_key(cfg, str8_lit("w")).s32;
|
||||
dim.y = df_value_from_cfg_key(cfg, str8_lit("h")).s32;
|
||||
}
|
||||
return dim;
|
||||
}
|
||||
|
||||
internal R_Tex2DFormat
|
||||
df_tex2dformat_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg)
|
||||
{
|
||||
R_Tex2DFormat result = R_Tex2DFormat_RGBA8;
|
||||
{
|
||||
DF_CfgNode *fmt_child = df_cfg_node_child_from_string(cfg, str8_lit("fmt"), 0);
|
||||
for(EachNonZeroEnumVal(R_Tex2DFormat, fmt))
|
||||
{
|
||||
if(str8_match(r_tex2d_kind_display_string_table[fmt], fmt_child->first->string, StringMatchFlag_CaseInsensitive))
|
||||
{
|
||||
result = fmt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//- rjf: view rule eval application
|
||||
|
||||
internal E_Eval
|
||||
|
||||
@@ -1582,7 +1582,7 @@ internal B32 df_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range
|
||||
internal B32 df_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range);
|
||||
|
||||
//- rjf: asynchronous streamed reads -> hashes from spaces
|
||||
internal U128 df_key_from_eval_space_range(E_Space space, Rng1U64 range);
|
||||
internal U128 df_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Evaluation Views
|
||||
@@ -1650,9 +1650,13 @@ internal String8 df_expr_string_from_viz_row(Arena *arena, DF_EvalVizRow *row);
|
||||
internal B32 df_viz_row_is_expandable(DF_EvalVizRow *row);
|
||||
internal B32 df_viz_row_is_editable(DF_EvalVizRow *row);
|
||||
|
||||
//- rjf: view rule config tree info extraction
|
||||
//- rjf: eval / view rule config tree info extraction
|
||||
internal U64 df_base_offset_from_eval(E_Eval eval);
|
||||
internal E_Value df_value_from_cfg_key(DF_CfgNode *cfg, String8 key);
|
||||
internal Rng1U64 df_range_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg);
|
||||
internal TXT_LangKind df_lang_kind_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg);
|
||||
internal Vec2S32 df_dim2s32_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg);
|
||||
internal R_Tex2DFormat df_tex2dformat_from_eval_cfg(E_Eval eval, DF_CfgNode *cfg);
|
||||
|
||||
//- rjf: view rule eval application
|
||||
internal E_Eval df_eval_from_eval_cfg_table(Arena *arena, E_Eval eval, DF_CfgTable *cfg);
|
||||
|
||||
+11
-15
@@ -397,11 +397,11 @@ DF_CoreCmdTable:// | | | |
|
||||
{Targets 1 1 Null Nil 0 0 0 0 0 0 Target "targets" "Targets" "Opens the list of all targets." "" }
|
||||
{FilePathMap 1 1 Null Nil 0 0 0 0 0 0 FileOutline "file_path_map" "File Path Map" "Opens the file path mapping editor." "" }
|
||||
{AutoViewRules 1 1 Null Nil 0 0 0 0 0 0 Binoculars "auto_view_rules" "Auto View Rules" "Opens the auto view rule editor." "" }
|
||||
{Breakpoints 1 1 Null Nil 0 0 0 0 0 0 CircleFilled "breakpoints" "Breakpoints" "Opens the breakpoints view." "" }
|
||||
{WatchPins 1 1 Null Nil 0 0 0 0 0 0 Pin "watch_pins" "Watch Pins" "Opens the watch pins view." "" }
|
||||
{Scheduler 1 1 Null Nil 0 0 0 0 0 0 Scheduler "scheduler" "Scheduler" "Opens the scheduler view, for process and thread controls." "threads,processes,targets" }
|
||||
{CallStack 1 1 Null Nil 0 0 0 0 0 0 Thread "call_stack" "Call Stack" "Opens the call stack view." "callstack,thread,unwind" }
|
||||
{Modules 1 1 Null Nil 0 0 0 0 0 0 Module "modules" "Modules" "Opens the modules view." "" }
|
||||
{PendingFile 0 0 Null Nil 0 0 0 0 0 0 FileOutline "pending_file" "Pending File" "Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it." "" }
|
||||
{Code 0 0 Null Nil 0 0 0 0 0 0 FileOutline "code" "Code" "Opens the code view for an already-loaded file." "" }
|
||||
{Watch 1 1 Null Nil 0 0 0 0 0 0 Binoculars "watch" "Watch" "Opens a watch view." "" }
|
||||
{Locals 1 1 Null Nil 0 0 0 0 0 0 Binoculars "locals" "Locals" "Opens a locals view." "" }
|
||||
{Registers 1 1 Null Nil 0 0 0 0 0 0 Binoculars "registers" "Registers" "Opens a registers view." "" }
|
||||
@@ -409,13 +409,14 @@ DF_CoreCmdTable:// | | | |
|
||||
{ThreadLocals 1 1 Null Nil 0 0 0 0 0 0 Binoculars "thread_locals" "Thread Locals" "Opens a thread locals view." "" }
|
||||
{Types 1 1 Null Nil 0 0 0 0 0 0 Binoculars "types" "Types" "Opens a types view." "" }
|
||||
{Procedures 1 1 Null Nil 0 0 0 0 0 0 Binoculars "procedures" "Procedures" "Opens a procedures view." "" }
|
||||
{PendingFile 0 0 Null Nil 0 0 0 0 0 0 FileOutline "pending_file" "Pending File" "Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it." "" }
|
||||
{Disassembly 1 1 Null Nil 0 0 0 0 0 0 Glasses "disassembly" "Disassembly" "Opens the disassembly view." "disasm" }
|
||||
{Output 1 1 Null Nil 0 0 0 0 0 0 List "output" "Output" "Opens an output view." "" }
|
||||
{Memory 1 1 Null Nil 0 0 0 0 0 0 Grid "memory" "Memory" "Opens a memory view." "" }
|
||||
{Disassembly 1 1 Null Nil 0 0 0 0 0 0 Glasses "disassembly" "Disassembly" "Opens the disassembly view." "disasm" }
|
||||
{Breakpoints 1 1 Null Nil 0 0 0 0 0 0 CircleFilled "breakpoints" "Breakpoints" "Opens the breakpoints view." "" }
|
||||
{WatchPins 1 1 Null Nil 0 0 0 0 0 0 Pin "watch_pins" "Watch Pins" "Opens the watch pins view." "" }
|
||||
{ExceptionFilters 1 1 Null Nil 0 0 0 0 0 0 Gear "exception_filters" "Exception Filters" "Opens the exception filters view." "exceptions,filters" }
|
||||
{Settings 1 1 Null Nil 0 0 0 0 0 0 Gear "settings" "Settings" "Opens the settings view." "theme,color,scheme,options" }
|
||||
|
||||
//- rjf: queries
|
||||
{PickFile 0 0 FilePath Nil 1 0 0 0 0 1 FileOutline "pick_file" "Pick File" "Opens the file browser to pick a file." "" }
|
||||
{PickFolder 0 0 FilePath Nil 0 1 0 0 0 1 FolderOpenFilled "pick_folder" "Pick Folder" "Opens the file browser to pick a folder." "" }
|
||||
{PickFileOrFolder 0 0 FilePath Nil 1 1 0 0 0 1 FileOutline "pick_file_or_folder" "Pick File/Folder" "Opens the file browser to pick a file or folder." "" }
|
||||
@@ -491,16 +492,11 @@ DF_CoreCmdTable:// | | | |
|
||||
// where view rules can insert their own arbitrary ui
|
||||
// on a per-row basis.
|
||||
//
|
||||
// block ui build, "bu" -> sometimes, view rules want to take over an entire
|
||||
// viz block. while those viz blocks will still be
|
||||
// used to size a collapsed region in terms of #-of-
|
||||
// rows, this stage offers the ability to build a ui
|
||||
// stretching over all of the rows.
|
||||
//
|
||||
// tab ui build, "tu" -> when a view rule also wants to implement ui for a
|
||||
// dedicated tab, it can supply hooks for that as well
|
||||
// in which case an eval/view-rule can be opened in a
|
||||
// fully fledged, dedicated ui
|
||||
// view ui build, "vu" -> view rules which want to supply more sophisticated
|
||||
// visualizers have the ability to provide full
|
||||
// arbitrary UI hooks, which can either be produced
|
||||
// in a minified form via watch views, or via a
|
||||
// standalone tab.
|
||||
//
|
||||
// A few other bits are included for various ways in which a view rule may be
|
||||
// applied throughout the eval visualization pipeline. A list follows:
|
||||
|
||||
@@ -256,7 +256,7 @@ DF_CoreCmdKind_Null,
|
||||
DF_CoreCmdKind_Null,
|
||||
};
|
||||
|
||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[222] =
|
||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[221] =
|
||||
{
|
||||
{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
|
||||
@@ -454,11 +454,11 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[222] =
|
||||
{ str8_lit_comp("targets"), str8_lit_comp("Opens the list of all targets."), str8_lit_comp(""), str8_lit_comp("Targets"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Target},
|
||||
{ str8_lit_comp("file_path_map"), str8_lit_comp("Opens the file path mapping editor."), str8_lit_comp(""), str8_lit_comp("File Path Map"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
||||
{ str8_lit_comp("auto_view_rules"), str8_lit_comp("Opens the auto view rule editor."), str8_lit_comp(""), str8_lit_comp("Auto View Rules"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
|
||||
{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pin},
|
||||
{ str8_lit_comp("scheduler"), str8_lit_comp("Opens the scheduler view, for process and thread controls."), str8_lit_comp("threads,processes,targets"), str8_lit_comp("Scheduler"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Scheduler},
|
||||
{ str8_lit_comp("call_stack"), str8_lit_comp("Opens the call stack view."), str8_lit_comp("callstack,thread,unwind"), str8_lit_comp("Call Stack"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thread},
|
||||
{ str8_lit_comp("modules"), str8_lit_comp("Opens the modules view."), str8_lit_comp(""), str8_lit_comp("Modules"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Module},
|
||||
{ str8_lit_comp("pending_file"), str8_lit_comp("Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it."), str8_lit_comp(""), str8_lit_comp("Pending File"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
||||
{ str8_lit_comp("code"), str8_lit_comp("Opens the code view for an already-loaded file."), str8_lit_comp(""), str8_lit_comp("Code"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
||||
{ str8_lit_comp("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
{ str8_lit_comp("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
{ str8_lit_comp("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
@@ -466,11 +466,10 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[222] =
|
||||
{ str8_lit_comp("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
{ str8_lit_comp("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
{ str8_lit_comp("procedures"), str8_lit_comp("Opens a procedures view."), str8_lit_comp(""), str8_lit_comp("Procedures"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
||||
{ str8_lit_comp("pending_file"), str8_lit_comp("Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it."), str8_lit_comp(""), str8_lit_comp("Pending File"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
||||
{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses},
|
||||
{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_List},
|
||||
{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Grid},
|
||||
{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses},
|
||||
{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
|
||||
{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pin},
|
||||
{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp("Exception Filters"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Gear},
|
||||
{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp("Settings"), (DF_CmdSpecFlag_ListInUI*1)|(DF_CmdSpecFlag_ListInIPCDocs*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Gear},
|
||||
{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), (DF_CmdSpecFlag_ListInUI*0)|(DF_CmdSpecFlag_ListInIPCDocs*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
||||
|
||||
@@ -246,11 +246,11 @@ DF_CoreCmdKind_Target,
|
||||
DF_CoreCmdKind_Targets,
|
||||
DF_CoreCmdKind_FilePathMap,
|
||||
DF_CoreCmdKind_AutoViewRules,
|
||||
DF_CoreCmdKind_Breakpoints,
|
||||
DF_CoreCmdKind_WatchPins,
|
||||
DF_CoreCmdKind_Scheduler,
|
||||
DF_CoreCmdKind_CallStack,
|
||||
DF_CoreCmdKind_Modules,
|
||||
DF_CoreCmdKind_PendingFile,
|
||||
DF_CoreCmdKind_Code,
|
||||
DF_CoreCmdKind_Watch,
|
||||
DF_CoreCmdKind_Locals,
|
||||
DF_CoreCmdKind_Registers,
|
||||
@@ -258,11 +258,10 @@ DF_CoreCmdKind_Globals,
|
||||
DF_CoreCmdKind_ThreadLocals,
|
||||
DF_CoreCmdKind_Types,
|
||||
DF_CoreCmdKind_Procedures,
|
||||
DF_CoreCmdKind_PendingFile,
|
||||
DF_CoreCmdKind_Disassembly,
|
||||
DF_CoreCmdKind_Output,
|
||||
DF_CoreCmdKind_Memory,
|
||||
DF_CoreCmdKind_Disassembly,
|
||||
DF_CoreCmdKind_Breakpoints,
|
||||
DF_CoreCmdKind_WatchPins,
|
||||
DF_CoreCmdKind_ExceptionFilters,
|
||||
DF_CoreCmdKind_Settings,
|
||||
DF_CoreCmdKind_PickFile,
|
||||
|
||||
+201
-143
@@ -305,7 +305,7 @@ df_target_rect_from_panel(Rng2F32 root_rect, DF_Panel *root, DF_Panel *panel)
|
||||
internal void
|
||||
df_panel_insert_tab_view(DF_Panel *panel, DF_View *prev_view, DF_View *view)
|
||||
{
|
||||
DLLInsert_NPZ(&df_g_nil_view, panel->first_tab_view, panel->last_tab_view, prev_view, view, next, prev);
|
||||
DLLInsert_NPZ(&df_g_nil_view, panel->first_tab_view, panel->last_tab_view, prev_view, view, order_next, order_prev);
|
||||
panel->tab_view_count += 1;
|
||||
if(!df_view_is_project_filtered(view))
|
||||
{
|
||||
@@ -321,7 +321,7 @@ df_panel_remove_tab_view(DF_Panel *panel, DF_View *view)
|
||||
panel->selected_tab_view = df_handle_zero();
|
||||
if(df_handle_match(df_handle_zero(), panel->selected_tab_view))
|
||||
{
|
||||
for(DF_View *v = view->next; !df_view_is_nil(v); v = v->next)
|
||||
for(DF_View *v = view->order_next; !df_view_is_nil(v); v = v->order_next)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v))
|
||||
{
|
||||
@@ -332,7 +332,7 @@ df_panel_remove_tab_view(DF_Panel *panel, DF_View *view)
|
||||
}
|
||||
if(df_handle_match(df_handle_zero(), panel->selected_tab_view))
|
||||
{
|
||||
for(DF_View *v = view->prev; !df_view_is_nil(v); v = v->prev)
|
||||
for(DF_View *v = view->order_prev; !df_view_is_nil(v); v = v->order_prev)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v))
|
||||
{
|
||||
@@ -342,7 +342,7 @@ df_panel_remove_tab_view(DF_Panel *panel, DF_View *view)
|
||||
}
|
||||
}
|
||||
}
|
||||
DLLRemove_NPZ(&df_g_nil_view, panel->first_tab_view, panel->last_tab_view, view, next, prev);
|
||||
DLLRemove_NPZ(&df_g_nil_view, panel->first_tab_view, panel->last_tab_view, view, order_next, order_prev);
|
||||
panel->tab_view_count -= 1;
|
||||
}
|
||||
|
||||
@@ -741,17 +741,6 @@ df_gfx_view_rule_spec_from_string(String8 string)
|
||||
return spec;
|
||||
}
|
||||
|
||||
internal DF_ViewSpec *
|
||||
df_tab_view_spec_from_gfx_view_rule_spec(DF_GfxViewRuleSpec *spec)
|
||||
{
|
||||
DF_ViewSpec *result = &df_g_nil_view_spec;
|
||||
if(spec->info.tab_view_spec_name.size != 0)
|
||||
{
|
||||
result = df_view_spec_from_string(spec->info.tab_view_spec_name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: View State Functions
|
||||
|
||||
@@ -764,7 +753,7 @@ df_view_alloc(void)
|
||||
if(!df_view_is_nil(view))
|
||||
{
|
||||
df_gfx_state->free_view_count -= 1;
|
||||
SLLStackPop(df_gfx_state->free_view);
|
||||
SLLStackPop_N(df_gfx_state->free_view, alloc_next);
|
||||
U64 generation = view->generation;
|
||||
MemoryZeroStruct(view);
|
||||
view->generation = generation;
|
||||
@@ -781,22 +770,35 @@ df_view_alloc(void)
|
||||
view->spec = &df_g_nil_view_spec;
|
||||
view->project_path_arena = arena_alloc();
|
||||
view->project_path = str8_zero();
|
||||
view->cfg_arena = arena_alloc();
|
||||
view->cfg_root = &df_g_nil_cfg_node;
|
||||
view->query_cursor = view->query_mark = txt_pt(1, 1);
|
||||
view->query_string_size = 0;
|
||||
df_gfx_state->allocated_view_count += 1;
|
||||
DLLPushBack_NPZ(&df_g_nil_view, df_gfx_state->first_view, df_gfx_state->last_view, view, alloc_next, alloc_prev);
|
||||
return view;
|
||||
}
|
||||
|
||||
internal void
|
||||
df_view_release(DF_View *view)
|
||||
{
|
||||
SLLStackPush(df_gfx_state->free_view, view);
|
||||
DLLPushBack_NPZ(&df_g_nil_view, df_gfx_state->first_view, df_gfx_state->last_view, view, alloc_next, alloc_prev);
|
||||
SLLStackPush_N(df_gfx_state->free_view, view, alloc_next);
|
||||
for(DF_View *tchild = view->first_transient, *next = 0; !df_view_is_nil(tchild); tchild = next)
|
||||
{
|
||||
next = tchild->order_next;
|
||||
df_view_release(tchild);
|
||||
}
|
||||
view->first_transient = view->last_transient = &df_g_nil_view;
|
||||
view->transient_view_slots_count = 0;
|
||||
view->transient_view_slots = 0;
|
||||
for(DF_ArenaExt *ext = view->first_arena_ext; ext != 0; ext = ext->next)
|
||||
{
|
||||
arena_release(ext->arena);
|
||||
}
|
||||
view->first_arena_ext = view->last_arena_ext = 0;
|
||||
arena_release(view->project_path_arena);
|
||||
arena_release(view->cfg_arena);
|
||||
arena_release(view->arena);
|
||||
view->generation += 1;
|
||||
df_gfx_state->allocated_view_count -= 1;
|
||||
@@ -806,6 +808,10 @@ df_view_release(DF_View *view)
|
||||
internal void
|
||||
df_view_equip_spec(DF_Window *window, DF_View *view, DF_ViewSpec *spec, String8 query, DF_CfgNode *cfg_root)
|
||||
{
|
||||
// rjf: fill cfg tree
|
||||
arena_clear(view->cfg_arena);
|
||||
view->cfg_root = df_cfg_tree_copy(view->cfg_arena, cfg_root);
|
||||
|
||||
// rjf: fill query buffer
|
||||
view->query_string_size = Min(sizeof(view->query_buffer), query.size);
|
||||
MemoryCopy(view->query_buffer, query.str, view->query_string_size);
|
||||
@@ -829,7 +835,7 @@ df_view_equip_spec(DF_Window *window, DF_View *view, DF_ViewSpec *spec, String8
|
||||
}
|
||||
view->is_filtering = 0;
|
||||
view->is_filtering_t = 0;
|
||||
view_setup(window, view, cfg_root);
|
||||
view_setup(window, view, view->cfg_root);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,7 +854,15 @@ df_view_clear_user_state(DF_View *view)
|
||||
{
|
||||
arena_release(ext->arena);
|
||||
}
|
||||
for(DF_View *tchild = view->first_transient, *next = 0; !df_view_is_nil(tchild); tchild = next)
|
||||
{
|
||||
next = tchild->order_next;
|
||||
df_view_release(tchild);
|
||||
}
|
||||
view->first_transient = view->last_transient = &df_g_nil_view;
|
||||
view->first_arena_ext = view->last_arena_ext = 0;
|
||||
view->transient_view_slots_count = 0;
|
||||
view->transient_view_slots = 0;
|
||||
arena_clear(view->arena);
|
||||
view->user_data = 0;
|
||||
}
|
||||
@@ -873,6 +887,49 @@ df_view_push_arena_ext(DF_View *view)
|
||||
return ext->arena;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Expand-Keyed Transient View Functions
|
||||
|
||||
internal DF_View *
|
||||
df_transient_view_from_expand_key(DF_View *owner_view, DF_Window *window, DF_ViewSpec *spec, String8 query, DF_CfgNode *cfg_root, DF_ExpandKey key)
|
||||
{
|
||||
if(owner_view->transient_view_slots_count == 0)
|
||||
{
|
||||
owner_view->transient_view_slots_count = 256;
|
||||
owner_view->transient_view_slots = push_array(owner_view->arena, DF_TransientViewSlot, owner_view->transient_view_slots_count);
|
||||
}
|
||||
DF_View *view = &df_g_nil_view;
|
||||
U64 hash = df_hash_from_expand_key(key);
|
||||
U64 slot_idx = hash%owner_view->transient_view_slots_count;
|
||||
DF_TransientViewSlot *slot = &owner_view->transient_view_slots[slot_idx];
|
||||
for(DF_TransientViewNode *n = slot->first; n != 0; n = n->next)
|
||||
{
|
||||
if(df_expand_key_match(n->key, key))
|
||||
{
|
||||
view = n->view;
|
||||
n->last_frame_index_touched = df_frame_index();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(df_view_is_nil(view))
|
||||
{
|
||||
if(!owner_view->free_transient_view_node)
|
||||
{
|
||||
owner_view->free_transient_view_node = push_array(df_gfx_state->arena, DF_TransientViewNode, 1);
|
||||
}
|
||||
DF_TransientViewNode *node = owner_view->free_transient_view_node;
|
||||
SLLStackPop(owner_view->free_transient_view_node);
|
||||
DLLPushBack(slot->first, slot->last, node);
|
||||
node->key = key;
|
||||
node->view = df_view_alloc();
|
||||
node->first_frame_index_touched = node->last_frame_index_touched = df_frame_index();
|
||||
view = node->view;
|
||||
DLLPushBack_NPZ(&df_g_nil_view, owner_view->first_transient, owner_view->last_transient, view, order_next, order_prev);
|
||||
df_view_equip_spec(window, view, spec, query, cfg_root);
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: View Rule Instance State Functions
|
||||
|
||||
@@ -961,7 +1018,7 @@ df_panel_release_all_views(DF_Panel *panel)
|
||||
{
|
||||
for(DF_View *view = panel->first_tab_view, *next = 0; !df_view_is_nil(view); view = next)
|
||||
{
|
||||
next = view->next;
|
||||
next = view->order_next;
|
||||
df_view_release(view);
|
||||
}
|
||||
panel->first_tab_view = panel->last_tab_view = &df_g_nil_view;
|
||||
@@ -1120,7 +1177,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
for(DF_View *view = panel->first_tab_view;
|
||||
!df_view_is_nil(view);
|
||||
view = view->next)
|
||||
view = view->order_next)
|
||||
{
|
||||
DF_Entity *entity = df_entity_from_eval_string(str8(view->query_buffer, view->query_string_size));
|
||||
if(entity->flags & DF_EntityFlag_MarkedForDeletion ||
|
||||
@@ -1359,7 +1416,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
df_panel_insert_tab_view(new_panel, new_panel->last_tab_view, move_tab);
|
||||
new_panel->selected_tab_view = df_handle_from_view(move_tab);
|
||||
B32 move_tab_panel_is_empty = 1;
|
||||
for(DF_View *v = move_tab_panel->first_tab_view; !df_view_is_nil(v); v = v->next)
|
||||
for(DF_View *v = move_tab_panel->first_tab_view; !df_view_is_nil(v); v = v->order_next)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v))
|
||||
{
|
||||
@@ -1423,7 +1480,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
df_handle_list_push(scratch.arena, &panels_to_close, handle);
|
||||
for(DF_View *view = panel->first_tab_view, *next = 0; !df_view_is_nil(view); view = next)
|
||||
{
|
||||
next = view->next;
|
||||
next = view->order_next;
|
||||
DF_GfxViewKind view_kind = df_gfx_view_kind_from_string(view->spec->info.name);
|
||||
B32 needs_delete = 1;
|
||||
switch(view_kind)
|
||||
@@ -1957,7 +2014,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_Panel *panel = df_panel_from_handle(params.panel);
|
||||
DF_View *view = df_selected_tab_from_panel(panel);
|
||||
DF_View *next_view = view;
|
||||
for(DF_View *v = view; !df_view_is_nil(v); v = df_view_is_nil(v->next) ? panel->first_tab_view : v->next)
|
||||
for(DF_View *v = view; !df_view_is_nil(v); v = df_view_is_nil(v->order_next) ? panel->first_tab_view : v->order_next)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v) && v != view)
|
||||
{
|
||||
@@ -1973,7 +2030,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_Panel *panel = df_panel_from_handle(params.panel);
|
||||
DF_View *view = df_selected_tab_from_panel(panel);
|
||||
DF_View *next_view = view;
|
||||
for(DF_View *v = view; !df_view_is_nil(v); v = df_view_is_nil(v->prev) ? panel->last_tab_view : v->prev)
|
||||
for(DF_View *v = view; !df_view_is_nil(v); v = df_view_is_nil(v->order_prev) ? panel->last_tab_view : v->order_prev)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v) && v != view)
|
||||
{
|
||||
@@ -1989,7 +2046,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
DF_Panel *panel = ws->focused_panel;
|
||||
DF_View *view = df_selected_tab_from_panel(panel);
|
||||
DF_View *prev_view = core_cmd_kind == DF_CoreCmdKind_MoveTabRight ? view->next : view->prev->prev;
|
||||
DF_View *prev_view = core_cmd_kind == DF_CoreCmdKind_MoveTabRight ? view->order_next : view->order_prev->order_prev;
|
||||
if(!df_view_is_nil(prev_view) || core_cmd_kind == DF_CoreCmdKind_MoveTabLeft)
|
||||
{
|
||||
DF_CmdParams p = df_cmd_params_from_window(ws);
|
||||
@@ -2055,7 +2112,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
df_panel_insert_tab_view(dst_panel, prev_view, view);
|
||||
ws->focused_panel = dst_panel;
|
||||
B32 src_panel_is_empty = 1;
|
||||
for(DF_View *v = src_panel->first_tab_view; !df_view_is_nil(v); v = v->next)
|
||||
for(DF_View *v = src_panel->first_tab_view; !df_view_is_nil(v); v = v->order_next)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v))
|
||||
{
|
||||
@@ -2981,7 +3038,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->next)
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next)
|
||||
{
|
||||
if(df_view_is_project_filtered(view)) { continue; }
|
||||
String8 view_file_path = df_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size));
|
||||
@@ -3007,7 +3064,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->next)
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next)
|
||||
{
|
||||
if(df_view_is_project_filtered(view)) { continue; }
|
||||
DF_GfxViewKind view_kind = df_gfx_view_kind_from_string(view->spec->info.name);
|
||||
@@ -3028,7 +3085,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->next)
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next)
|
||||
{
|
||||
if(df_view_is_project_filtered(view)) { continue; }
|
||||
DF_GfxViewKind view_kind = df_gfx_view_kind_from_string(view->spec->info.name);
|
||||
@@ -3081,7 +3138,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
Vec2F32 panel_rect_dim = dim_2f32(panel_rect);
|
||||
F32 area = panel_rect_dim.x * panel_rect_dim.y;
|
||||
B32 panel_is_empty = 1;
|
||||
for(DF_View *v = panel->first_tab_view; !df_view_is_nil(v); v = v->next)
|
||||
for(DF_View *v = panel->first_tab_view; !df_view_is_nil(v); v = v->order_next)
|
||||
{
|
||||
if(!df_view_is_project_filtered(v))
|
||||
{
|
||||
@@ -3198,7 +3255,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_View *view = df_view_from_handle(params.view);
|
||||
DF_Panel *panel = df_panel_from_handle(params.panel);
|
||||
B32 view_is_tab = 0;
|
||||
for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->next)
|
||||
for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->order_next)
|
||||
{
|
||||
if(df_view_is_project_filtered(tab)) { continue; }
|
||||
if(tab == view)
|
||||
@@ -3276,7 +3333,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
MemoryZeroStruct(&ws->query_cmd_params);
|
||||
for(DF_View *v = ws->query_view_stack_top, *next = 0; !df_view_is_nil(v); v = next)
|
||||
{
|
||||
next = v->next;
|
||||
next = v->order_next;
|
||||
df_view_release(v);
|
||||
}
|
||||
ws->query_view_stack_top = &df_g_nil_view;
|
||||
@@ -3307,7 +3364,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_View *view = df_selected_tab_from_panel(panel);
|
||||
if(df_view_is_nil(view))
|
||||
{
|
||||
for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->next)
|
||||
for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->order_next)
|
||||
{
|
||||
if(!df_view_is_project_filtered(tab))
|
||||
{
|
||||
@@ -3319,7 +3376,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
if(!df_view_is_nil(view))
|
||||
{
|
||||
B32 found = 0;
|
||||
for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->next)
|
||||
for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->order_next)
|
||||
{
|
||||
if(df_view_is_project_filtered(tab)) {continue;}
|
||||
if(tab == view)
|
||||
@@ -3359,7 +3416,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
df_push_interact_regs();
|
||||
DF_ViewCmdFunctionType *do_view_cmds_function = view->spec->info.cmd_hook;
|
||||
do_view_cmds_function(ws, panel, view, cmds);
|
||||
do_view_cmds_function(ws, panel, view, view->cfg_root, str8(view->query_buffer, view->query_string_size), cmds);
|
||||
DF_InteractRegs *view_regs = df_pop_interact_regs();
|
||||
if(panel == ws->focused_panel)
|
||||
{
|
||||
@@ -3581,7 +3638,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
DF_ViewSpec *view_spec = view->spec;
|
||||
DF_ViewUIFunctionType *build_view_ui_function = view_spec->info.ui_hook;
|
||||
build_view_ui_function(ws, &df_g_nil_panel, view, view_preview_container->rect);
|
||||
build_view_ui_function(ws, &df_g_nil_panel, view, view->cfg_root, str8(view->query_buffer, view->query_string_size), view_preview_container->rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5249,13 +5306,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
U64 open_menu_idx_prime = open_menu_idx;
|
||||
if(menu_open && ws->menu_bar_focused && window_is_focused)
|
||||
{
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first, *next = 0;
|
||||
n != 0;
|
||||
n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
next = n->next;
|
||||
UI_Event *evt = &n->v;
|
||||
B32 taken = 0;
|
||||
if(evt->delta_2s32.x > 0)
|
||||
{
|
||||
@@ -5270,7 +5322,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
if(taken)
|
||||
{
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5856,7 +5908,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
!df_view_is_nil(query_view);
|
||||
query_view = next)
|
||||
{
|
||||
next = query_view->next;
|
||||
next = query_view->order_next;
|
||||
df_view_release(query_view);
|
||||
}
|
||||
|
||||
@@ -5885,7 +5937,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
ws->query_view_stack_top = view;
|
||||
ws->query_view_selected = 1;
|
||||
view->next = &df_g_nil_view;
|
||||
view->order_next = &df_g_nil_view;
|
||||
|
||||
scratch_end(scratch);
|
||||
}
|
||||
@@ -6039,7 +6091,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
DF_ViewSpec *view_spec = view->spec;
|
||||
DF_ViewUIFunctionType *build_view_ui_function = view_spec->info.ui_hook;
|
||||
build_view_ui_function(ws, &df_g_nil_panel, view, query_container_content_rect);
|
||||
build_view_ui_function(ws, &df_g_nil_panel, view, view->cfg_root, str8(view->query_buffer, view->query_string_size), query_container_content_rect);
|
||||
}
|
||||
|
||||
//- rjf: query submission
|
||||
@@ -7188,7 +7240,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
//- rjf: build empty view
|
||||
UI_Parent(view_container_box) if(df_view_is_nil(df_selected_tab_from_panel(panel)))
|
||||
{
|
||||
DF_VIEW_UI_FUNCTION_NAME(Empty)(ws, panel, &df_g_nil_view, content_rect);
|
||||
DF_VIEW_UI_FUNCTION_NAME(Empty)(ws, panel, &df_g_nil_view, &df_g_nil_cfg_node, str8_zero(), content_rect);
|
||||
}
|
||||
|
||||
//- rjf: build tab view
|
||||
@@ -7196,7 +7248,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
DF_View *view = df_selected_tab_from_panel(panel);
|
||||
DF_ViewUIFunctionType *build_view_ui_function = view->spec->info.ui_hook;
|
||||
build_view_ui_function(ws, panel, view, content_rect);
|
||||
build_view_ui_function(ws, panel, view, view->cfg_root, str8(view->query_buffer, view->query_string_size), content_rect);
|
||||
}
|
||||
|
||||
//- rjf: fill with per-view states, after the view has a chance to run
|
||||
@@ -7223,21 +7275,19 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
if(ui_is_focus_active() && view->spec->info.flags & DF_ViewSpecFlag_TypingAutomaticallyFilters && !view->is_filtering)
|
||||
{
|
||||
DF_CmdParams p = df_cmd_params_from_view(ws, panel, view);
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
next = n->next;
|
||||
if(n->v.flags & UI_EventFlag_Paste)
|
||||
if(evt->flags & UI_EventFlag_Paste)
|
||||
{
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Filter));
|
||||
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Paste));
|
||||
}
|
||||
else if(n->v.string.size != 0 && n->v.kind == UI_EventKind_Text)
|
||||
else if(evt->string.size != 0 && evt->kind == UI_EventKind_Text)
|
||||
{
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Filter));
|
||||
p.string = n->v.string;
|
||||
p.string = evt->string;
|
||||
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_InsertText));
|
||||
}
|
||||
}
|
||||
@@ -7307,7 +7357,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_CornerRadius01(panel->tab_side == Side_Min ? 0 : corner_radius)
|
||||
UI_CornerRadius10(panel->tab_side == Side_Min ? corner_radius : 0)
|
||||
UI_CornerRadius11(panel->tab_side == Side_Min ? 0 : corner_radius)
|
||||
for(DF_View *view = panel->first_tab_view;; view = view->next, view_idx += 1)
|
||||
for(DF_View *view = panel->first_tab_view;; view = view->order_next, view_idx += 1)
|
||||
{
|
||||
temp_end(scratch);
|
||||
if(df_view_is_project_filtered(view)) { continue; }
|
||||
@@ -7320,7 +7370,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_View *drag_view = df_view_from_handle(df_g_drag_drop_payload.view);
|
||||
DF_View *dst_prev_view = df_view_from_handle(df_g_last_drag_drop_prev_tab);
|
||||
if(dst_panel == panel &&
|
||||
((!df_view_is_nil(view) && dst_prev_view == view->prev && drag_view != view && drag_view != view->prev) ||
|
||||
((!df_view_is_nil(view) && dst_prev_view == view->order_prev && drag_view != view && drag_view != view->order_prev) ||
|
||||
(df_view_is_nil(view) && dst_prev_view == panel->last_tab_view && drag_view != panel->last_tab_view)))
|
||||
{
|
||||
UI_PrefWidth(ui_em(9.f, 0.2f)) UI_Column
|
||||
@@ -7493,7 +7543,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: store off drop-site
|
||||
drop_sites[view_idx].p = tab_column_box->rect.x0 - tab_spacing/2;
|
||||
drop_sites[view_idx].prev_view = view->prev;
|
||||
drop_sites[view_idx].prev_view = view->order_prev;
|
||||
drop_site_max_p = Max(tab_column_box->rect.x1, drop_site_max_p);
|
||||
}
|
||||
|
||||
@@ -7635,7 +7685,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_DragDropPayload *payload = &df_g_drag_drop_payload;
|
||||
DF_View *dragged_view = df_view_from_handle(payload->view);
|
||||
B32 view_is_in_panel = 0;
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->next)
|
||||
for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next)
|
||||
{
|
||||
if(df_view_is_project_filtered(view)) { continue; }
|
||||
if(view == dragged_view)
|
||||
@@ -7701,56 +7751,77 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
//- rjf: animate views
|
||||
//
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
typedef struct Task Task;
|
||||
struct Task
|
||||
{
|
||||
Task *next;
|
||||
DF_Panel *panel;
|
||||
DF_View *list_first;
|
||||
};
|
||||
Task start_task = {0, &df_g_nil_panel, ws->query_view_stack_top};
|
||||
Task *first_task = &start_task;
|
||||
Task *last_task = first_task;
|
||||
F32 rate = 1 - pow_f32(2, (-10.f * df_dt()));
|
||||
F32 fast_rate = 1 - pow_f32(2, (-40.f * df_dt()));
|
||||
for(DF_Panel *panel = ws->root_panel;
|
||||
!df_panel_is_nil(panel);
|
||||
panel = df_panel_rec_df_pre(panel).next)
|
||||
{
|
||||
U64 list_firsts_count = 1 + !!(panel == ws->root_panel);
|
||||
DF_View *list_firsts[2] = {panel->first_tab_view, ws->query_view_stack_top};
|
||||
for(U64 idx = 0; idx < list_firsts_count; idx += 1)
|
||||
Task *t = push_array(scratch.arena, Task, 1);
|
||||
SLLQueuePush(first_task, last_task, t);
|
||||
t->panel = panel;
|
||||
t->list_first = panel->first_tab_view;
|
||||
}
|
||||
for(Task *t = first_task; t != 0; t = t->next)
|
||||
{
|
||||
DF_View *list_first = t->list_first;
|
||||
for(DF_View *view = list_first; !df_view_is_nil(view); view = view->order_next)
|
||||
{
|
||||
DF_View *list_first = list_firsts[idx];
|
||||
for(DF_View *view = list_first; !df_view_is_nil(view); view = view->next)
|
||||
if(!df_view_is_nil(view->first_transient))
|
||||
{
|
||||
if(window_is_focused)
|
||||
Task *task = push_array(scratch.arena, Task, 1);
|
||||
SLLQueuePush(first_task, last_task, task);
|
||||
task->panel = t->panel;
|
||||
task->list_first = view->first_transient;
|
||||
}
|
||||
if(window_is_focused)
|
||||
{
|
||||
if(abs_f32(view->loading_t_target - view->loading_t) > 0.01f ||
|
||||
abs_f32(view->scroll_pos.x.off) > 0.01f ||
|
||||
abs_f32(view->scroll_pos.y.off) > 0.01f ||
|
||||
abs_f32(view->is_filtering_t - (F32)!!view->is_filtering))
|
||||
{
|
||||
if(abs_f32(view->loading_t_target - view->loading_t) > 0.01f ||
|
||||
abs_f32(view->scroll_pos.x.off) > 0.01f ||
|
||||
abs_f32(view->scroll_pos.y.off) > 0.01f ||
|
||||
abs_f32(view->is_filtering_t - (F32)!!view->is_filtering))
|
||||
{
|
||||
df_gfx_request_frame();
|
||||
}
|
||||
if(view->loading_t_target != 0 && view == df_selected_tab_from_panel(panel))
|
||||
{
|
||||
df_gfx_request_frame();
|
||||
}
|
||||
df_gfx_request_frame();
|
||||
}
|
||||
view->loading_t += (view->loading_t_target - view->loading_t) * rate;
|
||||
view->is_filtering_t += ((F32)!!view->is_filtering - view->is_filtering_t) * fast_rate;
|
||||
view->scroll_pos.x.off -= view->scroll_pos.x.off * (df_setting_val_from_code(ws, DF_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f);
|
||||
view->scroll_pos.y.off -= view->scroll_pos.y.off * (df_setting_val_from_code(ws, DF_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f);
|
||||
if(abs_f32(view->scroll_pos.x.off) < 0.01f)
|
||||
if(view->loading_t_target != 0 && view == df_selected_tab_from_panel(t->panel))
|
||||
{
|
||||
view->scroll_pos.x.off = 0;
|
||||
}
|
||||
if(abs_f32(view->scroll_pos.y.off) < 0.01f)
|
||||
{
|
||||
view->scroll_pos.y.off = 0;
|
||||
}
|
||||
if(abs_f32(view->is_filtering_t - (F32)!!view->is_filtering) < 0.01f)
|
||||
{
|
||||
view->is_filtering_t = (F32)!!view->is_filtering;
|
||||
}
|
||||
if(view == df_selected_tab_from_panel(panel))
|
||||
{
|
||||
view->loading_t_target = 0;
|
||||
df_gfx_request_frame();
|
||||
}
|
||||
}
|
||||
view->loading_t += (view->loading_t_target - view->loading_t) * rate;
|
||||
view->is_filtering_t += ((F32)!!view->is_filtering - view->is_filtering_t) * fast_rate;
|
||||
view->scroll_pos.x.off -= view->scroll_pos.x.off * (df_setting_val_from_code(ws, DF_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f);
|
||||
view->scroll_pos.y.off -= view->scroll_pos.y.off * (df_setting_val_from_code(ws, DF_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f);
|
||||
if(abs_f32(view->scroll_pos.x.off) < 0.01f)
|
||||
{
|
||||
view->scroll_pos.x.off = 0;
|
||||
}
|
||||
if(abs_f32(view->scroll_pos.y.off) < 0.01f)
|
||||
{
|
||||
view->scroll_pos.y.off = 0;
|
||||
}
|
||||
if(abs_f32(view->is_filtering_t - (F32)!!view->is_filtering) < 0.01f)
|
||||
{
|
||||
view->is_filtering_t = (F32)!!view->is_filtering;
|
||||
}
|
||||
if(view == df_selected_tab_from_panel(t->panel))
|
||||
{
|
||||
view->loading_t_target = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
@@ -7765,19 +7836,17 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
////////////////////////////
|
||||
//- rjf: font size changing
|
||||
//
|
||||
for(UI_EventNode *n = events.first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
next = n->next;
|
||||
UI_Event *event = &n->v;
|
||||
if(event->kind == UI_EventKind_Scroll && event->modifiers & OS_EventFlag_Ctrl)
|
||||
if(evt->kind == UI_EventKind_Scroll && evt->modifiers & OS_EventFlag_Ctrl)
|
||||
{
|
||||
ui_eat_event(&events, n);
|
||||
if(event->delta_2f32.y < 0)
|
||||
ui_eat_event(evt);
|
||||
if(evt->delta_2f32.y < 0)
|
||||
{
|
||||
DF_CmdParams params = df_cmd_params_from_window(ws);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_IncUIFontScale));
|
||||
}
|
||||
else if(event->delta_2f32.y > 0)
|
||||
else if(evt->delta_2f32.y > 0)
|
||||
{
|
||||
DF_CmdParams params = df_cmd_params_from_window(ws);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_DecUIFontScale));
|
||||
@@ -9331,7 +9400,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source)
|
||||
}
|
||||
|
||||
// rjf: views
|
||||
for(DF_View *view = p->first_tab_view; !df_view_is_nil(view); view = view->next)
|
||||
for(DF_View *view = p->first_tab_view; !df_view_is_nil(view); view = view->order_next)
|
||||
{
|
||||
String8 view_string = view->spec->info.name;
|
||||
|
||||
@@ -12016,28 +12085,26 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
B32 change = 0;
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
next = n->next;
|
||||
if(n->v.kind != UI_EventKind_Navigate && n->v.kind != UI_EventKind_Edit)
|
||||
if(evt->kind != UI_EventKind_Navigate && evt->kind != UI_EventKind_Edit)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
B32 taken = 0;
|
||||
String8 line = txt_string_from_info_data_line_num(info, data, cursor->line);
|
||||
UI_TxtOp single_line_op = ui_single_line_txt_op_from_event(scratch.arena, &n->v, line, *cursor, *mark);
|
||||
UI_TxtOp single_line_op = ui_single_line_txt_op_from_event(scratch.arena, evt, line, *cursor, *mark);
|
||||
|
||||
//- rjf: invalid single-line op or endpoint units => try multiline
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Whole || single_line_op.flags & UI_TxtOpFlag_Invalid)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Whole || single_line_op.flags & UI_TxtOpFlag_Invalid)
|
||||
{
|
||||
U64 line_count = info->lines_count;
|
||||
String8 prev_line = txt_string_from_info_data_line_num(info, data, cursor->line-1);
|
||||
String8 next_line = txt_string_from_info_data_line_num(info, data, cursor->line+1);
|
||||
Vec2S32 delta = n->v.delta_2s32;
|
||||
Vec2S32 delta = evt->delta_2s32;
|
||||
|
||||
//- rjf: wrap lines right
|
||||
if(n->v.delta_unit != UI_EventDeltaUnit_Whole && delta.x > 0 && cursor->column == line.size+1 && cursor->line+1 <= line_count)
|
||||
if(evt->delta_unit != UI_EventDeltaUnit_Whole && delta.x > 0 && cursor->column == line.size+1 && cursor->line+1 <= line_count)
|
||||
{
|
||||
cursor->line += 1;
|
||||
cursor->column = 1;
|
||||
@@ -12047,7 +12114,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: wrap lines left
|
||||
if(n->v.delta_unit != UI_EventDeltaUnit_Whole && delta.x < 0 && cursor->column == 1 && cursor->line-1 >= 1)
|
||||
if(evt->delta_unit != UI_EventDeltaUnit_Whole && delta.x < 0 && cursor->column == 1 && cursor->line-1 >= 1)
|
||||
{
|
||||
cursor->line -= 1;
|
||||
cursor->column = prev_line.size+1;
|
||||
@@ -12057,7 +12124,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement down (plain)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Char && delta.y > 0 && cursor->line+1 <= line_count)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Char && delta.y > 0 && cursor->line+1 <= line_count)
|
||||
{
|
||||
cursor->line += 1;
|
||||
cursor->column = Min(*preferred_column, next_line.size+1);
|
||||
@@ -12066,7 +12133,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement up (plain)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Char && delta.y < 0 && cursor->line-1 >= 1)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Char && delta.y < 0 && cursor->line-1 >= 1)
|
||||
{
|
||||
cursor->line -= 1;
|
||||
cursor->column = Min(*preferred_column, prev_line.size+1);
|
||||
@@ -12075,7 +12142,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement down (chunk)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Word && delta.y > 0 && cursor->line+1 <= line_count)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Word && delta.y > 0 && cursor->line+1 <= line_count)
|
||||
{
|
||||
for(S64 line_num = cursor->line+1; line_num <= line_count; line_num += 1)
|
||||
{
|
||||
@@ -12098,7 +12165,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement up (chunk)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Word && delta.y < 0 && cursor->line-1 >= 1)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Word && delta.y < 0 && cursor->line-1 >= 1)
|
||||
{
|
||||
for(S64 line_num = cursor->line-1; line_num > 0; line_num -= 1)
|
||||
{
|
||||
@@ -12121,7 +12188,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement down (page)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Page && delta.y > 0)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Page && delta.y > 0)
|
||||
{
|
||||
cursor->line += line_count_per_page;
|
||||
cursor->column = 1;
|
||||
@@ -12131,7 +12198,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement up (page)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Page && delta.y < 0)
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Page && delta.y < 0)
|
||||
{
|
||||
cursor->line -= line_count_per_page;
|
||||
cursor->column = 1;
|
||||
@@ -12141,7 +12208,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement to endpoint (+)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Whole && (delta.y > 0 || delta.x > 0))
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Whole && (delta.y > 0 || delta.x > 0))
|
||||
{
|
||||
*cursor = txt_pt(line_count, info->lines_count ? dim_1u64(info->lines_ranges[info->lines_count-1])+1 : 1);
|
||||
change = 1;
|
||||
@@ -12149,7 +12216,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: movement to endpoint (-)
|
||||
if(n->v.delta_unit == UI_EventDeltaUnit_Whole && (delta.y < 0 || delta.x < 0))
|
||||
if(evt->delta_unit == UI_EventDeltaUnit_Whole && (delta.y < 0 || delta.x < 0))
|
||||
{
|
||||
*cursor = txt_pt(1, 1);
|
||||
change = 1;
|
||||
@@ -12157,7 +12224,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: stick mark to cursor, when we don't want to keep it in the same spot
|
||||
if(!(n->v.flags & UI_EventFlag_KeepMark))
|
||||
if(!(evt->flags & UI_EventFlag_KeepMark))
|
||||
{
|
||||
*mark = *cursor;
|
||||
}
|
||||
@@ -12174,7 +12241,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
}
|
||||
|
||||
//- rjf: copy
|
||||
if(n->v.flags & UI_EventFlag_Copy)
|
||||
if(evt->flags & UI_EventFlag_Copy)
|
||||
{
|
||||
String8 text = txt_string_from_info_data_txt_rng(info, data, txt_rng(*cursor, *mark));
|
||||
os_set_clipboard_text(text);
|
||||
@@ -12184,7 +12251,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx
|
||||
//- rjf: consume
|
||||
if(taken)
|
||||
{
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12561,11 +12628,8 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi
|
||||
B32 commit = 0;
|
||||
if(!is_focus_active && is_focus_hot)
|
||||
{
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
next = n->next;
|
||||
UI_Event *evt = &n->v;
|
||||
if(evt->flags & UI_EventFlag_Copy)
|
||||
{
|
||||
os_set_clipboard_text(pre_edit_value);
|
||||
@@ -12593,10 +12657,9 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi
|
||||
B32 start_editing_via_typing = 0;
|
||||
if(is_focus_hot)
|
||||
{
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(n->v.string.size != 0 || n->v.flags & UI_EventFlag_Paste)
|
||||
if(evt->string.size != 0 || evt->flags & UI_EventFlag_Paste)
|
||||
{
|
||||
start_editing_via_typing = 1;
|
||||
break;
|
||||
@@ -12629,12 +12692,11 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi
|
||||
//- rjf: determine autocompletion string
|
||||
String8 autocomplete_hint_string = {0};
|
||||
{
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(n->v.kind == UI_EventKind_AutocompleteHint)
|
||||
if(evt->kind == UI_EventKind_AutocompleteHint)
|
||||
{
|
||||
autocomplete_hint_string = n->v.string;
|
||||
autocomplete_hint_string = evt->string;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12644,20 +12706,18 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi
|
||||
if(!(flags & DF_LineEditFlag_DisableEdit) && (is_focus_active || focus_started))
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
String8 edit_string = str8(edit_buffer, edit_string_size_out[0]);
|
||||
next = n->next;
|
||||
|
||||
// rjf: do not consume anything that doesn't fit a single-line's operations
|
||||
if((n->v.kind != UI_EventKind_Edit && n->v.kind != UI_EventKind_Navigate && n->v.kind != UI_EventKind_Text) || n->v.delta_2s32.y != 0)
|
||||
if((evt->kind != UI_EventKind_Edit && evt->kind != UI_EventKind_Navigate && evt->kind != UI_EventKind_Text) || evt->delta_2s32.y != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// rjf: map this action to an op
|
||||
UI_TxtOp op = ui_single_line_txt_op_from_event(scratch.arena, &n->v, edit_string, *cursor, *mark);
|
||||
UI_TxtOp op = ui_single_line_txt_op_from_event(scratch.arena, evt, edit_string, *cursor, *mark);
|
||||
|
||||
// rjf: any valid op & autocomplete hint? -> perform autocomplete first, then re-compute op
|
||||
if(autocomplete_hint_string.size != 0)
|
||||
@@ -12670,7 +12730,7 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi
|
||||
edit_string_size_out[0] = new_string.size;
|
||||
*cursor = *mark = txt_pt(1, word_off+1+autocomplete_hint_string.size);
|
||||
edit_string = str8(edit_buffer, edit_string_size_out[0]);
|
||||
op = ui_single_line_txt_op_from_event(scratch.arena, &n->v, edit_string, *cursor, *mark);
|
||||
op = ui_single_line_txt_op_from_event(scratch.arena, evt, edit_string, *cursor, *mark);
|
||||
MemoryZeroStruct(&autocomplete_hint_string);
|
||||
}
|
||||
|
||||
@@ -12695,7 +12755,7 @@ df_line_edit(DF_Window *ws, DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeLi
|
||||
|
||||
// rjf: consume event
|
||||
{
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
changes_made = 1;
|
||||
}
|
||||
}
|
||||
@@ -12965,8 +13025,6 @@ df_gfx_init(OS_WindowRepaintFunctionType *window_repaint_entry_point, DF_StateDe
|
||||
{
|
||||
DF_GfxViewRuleSpecInfoArray array = {df_g_gfx_view_rule_spec_info_table, ArrayCount(df_g_gfx_view_rule_spec_info_table)};
|
||||
df_register_gfx_view_rule_specs(array);
|
||||
DF_ViewSpecInfoArray tab_view_specs_array = {df_g_gfx_view_rule_tab_view_spec_info_table, ArrayCount(df_g_gfx_view_rule_tab_view_spec_info_table)};
|
||||
df_register_view_specs(tab_view_specs_array);
|
||||
}
|
||||
|
||||
// rjf: register cmd param slot -> view specs
|
||||
|
||||
+54
-18
@@ -93,12 +93,12 @@ typedef DF_VIEW_SETUP_FUNCTION_SIG(DF_ViewSetupFunctionType);
|
||||
#define DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(name) internal DF_VIEW_STRING_FROM_STATE_FUNCTION_SIG(DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(name))
|
||||
typedef DF_VIEW_STRING_FROM_STATE_FUNCTION_SIG(DF_ViewStringFromStateFunctionType);
|
||||
|
||||
#define DF_VIEW_CMD_FUNCTION_SIG(name) void name(struct DF_Window *ws, struct DF_Panel *panel, struct DF_View *view, struct DF_CmdList *cmds)
|
||||
#define DF_VIEW_CMD_FUNCTION_SIG(name) void name(struct DF_Window *ws, struct DF_Panel *panel, struct DF_View *view, DF_CfgNode *cfg, String8 string, struct DF_CmdList *cmds)
|
||||
#define DF_VIEW_CMD_FUNCTION_NAME(name) df_view_cmds_##name
|
||||
#define DF_VIEW_CMD_FUNCTION_DEF(name) internal DF_VIEW_CMD_FUNCTION_SIG(DF_VIEW_CMD_FUNCTION_NAME(name))
|
||||
typedef DF_VIEW_CMD_FUNCTION_SIG(DF_ViewCmdFunctionType);
|
||||
|
||||
#define DF_VIEW_UI_FUNCTION_SIG(name) void name(struct DF_Window *ws, struct DF_Panel *panel, struct DF_View *view, Rng2F32 rect)
|
||||
#define DF_VIEW_UI_FUNCTION_SIG(name) void name(struct DF_Window *ws, struct DF_Panel *panel, struct DF_View *view, DF_CfgNode *cfg, String8 string, Rng2F32 rect)
|
||||
#define DF_VIEW_UI_FUNCTION_NAME(name) df_view_ui_##name
|
||||
#define DF_VIEW_UI_FUNCTION_DEF(name) internal DF_VIEW_UI_FUNCTION_SIG(DF_VIEW_UI_FUNCTION_NAME(name))
|
||||
typedef DF_VIEW_UI_FUNCTION_SIG(DF_ViewUIFunctionType);
|
||||
@@ -112,11 +112,10 @@ enum
|
||||
DF_ViewSpecFlag_ParameterizedByEntity = (1<<0),
|
||||
DF_ViewSpecFlag_ProjectSpecific = (1<<1),
|
||||
DF_ViewSpecFlag_CanSerialize = (1<<2),
|
||||
DF_ViewSpecFlag_CanSerializeFilePath = (1<<3),
|
||||
DF_ViewSpecFlag_CanFilter = (1<<4),
|
||||
DF_ViewSpecFlag_FilterIsCode = (1<<5),
|
||||
DF_ViewSpecFlag_TypingAutomaticallyFilters = (1<<6),
|
||||
DF_ViewSpecFlag_DisplayFilterInTitle = (1<<7),
|
||||
DF_ViewSpecFlag_CanFilter = (1<<3),
|
||||
DF_ViewSpecFlag_FilterIsCode = (1<<4),
|
||||
DF_ViewSpecFlag_TypingAutomaticallyFilters = (1<<5),
|
||||
DF_ViewSpecFlag_DisplayFilterInTitle = (1<<6),
|
||||
};
|
||||
|
||||
typedef struct DF_ViewSpecInfo DF_ViewSpecInfo;
|
||||
@@ -172,12 +171,38 @@ struct DF_ArenaExt
|
||||
Arena *arena;
|
||||
};
|
||||
|
||||
typedef struct DF_TransientViewNode DF_TransientViewNode;
|
||||
struct DF_TransientViewNode
|
||||
{
|
||||
DF_TransientViewNode *next;
|
||||
DF_TransientViewNode *prev;
|
||||
DF_ExpandKey key;
|
||||
DF_View *view;
|
||||
U64 first_frame_index_touched;
|
||||
U64 last_frame_index_touched;
|
||||
};
|
||||
|
||||
typedef struct DF_TransientViewSlot DF_TransientViewSlot;
|
||||
struct DF_TransientViewSlot
|
||||
{
|
||||
DF_TransientViewNode *first;
|
||||
DF_TransientViewNode *last;
|
||||
};
|
||||
|
||||
typedef struct DF_View DF_View;
|
||||
struct DF_View
|
||||
{
|
||||
// rjf: allocation links (for iterating all views)
|
||||
DF_View *alloc_next;
|
||||
DF_View *alloc_prev;
|
||||
|
||||
// rjf: ownership links ('owners' can have lists of views)
|
||||
DF_View *next;
|
||||
DF_View *prev;
|
||||
DF_View *order_next;
|
||||
DF_View *order_prev;
|
||||
|
||||
// rjf: transient view children
|
||||
DF_View *first_transient;
|
||||
DF_View *last_transient;
|
||||
|
||||
// rjf: view specification info
|
||||
DF_ViewSpec *spec;
|
||||
@@ -204,12 +229,19 @@ struct DF_View
|
||||
Arena *arena;
|
||||
DF_ArenaExt *first_arena_ext;
|
||||
DF_ArenaExt *last_arena_ext;
|
||||
U64 transient_view_slots_count;
|
||||
DF_TransientViewSlot *transient_view_slots;
|
||||
DF_TransientViewNode *free_transient_view_node;
|
||||
void *user_data;
|
||||
|
||||
// rjf: filter mode
|
||||
B32 is_filtering;
|
||||
F32 is_filtering_t;
|
||||
|
||||
// rjf: configuration tree state
|
||||
Arena *cfg_arena;
|
||||
DF_CfgNode *cfg_root;
|
||||
|
||||
// rjf: text query state
|
||||
TxtPt query_cursor;
|
||||
TxtPt query_mark;
|
||||
@@ -303,7 +335,7 @@ enum
|
||||
DF_GfxViewRuleSpecInfoFlag_VizRowProd = (1<<0),
|
||||
DF_GfxViewRuleSpecInfoFlag_LineStringize = (1<<1),
|
||||
DF_GfxViewRuleSpecInfoFlag_RowUI = (1<<2),
|
||||
DF_GfxViewRuleSpecInfoFlag_BlockUI = (1<<3),
|
||||
DF_GfxViewRuleSpecInfoFlag_ViewUI = (1<<3),
|
||||
};
|
||||
|
||||
#define DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(name) void name(void)
|
||||
@@ -318,14 +350,9 @@ enum
|
||||
#define DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(name) df_gfx_view_rule_row_ui__##name
|
||||
#define DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(name) DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_SIG(DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(name))
|
||||
|
||||
#define DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_SIG(name) void name(struct DF_Window *ws, DF_ExpandKey key, E_Eval eval, struct DF_CfgNode *cfg, Vec2F32 dim)
|
||||
#define DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(name) df_gfx_view_rule_block_ui__##name
|
||||
#define DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(name) DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_SIG(DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(name))
|
||||
|
||||
typedef DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(DF_GfxViewRuleVizRowProdHookFunctionType);
|
||||
typedef DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(DF_GfxViewRuleLineStringizeHookFunctionType);
|
||||
typedef DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_SIG(DF_GfxViewRuleRowUIFunctionType);
|
||||
typedef DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_SIG(DF_GfxViewRuleBlockUIFunctionType);
|
||||
|
||||
typedef struct DF_GfxViewRuleSpecInfo DF_GfxViewRuleSpecInfo;
|
||||
struct DF_GfxViewRuleSpecInfo
|
||||
@@ -335,8 +362,7 @@ struct DF_GfxViewRuleSpecInfo
|
||||
DF_GfxViewRuleVizRowProdHookFunctionType *viz_row_prod;
|
||||
DF_GfxViewRuleLineStringizeHookFunctionType *line_stringize;
|
||||
DF_GfxViewRuleRowUIFunctionType *row_ui;
|
||||
DF_GfxViewRuleBlockUIFunctionType *block_ui;
|
||||
String8 tab_view_spec_name;
|
||||
String8 view_spec_name;
|
||||
};
|
||||
|
||||
typedef struct DF_GfxViewRuleSpecInfoArray DF_GfxViewRuleSpecInfoArray;
|
||||
@@ -754,6 +780,8 @@ struct DF_GfxState
|
||||
B32 last_window_queued_save;
|
||||
|
||||
// rjf: view state
|
||||
DF_View *first_view;
|
||||
DF_View *last_view;
|
||||
DF_View *free_view;
|
||||
U64 free_view_count;
|
||||
U64 allocated_view_count;
|
||||
@@ -808,6 +836,10 @@ read_only global DF_GfxViewRuleSpec df_g_nil_gfx_view_rule_spec =
|
||||
|
||||
read_only global DF_View df_g_nil_view =
|
||||
{
|
||||
&df_g_nil_view,
|
||||
&df_g_nil_view,
|
||||
&df_g_nil_view,
|
||||
&df_g_nil_view,
|
||||
&df_g_nil_view,
|
||||
&df_g_nil_view,
|
||||
&df_g_nil_view_spec,
|
||||
@@ -920,7 +952,6 @@ internal DF_ViewSpec *df_view_spec_from_cmd_param_slot_spec(DF_CmdParamSlot slot
|
||||
|
||||
internal void df_register_gfx_view_rule_specs(DF_GfxViewRuleSpecInfoArray specs);
|
||||
internal DF_GfxViewRuleSpec *df_gfx_view_rule_spec_from_string(String8 string);
|
||||
internal DF_ViewSpec *df_tab_view_spec_from_gfx_view_rule_spec(DF_GfxViewRuleSpec *spec);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: View State Functions
|
||||
@@ -934,6 +965,11 @@ internal void *df_view_get_or_push_user_state(DF_View *view, U64 size);
|
||||
internal Arena *df_view_push_arena_ext(DF_View *view);
|
||||
#define df_view_user_state(view, type) (type *)df_view_get_or_push_user_state((view), sizeof(type))
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Expand-Keyed Transient View Functions
|
||||
|
||||
internal DF_View *df_transient_view_from_expand_key(DF_View *owner_view, DF_Window *window, DF_ViewSpec *spec, String8 query, DF_CfgNode *cfg_root, DF_ExpandKey key);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: View Rule Instance State Functions
|
||||
|
||||
|
||||
+66
-64
@@ -210,40 +210,56 @@ DF_BindingVersionRemapTable:
|
||||
////////////////////////////////
|
||||
//~ rjf: Gfx Layer View Kinds
|
||||
|
||||
@table(name name_lower display_string icon parameterized_by_entity project_specific can_serialize can_serialize_file_path can_filter filter_is_code typing_automatically_filters display_filter_in_title inc_in_docs docs_desc)
|
||||
@table(name name_lower display_string icon parameterized_by_entity project_specific can_serialize can_filter filter_is_code typing_automatically_filters display_filter_in_title inc_in_docs docs_desc)
|
||||
DF_GfxViewTable:
|
||||
{
|
||||
{ Null "null" "" Null 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ Empty "empty" "" Null 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ GettingStarted "getting_started" "Getting Started" QuestionMark 0 0 1 0 0 0 0 0 0 "" }
|
||||
{ Commands "commands" "Commands" List 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ FileSystem "file_system" "File System" FileOutline 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ SystemProcesses "system_processes" "System Processes" Null 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ EntityLister "entity_lister" "Entity List" Null 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ SymbolLister "symbol_lister" "Symbols" Null 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ Target "target" "Target" Target 1 0 0 0 0 0 0 0 0 "" }
|
||||
{ Targets "targets" "Targets" Target 0 0 1 0 1 0 1 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." }
|
||||
{ FilePathMap "file_path_map" "File Path Map" FileOutline 0 0 1 0 0 0 0 0 1 "Displays a table of *path maps*. Each path map is a pair of file or folder paths, one being a 'source' path, and one being a 'destination' path. These pairs are used by the debugger when automatically searching for specific files - for instance, when attempting to snap to a source code location specified by debug info. If debug info refers to a path on the machine on which a target executable was originally built, but that path is not valid on the debugger machine, but some alternative path exists, then path maps may be used to redirect the debugger from the debug info's specified paths to the associated appropriate debugger machine file paths." }
|
||||
{ AutoViewRules "auto_view_rules" "Auto View Rules" Binoculars 0 0 1 0 0 0 0 0 1 "Displays a table of *auto view rules*. Each *auto view rule* is a pair, with one element being a type, and the other being a view rule, which should be automatically applied to expressions of that type, when possible." }
|
||||
{ Scheduler "scheduler" "Scheduler" Scheduler 0 0 1 0 1 1 1 1 1 "Displays all processes and threads to which the debugger is currently attached, and contains controls for selecting and freezing threads." }
|
||||
{ CallStack "call_stack" "Call Stack" Thread 0 0 1 0 0 0 0 1 1 "Displays the call stack of the currently selected thread. Each frame in the call stack contains the associated module, function name, and return address. Allows selection of a particular call stack frame other than the top." }
|
||||
{ Modules "modules" "Modules" Module 0 0 1 0 1 0 1 1 1 "Displays a table of all modules currently loaded by any process to which the debugger is attached. This table displays each module's name, virtual address range in the containing process' address space, and which debug info file is being used by the debugger for the associated module." }
|
||||
{ PendingFile "pending_file" "Pending File" FileOutline 0 0 0 0 0 0 0 0 0 "" }
|
||||
{ Code "code" "Code" FileOutline 0 1 1 1 0 1 0 0 0 "" }
|
||||
{ Disassembly "disassembly" "Disassembly" Glasses 0 0 1 0 0 0 0 0 1 "Displays disassembled instructions in a textual form from the selected thread's containing process virtual address space." }
|
||||
{ Watch "watch" "Watch" Binoculars 0 0 1 0 1 1 1 1 1 "The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section." }
|
||||
{ Locals "locals" "Locals" Binoculars 0 0 1 0 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with local variables found within the selected call stack frame of the selected thread, according to the associated debug info. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Registers "registers" "Registers" Binoculars 0 0 1 0 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all register names according to the selected thread's architecture. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Globals "globals" "Globals" Binoculars 0 0 1 0 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all global variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ ThreadLocals "thread_locals" "Thread Locals" Binoculars 0 0 1 0 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all thread local variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Types "types" "Types" Binoculars 0 0 1 0 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all types within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Procedures "procedures" "Procedures" Binoculars 0 0 1 0 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all procedures within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Output "output" "Output" List 0 0 1 0 0 0 0 0 1 "Displays textual output from the selected thread's containing process." }
|
||||
{ Memory "memory" "Memory" Grid 0 0 1 0 0 0 0 0 1 "A familiar hex-editor-like interface for viewing memory of attached processes." }
|
||||
{ Breakpoints "breakpoints" "Breakpoints" CircleFilled 0 0 1 0 1 0 1 1 1 "Displays a table of all breakpoints, containing information about each breakpoint's name, location, and hit count. Also contains per-breakpoint controls for enabling, deleting, or editing each breakpoint. For more information on breakpoints and their features, read the 'Breakpoints' section." }
|
||||
{ WatchPins "watch_pins" "Watch Pins" Pin 0 0 1 0 1 1 1 1 1 "Displays a table of all watch pins (watched expressions, like those found in `Watch`, but instead of being within a table, being pinned to some source code location, like breakpoints). This table contains each pin's name, location, and controls for editing or deleting each pin." }
|
||||
{ ExceptionFilters "exception_filters" "Exception Filters" Gear 0 0 1 0 1 0 1 1 1 "An interface which controls whether or not the debugger will halt attached processes upon encountering specific exception codes for the first time." }
|
||||
{ Settings "settings" "Settings" Gear 0 0 1 0 1 0 1 1 1 "An interface to modify general settings for the debugger's appearance and behavior." }
|
||||
//- rjf: basics
|
||||
{ Null "null" "" Null 0 0 0 0 0 0 0 0 "" }
|
||||
{ Empty "empty" "" Null 0 0 0 0 0 0 0 0 "" }
|
||||
{ GettingStarted "getting_started" "Getting Started" QuestionMark 0 0 1 0 0 0 0 0 "" }
|
||||
|
||||
//- rjf: listers
|
||||
{ Commands "commands" "Commands" List 0 0 0 0 0 0 0 0 "" }
|
||||
{ FileSystem "file_system" "File System" FileOutline 0 0 0 0 0 0 0 0 "" }
|
||||
{ SystemProcesses "system_processes" "System Processes" Null 0 0 0 0 0 0 0 0 "" }
|
||||
{ EntityLister "entity_lister" "Entity List" Null 0 0 0 0 0 0 0 0 "" }
|
||||
{ SymbolLister "symbol_lister" "Symbols" Null 0 0 0 0 0 0 0 0 "" }
|
||||
|
||||
//- rjf: entity editors
|
||||
{ Target "target" "Target" Target 1 0 0 0 0 0 0 0 "" }
|
||||
{ Targets "targets" "Targets" Target 0 0 1 1 0 1 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." }
|
||||
{ FilePathMap "file_path_map" "File Path Map" FileOutline 0 0 1 0 0 0 0 1 "Displays a table of *path maps*. Each path map is a pair of file or folder paths, one being a 'source' path, and one being a 'destination' path. These pairs are used by the debugger when automatically searching for specific files - for instance, when attempting to snap to a source code location specified by debug info. If debug info refers to a path on the machine on which a target executable was originally built, but that path is not valid on the debugger machine, but some alternative path exists, then path maps may be used to redirect the debugger from the debug info's specified paths to the associated appropriate debugger machine file paths." }
|
||||
{ AutoViewRules "auto_view_rules" "Auto View Rules" Binoculars 0 0 1 0 0 0 0 1 "Displays a table of *auto view rules*. Each *auto view rule* is a pair, with one element being a type, and the other being a view rule, which should be automatically applied to expressions of that type, when possible." }
|
||||
{ Breakpoints "breakpoints" "Breakpoints" CircleFilled 0 0 1 1 0 1 1 1 "Displays a table of all breakpoints, containing information about each breakpoint's name, location, and hit count. Also contains per-breakpoint controls for enabling, deleting, or editing each breakpoint. For more information on breakpoints and their features, read the 'Breakpoints' section." }
|
||||
{ WatchPins "watch_pins" "Watch Pins" Pin 0 0 1 1 1 1 1 1 "Displays a table of all watch pins (watched expressions, like those found in `Watch`, but instead of being within a table, being pinned to some source code location, like breakpoints). This table contains each pin's name, location, and controls for editing or deleting each pin." }
|
||||
|
||||
//- rjf: debug entity viewers
|
||||
{ Scheduler "scheduler" "Scheduler" Scheduler 0 0 1 1 1 1 1 1 "Displays all processes and threads to which the debugger is currently attached, and contains controls for selecting and freezing threads." }
|
||||
{ CallStack "call_stack" "Call Stack" Thread 0 0 1 0 0 0 1 1 "Displays the call stack of the currently selected thread. Each frame in the call stack contains the associated module, function name, and return address. Allows selection of a particular call stack frame other than the top." }
|
||||
{ Modules "modules" "Modules" Module 0 0 1 1 0 1 1 1 "Displays a table of all modules currently loaded by any process to which the debugger is attached. This table displays each module's name, virtual address range in the containing process' address space, and which debug info file is being used by the debugger for the associated module." }
|
||||
|
||||
//- rjf: watch-style views
|
||||
{ Watch "watch" "Watch" Binoculars 0 0 1 1 1 1 1 1 "The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section." }
|
||||
{ Locals "locals" "Locals" Binoculars 0 0 1 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with local variables found within the selected call stack frame of the selected thread, according to the associated debug info. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Registers "registers" "Registers" Binoculars 0 0 1 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all register names according to the selected thread's architecture. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Globals "globals" "Globals" Binoculars 0 0 1 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all global variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ ThreadLocals "thread_locals" "Thread Locals" Binoculars 0 0 1 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all thread local variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Types "types" "Types" Binoculars 0 0 1 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all types within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
{ Procedures "procedures" "Procedures" Binoculars 0 0 1 1 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all procedures within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
||||
|
||||
//- rjf: temporary view for loading files - must analyze file before picking viewer
|
||||
{ PendingFile "pending_file" "Pending File" FileOutline 0 0 0 0 0 0 0 0 "" }
|
||||
|
||||
//- rjf: visualizers
|
||||
{ Code "code" "Code" FileOutline 0 1 1 0 1 0 0 0 "" }
|
||||
{ Disassembly "disassembly" "Disassembly" Glasses 0 0 1 0 0 0 0 1 "Displays disassembled instructions in a textual form from the selected thread's containing process virtual address space." }
|
||||
{ Output "output" "Output" List 0 0 1 0 0 0 0 1 "Displays textual output from the selected thread's containing process." }
|
||||
{ Memory "memory" "Memory" Grid 0 0 1 0 0 0 0 1 "A familiar hex-editor-like interface for viewing memory of attached processes." }
|
||||
{ Bitmap "bitmap" "Bitmap" Binoculars 0 0 1 0 0 0 0 1 "Visualizes memory as a bitmap." }
|
||||
|
||||
//- rjf: meta (settings)
|
||||
{ ExceptionFilters "exception_filters" "Exception Filters" Gear 0 0 1 1 0 1 1 1 "An interface which controls whether or not the debugger will halt attached processes upon encountering specific exception codes for the first time." }
|
||||
{ Settings "settings" "Settings" Gear 0 0 1 1 0 1 1 1 "An interface to modify general settings for the debugger's appearance and behavior." }
|
||||
}
|
||||
|
||||
@enum DF_GfxViewKind:
|
||||
@@ -262,7 +278,7 @@ DF_GfxViewTable:
|
||||
|
||||
@data(DF_ViewSpecInfo) df_g_gfx_view_kind_spec_info_table:
|
||||
{
|
||||
@expand(DF_GfxViewTable a) ```{(0|$(a.parameterized_by_entity)*DF_ViewSpecFlag_ParameterizedByEntity|$(a.project_specific)*DF_ViewSpecFlag_ProjectSpecific|$(a.can_serialize)*DF_ViewSpecFlag_CanSerialize|$(a.can_serialize_file_path)*DF_ViewSpecFlag_CanSerializeFilePath|$(a.can_filter)*DF_ViewSpecFlag_CanFilter|$(a.filter_is_code)*DF_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*DF_ViewSpecFlag_TypingAutomaticallyFilters|$(a.display_filter_in_title)*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), DF_IconKind_$(a.icon), DF_VIEW_SETUP_FUNCTION_NAME($(a.name)), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME($(a.name)), DF_VIEW_CMD_FUNCTION_NAME($(a.name)), DF_VIEW_UI_FUNCTION_NAME($(a.name))}```;
|
||||
@expand(DF_GfxViewTable a) ```{(0|$(a.parameterized_by_entity)*DF_ViewSpecFlag_ParameterizedByEntity|$(a.project_specific)*DF_ViewSpecFlag_ProjectSpecific|$(a.can_serialize)*DF_ViewSpecFlag_CanSerialize|$(a.can_filter)*DF_ViewSpecFlag_CanFilter|$(a.filter_is_code)*DF_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*DF_ViewSpecFlag_TypingAutomaticallyFilters|$(a.display_filter_in_title)*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), DF_IconKind_$(a.icon), DF_VIEW_SETUP_FUNCTION_NAME($(a.name)), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME($(a.name)), DF_VIEW_CMD_FUNCTION_NAME($(a.name)), DF_VIEW_UI_FUNCTION_NAME($(a.name))}```;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
@@ -300,24 +316,24 @@ DF_CmdParamSlot2ViewSpecMap:
|
||||
//
|
||||
// NOTE(rjf): see @view_rule_info
|
||||
|
||||
@table(string vr ls ru bu tu tab_display_string)
|
||||
@table(string vr ls ru vu view_spec_name)
|
||||
DF_GfxViewRuleTable:
|
||||
{
|
||||
{"array" - - - - - "" }
|
||||
{"list" x - - - - "" }
|
||||
{"dec" - x - - - "" }
|
||||
{"bin" - x - - - "" }
|
||||
{"oct" - x - - - "" }
|
||||
{"hex" - x - - - "" }
|
||||
{"only" x x - - - "" }
|
||||
{"omit" x x - - - "" }
|
||||
{"no_addr" - x - - - "" }
|
||||
{"checkbox" - - x - - "" }
|
||||
{"rgba" - - x x - "" }
|
||||
{"text" - - - x x "Text" }
|
||||
{"disasm" - - - x x "Disassembly" }
|
||||
{"bitmap" - - x x x "Bitmap" }
|
||||
{"geo" - - x x x "Geometry" }
|
||||
{"array" - - - - "" }
|
||||
{"list" x - - - "" }
|
||||
{"dec" - x - - "" }
|
||||
{"bin" - x - - "" }
|
||||
{"oct" - x - - "" }
|
||||
{"hex" - x - - "" }
|
||||
{"only" x x - - "" }
|
||||
{"omit" x x - - "" }
|
||||
{"no_addr" - x - - "" }
|
||||
{"checkbox" - - x - "" }
|
||||
{"rgba" - - x x "" }
|
||||
{"text" - - - x "code" }
|
||||
{"disasm" - - - x "disassembly" }
|
||||
{"bitmap" - - x x "bitmap" }
|
||||
{"geo" - - x x "geometry" }
|
||||
}
|
||||
|
||||
@gen
|
||||
@@ -331,26 +347,12 @@ DF_GfxViewRuleTable:
|
||||
`$(a.ru == "x" -> "DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
`$(a.bu == "x" -> "DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
`$(a.tu == "x" -> "DF_VIEW_SETUP_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
`$(a.tu == "x" -> "DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
`$(a.tu == "x" -> "DF_VIEW_CMD_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
`$(a.tu == "x" -> "DF_VIEW_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
||||
}
|
||||
|
||||
@data(DF_ViewSpecInfo) @c_file df_g_gfx_view_rule_tab_view_spec_info_table:
|
||||
{
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
```$(a.tu == "x" -> '{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_FilterIsCode, str8_lit_comp("' .. a.string .. '_view_rule"), str8_lit_comp("' .. a.tab_display_string .. '"), 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 .. ') }')```;
|
||||
}
|
||||
|
||||
@data(DF_GfxViewRuleSpecInfo) @c_file df_g_gfx_view_rule_spec_info_table:
|
||||
{
|
||||
@expand(DF_GfxViewRuleTable a)
|
||||
```{ str8_lit_comp("$(a.string)"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*$(a.vr == "x"))|(DF_GfxViewRuleSpecInfoFlag_LineStringize*$(a.ls == "x"))|(DF_GfxViewRuleSpecInfoFlag_RowUI*$(a.ru == "x"))|(DF_GfxViewRuleSpecInfoFlag_BlockUI*$(a.bu == "x")), $(a.vr == "x" -> "DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vr != "x" -> 0), $(a.ls == "x" -> "DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME("..a.name_lower..")") $(a.ls != "x" -> 0), $(a.ru == "x" -> "DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME("..a.name_lower..")") $(a.ru != "x" -> 0), $(a.bu == "x" -> "DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME("..a.name_lower..")") $(a.bu != "x" -> 0), str8_lit_comp("$(a.tu == 'x' -> a.string..'_view_rule')") }```;
|
||||
```{ str8_lit_comp("$(a.string)"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*$(a.vr == "x"))|(DF_GfxViewRuleSpecInfoFlag_LineStringize*$(a.ls == "x"))|(DF_GfxViewRuleSpecInfoFlag_RowUI*$(a.ru == "x"))|(DF_GfxViewRuleSpecInfoFlag_ViewUI*$(a.vu == "x")), $(a.vr == "x" -> "DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vr != "x" -> 0), $(a.ls == "x" -> "DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME("..a.name_lower..")") $(a.ls != "x" -> 0), $(a.ru == "x" -> "DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME("..a.name_lower..")") $(a.ru != "x" -> 0), str8_lit_comp("$(a.view_spec_name)") }```;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
+12
-223
@@ -572,6 +572,7 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(rgba)
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
#if 0
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
@@ -650,6 +651,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba)
|
||||
|
||||
scratch_end(scratch);
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "text"
|
||||
@@ -682,6 +684,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text)
|
||||
df_eval_viz_block_end(out, vb);
|
||||
}
|
||||
|
||||
#if 0
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
@@ -772,13 +775,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text)
|
||||
hs_scope_close(hs_scope);
|
||||
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)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "disasm"
|
||||
@@ -824,6 +821,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm)
|
||||
df_eval_viz_block_end(out, vb);
|
||||
}
|
||||
|
||||
#if 0
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
@@ -924,13 +922,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm)
|
||||
hs_scope_close(hs_scope);
|
||||
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)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "graph"
|
||||
@@ -946,17 +938,6 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph)
|
||||
df_eval_viz_block_end(out, vb);
|
||||
}
|
||||
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(graph)
|
||||
{
|
||||
}
|
||||
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(graph) {}
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(graph) { return str8_lit(""); }
|
||||
DF_VIEW_CMD_FUNCTION_DEF(graph) {}
|
||||
DF_VIEW_UI_FUNCTION_DEF(graph)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "bitmap"
|
||||
|
||||
@@ -1098,6 +1079,7 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(bitmap)
|
||||
ui_labelf("0x%I64x -> Bitmap (%I64u x %I64u)", base_vaddr, topology.width, topology.height);
|
||||
}
|
||||
|
||||
#if 0
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
@@ -1172,7 +1154,9 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap)
|
||||
hs_scope_close(hs_scope);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(bitmap)
|
||||
{
|
||||
DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState);
|
||||
@@ -1209,201 +1193,11 @@ DF_VIEW_CMD_FUNCTION_DEF(bitmap)
|
||||
{
|
||||
}
|
||||
|
||||
internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw)
|
||||
{
|
||||
DF_BitmapViewState *bvs = (DF_BitmapViewState *)user_data;
|
||||
Rng2F32 rect_scrn = box->rect;
|
||||
Rng2F32 rect_cvs = df_bitmap_view_state__canvas_from_screen_rect(bvs, rect_scrn, rect_scrn);
|
||||
F32 grid_cell_size_cvs = box->font_size*10.f;
|
||||
F32 grid_line_thickness_px = Max(2.f, box->font_size*0.1f);
|
||||
Vec4F32 grid_line_color = df_rgba_from_theme_color(DF_ThemeColor_TextWeak);
|
||||
for(EachEnumVal(Axis2, axis))
|
||||
{
|
||||
for(F32 v = rect_cvs.p0.v[axis] - mod_f32(rect_cvs.p0.v[axis], grid_cell_size_cvs);
|
||||
v < rect_cvs.p1.v[axis];
|
||||
v += grid_cell_size_cvs)
|
||||
{
|
||||
Vec2F32 p_cvs = {0};
|
||||
p_cvs.v[axis] = v;
|
||||
Vec2F32 p_scr = df_bitmap_view_state__screen_from_canvas_pos(bvs, rect_scrn, p_cvs);
|
||||
Rng2F32 rect = {0};
|
||||
rect.p0.v[axis] = p_scr.v[axis] - grid_line_thickness_px/2;
|
||||
rect.p1.v[axis] = p_scr.v[axis] + grid_line_thickness_px/2;
|
||||
rect.p0.v[axis2_flip(axis)] = box->rect.p0.v[axis2_flip(axis)];
|
||||
rect.p1.v[axis2_flip(axis)] = box->rect.p1.v[axis2_flip(axis)];
|
||||
d_rect(rect, grid_line_color, 0, 0, 1.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DF_VIEW_UI_FUNCTION_DEF(bitmap)
|
||||
{
|
||||
DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState);
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
HS_Scope *hs_scope = hs_scope_open();
|
||||
TEX_Scope *tex_scope = tex_scope_open();
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: unpack context
|
||||
//
|
||||
DF_Entity *thread = df_entity_from_handle(df_interact_regs()->thread);
|
||||
DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process);
|
||||
U64 thread_unwind_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, df_interact_regs()->unwind_count);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: evaluate expression
|
||||
//
|
||||
String8 expr = str8(view->query_buffer, view->query_string_size);
|
||||
E_Eval eval = e_eval_from_string(scratch.arena, expr);
|
||||
E_Eval value_eval = e_value_eval_from_eval(eval);
|
||||
U64 base_vaddr = value_eval.value.u64;
|
||||
U64 expected_size = bvs->top.width*bvs->top.height*r_tex2d_format_bytes_per_pixel_table[bvs->top.fmt];
|
||||
Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr+expected_size);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: map expression artifacts -> texture
|
||||
//
|
||||
U128 texture_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0);
|
||||
TEX_Topology topology = tex_topology_make(v2s32((S32)bvs->top.width, (S32)bvs->top.height), bvs->top.fmt);
|
||||
U128 data_hash = {0};
|
||||
R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, &data_hash);
|
||||
String8 data = hs_data_from_hash(hs_scope, data_hash);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: build canvas box
|
||||
//
|
||||
UI_Box *canvas_box = &ui_g_nil_box;
|
||||
Vec2F32 canvas_dim = dim_2f32(rect);
|
||||
Rng2F32 canvas_rect = r2f32p(0, 0, canvas_dim.x, canvas_dim.y);
|
||||
UI_Rect(canvas_rect)
|
||||
{
|
||||
canvas_box = ui_build_box_from_stringf(UI_BoxFlag_Clip|UI_BoxFlag_Clickable|UI_BoxFlag_Scroll, "bmp_canvas_%p", view);
|
||||
ui_box_equip_custom_draw(canvas_box, df_bitmap_view_canvas_box_draw, bvs);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: canvas dragging
|
||||
//
|
||||
UI_Signal canvas_sig = ui_signal_from_box(canvas_box);
|
||||
{
|
||||
if(ui_dragging(canvas_sig))
|
||||
{
|
||||
if(ui_pressed(canvas_sig))
|
||||
{
|
||||
DF_CmdParams p = df_cmd_params_from_view(ws, panel, view);
|
||||
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel));
|
||||
ui_store_drag_struct(&bvs->view_center_pos);
|
||||
}
|
||||
Vec2F32 start_view_center_pos = *ui_get_drag_struct(Vec2F32);
|
||||
Vec2F32 drag_delta_scr = ui_drag_delta();
|
||||
Vec2F32 drag_delta_cvs = scale_2f32(drag_delta_scr, 1.f/bvs->zoom);
|
||||
Vec2F32 new_view_center_pos = sub_2f32(start_view_center_pos, drag_delta_cvs);
|
||||
bvs->view_center_pos = new_view_center_pos;
|
||||
}
|
||||
if(canvas_sig.scroll.y != 0)
|
||||
{
|
||||
F32 new_zoom = bvs->zoom - bvs->zoom*canvas_sig.scroll.y/10.f;
|
||||
new_zoom = Clamp(1.f/256.f, new_zoom, 256.f);
|
||||
Vec2F32 mouse_scr_pre = sub_2f32(ui_mouse(), rect.p0);
|
||||
Vec2F32 mouse_cvs = df_bitmap_view_state__canvas_from_screen_pos(bvs, canvas_rect, mouse_scr_pre);
|
||||
bvs->zoom = new_zoom;
|
||||
Vec2F32 mouse_scr_pst = df_bitmap_view_state__screen_from_canvas_pos(bvs, canvas_rect, mouse_cvs);
|
||||
Vec2F32 drift_scr = sub_2f32(mouse_scr_pst, mouse_scr_pre);
|
||||
bvs->view_center_pos = add_2f32(bvs->view_center_pos, scale_2f32(drift_scr, 1.f/new_zoom));
|
||||
}
|
||||
if(ui_double_clicked(canvas_sig))
|
||||
{
|
||||
ui_kill_action();
|
||||
MemoryZeroStruct(&bvs->view_center_pos);
|
||||
bvs->zoom = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: calculate image coordinates
|
||||
//
|
||||
Rng2F32 img_rect_cvs = r2f32p(-topology.dim.x/2, -topology.dim.y/2, +topology.dim.x/2, +topology.dim.y/2);
|
||||
Rng2F32 img_rect_scr = df_bitmap_view_state__screen_from_canvas_rect(bvs, canvas_rect, img_rect_cvs);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: image-region canvas interaction
|
||||
//
|
||||
Vec2S32 mouse_bmp = {-1, -1};
|
||||
if(ui_hovering(canvas_sig) && !ui_dragging(canvas_sig))
|
||||
{
|
||||
Vec2F32 mouse_scr = sub_2f32(ui_mouse(), rect.p0);
|
||||
Vec2F32 mouse_cvs = df_bitmap_view_state__canvas_from_screen_pos(bvs, canvas_rect, mouse_scr);
|
||||
if(contains_2f32(img_rect_cvs, mouse_cvs))
|
||||
{
|
||||
mouse_bmp = v2s32((S32)(mouse_cvs.x-img_rect_cvs.x0), (S32)(mouse_cvs.y-img_rect_cvs.y0));
|
||||
S64 off_px = mouse_bmp.y*topology.dim.x + mouse_bmp.x;
|
||||
S64 off_bytes = off_px*r_tex2d_format_bytes_per_pixel_table[topology.fmt];
|
||||
if(0 <= off_bytes && off_bytes+r_tex2d_format_bytes_per_pixel_table[topology.fmt] <= data.size &&
|
||||
r_tex2d_format_bytes_per_pixel_table[topology.fmt] != 0)
|
||||
{
|
||||
B32 color_is_good = 1;
|
||||
Vec4F32 color = {0};
|
||||
switch(topology.fmt)
|
||||
{
|
||||
default:{color_is_good = 0;}break;
|
||||
case R_Tex2DFormat_R8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, 0, 0, 1);}break;
|
||||
case R_Tex2DFormat_RG8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, 0, 1);}break;
|
||||
case R_Tex2DFormat_RGBA8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, ((U8 *)(data.str+off_bytes))[2]/255.f, ((U8 *)(data.str+off_bytes))[3]/255.f);}break;
|
||||
case R_Tex2DFormat_BGRA8: {color = v4f32(((U8 *)(data.str+off_bytes))[3]/255.f, ((U8 *)(data.str+off_bytes))[2]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, ((U8 *)(data.str+off_bytes))[0]/255.f);}break;
|
||||
case R_Tex2DFormat_R16: {color = v4f32(((U16 *)(data.str+off_bytes))[0]/(F32)max_U16, 0, 0, 1);}break;
|
||||
case R_Tex2DFormat_RGBA16: {color = v4f32(((U16 *)(data.str+off_bytes))[0]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[1]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[2]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[3]/(F32)max_U16);}break;
|
||||
case R_Tex2DFormat_R32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], 0, 0, 1);}break;
|
||||
case R_Tex2DFormat_RG32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], ((F32 *)(data.str+off_bytes))[1], 0, 1);}break;
|
||||
case R_Tex2DFormat_RGBA32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], ((F32 *)(data.str+off_bytes))[1], ((F32 *)(data.str+off_bytes))[2], ((F32 *)(data.str+off_bytes))[3]);}break;
|
||||
}
|
||||
if(color_is_good)
|
||||
{
|
||||
Vec4F32 hsva = hsva_from_rgba(color);
|
||||
ui_do_color_tooltip_hsva(hsva);
|
||||
}
|
||||
DF_RichHoverInfo info = {0};
|
||||
{
|
||||
Rng1U64 hover_vaddr_range = r1u64(vaddr_range.min+off_bytes, vaddr_range.min+off_bytes+r_tex2d_format_bytes_per_pixel_table[topology.fmt]);
|
||||
DF_Entity *module = df_module_from_process_vaddr(process, info.vaddr_range.min);
|
||||
info.process = df_handle_from_entity(process);
|
||||
info.vaddr_range = hover_vaddr_range;
|
||||
info.module = df_handle_from_entity(module);
|
||||
info.voff_range = df_voff_range_from_vaddr_range(module, info.vaddr_range);
|
||||
info.dbgi_key = df_dbgi_key_from_module(module);
|
||||
}
|
||||
df_set_rich_hover_info(&info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: build image
|
||||
//
|
||||
UI_Parent(canvas_box)
|
||||
{
|
||||
if(0 <= mouse_bmp.x && mouse_bmp.x < bvs->top.width &&
|
||||
0 <= mouse_bmp.x && mouse_bmp.x < bvs->top.height)
|
||||
{
|
||||
F32 pixel_size_scr = 1.f*bvs->zoom;
|
||||
Rng2F32 indicator_rect_scr = r2f32p(img_rect_scr.x0 + mouse_bmp.x*pixel_size_scr,
|
||||
img_rect_scr.y0 + mouse_bmp.y*pixel_size_scr,
|
||||
img_rect_scr.x0 + (mouse_bmp.x+1)*pixel_size_scr,
|
||||
img_rect_scr.y0 + (mouse_bmp.y+1)*pixel_size_scr);
|
||||
UI_Rect(indicator_rect_scr)
|
||||
{
|
||||
ui_build_box_from_key(UI_BoxFlag_DrawBorder|UI_BoxFlag_Floating, ui_key_zero());
|
||||
}
|
||||
}
|
||||
UI_Rect(img_rect_scr) UI_Flags(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawDropShadow|UI_BoxFlag_Floating)
|
||||
{
|
||||
ui_image(texture, R_Tex2DSampleKind_Nearest, r2f32p(0, 0, (F32)bvs->top.width, (F32)bvs->top.height), v4f32(1, 1, 1, 1), 0, str8_lit("bmp_image"));
|
||||
}
|
||||
}
|
||||
|
||||
hs_scope_close(hs_scope);
|
||||
tex_scope_close(tex_scope);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "geo"
|
||||
@@ -1506,6 +1300,7 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(geo)
|
||||
ui_labelf("0x%I64x -> Geometry", base_vaddr);
|
||||
}
|
||||
|
||||
#if 0
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
@@ -1602,10 +1397,4 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo)
|
||||
geo_scope_close(geo_scope);
|
||||
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)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -73,6 +73,7 @@ struct DF_BitmapTopologyInfo
|
||||
R_Tex2DFormat fmt;
|
||||
};
|
||||
|
||||
#if 0
|
||||
typedef struct DF_BitmapViewState DF_BitmapViewState;
|
||||
struct DF_BitmapViewState
|
||||
{
|
||||
@@ -80,6 +81,7 @@ struct DF_BitmapViewState
|
||||
F32 zoom;
|
||||
DF_BitmapTopologyInfo top;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef struct DF_VR_BitmapState DF_VR_BitmapState;
|
||||
struct DF_VR_BitmapState
|
||||
|
||||
+611
-609
File diff suppressed because it is too large
Load Diff
@@ -455,6 +455,28 @@ struct DF_MemoryViewState
|
||||
B32 contain_cursor;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Bitmap @view_types
|
||||
|
||||
typedef struct DF_BitmapViewState DF_BitmapViewState;
|
||||
struct DF_BitmapViewState
|
||||
{
|
||||
B32 initialized;
|
||||
Vec2F32 view_center_pos;
|
||||
F32 zoom;
|
||||
};
|
||||
|
||||
typedef struct DF_BitmapBoxDrawData DF_BitmapBoxDrawData;
|
||||
struct DF_BitmapBoxDrawData
|
||||
{
|
||||
Rng2F32 src;
|
||||
R_Handle texture;
|
||||
F32 loaded_t;
|
||||
B32 hovered;
|
||||
Vec2S32 mouse_px;
|
||||
F32 ui_per_bmp_px;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Settings @view_types
|
||||
|
||||
@@ -577,4 +599,12 @@ internal void df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_Watch
|
||||
internal void df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, DF_CmdList *cmds);
|
||||
internal void df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Bitmap Views
|
||||
|
||||
internal Vec2F32 df_bitmap_screen_from_canvas_pos(DF_BitmapViewState *bvs, Rng2F32 rect, Vec2F32 cvs);
|
||||
internal Rng2F32 df_bitmap_screen_from_canvas_rect(DF_BitmapViewState *bvs, Rng2F32 rect, Rng2F32 cvs);
|
||||
internal Vec2F32 df_bitmap_canvas_from_screen_pos(DF_BitmapViewState *bvs, Rng2F32 rect, Vec2F32 scr);
|
||||
internal Rng2F32 df_bitmap_canvas_from_screen_rect(DF_BitmapViewState *bvs, Rng2F32 rect, Rng2F32 scr);
|
||||
|
||||
#endif // DEBUG_FRONTEND_VIEWS_H
|
||||
|
||||
@@ -140,39 +140,40 @@ str8_lit_comp("add_address_breakpoint"),
|
||||
str8_lit_comp("add_function_breakpoint"),
|
||||
};
|
||||
|
||||
DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[31] =
|
||||
DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[32] =
|
||||
{
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("null"), str8_lit_comp(""), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(Null), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Null), DF_VIEW_CMD_FUNCTION_NAME(Null), DF_VIEW_UI_FUNCTION_NAME(Null)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("empty"), str8_lit_comp(""), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(Empty), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Empty), DF_VIEW_CMD_FUNCTION_NAME(Empty), DF_VIEW_UI_FUNCTION_NAME(Empty)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("getting_started"), str8_lit_comp("Getting Started"), DF_IconKind_QuestionMark, DF_VIEW_SETUP_FUNCTION_NAME(GettingStarted), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(GettingStarted), DF_VIEW_CMD_FUNCTION_NAME(GettingStarted), DF_VIEW_UI_FUNCTION_NAME(GettingStarted)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("commands"), str8_lit_comp("Commands"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("file_system"), str8_lit_comp("File System"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("target"), str8_lit_comp("Target"), 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|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("targets"), str8_lit_comp("Targets"), 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|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(FilePathMap), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(FilePathMap), DF_VIEW_CMD_FUNCTION_NAME(FilePathMap), DF_VIEW_UI_FUNCTION_NAME(FilePathMap)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rules"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(AutoViewRules), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(AutoViewRules), DF_VIEW_CMD_FUNCTION_NAME(AutoViewRules), DF_VIEW_UI_FUNCTION_NAME(AutoViewRules)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), DF_IconKind_Scheduler, DF_VIEW_SETUP_FUNCTION_NAME(Scheduler), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Scheduler), DF_VIEW_CMD_FUNCTION_NAME(Scheduler), DF_VIEW_UI_FUNCTION_NAME(Scheduler)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), DF_IconKind_Thread, DF_VIEW_SETUP_FUNCTION_NAME(CallStack), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(CallStack), DF_VIEW_CMD_FUNCTION_NAME(CallStack), DF_VIEW_UI_FUNCTION_NAME(CallStack)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("modules"), str8_lit_comp("Modules"), DF_IconKind_Module, DF_VIEW_SETUP_FUNCTION_NAME(Modules), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Modules), DF_VIEW_CMD_FUNCTION_NAME(Modules), DF_VIEW_UI_FUNCTION_NAME(Modules)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("pending_file"), str8_lit_comp("Pending File"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(PendingFile), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(PendingFile), DF_VIEW_CMD_FUNCTION_NAME(PendingFile), DF_VIEW_UI_FUNCTION_NAME(PendingFile)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("code"), str8_lit_comp("Code"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(Code), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Code), DF_VIEW_CMD_FUNCTION_NAME(Code), DF_VIEW_UI_FUNCTION_NAME(Code)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("disassembly"), str8_lit_comp("Disassembly"), DF_IconKind_Glasses, DF_VIEW_SETUP_FUNCTION_NAME(Disassembly), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Disassembly), DF_VIEW_CMD_FUNCTION_NAME(Disassembly), DF_VIEW_UI_FUNCTION_NAME(Disassembly)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("watch"), str8_lit_comp("Watch"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Watch), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Watch), DF_VIEW_CMD_FUNCTION_NAME(Watch), DF_VIEW_UI_FUNCTION_NAME(Watch)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("locals"), str8_lit_comp("Locals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Locals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Locals), DF_VIEW_CMD_FUNCTION_NAME(Locals), DF_VIEW_UI_FUNCTION_NAME(Locals)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("registers"), str8_lit_comp("Registers"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Registers), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Registers), DF_VIEW_CMD_FUNCTION_NAME(Registers), DF_VIEW_UI_FUNCTION_NAME(Registers)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("globals"), str8_lit_comp("Globals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Globals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Globals), DF_VIEW_CMD_FUNCTION_NAME(Globals), DF_VIEW_UI_FUNCTION_NAME(Globals)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(ThreadLocals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ThreadLocals), DF_VIEW_CMD_FUNCTION_NAME(ThreadLocals), DF_VIEW_UI_FUNCTION_NAME(ThreadLocals)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("types"), str8_lit_comp("Types"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Types), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Types), DF_VIEW_CMD_FUNCTION_NAME(Types), DF_VIEW_UI_FUNCTION_NAME(Types)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Procedures), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Procedures), DF_VIEW_CMD_FUNCTION_NAME(Procedures), DF_VIEW_UI_FUNCTION_NAME(Procedures)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("output"), str8_lit_comp("Output"), DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Output), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Output), DF_VIEW_CMD_FUNCTION_NAME(Output), DF_VIEW_UI_FUNCTION_NAME(Output)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("memory"), str8_lit_comp("Memory"), DF_IconKind_Grid, DF_VIEW_SETUP_FUNCTION_NAME(Memory), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Memory), DF_VIEW_CMD_FUNCTION_NAME(Memory), DF_VIEW_UI_FUNCTION_NAME(Memory)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), DF_IconKind_CircleFilled, DF_VIEW_SETUP_FUNCTION_NAME(Breakpoints), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Breakpoints), DF_VIEW_CMD_FUNCTION_NAME(Breakpoints), DF_VIEW_UI_FUNCTION_NAME(Breakpoints)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), DF_IconKind_Pin, DF_VIEW_SETUP_FUNCTION_NAME(WatchPins), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(WatchPins), DF_VIEW_CMD_FUNCTION_NAME(WatchPins), DF_VIEW_UI_FUNCTION_NAME(WatchPins)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(ExceptionFilters), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ExceptionFilters), DF_VIEW_CMD_FUNCTION_NAME(ExceptionFilters), DF_VIEW_UI_FUNCTION_NAME(ExceptionFilters)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeFilePath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("settings"), str8_lit_comp("Settings"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(Settings), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Settings), DF_VIEW_CMD_FUNCTION_NAME(Settings), DF_VIEW_UI_FUNCTION_NAME(Settings)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("null"), str8_lit_comp(""), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(Null), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Null), DF_VIEW_CMD_FUNCTION_NAME(Null), DF_VIEW_UI_FUNCTION_NAME(Null)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("empty"), str8_lit_comp(""), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(Empty), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Empty), DF_VIEW_CMD_FUNCTION_NAME(Empty), DF_VIEW_UI_FUNCTION_NAME(Empty)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("getting_started"), str8_lit_comp("Getting Started"), DF_IconKind_QuestionMark, DF_VIEW_SETUP_FUNCTION_NAME(GettingStarted), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(GettingStarted), DF_VIEW_CMD_FUNCTION_NAME(GettingStarted), DF_VIEW_UI_FUNCTION_NAME(GettingStarted)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("commands"), str8_lit_comp("Commands"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("file_system"), str8_lit_comp("File System"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), 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_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("target"), str8_lit_comp("Target"), 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|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("targets"), str8_lit_comp("Targets"), 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|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(FilePathMap), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(FilePathMap), DF_VIEW_CMD_FUNCTION_NAME(FilePathMap), DF_VIEW_UI_FUNCTION_NAME(FilePathMap)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rules"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(AutoViewRules), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(AutoViewRules), DF_VIEW_CMD_FUNCTION_NAME(AutoViewRules), DF_VIEW_UI_FUNCTION_NAME(AutoViewRules)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), DF_IconKind_CircleFilled, DF_VIEW_SETUP_FUNCTION_NAME(Breakpoints), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Breakpoints), DF_VIEW_CMD_FUNCTION_NAME(Breakpoints), DF_VIEW_UI_FUNCTION_NAME(Breakpoints)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), DF_IconKind_Pin, DF_VIEW_SETUP_FUNCTION_NAME(WatchPins), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(WatchPins), DF_VIEW_CMD_FUNCTION_NAME(WatchPins), DF_VIEW_UI_FUNCTION_NAME(WatchPins)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), DF_IconKind_Scheduler, DF_VIEW_SETUP_FUNCTION_NAME(Scheduler), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Scheduler), DF_VIEW_CMD_FUNCTION_NAME(Scheduler), DF_VIEW_UI_FUNCTION_NAME(Scheduler)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), DF_IconKind_Thread, DF_VIEW_SETUP_FUNCTION_NAME(CallStack), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(CallStack), DF_VIEW_CMD_FUNCTION_NAME(CallStack), DF_VIEW_UI_FUNCTION_NAME(CallStack)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("modules"), str8_lit_comp("Modules"), DF_IconKind_Module, DF_VIEW_SETUP_FUNCTION_NAME(Modules), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Modules), DF_VIEW_CMD_FUNCTION_NAME(Modules), DF_VIEW_UI_FUNCTION_NAME(Modules)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("watch"), str8_lit_comp("Watch"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Watch), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Watch), DF_VIEW_CMD_FUNCTION_NAME(Watch), DF_VIEW_UI_FUNCTION_NAME(Watch)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("locals"), str8_lit_comp("Locals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Locals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Locals), DF_VIEW_CMD_FUNCTION_NAME(Locals), DF_VIEW_UI_FUNCTION_NAME(Locals)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("registers"), str8_lit_comp("Registers"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Registers), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Registers), DF_VIEW_CMD_FUNCTION_NAME(Registers), DF_VIEW_UI_FUNCTION_NAME(Registers)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("globals"), str8_lit_comp("Globals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Globals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Globals), DF_VIEW_CMD_FUNCTION_NAME(Globals), DF_VIEW_UI_FUNCTION_NAME(Globals)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(ThreadLocals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ThreadLocals), DF_VIEW_CMD_FUNCTION_NAME(ThreadLocals), DF_VIEW_UI_FUNCTION_NAME(ThreadLocals)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("types"), str8_lit_comp("Types"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Types), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Types), DF_VIEW_CMD_FUNCTION_NAME(Types), DF_VIEW_UI_FUNCTION_NAME(Types)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Procedures), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Procedures), DF_VIEW_CMD_FUNCTION_NAME(Procedures), DF_VIEW_UI_FUNCTION_NAME(Procedures)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("pending_file"), str8_lit_comp("Pending File"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(PendingFile), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(PendingFile), DF_VIEW_CMD_FUNCTION_NAME(PendingFile), DF_VIEW_UI_FUNCTION_NAME(PendingFile)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("code"), str8_lit_comp("Code"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(Code), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Code), DF_VIEW_CMD_FUNCTION_NAME(Code), DF_VIEW_UI_FUNCTION_NAME(Code)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("disassembly"), str8_lit_comp("Disassembly"), DF_IconKind_Glasses, DF_VIEW_SETUP_FUNCTION_NAME(Disassembly), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Disassembly), DF_VIEW_CMD_FUNCTION_NAME(Disassembly), DF_VIEW_UI_FUNCTION_NAME(Disassembly)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("output"), str8_lit_comp("Output"), DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Output), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Output), DF_VIEW_CMD_FUNCTION_NAME(Output), DF_VIEW_UI_FUNCTION_NAME(Output)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("memory"), str8_lit_comp("Memory"), DF_IconKind_Grid, DF_VIEW_SETUP_FUNCTION_NAME(Memory), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Memory), DF_VIEW_CMD_FUNCTION_NAME(Memory), DF_VIEW_UI_FUNCTION_NAME(Memory)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters|0*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), 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)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(ExceptionFilters), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ExceptionFilters), DF_VIEW_CMD_FUNCTION_NAME(ExceptionFilters), DF_VIEW_UI_FUNCTION_NAME(ExceptionFilters)},
|
||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters|1*DF_ViewSpecFlag_DisplayFilterInTitle), str8_lit_comp("settings"), str8_lit_comp("Settings"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(Settings), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Settings), DF_VIEW_CMD_FUNCTION_NAME(Settings), DF_VIEW_UI_FUNCTION_NAME(Settings)},
|
||||
};
|
||||
|
||||
DF_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7] =
|
||||
@@ -208,31 +209,23 @@ str8_lit_comp("goto_name"),
|
||||
str8_lit_comp("add_function_breakpoint"),
|
||||
};
|
||||
|
||||
DF_ViewSpecInfo df_g_gfx_view_rule_tab_view_spec_info_table[4] =
|
||||
{
|
||||
{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_FilterIsCode, str8_lit_comp("text_view_rule"), str8_lit_comp("Text"), 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|DF_ViewSpecFlag_FilterIsCode, str8_lit_comp("disasm_view_rule"), str8_lit_comp("Disassembly"), 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|DF_ViewSpecFlag_FilterIsCode, str8_lit_comp("bitmap_view_rule"), str8_lit_comp("Bitmap"), 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|DF_ViewSpecFlag_FilterIsCode, str8_lit_comp("geo_view_rule"), str8_lit_comp("Geometry"), 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_GfxViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[15] =
|
||||
{
|
||||
{ str8_lit_comp("array"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, 0, 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("list"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(list) , 0, 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("dec"), (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(dec) , 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("bin"), (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(bin) , 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("oct"), (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(oct) , 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("hex"), (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(hex) , 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("only"), (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(only) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(only) , 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("checkbox"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(checkbox) , 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("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("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("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") },
|
||||
{ str8_lit_comp("array"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("list"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(list) , 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("dec"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(dec) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("bin"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(bin) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("oct"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(oct) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("hex"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(hex) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("only"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(only) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(only) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("omit"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(omit) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(omit) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("no_addr"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(no_addr) , 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("checkbox"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*0), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(checkbox) , str8_lit_comp("") },
|
||||
{ str8_lit_comp("rgba"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_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_ViewUI*1), 0, 0, 0, str8_lit_comp("code") },
|
||||
{ str8_lit_comp("disasm"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*1), 0, 0, 0, str8_lit_comp("disassembly") },
|
||||
{ str8_lit_comp("bitmap"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(bitmap) , str8_lit_comp("bitmap") },
|
||||
{ str8_lit_comp("geo"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_ViewUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(geo) , str8_lit_comp("geometry") },
|
||||
};
|
||||
|
||||
String8 df_g_theme_preset_display_string_table[9] =
|
||||
|
||||
@@ -20,12 +20,11 @@ DF_GfxViewKind_Target,
|
||||
DF_GfxViewKind_Targets,
|
||||
DF_GfxViewKind_FilePathMap,
|
||||
DF_GfxViewKind_AutoViewRules,
|
||||
DF_GfxViewKind_Breakpoints,
|
||||
DF_GfxViewKind_WatchPins,
|
||||
DF_GfxViewKind_Scheduler,
|
||||
DF_GfxViewKind_CallStack,
|
||||
DF_GfxViewKind_Modules,
|
||||
DF_GfxViewKind_PendingFile,
|
||||
DF_GfxViewKind_Code,
|
||||
DF_GfxViewKind_Disassembly,
|
||||
DF_GfxViewKind_Watch,
|
||||
DF_GfxViewKind_Locals,
|
||||
DF_GfxViewKind_Registers,
|
||||
@@ -33,10 +32,12 @@ DF_GfxViewKind_Globals,
|
||||
DF_GfxViewKind_ThreadLocals,
|
||||
DF_GfxViewKind_Types,
|
||||
DF_GfxViewKind_Procedures,
|
||||
DF_GfxViewKind_PendingFile,
|
||||
DF_GfxViewKind_Code,
|
||||
DF_GfxViewKind_Disassembly,
|
||||
DF_GfxViewKind_Output,
|
||||
DF_GfxViewKind_Memory,
|
||||
DF_GfxViewKind_Breakpoints,
|
||||
DF_GfxViewKind_WatchPins,
|
||||
DF_GfxViewKind_Bitmap,
|
||||
DF_GfxViewKind_ExceptionFilters,
|
||||
DF_GfxViewKind_Settings,
|
||||
DF_GfxViewKind_COUNT,
|
||||
@@ -172,12 +173,11 @@ DF_VIEW_SETUP_FUNCTION_DEF(Target);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Targets);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(FilePathMap);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(AutoViewRules);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Scheduler);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(CallStack);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Modules);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Code);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Watch);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Locals);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Registers);
|
||||
@@ -185,10 +185,12 @@ DF_VIEW_SETUP_FUNCTION_DEF(Globals);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(ThreadLocals);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Types);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Procedures);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Code);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Output);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Memory);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Bitmap);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(ExceptionFilters);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(Settings);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Null);
|
||||
@@ -203,12 +205,11 @@ DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Target);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Targets);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(FilePathMap);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(AutoViewRules);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Scheduler);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(CallStack);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Modules);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Code);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Watch);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Locals);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Registers);
|
||||
@@ -216,10 +217,12 @@ DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Globals);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(ThreadLocals);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Types);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Procedures);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Code);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Output);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Memory);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Bitmap);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(ExceptionFilters);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(Settings);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Null);
|
||||
@@ -234,12 +237,11 @@ DF_VIEW_CMD_FUNCTION_DEF(Target);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Targets);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(FilePathMap);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(AutoViewRules);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Scheduler);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(CallStack);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Modules);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Code);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Watch);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Locals);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Registers);
|
||||
@@ -247,10 +249,12 @@ DF_VIEW_CMD_FUNCTION_DEF(Globals);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(ThreadLocals);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Types);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Procedures);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Code);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Output);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Memory);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Bitmap);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(ExceptionFilters);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(Settings);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Null);
|
||||
@@ -265,12 +269,11 @@ DF_VIEW_UI_FUNCTION_DEF(Target);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Targets);
|
||||
DF_VIEW_UI_FUNCTION_DEF(FilePathMap);
|
||||
DF_VIEW_UI_FUNCTION_DEF(AutoViewRules);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_UI_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Scheduler);
|
||||
DF_VIEW_UI_FUNCTION_DEF(CallStack);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Modules);
|
||||
DF_VIEW_UI_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Code);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Watch);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Locals);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Registers);
|
||||
@@ -278,10 +281,12 @@ DF_VIEW_UI_FUNCTION_DEF(Globals);
|
||||
DF_VIEW_UI_FUNCTION_DEF(ThreadLocals);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Types);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Procedures);
|
||||
DF_VIEW_UI_FUNCTION_DEF(PendingFile);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Code);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Disassembly);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Output);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Memory);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Breakpoints);
|
||||
DF_VIEW_UI_FUNCTION_DEF(WatchPins);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Bitmap);
|
||||
DF_VIEW_UI_FUNCTION_DEF(ExceptionFilters);
|
||||
DF_VIEW_UI_FUNCTION_DEF(Settings);
|
||||
|
||||
@@ -299,32 +304,11 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(checkbox);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(rgba);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(bitmap);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(geo);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba);
|
||||
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(bitmap);
|
||||
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(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(geo);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(text);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(disasm);
|
||||
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(geo);
|
||||
C_LINKAGE_BEGIN
|
||||
extern DF_StringBindingPair df_g_default_binding_table[110];
|
||||
extern String8 df_g_binding_version_remap_old_name_table[7];
|
||||
extern String8 df_g_binding_version_remap_new_name_table[7];
|
||||
extern DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[31];
|
||||
extern DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[32];
|
||||
extern DF_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7];
|
||||
extern String8 df_g_cmd_param_slot_2_view_spec_dst_map[7];
|
||||
extern String8 df_g_cmd_param_slot_2_view_spec_cmd_map[7];
|
||||
|
||||
@@ -71,6 +71,49 @@ e_raw_from_escaped_string(Arena *arena, String8 string)
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
e_escaped_from_raw_string(Arena *arena, String8 string)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8List parts = {0};
|
||||
U64 start_split_idx = 0;
|
||||
for(U64 idx = 0; idx <= string.size; idx += 1)
|
||||
{
|
||||
U8 byte = (idx < string.size) ? string.str[idx] : 0;
|
||||
B32 split = 1;
|
||||
String8 separator_replace = {0};
|
||||
switch(byte)
|
||||
{
|
||||
default:{split = 0;}break;
|
||||
case 0: {}break;
|
||||
case '\a': {separator_replace = str8_lit("\\a");}break;
|
||||
case '\b': {separator_replace = str8_lit("\\b");}break;
|
||||
case '\f': {separator_replace = str8_lit("\\f");}break;
|
||||
case '\n': {separator_replace = str8_lit("\\n");}break;
|
||||
case '\r': {separator_replace = str8_lit("\\r");}break;
|
||||
case '\t': {separator_replace = str8_lit("\\t");}break;
|
||||
case '\v': {separator_replace = str8_lit("\\v");}break;
|
||||
case '\\': {separator_replace = str8_lit("\\\\");}break;
|
||||
case '"': {separator_replace = str8_lit("\\\"");}break;
|
||||
case '?': {separator_replace = str8_lit("\\?");}break;
|
||||
}
|
||||
if(split)
|
||||
{
|
||||
String8 substr = str8_substr(string, r1u64(start_split_idx, idx));
|
||||
start_split_idx = idx+1;
|
||||
str8_list_push(scratch.arena, &parts, substr);
|
||||
if(separator_replace.size != 0)
|
||||
{
|
||||
str8_list_push(scratch.arena, &parts, separator_replace);
|
||||
}
|
||||
}
|
||||
}
|
||||
StringJoin join = {0};
|
||||
String8 result = str8_list_join(arena, &parts, &join);
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Message Functions
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ union E_Value
|
||||
U64 u64;
|
||||
U32 u32;
|
||||
S64 s64;
|
||||
S32 s32;
|
||||
F64 f64;
|
||||
F32 f32;
|
||||
};
|
||||
@@ -121,6 +122,7 @@ struct E_Module
|
||||
|
||||
internal U64 e_hash_from_string(U64 seed, String8 string);
|
||||
internal String8 e_raw_from_escaped_string(Arena *arena, String8 string);
|
||||
internal String8 e_escaped_from_raw_string(Arena *arena, String8 string);
|
||||
#define e_value_u64(v) (E_Value){.u64 = (v)}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
@@ -750,6 +750,10 @@ e_append_strings_from_expr(Arena *arena, E_Expr *expr, String8List *out)
|
||||
{
|
||||
str8_list_pushf(arena, out, "0x%I64x", expr->value.u64);
|
||||
}break;
|
||||
case E_ExprKind_LeafFilePath:
|
||||
{
|
||||
str8_list_pushf(arena, out, "file:\"%S\"", e_escaped_from_raw_string(arena, expr->string));
|
||||
}break;
|
||||
case E_ExprKind_LeafF64:
|
||||
{
|
||||
str8_list_pushf(arena, out, "%f", expr->value.f64);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
// [x] eval: indexing into string literals
|
||||
// [x] fix incorrectly consuming keyboard inputs, preventing fallback-to-filtering, when
|
||||
// selecting null selection in watch views
|
||||
// [ ] transient view timeout releasing
|
||||
//
|
||||
// [ ] fix selecting hover eval, then hover eval disappearing, causing
|
||||
// busted focus, until a new hover eval is opened
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#define UI_FixedHeight(v) DeferLoop(ui_push_fixed_height(v), ui_pop_fixed_height())
|
||||
#define UI_PrefWidth(v) DeferLoop(ui_push_pref_width(v), ui_pop_pref_width())
|
||||
#define UI_PrefHeight(v) DeferLoop(ui_push_pref_height(v), ui_pop_pref_height())
|
||||
#define UI_PermissionFlags(v) DeferLoop(ui_push_permission_flags(v), ui_pop_permission_flags())
|
||||
#define UI_Flags(v) DeferLoop(ui_push_flags(v), ui_pop_flags())
|
||||
#define UI_FocusHot(v) DeferLoop(ui_push_focus_hot(v), ui_pop_focus_hot())
|
||||
#define UI_FocusActive(v) DeferLoop(ui_push_focus_active(v), ui_pop_focus_active())
|
||||
@@ -41,6 +42,7 @@ internal F32 ui_top_fixed_width(void) { UI_StackTopImpl(ui_state, FixedWidth, fi
|
||||
internal F32 ui_top_fixed_height(void) { UI_StackTopImpl(ui_state, FixedHeight, fixed_height) }
|
||||
internal UI_Size ui_top_pref_width(void) { UI_StackTopImpl(ui_state, PrefWidth, pref_width) }
|
||||
internal UI_Size ui_top_pref_height(void) { UI_StackTopImpl(ui_state, PrefHeight, pref_height) }
|
||||
internal UI_PermissionFlags ui_top_permission_flags(void) { UI_StackTopImpl(ui_state, PermissionFlags, permission_flags) }
|
||||
internal UI_BoxFlags ui_top_flags(void) { UI_StackTopImpl(ui_state, Flags, flags) }
|
||||
internal UI_FocusKind ui_top_focus_hot(void) { UI_StackTopImpl(ui_state, FocusHot, focus_hot) }
|
||||
internal UI_FocusKind ui_top_focus_active(void) { UI_StackTopImpl(ui_state, FocusActive, focus_active) }
|
||||
@@ -69,6 +71,7 @@ internal F32 ui_bottom_fixed_width(void) { UI_StackBottomImpl(ui_state, FixedWid
|
||||
internal F32 ui_bottom_fixed_height(void) { UI_StackBottomImpl(ui_state, FixedHeight, fixed_height) }
|
||||
internal UI_Size ui_bottom_pref_width(void) { UI_StackBottomImpl(ui_state, PrefWidth, pref_width) }
|
||||
internal UI_Size ui_bottom_pref_height(void) { UI_StackBottomImpl(ui_state, PrefHeight, pref_height) }
|
||||
internal UI_PermissionFlags ui_bottom_permission_flags(void) { UI_StackBottomImpl(ui_state, PermissionFlags, permission_flags) }
|
||||
internal UI_BoxFlags ui_bottom_flags(void) { UI_StackBottomImpl(ui_state, Flags, flags) }
|
||||
internal UI_FocusKind ui_bottom_focus_hot(void) { UI_StackBottomImpl(ui_state, FocusHot, focus_hot) }
|
||||
internal UI_FocusKind ui_bottom_focus_active(void) { UI_StackBottomImpl(ui_state, FocusActive, focus_active) }
|
||||
@@ -97,6 +100,7 @@ internal F32 ui_push_fixed_width(F32 v) { UI_StackPushImpl(ui_state, FixedWidth,
|
||||
internal F32 ui_push_fixed_height(F32 v) { UI_StackPushImpl(ui_state, FixedHeight, fixed_height, F32, v) }
|
||||
internal UI_Size ui_push_pref_width(UI_Size v) { UI_StackPushImpl(ui_state, PrefWidth, pref_width, UI_Size, v) }
|
||||
internal UI_Size ui_push_pref_height(UI_Size v) { UI_StackPushImpl(ui_state, PrefHeight, pref_height, UI_Size, v) }
|
||||
internal UI_PermissionFlags ui_push_permission_flags(UI_PermissionFlags v) { UI_StackPushImpl(ui_state, PermissionFlags, permission_flags, UI_PermissionFlags, v) }
|
||||
internal UI_BoxFlags ui_push_flags(UI_BoxFlags v) { UI_StackPushImpl(ui_state, Flags, flags, UI_BoxFlags, v) }
|
||||
internal UI_FocusKind ui_push_focus_hot(UI_FocusKind v) { UI_StackPushImpl(ui_state, FocusHot, focus_hot, UI_FocusKind, v) }
|
||||
internal UI_FocusKind ui_push_focus_active(UI_FocusKind v) { UI_StackPushImpl(ui_state, FocusActive, focus_active, UI_FocusKind, v) }
|
||||
@@ -125,6 +129,7 @@ internal F32 ui_pop_fixed_width(void) { UI_StackPopImpl(ui_state, FixedWidth, fi
|
||||
internal F32 ui_pop_fixed_height(void) { UI_StackPopImpl(ui_state, FixedHeight, fixed_height) }
|
||||
internal UI_Size ui_pop_pref_width(void) { UI_StackPopImpl(ui_state, PrefWidth, pref_width) }
|
||||
internal UI_Size ui_pop_pref_height(void) { UI_StackPopImpl(ui_state, PrefHeight, pref_height) }
|
||||
internal UI_PermissionFlags ui_pop_permission_flags(void) { UI_StackPopImpl(ui_state, PermissionFlags, permission_flags) }
|
||||
internal UI_BoxFlags ui_pop_flags(void) { UI_StackPopImpl(ui_state, Flags, flags) }
|
||||
internal UI_FocusKind ui_pop_focus_hot(void) { UI_StackPopImpl(ui_state, FocusHot, focus_hot) }
|
||||
internal UI_FocusKind ui_pop_focus_active(void) { UI_StackPopImpl(ui_state, FocusActive, focus_active) }
|
||||
@@ -153,6 +158,7 @@ internal F32 ui_set_next_fixed_width(F32 v) { UI_StackSetNextImpl(ui_state, Fixe
|
||||
internal F32 ui_set_next_fixed_height(F32 v) { UI_StackSetNextImpl(ui_state, FixedHeight, fixed_height, F32, v) }
|
||||
internal UI_Size ui_set_next_pref_width(UI_Size v) { UI_StackSetNextImpl(ui_state, PrefWidth, pref_width, UI_Size, v) }
|
||||
internal UI_Size ui_set_next_pref_height(UI_Size v) { UI_StackSetNextImpl(ui_state, PrefHeight, pref_height, UI_Size, v) }
|
||||
internal UI_PermissionFlags ui_set_next_permission_flags(UI_PermissionFlags v) { UI_StackSetNextImpl(ui_state, PermissionFlags, permission_flags, UI_PermissionFlags, v) }
|
||||
internal UI_BoxFlags ui_set_next_flags(UI_BoxFlags v) { UI_StackSetNextImpl(ui_state, Flags, flags, UI_BoxFlags, v) }
|
||||
internal UI_FocusKind ui_set_next_focus_hot(UI_FocusKind v) { UI_StackSetNextImpl(ui_state, FocusHot, focus_hot, UI_FocusKind, v) }
|
||||
internal UI_FocusKind ui_set_next_focus_active(UI_FocusKind v) { UI_StackSetNextImpl(ui_state, FocusActive, focus_active, UI_FocusKind, v) }
|
||||
|
||||
@@ -14,6 +14,7 @@ typedef struct UI_FixedWidthNode UI_FixedWidthNode; struct UI_FixedWidthNode{UI_
|
||||
typedef struct UI_FixedHeightNode UI_FixedHeightNode; struct UI_FixedHeightNode{UI_FixedHeightNode *next; F32 v;};
|
||||
typedef struct UI_PrefWidthNode UI_PrefWidthNode; struct UI_PrefWidthNode{UI_PrefWidthNode *next; UI_Size v;};
|
||||
typedef struct UI_PrefHeightNode UI_PrefHeightNode; struct UI_PrefHeightNode{UI_PrefHeightNode *next; UI_Size v;};
|
||||
typedef struct UI_PermissionFlagsNode UI_PermissionFlagsNode; struct UI_PermissionFlagsNode{UI_PermissionFlagsNode *next; UI_PermissionFlags v;};
|
||||
typedef struct UI_FlagsNode UI_FlagsNode; struct UI_FlagsNode{UI_FlagsNode *next; UI_BoxFlags v;};
|
||||
typedef struct UI_FocusHotNode UI_FocusHotNode; struct UI_FocusHotNode{UI_FocusHotNode *next; UI_FocusKind v;};
|
||||
typedef struct UI_FocusActiveNode UI_FocusActiveNode; struct UI_FocusActiveNode{UI_FocusActiveNode *next; UI_FocusKind v;};
|
||||
@@ -45,6 +46,7 @@ UI_FixedWidthNode fixed_width_nil_stack_top;\
|
||||
UI_FixedHeightNode fixed_height_nil_stack_top;\
|
||||
UI_PrefWidthNode pref_width_nil_stack_top;\
|
||||
UI_PrefHeightNode pref_height_nil_stack_top;\
|
||||
UI_PermissionFlagsNode permission_flags_nil_stack_top;\
|
||||
UI_FlagsNode flags_nil_stack_top;\
|
||||
UI_FocusHotNode focus_hot_nil_stack_top;\
|
||||
UI_FocusActiveNode focus_active_nil_stack_top;\
|
||||
@@ -75,6 +77,7 @@ state->fixed_width_nil_stack_top.v = 0;\
|
||||
state->fixed_height_nil_stack_top.v = 0;\
|
||||
state->pref_width_nil_stack_top.v = ui_px(250.f, 1.f);\
|
||||
state->pref_height_nil_stack_top.v = ui_px(30.f, 1.f);\
|
||||
state->permission_flags_nil_stack_top.v = UI_PermissionFlag_All;\
|
||||
state->flags_nil_stack_top.v = 0;\
|
||||
state->focus_hot_nil_stack_top.v = UI_FocusKind_Null;\
|
||||
state->focus_active_nil_stack_top.v = UI_FocusKind_Null;\
|
||||
@@ -107,6 +110,7 @@ struct { UI_FixedWidthNode *top; F32 bottom_val; UI_FixedWidthNode *free; B32 au
|
||||
struct { UI_FixedHeightNode *top; F32 bottom_val; UI_FixedHeightNode *free; B32 auto_pop; } fixed_height_stack;\
|
||||
struct { UI_PrefWidthNode *top; UI_Size bottom_val; UI_PrefWidthNode *free; B32 auto_pop; } pref_width_stack;\
|
||||
struct { UI_PrefHeightNode *top; UI_Size bottom_val; UI_PrefHeightNode *free; B32 auto_pop; } pref_height_stack;\
|
||||
struct { UI_PermissionFlagsNode *top; UI_PermissionFlags bottom_val; UI_PermissionFlagsNode *free; B32 auto_pop; } permission_flags_stack;\
|
||||
struct { UI_FlagsNode *top; UI_BoxFlags bottom_val; UI_FlagsNode *free; B32 auto_pop; } flags_stack;\
|
||||
struct { UI_FocusHotNode *top; UI_FocusKind bottom_val; UI_FocusHotNode *free; B32 auto_pop; } focus_hot_stack;\
|
||||
struct { UI_FocusActiveNode *top; UI_FocusKind bottom_val; UI_FocusActiveNode *free; B32 auto_pop; } focus_active_stack;\
|
||||
@@ -137,6 +141,7 @@ state->fixed_width_stack.top = &state->fixed_width_nil_stack_top; state->fixed_w
|
||||
state->fixed_height_stack.top = &state->fixed_height_nil_stack_top; state->fixed_height_stack.bottom_val = 0; state->fixed_height_stack.free = 0; state->fixed_height_stack.auto_pop = 0;\
|
||||
state->pref_width_stack.top = &state->pref_width_nil_stack_top; state->pref_width_stack.bottom_val = ui_px(250.f, 1.f); state->pref_width_stack.free = 0; state->pref_width_stack.auto_pop = 0;\
|
||||
state->pref_height_stack.top = &state->pref_height_nil_stack_top; state->pref_height_stack.bottom_val = ui_px(30.f, 1.f); state->pref_height_stack.free = 0; state->pref_height_stack.auto_pop = 0;\
|
||||
state->permission_flags_stack.top = &state->permission_flags_nil_stack_top; state->permission_flags_stack.bottom_val = UI_PermissionFlag_All; state->permission_flags_stack.free = 0; state->permission_flags_stack.auto_pop = 0;\
|
||||
state->flags_stack.top = &state->flags_nil_stack_top; state->flags_stack.bottom_val = 0; state->flags_stack.free = 0; state->flags_stack.auto_pop = 0;\
|
||||
state->focus_hot_stack.top = &state->focus_hot_nil_stack_top; state->focus_hot_stack.bottom_val = UI_FocusKind_Null; state->focus_hot_stack.free = 0; state->focus_hot_stack.auto_pop = 0;\
|
||||
state->focus_active_stack.top = &state->focus_active_nil_stack_top; state->focus_active_stack.bottom_val = UI_FocusKind_Null; state->focus_active_stack.free = 0; state->focus_active_stack.auto_pop = 0;\
|
||||
@@ -167,6 +172,7 @@ if(state->fixed_width_stack.auto_pop) { ui_pop_fixed_width(); state->fixed_width
|
||||
if(state->fixed_height_stack.auto_pop) { ui_pop_fixed_height(); state->fixed_height_stack.auto_pop = 0; }\
|
||||
if(state->pref_width_stack.auto_pop) { ui_pop_pref_width(); state->pref_width_stack.auto_pop = 0; }\
|
||||
if(state->pref_height_stack.auto_pop) { ui_pop_pref_height(); state->pref_height_stack.auto_pop = 0; }\
|
||||
if(state->permission_flags_stack.auto_pop) { ui_pop_permission_flags(); state->permission_flags_stack.auto_pop = 0; }\
|
||||
if(state->flags_stack.auto_pop) { ui_pop_flags(); state->flags_stack.auto_pop = 0; }\
|
||||
if(state->focus_hot_stack.auto_pop) { ui_pop_focus_hot(); state->focus_hot_stack.auto_pop = 0; }\
|
||||
if(state->focus_active_stack.auto_pop) { ui_pop_focus_active(); state->focus_active_stack.auto_pop = 0; }\
|
||||
@@ -196,6 +202,7 @@ internal F32 ui_top_fixed_width(void);
|
||||
internal F32 ui_top_fixed_height(void);
|
||||
internal UI_Size ui_top_pref_width(void);
|
||||
internal UI_Size ui_top_pref_height(void);
|
||||
internal UI_PermissionFlags ui_top_permission_flags(void);
|
||||
internal UI_BoxFlags ui_top_flags(void);
|
||||
internal UI_FocusKind ui_top_focus_hot(void);
|
||||
internal UI_FocusKind ui_top_focus_active(void);
|
||||
@@ -224,6 +231,7 @@ internal F32 ui_bottom_fixed_width(void);
|
||||
internal F32 ui_bottom_fixed_height(void);
|
||||
internal UI_Size ui_bottom_pref_width(void);
|
||||
internal UI_Size ui_bottom_pref_height(void);
|
||||
internal UI_PermissionFlags ui_bottom_permission_flags(void);
|
||||
internal UI_BoxFlags ui_bottom_flags(void);
|
||||
internal UI_FocusKind ui_bottom_focus_hot(void);
|
||||
internal UI_FocusKind ui_bottom_focus_active(void);
|
||||
@@ -252,6 +260,7 @@ internal F32 ui_push_fixed_width(F32 v);
|
||||
internal F32 ui_push_fixed_height(F32 v);
|
||||
internal UI_Size ui_push_pref_width(UI_Size v);
|
||||
internal UI_Size ui_push_pref_height(UI_Size v);
|
||||
internal UI_PermissionFlags ui_push_permission_flags(UI_PermissionFlags v);
|
||||
internal UI_BoxFlags ui_push_flags(UI_BoxFlags v);
|
||||
internal UI_FocusKind ui_push_focus_hot(UI_FocusKind v);
|
||||
internal UI_FocusKind ui_push_focus_active(UI_FocusKind v);
|
||||
@@ -280,6 +289,7 @@ internal F32 ui_pop_fixed_width(void);
|
||||
internal F32 ui_pop_fixed_height(void);
|
||||
internal UI_Size ui_pop_pref_width(void);
|
||||
internal UI_Size ui_pop_pref_height(void);
|
||||
internal UI_PermissionFlags ui_pop_permission_flags(void);
|
||||
internal UI_BoxFlags ui_pop_flags(void);
|
||||
internal UI_FocusKind ui_pop_focus_hot(void);
|
||||
internal UI_FocusKind ui_pop_focus_active(void);
|
||||
@@ -308,6 +318,7 @@ internal F32 ui_set_next_fixed_width(F32 v);
|
||||
internal F32 ui_set_next_fixed_height(F32 v);
|
||||
internal UI_Size ui_set_next_pref_width(UI_Size v);
|
||||
internal UI_Size ui_set_next_pref_height(UI_Size v);
|
||||
internal UI_PermissionFlags ui_set_next_permission_flags(UI_PermissionFlags v);
|
||||
internal UI_BoxFlags ui_set_next_flags(UI_BoxFlags v);
|
||||
internal UI_FocusKind ui_set_next_focus_hot(UI_FocusKind v);
|
||||
internal UI_FocusKind ui_set_next_focus_active(UI_FocusKind v);
|
||||
|
||||
@@ -21,6 +21,7 @@ UI_StackTable:
|
||||
{ PrefHeight pref_height UI_Size `ui_px(30.f, 1.f)` }
|
||||
|
||||
//- rjf: flags
|
||||
{ PermissionFlags permission_flags UI_PermissionFlags UI_PermissionFlag_All }
|
||||
{ Flags flags UI_BoxFlags 0 }
|
||||
|
||||
//- rjf: interaction
|
||||
|
||||
@@ -196,20 +196,18 @@ ui_line_edit(TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size,
|
||||
if(is_focus_active)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
String8 edit_string = str8(edit_buffer, edit_string_size_out[0]);
|
||||
next = n->next;
|
||||
|
||||
// rjf: do not consume anything that doesn't fit a single-line's operations
|
||||
if((n->v.kind != UI_EventKind_Edit && n->v.kind != UI_EventKind_Navigate && n->v.kind != UI_EventKind_Text) || n->v.delta_2s32.y != 0)
|
||||
if((evt->kind != UI_EventKind_Edit && evt->kind != UI_EventKind_Navigate && evt->kind != UI_EventKind_Text) || evt->delta_2s32.y != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// rjf: map this action to an op
|
||||
UI_TxtOp op = ui_single_line_txt_op_from_event(scratch.arena, &n->v, edit_string, *cursor, *mark);
|
||||
UI_TxtOp op = ui_single_line_txt_op_from_event(scratch.arena, evt, edit_string, *cursor, *mark);
|
||||
|
||||
// rjf: perform replace range
|
||||
if(!txt_pt_match(op.range.min, op.range.max) || op.replace.size != 0)
|
||||
@@ -232,7 +230,7 @@ ui_line_edit(TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size,
|
||||
|
||||
// rjf: consume event
|
||||
{
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
changes_made = 1;
|
||||
}
|
||||
}
|
||||
@@ -1354,19 +1352,16 @@ ui_scroll_list_begin(UI_ScrollListParams *params, UI_ScrollPt *scroll_pt, Vec2S6
|
||||
B32 moved = 0;
|
||||
if(params->flags & UI_ScrollListFlag_Nav && cursor_out != 0 && ui_is_focus_active())
|
||||
{
|
||||
UI_EventList *events = ui_events();
|
||||
Vec2S64 cursor = *cursor_out;
|
||||
Vec2S64 mark = mark_out ? *mark_out : cursor;
|
||||
for(UI_EventNode *n = events->first, *next = 0; n != 0; n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
next = n->next;
|
||||
UI_Event *evt = &n->v;
|
||||
if((evt->delta_2s32.x == 0 && evt->delta_2s32.y == 0) ||
|
||||
evt->flags & UI_EventFlag_Delete)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ui_eat_event(events, n);
|
||||
ui_eat_event(evt);
|
||||
moved = 1;
|
||||
switch(evt->delta_unit)
|
||||
{
|
||||
|
||||
+101
-35
@@ -109,7 +109,7 @@ ui_event_list_push(Arena *arena, UI_EventList *list, UI_Event *v)
|
||||
}
|
||||
|
||||
internal void
|
||||
ui_eat_event(UI_EventList *list, UI_EventNode *node)
|
||||
ui_eat_event_node(UI_EventList *list, UI_EventNode *node)
|
||||
{
|
||||
DLLRemove(list->first, list->last, node);
|
||||
list->count -= 1;
|
||||
@@ -496,12 +496,6 @@ ui_window(void)
|
||||
return ui_state->window;
|
||||
}
|
||||
|
||||
internal UI_EventList *
|
||||
ui_events(void)
|
||||
{
|
||||
return ui_state->events;
|
||||
}
|
||||
|
||||
internal Vec2F32
|
||||
ui_mouse(void)
|
||||
{
|
||||
@@ -526,19 +520,100 @@ ui_dt(void)
|
||||
return ui_state->animation_dt;
|
||||
}
|
||||
|
||||
//- rjf: event pumping
|
||||
|
||||
internal B32
|
||||
ui_next_event(UI_Event **ev)
|
||||
{
|
||||
UI_EventList *events = ui_state->events;
|
||||
UI_EventNode *start_node = events->first;
|
||||
if(ev[0] != 0)
|
||||
{
|
||||
start_node = CastFromMember(UI_EventNode, v, ev[0]);
|
||||
start_node = start_node->next;
|
||||
ev[0] = 0;
|
||||
}
|
||||
if(start_node != 0)
|
||||
{
|
||||
UI_PermissionFlags perms = ui_top_permission_flags();
|
||||
for(UI_EventNode *n = start_node; n != 0; n = n->next)
|
||||
{
|
||||
B32 good = 1;
|
||||
if(!(perms & UI_PermissionFlag_ClicksLeft) &&
|
||||
(n->v.kind == UI_EventKind_Press ||
|
||||
n->v.kind == UI_EventKind_Release) &&
|
||||
(n->v.key == OS_Key_LeftMouseButton))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
if(!(perms & UI_PermissionFlag_ClicksMiddle) &&
|
||||
(n->v.kind == UI_EventKind_Press ||
|
||||
n->v.kind == UI_EventKind_Release) &&
|
||||
(n->v.key == OS_Key_MiddleMouseButton))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
if(!(perms & UI_PermissionFlag_ClicksRight) &&
|
||||
(n->v.kind == UI_EventKind_Press ||
|
||||
n->v.kind == UI_EventKind_Release) &&
|
||||
(n->v.key == OS_Key_RightMouseButton))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
if(!(perms & UI_PermissionFlag_ScrollX) && (n->v.kind == UI_EventKind_Scroll) && (n->v.delta_2f32.x != 0 || n->v.modifiers & OS_EventFlag_Shift))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
if(!(perms & UI_PermissionFlag_ScrollY) && (n->v.kind == UI_EventKind_Scroll) && n->v.delta_2f32.y != 0 && !(n->v.modifiers & OS_EventFlag_Shift))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
if(!(perms & UI_PermissionFlag_Keyboard) &&
|
||||
(n->v.kind == UI_EventKind_Press ||
|
||||
n->v.kind == UI_EventKind_Release) &&
|
||||
(n->v.key != OS_Key_LeftMouseButton &&
|
||||
n->v.key != OS_Key_MiddleMouseButton &&
|
||||
n->v.key != OS_Key_RightMouseButton))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
else if(!(perms & UI_PermissionFlag_Text) && (n->v.kind == UI_EventKind_Text))
|
||||
{
|
||||
good = 0;
|
||||
}
|
||||
if(good)
|
||||
{
|
||||
ev[0] = &n->v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
B32 result = !!ev[0];
|
||||
return result;
|
||||
}
|
||||
|
||||
internal void
|
||||
ui_eat_event(UI_Event *ev)
|
||||
{
|
||||
if(ev != 0)
|
||||
{
|
||||
UI_EventNode *n = CastFromMember(UI_EventNode, v, ev);
|
||||
ui_eat_event_node(ui_state->events, n);
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: event consumption helpers
|
||||
|
||||
internal B32
|
||||
ui_key_press(OS_EventFlags mods, OS_Key key)
|
||||
{
|
||||
UI_EventList *list = ui_events();
|
||||
B32 result = 0;
|
||||
for(UI_EventNode *n = list->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(n->v.kind == UI_EventKind_Press && n->v.key == key && n->v.modifiers == mods)
|
||||
if(evt->kind == UI_EventKind_Press && evt->key == key && evt->modifiers == mods)
|
||||
{
|
||||
result = 1;
|
||||
ui_eat_event(list, n);
|
||||
ui_eat_event(evt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -548,14 +623,13 @@ ui_key_press(OS_EventFlags mods, OS_Key key)
|
||||
internal B32
|
||||
ui_key_release(OS_EventFlags mods, OS_Key key)
|
||||
{
|
||||
UI_EventList *list = ui_events();
|
||||
B32 result = 0;
|
||||
for(UI_EventNode *n = list->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(n->v.kind == UI_EventKind_Release && n->v.key == key && n->v.modifiers == mods)
|
||||
if(evt->kind == UI_EventKind_Release && evt->key == key && evt->modifiers == mods)
|
||||
{
|
||||
result = 1;
|
||||
ui_eat_event(list, n);
|
||||
ui_eat_event(evt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -565,16 +639,15 @@ ui_key_release(OS_EventFlags mods, OS_Key key)
|
||||
internal B32
|
||||
ui_text(U32 character)
|
||||
{
|
||||
UI_EventList *list = ui_events();
|
||||
B32 result = 0;
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
String8 character_text = str8_from_32(scratch.arena, str32(&character, 1));
|
||||
for(UI_EventNode *n = list->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(n->v.kind == UI_EventKind_Text && str8_match(character_text, n->v.string, 0))
|
||||
if(evt->kind == UI_EventKind_Text && str8_match(character_text, evt->string, 0))
|
||||
{
|
||||
result = 1;
|
||||
ui_eat_event(list, n);
|
||||
ui_eat_event(evt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -585,14 +658,13 @@ ui_text(U32 character)
|
||||
internal B32
|
||||
ui_slot_press(UI_EventActionSlot slot)
|
||||
{
|
||||
UI_EventList *list = ui_events();
|
||||
B32 result = 0;
|
||||
for(UI_EventNode *n = list->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(n->v.kind == UI_EventKind_Press && n->v.slot == slot)
|
||||
if(evt->kind == UI_EventKind_Press && evt->slot == slot)
|
||||
{
|
||||
result = 1;
|
||||
ui_eat_event(list, n);
|
||||
ui_eat_event(evt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -817,7 +889,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
|
||||
}
|
||||
if(taken)
|
||||
{
|
||||
ui_eat_event(events, node);
|
||||
ui_eat_event_node(events, node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1327,12 +1399,10 @@ ui_end_build(void)
|
||||
|
||||
//- rjf: close ctx menu if unconsumed clicks
|
||||
{
|
||||
UI_EventList *events = ui_events();
|
||||
for(UI_EventNode *n = events->first; n != 0; n = n->next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
UI_Event *event = &n->v;
|
||||
if(event->kind == UI_EventKind_Press &&
|
||||
(event->key == OS_Key_LeftMouseButton || event->key == OS_Key_RightMouseButton))
|
||||
if(evt->kind == UI_EventKind_Press &&
|
||||
(evt->key == OS_Key_LeftMouseButton || evt->key == OS_Key_RightMouseButton))
|
||||
{
|
||||
ui_ctx_menu_close();
|
||||
}
|
||||
@@ -2489,13 +2559,9 @@ ui_signal_from_box(UI_Box *box)
|
||||
//- rjf: process events related to this box
|
||||
//
|
||||
B32 view_scrolled = 0;
|
||||
for(UI_EventNode *n = ui_state->events->first, *next = 0;
|
||||
n != 0;
|
||||
n = next)
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
B32 taken = 0;
|
||||
next = n->next;
|
||||
UI_Event *evt = &n->v;
|
||||
|
||||
//- rjf: unpack event
|
||||
Vec2F32 evt_mouse = evt->pos;
|
||||
@@ -2675,7 +2741,7 @@ ui_signal_from_box(UI_Box *box)
|
||||
//- rjf: taken -> eat event
|
||||
if(taken)
|
||||
{
|
||||
ui_eat_event(ui_state->events, n);
|
||||
ui_eat_event(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+30
-2
@@ -43,6 +43,25 @@ typedef enum UI_MouseButtonKind
|
||||
}
|
||||
UI_MouseButtonKind;
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Codepath Permissions
|
||||
|
||||
typedef U32 UI_PermissionFlags;
|
||||
enum
|
||||
{
|
||||
UI_PermissionFlag_ClicksLeft = (1<<0),
|
||||
UI_PermissionFlag_ClicksMiddle = (1<<1),
|
||||
UI_PermissionFlag_ClicksRight = (1<<2),
|
||||
UI_PermissionFlag_ScrollX = (1<<3),
|
||||
UI_PermissionFlag_ScrollY = (1<<4),
|
||||
UI_PermissionFlag_Keyboard = (1<<5),
|
||||
UI_PermissionFlag_Text = (1<<6),
|
||||
|
||||
//- rjf bundles
|
||||
UI_PermissionFlag_Clicks = (UI_PermissionFlag_ClicksLeft|UI_PermissionFlag_ClicksMiddle|UI_PermissionFlag_ClicksRight),
|
||||
UI_PermissionFlag_All = 0xffffffff,
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Focus Types
|
||||
|
||||
@@ -656,7 +675,7 @@ internal B32 ui_key_match(UI_Key a, UI_Key b);
|
||||
//~ rjf: Event Type Functions
|
||||
|
||||
internal UI_EventNode *ui_event_list_push(Arena *arena, UI_EventList *list, UI_Event *v);
|
||||
internal void ui_eat_event(UI_EventList *list, UI_EventNode *node);
|
||||
internal void ui_eat_event_node(UI_EventList *list, UI_EventNode *node);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Text Operation Functions
|
||||
@@ -723,12 +742,15 @@ internal UI_State *ui_get_selected_state(void);
|
||||
//- rjf: per-frame info
|
||||
internal Arena * ui_build_arena(void);
|
||||
internal OS_Handle ui_window(void);
|
||||
internal UI_EventList * ui_events(void);
|
||||
internal Vec2F32 ui_mouse(void);
|
||||
internal F_Tag ui_icon_font(void);
|
||||
internal String8 ui_icon_string_from_kind(UI_IconKind icon_kind);
|
||||
internal F32 ui_dt(void);
|
||||
|
||||
//- rjf: event pumping
|
||||
internal B32 ui_next_event(UI_Event **ev);
|
||||
internal void ui_eat_event(UI_Event *ev);
|
||||
|
||||
//- rjf: event consumption helpers
|
||||
internal B32 ui_key_press(OS_EventFlags mods, OS_Key key);
|
||||
internal B32 ui_key_release(OS_EventFlags mods, OS_Key key);
|
||||
@@ -840,6 +862,7 @@ internal F32 ui_top_fixed_width(void);
|
||||
internal F32 ui_top_fixed_height(void);
|
||||
internal UI_Size ui_top_pref_width(void);
|
||||
internal UI_Size ui_top_pref_height(void);
|
||||
internal UI_PermissionFlags ui_top_permission_flags(void);
|
||||
internal UI_BoxFlags ui_top_flags(void);
|
||||
internal UI_FocusKind ui_top_focus_hot(void);
|
||||
internal UI_FocusKind ui_top_focus_active(void);
|
||||
@@ -868,6 +891,7 @@ internal F32 ui_bottom_fixed_width(void);
|
||||
internal F32 ui_bottom_fixed_height(void);
|
||||
internal UI_Size ui_bottom_pref_width(void);
|
||||
internal UI_Size ui_bottom_pref_height(void);
|
||||
internal UI_PermissionFlags ui_bottom_permission_flags(void);
|
||||
internal UI_BoxFlags ui_bottom_flags(void);
|
||||
internal UI_FocusKind ui_bottom_focus_hot(void);
|
||||
internal UI_FocusKind ui_bottom_focus_active(void);
|
||||
@@ -896,6 +920,7 @@ internal F32 ui_push_fixed_width(F32 v);
|
||||
internal F32 ui_push_fixed_height(F32 v);
|
||||
internal UI_Size ui_push_pref_width(UI_Size v);
|
||||
internal UI_Size ui_push_pref_height(UI_Size v);
|
||||
internal UI_PermissionFlags ui_push_permission_flags(UI_PermissionFlags v);
|
||||
internal UI_BoxFlags ui_push_flags(UI_BoxFlags v);
|
||||
internal UI_FocusKind ui_push_focus_hot(UI_FocusKind v);
|
||||
internal UI_FocusKind ui_push_focus_active(UI_FocusKind v);
|
||||
@@ -924,6 +949,7 @@ internal F32 ui_pop_fixed_width(void);
|
||||
internal F32 ui_pop_fixed_height(void);
|
||||
internal UI_Size ui_pop_pref_width(void);
|
||||
internal UI_Size ui_pop_pref_height(void);
|
||||
internal UI_PermissionFlags ui_pop_permission_flags(void);
|
||||
internal UI_BoxFlags ui_pop_flags(void);
|
||||
internal UI_FocusKind ui_pop_focus_hot(void);
|
||||
internal UI_FocusKind ui_pop_focus_active(void);
|
||||
@@ -952,6 +978,7 @@ internal F32 ui_set_next_fixed_width(F32 v);
|
||||
internal F32 ui_set_next_fixed_height(F32 v);
|
||||
internal UI_Size ui_set_next_pref_width(UI_Size v);
|
||||
internal UI_Size ui_set_next_pref_height(UI_Size v);
|
||||
internal UI_PermissionFlags ui_set_next_permission_flags(UI_PermissionFlags v);
|
||||
internal UI_BoxFlags ui_set_next_flags(UI_BoxFlags v);
|
||||
internal UI_FocusKind ui_set_next_focus_hot(UI_FocusKind v);
|
||||
internal UI_FocusKind ui_set_next_focus_active(UI_FocusKind v);
|
||||
@@ -995,6 +1022,7 @@ internal void ui_pop_corner_radius(void);
|
||||
#define UI_FixedHeight(v) DeferLoop(ui_push_fixed_height(v), ui_pop_fixed_height())
|
||||
#define UI_PrefWidth(v) DeferLoop(ui_push_pref_width(v), ui_pop_pref_width())
|
||||
#define UI_PrefHeight(v) DeferLoop(ui_push_pref_height(v), ui_pop_pref_height())
|
||||
#define UI_PermissionFlags(v) DeferLoop(ui_push_permission_flags(v), ui_pop_permission_flags())
|
||||
#define UI_Flags(v) DeferLoop(ui_push_flags(v), ui_pop_flags())
|
||||
#define UI_FocusHot(v) DeferLoop(ui_push_focus_hot(v), ui_pop_focus_hot())
|
||||
#define UI_FocusActive(v) DeferLoop(ui_push_focus_active(v), ui_pop_focus_active())
|
||||
|
||||
Reference in New Issue
Block a user