eliminate setup hook for views

This commit is contained in:
Ryan Fleury
2024-09-16 09:53:24 -07:00
parent 23a5c9eb44
commit e8c8df9c6e
12 changed files with 135 additions and 231 deletions
+34 -34
View File
@@ -714,40 +714,40 @@ str8_lit_comp("settings"),
RD_ViewSpecInfo rd_gfx_view_kind_spec_info_table[34] =
{
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("null"), str8_lit_comp(""), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(null), RD_VIEW_UI_FUNCTION_NAME(null)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("empty"), str8_lit_comp(""), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(empty), RD_VIEW_UI_FUNCTION_NAME(empty)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("getting_started"), str8_lit_comp("Getting Started"), RD_IconKind_QuestionMark, RD_VIEW_SETUP_FUNCTION_NAME(getting_started), RD_VIEW_UI_FUNCTION_NAME(getting_started)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), RD_IconKind_List, RD_VIEW_SETUP_FUNCTION_NAME(commands), RD_VIEW_UI_FUNCTION_NAME(commands)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(file_system), RD_VIEW_UI_FUNCTION_NAME(file_system)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(system_processes), RD_VIEW_UI_FUNCTION_NAME(system_processes)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(entity_lister), RD_VIEW_UI_FUNCTION_NAME(entity_lister)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(symbol_lister), RD_VIEW_UI_FUNCTION_NAME(symbol_lister)},
{(0|1*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), RD_IconKind_Target, RD_VIEW_SETUP_FUNCTION_NAME(target), RD_VIEW_UI_FUNCTION_NAME(target)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), RD_IconKind_Target, RD_VIEW_SETUP_FUNCTION_NAME(targets), RD_VIEW_UI_FUNCTION_NAME(targets)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(file_path_map), RD_VIEW_UI_FUNCTION_NAME(file_path_map)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(auto_view_rules), RD_VIEW_UI_FUNCTION_NAME(auto_view_rules)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), RD_IconKind_CircleFilled, RD_VIEW_SETUP_FUNCTION_NAME(breakpoints), RD_VIEW_UI_FUNCTION_NAME(breakpoints)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), RD_IconKind_Pin, RD_VIEW_SETUP_FUNCTION_NAME(watch_pins), RD_VIEW_UI_FUNCTION_NAME(watch_pins)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), RD_IconKind_Scheduler, RD_VIEW_SETUP_FUNCTION_NAME(scheduler), RD_VIEW_UI_FUNCTION_NAME(scheduler)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), RD_IconKind_Thread, RD_VIEW_SETUP_FUNCTION_NAME(call_stack), RD_VIEW_UI_FUNCTION_NAME(call_stack)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("modules"), str8_lit_comp("Modules"), RD_IconKind_Module, RD_VIEW_SETUP_FUNCTION_NAME(modules), RD_VIEW_UI_FUNCTION_NAME(modules)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch"), str8_lit_comp("Watch"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(watch), RD_VIEW_UI_FUNCTION_NAME(watch)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("locals"), str8_lit_comp("Locals"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(locals), RD_VIEW_UI_FUNCTION_NAME(locals)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("registers"), str8_lit_comp("Registers"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(registers), RD_VIEW_UI_FUNCTION_NAME(registers)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("globals"), str8_lit_comp("Globals"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(globals), RD_VIEW_UI_FUNCTION_NAME(globals)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(thread_locals), RD_VIEW_UI_FUNCTION_NAME(thread_locals)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("types"), str8_lit_comp("Types"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(types), RD_VIEW_UI_FUNCTION_NAME(types)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(procedures), RD_VIEW_UI_FUNCTION_NAME(procedures)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("pending_file"), str8_lit_comp("Pending File"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(pending_file), RD_VIEW_UI_FUNCTION_NAME(pending_file)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|1*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("text"), str8_lit_comp("Text"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(text), RD_VIEW_UI_FUNCTION_NAME(text)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), RD_IconKind_Glasses, RD_VIEW_SETUP_FUNCTION_NAME(disasm), RD_VIEW_UI_FUNCTION_NAME(disasm)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("output"), str8_lit_comp("Output"), RD_IconKind_List, RD_VIEW_SETUP_FUNCTION_NAME(output), RD_VIEW_UI_FUNCTION_NAME(output)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("memory"), str8_lit_comp("Memory"), RD_IconKind_Grid, RD_VIEW_SETUP_FUNCTION_NAME(memory), RD_VIEW_UI_FUNCTION_NAME(memory)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(bitmap), RD_VIEW_UI_FUNCTION_NAME(bitmap)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), RD_IconKind_Palette, RD_VIEW_SETUP_FUNCTION_NAME(color_rgba), RD_VIEW_UI_FUNCTION_NAME(color_rgba)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(geo3d), RD_VIEW_UI_FUNCTION_NAME(geo3d)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), RD_IconKind_Gear, RD_VIEW_SETUP_FUNCTION_NAME(exception_filters), RD_VIEW_UI_FUNCTION_NAME(exception_filters)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("settings"), str8_lit_comp("Settings"), RD_IconKind_Gear, RD_VIEW_SETUP_FUNCTION_NAME(settings), RD_VIEW_UI_FUNCTION_NAME(settings)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("null"), str8_lit_comp(""), RD_IconKind_Null, RD_VIEW_UI_FUNCTION_NAME(null)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("empty"), str8_lit_comp(""), RD_IconKind_Null, RD_VIEW_UI_FUNCTION_NAME(empty)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("getting_started"), str8_lit_comp("Getting Started"), RD_IconKind_QuestionMark, RD_VIEW_UI_FUNCTION_NAME(getting_started)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), RD_IconKind_List, RD_VIEW_UI_FUNCTION_NAME(commands)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), RD_IconKind_FileOutline, RD_VIEW_UI_FUNCTION_NAME(file_system)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), RD_IconKind_Null, RD_VIEW_UI_FUNCTION_NAME(system_processes)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), RD_IconKind_Null, RD_VIEW_UI_FUNCTION_NAME(entity_lister)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), RD_IconKind_Null, RD_VIEW_UI_FUNCTION_NAME(symbol_lister)},
{(0|1*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), RD_IconKind_Target, RD_VIEW_UI_FUNCTION_NAME(target)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), RD_IconKind_Target, RD_VIEW_UI_FUNCTION_NAME(targets)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), RD_IconKind_FileOutline, RD_VIEW_UI_FUNCTION_NAME(file_path_map)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(auto_view_rules)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), RD_IconKind_CircleFilled, RD_VIEW_UI_FUNCTION_NAME(breakpoints)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), RD_IconKind_Pin, RD_VIEW_UI_FUNCTION_NAME(watch_pins)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), RD_IconKind_Scheduler, RD_VIEW_UI_FUNCTION_NAME(scheduler)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), RD_IconKind_Thread, RD_VIEW_UI_FUNCTION_NAME(call_stack)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("modules"), str8_lit_comp("Modules"), RD_IconKind_Module, RD_VIEW_UI_FUNCTION_NAME(modules)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch"), str8_lit_comp("Watch"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(watch)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("locals"), str8_lit_comp("Locals"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(locals)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("registers"), str8_lit_comp("Registers"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(registers)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("globals"), str8_lit_comp("Globals"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(globals)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(thread_locals)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("types"), str8_lit_comp("Types"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(types)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(procedures)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("pending_file"), str8_lit_comp("Pending File"), RD_IconKind_FileOutline, RD_VIEW_UI_FUNCTION_NAME(pending_file)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|1*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("text"), str8_lit_comp("Text"), RD_IconKind_FileOutline, RD_VIEW_UI_FUNCTION_NAME(text)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), RD_IconKind_Glasses, RD_VIEW_UI_FUNCTION_NAME(disasm)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("output"), str8_lit_comp("Output"), RD_IconKind_List, RD_VIEW_UI_FUNCTION_NAME(output)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("memory"), str8_lit_comp("Memory"), RD_IconKind_Grid, RD_VIEW_UI_FUNCTION_NAME(memory)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(bitmap)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), RD_IconKind_Palette, RD_VIEW_UI_FUNCTION_NAME(color_rgba)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), RD_IconKind_Binoculars, RD_VIEW_UI_FUNCTION_NAME(geo3d)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), RD_IconKind_Gear, RD_VIEW_UI_FUNCTION_NAME(exception_filters)},
{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("settings"), str8_lit_comp("Settings"), RD_IconKind_Gear, RD_VIEW_UI_FUNCTION_NAME(settings)},
};
RD_IconKind rd_entity_kind_icon_kind_table[30] =
-34
View File
@@ -682,40 +682,6 @@ RD_ViewRuleUIFunctionType *ui;
.params_tree = rd_regs()->params_tree,\
.os_event = rd_regs()->os_event,\
RD_VIEW_SETUP_FUNCTION_DEF(null);
RD_VIEW_SETUP_FUNCTION_DEF(empty);
RD_VIEW_SETUP_FUNCTION_DEF(getting_started);
RD_VIEW_SETUP_FUNCTION_DEF(commands);
RD_VIEW_SETUP_FUNCTION_DEF(file_system);
RD_VIEW_SETUP_FUNCTION_DEF(system_processes);
RD_VIEW_SETUP_FUNCTION_DEF(entity_lister);
RD_VIEW_SETUP_FUNCTION_DEF(symbol_lister);
RD_VIEW_SETUP_FUNCTION_DEF(target);
RD_VIEW_SETUP_FUNCTION_DEF(targets);
RD_VIEW_SETUP_FUNCTION_DEF(file_path_map);
RD_VIEW_SETUP_FUNCTION_DEF(auto_view_rules);
RD_VIEW_SETUP_FUNCTION_DEF(breakpoints);
RD_VIEW_SETUP_FUNCTION_DEF(watch_pins);
RD_VIEW_SETUP_FUNCTION_DEF(scheduler);
RD_VIEW_SETUP_FUNCTION_DEF(call_stack);
RD_VIEW_SETUP_FUNCTION_DEF(modules);
RD_VIEW_SETUP_FUNCTION_DEF(watch);
RD_VIEW_SETUP_FUNCTION_DEF(locals);
RD_VIEW_SETUP_FUNCTION_DEF(registers);
RD_VIEW_SETUP_FUNCTION_DEF(globals);
RD_VIEW_SETUP_FUNCTION_DEF(thread_locals);
RD_VIEW_SETUP_FUNCTION_DEF(types);
RD_VIEW_SETUP_FUNCTION_DEF(procedures);
RD_VIEW_SETUP_FUNCTION_DEF(pending_file);
RD_VIEW_SETUP_FUNCTION_DEF(text);
RD_VIEW_SETUP_FUNCTION_DEF(disasm);
RD_VIEW_SETUP_FUNCTION_DEF(output);
RD_VIEW_SETUP_FUNCTION_DEF(memory);
RD_VIEW_SETUP_FUNCTION_DEF(bitmap);
RD_VIEW_SETUP_FUNCTION_DEF(color_rgba);
RD_VIEW_SETUP_FUNCTION_DEF(geo3d);
RD_VIEW_SETUP_FUNCTION_DEF(exception_filters);
RD_VIEW_SETUP_FUNCTION_DEF(settings);
RD_VIEW_UI_FUNCTION_DEF(null);
RD_VIEW_UI_FUNCTION_DEF(empty);
RD_VIEW_UI_FUNCTION_DEF(getting_started);
+1 -2
View File
@@ -972,7 +972,6 @@ RD_ViewTable:
@gen
{
@expand(RD_ViewTable a) `RD_VIEW_SETUP_FUNCTION_DEF($(a.name_lower));`;
@expand(RD_ViewTable a) `RD_VIEW_UI_FUNCTION_DEF($(a.name_lower));`;
}
@@ -983,7 +982,7 @@ RD_ViewTable:
@data(RD_ViewSpecInfo) rd_gfx_view_kind_spec_info_table:
{
@expand(RD_ViewTable a) ```{(0|$(a.parameterized_by_entity)*RD_ViewSpecFlag_ParameterizedByEntity|$(a.project_specific)*RD_ViewSpecFlag_ProjectSpecific|$(a.can_serialize)*RD_ViewSpecFlag_CanSerialize|$(a.can_filter)*RD_ViewSpecFlag_CanFilter|$(a.filter_is_code)*RD_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), RD_IconKind_$(a.icon), RD_VIEW_SETUP_FUNCTION_NAME($(a.name_lower)), RD_VIEW_UI_FUNCTION_NAME($(a.name_lower))}```;
@expand(RD_ViewTable a) ```{(0|$(a.parameterized_by_entity)*RD_ViewSpecFlag_ParameterizedByEntity|$(a.project_specific)*RD_ViewSpecFlag_ProjectSpecific|$(a.can_serialize)*RD_ViewSpecFlag_CanSerialize|$(a.can_filter)*RD_ViewSpecFlag_CanFilter|$(a.filter_is_code)*RD_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), RD_IconKind_$(a.icon), RD_VIEW_UI_FUNCTION_NAME($(a.name_lower))}```;
}
////////////////////////////////
+29 -20
View File
@@ -2422,7 +2422,6 @@ rd_view_equip_spec(RD_View *view, RD_ViewSpec *spec, String8 query, MD_Node *par
rd_view_equip_query(view, query);
// rjf: initialize state for new view spec
RD_ViewSetupFunctionType *view_setup = spec->info.setup_hook;
{
for(RD_ArenaExt *ext = view->first_arena_ext; ext != 0; ext = ext->next)
{
@@ -2453,7 +2452,6 @@ rd_view_equip_spec(RD_View *view, RD_ViewSpec *spec, String8 query, MD_Node *par
}
view->is_filtering = 0;
view->is_filtering_t = 0;
view_setup(view, view->params_roots[view->params_read_gen%ArrayCount(view->params_roots)], str8(view->query_buffer, view->query_string_size));
}
internal void
@@ -2917,8 +2915,8 @@ rd_window_frame(RD_Window *ws)
//////////////////////////////
//- rjf: build UI
//
UI_Box *autocomp_box = &ui_g_nil_box;
UI_Box *hover_eval_box = &ui_g_nil_box;
UI_Box *autocomp_box = &ui_nil_box;
UI_Box *hover_eval_box = &ui_nil_box;
ProfScope("build UI")
{
////////////////////////////
@@ -3908,7 +3906,7 @@ rd_window_frame(RD_Window *ws)
if(rd_state->popup_t > 0.005f) UI_TextAlignment(UI_TextAlign_Center) UI_Focus(rd_state->popup_active ? UI_FocusKind_Root : UI_FocusKind_Off)
{
Vec2F32 window_dim = dim_2f32(window_rect);
UI_Box *bg_box = &ui_g_nil_box;
UI_Box *bg_box = &ui_nil_box;
UI_Palette *palette = ui_build_palette(rd_palette_from_code(RD_PaletteCode_Floating));
palette->background.w *= rd_state->popup_t;
UI_Rect(window_rect)
@@ -5337,7 +5335,7 @@ rd_window_frame(RD_Window *ws)
query_container_rect.y1);
//- rjf: build floating query view container
UI_Box *query_container_box = &ui_g_nil_box;
UI_Box *query_container_box = &ui_nil_box;
UI_Rect(query_container_rect)
UI_CornerRadius(ui_top_font_size()*0.2f)
UI_ChildLayoutAxis(Axis2_Y)
@@ -5854,14 +5852,14 @@ rd_window_frame(RD_Window *ws)
site_rect.p1.v[axis] = panel_rect.v[side].v[axis] + drop_site_minor_dim_px/2;
// rjf: build
UI_Box *site_box = &ui_g_nil_box;
UI_Box *site_box = &ui_nil_box;
{
UI_Rect(site_rect)
{
site_box = ui_build_box_from_key(UI_BoxFlag_DropSite, key);
ui_signal_from_box(site_box);
}
UI_Box *site_box_viz = &ui_g_nil_box;
UI_Box *site_box_viz = &ui_nil_box;
UI_Parent(site_box) UI_WidthFill UI_HeightFill
UI_Padding(ui_px(padding, 1.f))
UI_Column
@@ -5938,14 +5936,14 @@ rd_window_frame(RD_Window *ws)
site_rect.p1.v[axis2_flip(split_axis)] += drop_site_major_dim_px/2;
// rjf: build
UI_Box *site_box = &ui_g_nil_box;
UI_Box *site_box = &ui_nil_box;
{
UI_Rect(site_rect)
{
site_box = ui_build_box_from_key(UI_BoxFlag_DropSite, key);
ui_signal_from_box(site_box);
}
UI_Box *site_box_viz = &ui_g_nil_box;
UI_Box *site_box_viz = &ui_nil_box;
UI_Parent(site_box) UI_WidthFill UI_HeightFill
UI_Padding(ui_px(padding, 1.f))
UI_Column
@@ -6236,14 +6234,14 @@ rd_window_frame(RD_Window *ws)
{
continue;
}
UI_Box *site_box = &ui_g_nil_box;
UI_Box *site_box = &ui_nil_box;
{
UI_Rect(rect)
{
site_box = ui_build_box_from_key(UI_BoxFlag_DropSite, key);
ui_signal_from_box(site_box);
}
UI_Box *site_box_viz = &ui_g_nil_box;
UI_Box *site_box_viz = &ui_nil_box;
UI_Parent(site_box) UI_WidthFill UI_HeightFill
UI_Padding(ui_px(padding, 1.f))
UI_Column
@@ -6358,7 +6356,7 @@ rd_window_frame(RD_Window *ws)
}
if(view->is_filtering || view->is_filtering_t > 0.01f)
{
UI_Box *filter_box = &ui_g_nil_box;
UI_Box *filter_box = &ui_nil_box;
UI_Rect(filter_rect)
{
ui_set_next_child_layout_axis(Axis2_X);
@@ -6416,7 +6414,7 @@ rd_window_frame(RD_Window *ws)
//////////////////////////
//- rjf: build panel container box
//
UI_Box *panel_box = &ui_g_nil_box;
UI_Box *panel_box = &ui_nil_box;
UI_Rect(content_rect) UI_ChildLayoutAxis(Axis2_Y) UI_CornerRadius(0) UI_Focus(UI_FocusKind_On)
{
UI_Key panel_key = rd_ui_key_from_panel(panel);
@@ -6432,10 +6430,10 @@ rd_window_frame(RD_Window *ws)
//////////////////////////
//- rjf: loading animation for stable view
//
UI_Parent(panel_box)
UI_Box *loading_overlay_container = &ui_nil_box;
UI_Parent(panel_box) UI_WidthFill UI_HeightFill
{
RD_View *view = rd_selected_tab_from_panel(panel);
rd_loading_overlay(panel_rect, view->loading_t, view->loading_progress_v, view->loading_progress_v_target);
loading_overlay_container = ui_build_box_from_key(UI_BoxFlag_FloatingX|UI_BoxFlag_FloatingY, ui_key_zero());
}
//////////////////////////
@@ -6455,7 +6453,7 @@ rd_window_frame(RD_Window *ws)
}
//- rjf: build view container
UI_Box *view_container_box = &ui_g_nil_box;
UI_Box *view_container_box = &ui_nil_box;
UI_FixedWidth(dim_2f32(content_rect).x)
UI_FixedHeight(dim_2f32(content_rect).y)
UI_ChildLayoutAxis(Axis2_Y)
@@ -6485,6 +6483,17 @@ rd_window_frame(RD_Window *ws)
}
}
////////////////////////
//- rjf: loading? -> fill loading overlay container
//
{
RD_View *view = rd_selected_tab_from_panel(panel);
if(view->loading_t > 0.01f) UI_Parent(loading_overlay_container)
{
rd_loading_overlay(panel_rect, view->loading_t, view->loading_progress_v, view->loading_progress_v_target);
}
}
//////////////////////////
//- rjf: take events to automatically start/end filtering, if applicable
//
@@ -6541,7 +6550,7 @@ rd_window_frame(RD_Window *ws)
// rjf: prep output data
RD_View *next_selected_tab_view = rd_selected_tab_from_panel(panel);
UI_Box *tab_bar_box = &ui_g_nil_box;
UI_Box *tab_bar_box = &ui_nil_box;
U64 drop_site_count = panel->tab_view_count+1;
DropSite *drop_sites = push_array(scratch.arena, DropSite, drop_site_count);
F32 drop_site_max_p = 0;
@@ -7147,7 +7156,7 @@ rd_window_frame(RD_Window *ws)
for(UI_Box *box = ui_root_from_state(ws->ui); !ui_box_is_nil(box);)
{
// rjf: get recursion
UI_BoxRec rec = ui_box_rec_df_post(box, &ui_g_nil_box);
UI_BoxRec rec = ui_box_rec_df_post(box, &ui_nil_box);
// rjf: sum to box heatmap
if(DEV_draw_ui_box_heatmap)
-7
View File
@@ -161,11 +161,6 @@ struct RD_SettingVal
typedef struct RD_View RD_View;
#define RD_VIEW_SETUP_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string)
#define RD_VIEW_SETUP_FUNCTION_NAME(name) rd_view_setup_##name
#define RD_VIEW_SETUP_FUNCTION_DEF(name) internal RD_VIEW_SETUP_FUNCTION_SIG(RD_VIEW_SETUP_FUNCTION_NAME(name))
typedef RD_VIEW_SETUP_FUNCTION_SIG(RD_ViewSetupFunctionType);
#define RD_VIEW_UI_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string, Rng2F32 rect)
#define RD_VIEW_UI_FUNCTION_NAME(name) rd_view_ui_##name
#define RD_VIEW_UI_FUNCTION_DEF(name) internal RD_VIEW_UI_FUNCTION_SIG(RD_VIEW_UI_FUNCTION_NAME(name))
@@ -210,7 +205,6 @@ struct RD_ViewSpecInfo
String8 name;
String8 display_string;
U32 icon_kind;
RD_ViewSetupFunctionType *setup_hook;
RD_ViewUIFunctionType *ui_hook;
};
@@ -1084,7 +1078,6 @@ read_only global RD_ViewSpec rd_nil_view_spec =
{0},
{0},
RD_IconKind_Null,
RD_VIEW_SETUP_FUNCTION_NAME(null),
RD_VIEW_UI_FUNCTION_NAME(null),
},
};
+34 -97
View File
@@ -13,9 +13,9 @@ rd_code_view_init(RD_CodeViewState *cv, RD_View *view)
cv->preferred_column = 1;
cv->find_text_arena = rd_view_push_arena_ext(view);
cv->center_cursor = 1;
rd_view_equip_loading_info(view, 1, 0, 0);
view->loading_t = view->loading_t_target = 1.f;
}
rd_view_equip_loading_info(view, 1, 0, 0);
view->loading_t = view->loading_t_target = 1.f;
}
internal void
@@ -368,7 +368,7 @@ rd_code_view_build(Arena *arena, RD_View *view, RD_CodeViewState *cv, RD_CodeVie
//////////////////////////////
//- rjf: build container
//
UI_Box *container_box = &ui_g_nil_box;
UI_Box *container_box = &ui_nil_box;
{
ui_set_next_pref_width(ui_px(code_area_dim.x, 1));
ui_set_next_pref_height(ui_px(code_area_dim.y, 1));
@@ -2871,13 +2871,11 @@ rd_watch_view_build(RD_View *view, RD_WatchViewState *ewv, B32 modifiable, U32 d
////////////////////////////////
//~ rjf: null @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(null) {}
RD_VIEW_UI_FUNCTION_DEF(null) {}
////////////////////////////////
//~ rjf: empty @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(empty) {}
RD_VIEW_UI_FUNCTION_DEF(empty)
{
ui_set_next_flags(UI_BoxFlag_DefaultFocusNav);
@@ -2903,7 +2901,6 @@ RD_VIEW_UI_FUNCTION_DEF(empty)
////////////////////////////////
//~ rjf: getting_started @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(getting_started) {}
RD_VIEW_UI_FUNCTION_DEF(getting_started)
{
ProfBeginFunction();
@@ -3169,7 +3166,6 @@ rd_cmd_lister_item_array_sort_by_strength__in_place(RD_CmdListerItemArray array)
quick_sort(array.v, array.count, sizeof(RD_CmdListerItem), rd_qsort_compare_cmd_lister__strength);
}
RD_VIEW_SETUP_FUNCTION_DEF(commands) {}
RD_VIEW_UI_FUNCTION_DEF(commands)
{
ProfBeginFunction();
@@ -3239,7 +3235,7 @@ RD_VIEW_UI_FUNCTION_DEF(commands)
//- rjf: build row contents
ui_set_next_hover_cursor(OS_Cursor_HandPoint);
ui_set_next_child_layout_axis(Axis2_X);
UI_Box *box = &ui_g_nil_box;
UI_Box *box = &ui_nil_box;
UI_Focus(cursor.y == row_idx+1 ? UI_FocusKind_On : UI_FocusKind_Off)
{
box = ui_build_box_from_stringf(UI_BoxFlag_Clickable|
@@ -3279,7 +3275,7 @@ RD_VIEW_UI_FUNCTION_DEF(commands)
String8 cmd_display_name = info->display_name;
String8 cmd_desc = info->description;
UI_Box *name_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText, "%S##name_%S", cmd_display_name, info->string);
UI_Box *desc_box = &ui_g_nil_box;
UI_Box *desc_box = &ui_nil_box;
UI_PrefHeight(ui_em(1.8f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
{
desc_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText, "%S##desc_%S", cmd_desc, info->string);
@@ -3493,7 +3489,6 @@ rd_qsort_compare_file_info__size(RD_FileInfo *a, RD_FileInfo *b)
0);
}
RD_VIEW_SETUP_FUNCTION_DEF(file_system){}
RD_VIEW_UI_FUNCTION_DEF(file_system)
{
ProfBeginFunction();
@@ -4074,7 +4069,6 @@ rd_process_info_array_sort_by_strength__in_place(RD_ProcessInfoArray array)
quick_sort(array.v, array.count, sizeof(RD_ProcessInfo), rd_qsort_compare_process_info);
}
RD_VIEW_SETUP_FUNCTION_DEF(system_processes){}
RD_VIEW_UI_FUNCTION_DEF(system_processes)
{
ProfBeginFunction();
@@ -4324,7 +4318,6 @@ rd_entity_lister_item_array_sort_by_strength__in_place(RD_EntityListerItemArray
quick_sort(array.v, array.count, sizeof(RD_EntityListerItem), rd_qsort_compare_entity_lister__strength);
}
RD_VIEW_SETUP_FUNCTION_DEF(entity_lister){}
RD_VIEW_UI_FUNCTION_DEF(entity_lister)
{
ProfBeginFunction();
@@ -4401,7 +4394,7 @@ RD_VIEW_UI_FUNCTION_DEF(entity_lister)
RD_Entity *ent = item.entity;
ui_set_next_hover_cursor(OS_Cursor_HandPoint);
ui_set_next_child_layout_axis(Axis2_X);
UI_Box *box = &ui_g_nil_box;
UI_Box *box = &ui_nil_box;
UI_FocusHot(idx+1 == cursor.y ? UI_FocusKind_On : UI_FocusKind_Off)
{
box = ui_build_box_from_stringf(UI_BoxFlag_Clickable|
@@ -4451,7 +4444,6 @@ RD_VIEW_UI_FUNCTION_DEF(entity_lister)
////////////////////////////////
//~ rjf: symbol_lister @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(symbol_lister){}
RD_VIEW_UI_FUNCTION_DEF(symbol_lister)
{
ProfBeginFunction();
@@ -4658,7 +4650,6 @@ struct RD_TargetViewState
F32 value_pct;
};
RD_VIEW_SETUP_FUNCTION_DEF(target){}
RD_VIEW_UI_FUNCTION_DEF(target)
{
ProfBeginFunction();
@@ -4965,7 +4956,6 @@ RD_VIEW_UI_FUNCTION_DEF(target)
////////////////////////////////
//~ rjf: targets @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(targets){}
RD_VIEW_UI_FUNCTION_DEF(targets)
{
ProfBeginFunction();
@@ -5132,17 +5122,6 @@ struct RD_FilePathMapViewState
F32 dst_column_pct;
};
RD_VIEW_SETUP_FUNCTION_DEF(file_path_map)
{
RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState);
if(fpms->initialized == 0)
{
fpms->initialized = 1;
fpms->src_column_pct = 0.5f;
fpms->dst_column_pct = 0.5f;
}
}
RD_VIEW_UI_FUNCTION_DEF(file_path_map)
{
ProfBeginFunction();
@@ -5151,6 +5130,14 @@ RD_VIEW_UI_FUNCTION_DEF(file_path_map)
RD_EntityArray maps = rd_entity_array_from_list(scratch.arena, &maps_list);
F32 row_height_px = floor_f32(ui_top_font_size()*2.5f);
RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState);
if(fpms->initialized == 0)
{
fpms->initialized = 1;
fpms->src_column_pct = 0.5f;
fpms->dst_column_pct = 0.5f;
}
#if 0 // TODO(rjf): @msgs
RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState);
@@ -5186,9 +5173,6 @@ RD_VIEW_UI_FUNCTION_DEF(file_path_map)
}
#endif
//- rjf: grab state
RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState);
//- rjf: take controls to start/end editing
B32 edit_begin = 0;
B32 edit_end = 0;
@@ -5455,13 +5439,11 @@ RD_VIEW_UI_FUNCTION_DEF(file_path_map)
////////////////////////////////
//~ rjf: auto_view_rules @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(auto_view_rules){}
RD_VIEW_UI_FUNCTION_DEF(auto_view_rules){}
////////////////////////////////
//~ rjf: breakpoints @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(breakpoints){}
RD_VIEW_UI_FUNCTION_DEF(breakpoints)
{
ProfBeginFunction();
@@ -5482,7 +5464,6 @@ RD_VIEW_UI_FUNCTION_DEF(breakpoints)
////////////////////////////////
//~ rjf: watch_pins @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(watch_pins){}
RD_VIEW_UI_FUNCTION_DEF(watch_pins)
{
ProfBeginFunction();
@@ -5500,7 +5481,6 @@ RD_VIEW_UI_FUNCTION_DEF(watch_pins)
////////////////////////////////
//~ rjf: scheduler @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(scheduler) {}
RD_VIEW_UI_FUNCTION_DEF(scheduler)
{
ProfBeginFunction();
@@ -5723,7 +5703,6 @@ RD_VIEW_UI_FUNCTION_DEF(scheduler)
////////////////////////////////
//~ rjf: call_stack @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(call_stack){}
RD_VIEW_UI_FUNCTION_DEF(call_stack)
{
ProfBeginFunction();
@@ -5762,7 +5741,7 @@ struct RD_ModulesViewState
};
#endif
RD_VIEW_SETUP_FUNCTION_DEF(modules)
RD_VIEW_UI_FUNCTION_DEF(modules)
{
#if 0 // TODO(rjf): @msgs
RD_ModulesViewState *mv = rd_view_user_state(view, RD_ModulesViewState);
@@ -5775,10 +5754,6 @@ RD_VIEW_SETUP_FUNCTION_DEF(modules)
mv->dbg_col_pct = 0.50f;
}
#endif
}
RD_VIEW_UI_FUNCTION_DEF(modules)
{
#if 0 // TODO(rjf): @msgs
RD_ModulesViewState *mv = rd_view_user_state(view, RD_ModulesViewState);
for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);)
@@ -6082,7 +6057,6 @@ RD_VIEW_UI_FUNCTION_DEF(modules)
////////////////////////////////
//~ rjf: watch @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(watch){}
RD_VIEW_UI_FUNCTION_DEF(watch)
{
ProfBeginFunction();
@@ -6102,7 +6076,6 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
////////////////////////////////
//~ rjf: locals @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(locals){}
RD_VIEW_UI_FUNCTION_DEF(locals)
{
ProfBeginFunction();
@@ -6122,7 +6095,6 @@ RD_VIEW_UI_FUNCTION_DEF(locals)
////////////////////////////////
//~ rjf: registers @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(registers){}
RD_VIEW_UI_FUNCTION_DEF(registers)
{
ProfBeginFunction();
@@ -6142,7 +6114,6 @@ RD_VIEW_UI_FUNCTION_DEF(registers)
////////////////////////////////
//~ rjf: globals @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(globals){}
RD_VIEW_UI_FUNCTION_DEF(globals)
{
ProfBeginFunction();
@@ -6162,7 +6133,6 @@ RD_VIEW_UI_FUNCTION_DEF(globals)
////////////////////////////////
//~ rjf: thread_locals @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(thread_locals){}
RD_VIEW_UI_FUNCTION_DEF(thread_locals)
{
ProfBeginFunction();
@@ -6182,7 +6152,6 @@ RD_VIEW_UI_FUNCTION_DEF(thread_locals)
////////////////////////////////
//~ rjf: types @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(types){}
RD_VIEW_UI_FUNCTION_DEF(types)
{
ProfBeginFunction();
@@ -6202,7 +6171,6 @@ RD_VIEW_UI_FUNCTION_DEF(types)
////////////////////////////////
//~ rjf: procedures @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(procedures){}
RD_VIEW_UI_FUNCTION_DEF(procedures)
{
ProfBeginFunction();
@@ -6228,15 +6196,14 @@ struct RD_PendingFileViewState
RD_CmdList deferred_cmds;
};
RD_VIEW_SETUP_FUNCTION_DEF(pending_file)
{
RD_PendingFileViewState *pves = rd_view_user_state(view, RD_PendingFileViewState);
pves->deferred_cmd_arena = rd_view_push_arena_ext(view);
}
RD_VIEW_UI_FUNCTION_DEF(pending_file)
{
Temp scratch = scratch_begin(0, 0);
RD_PendingFileViewState *pves = rd_view_user_state(view, RD_PendingFileViewState);
if(pves->deferred_cmd_arena == 0)
{
pves->deferred_cmd_arena = rd_view_push_arena_ext(view);
}
view->loading_t = view->loading_t_target = 1.f;
rd_request_frame();
@@ -6365,17 +6332,10 @@ EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(text)
ev_block_end(out, vb);
}
RD_VIEW_SETUP_FUNCTION_DEF(text)
{
RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState);
rd_code_view_init(cv, view);
rd_view_equip_loading_info(view, 1, 0, 0);
view->loading_t = view->loading_t_target = 1.f;
}
RD_VIEW_UI_FUNCTION_DEF(text)
{
RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState);
rd_code_view_init(cv, view);
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
@@ -6541,7 +6501,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
{
if(file_is_out_of_date)
{
UI_Box *box = &ui_g_nil_box;
UI_Box *box = &ui_nil_box;
UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative)))
RD_Font(RD_FontSlot_Icons)
{
@@ -6614,7 +6574,7 @@ EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(disasm)
ev_block_end(out, vb);
}
RD_VIEW_SETUP_FUNCTION_DEF(disasm)
RD_VIEW_UI_FUNCTION_DEF(disasm)
{
RD_DisasmViewState *dv = rd_view_user_state(view, RD_DisasmViewState);
if(dv->initialized == 0)
@@ -6625,11 +6585,6 @@ RD_VIEW_SETUP_FUNCTION_DEF(disasm)
dv->style_flags = DASM_StyleFlag_Addresses|DASM_StyleFlag_SourceFilesNames|DASM_StyleFlag_SourceLines|DASM_StyleFlag_SymbolNames;
rd_code_view_init(&dv->cv, view);
}
}
RD_VIEW_UI_FUNCTION_DEF(disasm)
{
RD_DisasmViewState *dv = rd_view_user_state(view, RD_DisasmViewState);
RD_CodeViewState *cv = &dv->cv;
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
@@ -6825,14 +6780,10 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
////////////////////////////////
//~ rjf: output @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(output)
{
RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState);
rd_code_view_init(cv, view);
}
RD_VIEW_UI_FUNCTION_DEF(output)
{
RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState);
rd_code_view_init(cv, view);
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
@@ -6912,7 +6863,6 @@ EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(memory)
ev_block_end(out, vb);
}
RD_VIEW_SETUP_FUNCTION_DEF(memory){}
RD_VIEW_UI_FUNCTION_DEF(memory)
{
ProfBeginFunction();
@@ -7293,7 +7243,7 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
//////////////////////////////
//- rjf: build main container
//
UI_Box *container_box = &ui_g_nil_box;
UI_Box *container_box = &ui_nil_box;
{
Vec2F32 dim = dim_2f32(rect);
ui_set_next_fixed_width(dim.x);
@@ -7305,7 +7255,7 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
//////////////////////////////
//- rjf: build header
//
UI_Box *header_box = &ui_g_nil_box;
UI_Box *header_box = &ui_nil_box;
UI_Parent(container_box)
{
UI_WidthFill UI_PrefHeight(ui_px(row_height_px, 1.f)) UI_Row
@@ -7355,7 +7305,7 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
//////////////////////////////
//- rjf: build scrollable box
//
UI_Box *scrollable_box = &ui_g_nil_box;
UI_Box *scrollable_box = &ui_nil_box;
UI_Parent(container_box)
{
ui_set_next_fixed_x(content_rect.x0);
@@ -7375,8 +7325,8 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
//////////////////////////////
//- rjf: build row container/overlay
//
UI_Box *row_container_box = &ui_g_nil_box;
UI_Box *row_overlay_box = &ui_g_nil_box;
UI_Box *row_container_box = &ui_nil_box;
UI_Box *row_overlay_box = &ui_nil_box;
UI_Parent(scrollable_box) UI_WidthFill UI_HeightFill
{
ui_set_next_child_layout_axis(Axis2_Y);
@@ -7629,7 +7579,7 @@ RD_VIEW_UI_FUNCTION_DEF(memory)
//////////////////////////////
//- rjf: build footer
//
UI_Box *footer_box = &ui_g_nil_box;
UI_Box *footer_box = &ui_nil_box;
UI_Parent(container_box)
{
ui_set_next_fixed_x(footer_rect.x0);
@@ -7808,11 +7758,6 @@ EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(bitmap)
ev_block_end(out, vb);
}
RD_VIEW_SETUP_FUNCTION_DEF(bitmap)
{
rd_view_equip_loading_info(view, 1, 0, 0);
view->loading_t = view->loading_t_target = 1.f;
}
RD_VIEW_UI_FUNCTION_DEF(bitmap)
{
Temp scratch = scratch_begin(0, 0);
@@ -7876,7 +7821,7 @@ RD_VIEW_UI_FUNCTION_DEF(bitmap)
//////////////////////////////
//- rjf: build canvas box
//
UI_Box *canvas_box = &ui_g_nil_box;
UI_Box *canvas_box = &ui_nil_box;
Vec2F32 canvas_dim = dim_2f32(rect);
Rng2F32 canvas_rect = r2f32p(0, 0, canvas_dim.x, canvas_dim.y);
UI_Rect(canvas_rect)
@@ -8072,7 +8017,7 @@ RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba)
Vec4F32 hsva = hsva_from_rgba(rgba);
//- rjf: build text box
UI_Box *text_box = &ui_g_nil_box;
UI_Box *text_box = &ui_nil_box;
UI_WidthFill RD_Font(RD_FontSlot_Code)
{
text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero());
@@ -8099,7 +8044,7 @@ RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba)
}
//- rjf: build color box
UI_Box *color_box = &ui_g_nil_box;
UI_Box *color_box = &ui_nil_box;
UI_PrefWidth(ui_em(1.875f, 1.f)) UI_ChildLayoutAxis(Axis2_Y)
{
color_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "color_box");
@@ -8123,7 +8068,6 @@ RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba)
scratch_end(scratch);
}
RD_VIEW_SETUP_FUNCTION_DEF(color_rgba) {}
RD_VIEW_UI_FUNCTION_DEF(color_rgba)
{
Temp scratch = scratch_begin(0, 0);
@@ -8230,11 +8174,6 @@ EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(geo3d)
ev_block_end(out, vb);
}
RD_VIEW_SETUP_FUNCTION_DEF(geo3d)
{
rd_view_equip_loading_info(view, 1, 0, 0);
view->loading_t = view->loading_t_target = 1.f;
}
RD_VIEW_UI_FUNCTION_DEF(geo3d)
{
Temp scratch = scratch_begin(0, 0);
@@ -8306,7 +8245,7 @@ RD_VIEW_UI_FUNCTION_DEF(geo3d)
if(count != 0 && !r_handle_match(idxs_buffer, r_handle_zero()) && !r_handle_match(vtxs_buffer, r_handle_zero()))
{
Vec2F32 dim = dim_2f32(rect);
UI_Box *box = &ui_g_nil_box;
UI_Box *box = &ui_nil_box;
UI_FixedSize(dim)
{
box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clickable|UI_BoxFlag_Scroll, "geo_box");
@@ -8351,7 +8290,6 @@ RD_VIEW_UI_FUNCTION_DEF(geo3d)
////////////////////////////////
//~ rjf: exception_filters @view_hook_impl
RD_VIEW_SETUP_FUNCTION_DEF(exception_filters) {}
RD_VIEW_UI_FUNCTION_DEF(exception_filters)
{
ProfBeginFunction();
@@ -8559,7 +8497,6 @@ rd_qsort_compare_settings_item(RD_SettingsItem *a, RD_SettingsItem *b)
return result;
}
RD_VIEW_SETUP_FUNCTION_DEF(settings){}
RD_VIEW_UI_FUNCTION_DEF(settings)
{
ProfBeginFunction();
@@ -9050,7 +8987,7 @@ RD_VIEW_UI_FUNCTION_DEF(settings)
}
//- rjf: build item widget
UI_Box *item_box = &ui_g_nil_box;
UI_Box *item_box = &ui_nil_box;
UI_Row
{
if(query.size == 0 && item->kind != RD_SettingsItemKind_CategoryHeader)
+6 -6
View File
@@ -647,7 +647,7 @@ rd_entity_desc_button(RD_Entity *entity, FuzzyMatchRangeList *name_matches, Stri
UI_TextAlignment(UI_TextAlign_Center)
UI_PrefWidth(ui_em(1.875f, 1.f))
{
UI_Box *info_box = &ui_g_nil_box;
UI_Box *info_box = &ui_nil_box;
RD_Font(RD_FontSlot_Icons)
UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons))
{
@@ -977,7 +977,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
//////////////////////////////
//- rjf: build top-level container
//
UI_Box *top_container_box = &ui_g_nil_box;
UI_Box *top_container_box = &ui_nil_box;
Rng2F32 clipped_top_container_rect = {0};
{
ui_set_next_child_layout_axis(Axis2_X);
@@ -1019,7 +1019,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
//////////////////////////////
//- rjf: build priority margin
//
UI_Box *priority_margin_container_box = &ui_g_nil_box;
UI_Box *priority_margin_container_box = &ui_nil_box;
if(params->flags & RD_CodeSliceFlag_PriorityMargin) UI_Focus(UI_FocusKind_Off) UI_Parent(top_container_box) UI_Palette(margin_palette) ProfScope("build priority margins")
{
if(params->margin_float_off_px != 0)
@@ -1177,7 +1177,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
//////////////////////////////
//- rjf: build catchall margin
//
UI_Box *catchall_margin_container_box = &ui_g_nil_box;
UI_Box *catchall_margin_container_box = &ui_nil_box;
if(params->flags & RD_CodeSliceFlag_CatchallMargin) UI_Focus(UI_FocusKind_Off) UI_Palette(margin_palette) UI_Parent(top_container_box) ProfScope("build catchall margins")
{
if(params->margin_float_off_px != 0)
@@ -1565,7 +1565,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
//////////////////////////////
//- rjf: build main text container box, for mouse interaction on both lines & line numbers
//
UI_Box *text_container_box = &ui_g_nil_box;
UI_Box *text_container_box = &ui_nil_box;
UI_Parent(top_container_box) UI_Focus(UI_FocusKind_Off)
{
ui_set_next_hover_cursor(ctrlified ? OS_Cursor_HandPoint : OS_Cursor_IBar);
@@ -2945,7 +2945,7 @@ rd_line_edit(RD_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx
}
//- rjf: build scrollable container box
UI_Box *scrollable_box = &ui_g_nil_box;
UI_Box *scrollable_box = &ui_nil_box;
UI_Parent(box) UI_PrefWidth(ui_children_sum(0))
{
scrollable_box = ui_build_box_from_stringf(is_focus_active*(UI_BoxFlag_AllowOverflowX), "scroll_box_%p", edit_buffer);
+2 -2
View File
@@ -69,7 +69,7 @@ UI_TextPaddingNode text_padding_nil_stack_top;\
UI_TextAlignmentNode text_alignment_nil_stack_top;\
}
#define UI_InitStackNils(state) \
state->parent_nil_stack_top.v = &ui_g_nil_box;\
state->parent_nil_stack_top.v = &ui_nil_box;\
state->child_layout_axis_nil_stack_top.v = Axis2_X;\
state->fixed_x_nil_stack_top.v = 0;\
state->fixed_y_nil_stack_top.v = 0;\
@@ -133,7 +133,7 @@ struct { UI_TextPaddingNode *top; F32 bottom_val; UI_TextPaddingNode *free; B32
struct { UI_TextAlignmentNode *top; UI_TextAlign bottom_val; UI_TextAlignmentNode *free; B32 auto_pop; } text_alignment_stack;\
}
#define UI_InitStacks(state) \
state->parent_stack.top = &state->parent_nil_stack_top; state->parent_stack.bottom_val = &ui_g_nil_box; state->parent_stack.free = 0; state->parent_stack.auto_pop = 0;\
state->parent_stack.top = &state->parent_nil_stack_top; state->parent_stack.bottom_val = &ui_nil_box; state->parent_stack.free = 0; state->parent_stack.auto_pop = 0;\
state->child_layout_axis_stack.top = &state->child_layout_axis_nil_stack_top; state->child_layout_axis_stack.bottom_val = Axis2_X; state->child_layout_axis_stack.free = 0; state->child_layout_axis_stack.auto_pop = 0;\
state->fixed_x_stack.top = &state->fixed_x_nil_stack_top; state->fixed_x_stack.bottom_val = 0; state->fixed_x_stack.free = 0; state->fixed_x_stack.auto_pop = 0;\
state->fixed_y_stack.top = &state->fixed_y_nil_stack_top; state->fixed_y_stack.bottom_val = 0; state->fixed_y_stack.free = 0; state->fixed_y_stack.auto_pop = 0;\
+1 -1
View File
@@ -7,7 +7,7 @@
UI_StackTable:
{
//- rjf: parents
{ Parent parent `UI_Box *` `&ui_g_nil_box` }
{ Parent parent `UI_Box *` `&ui_nil_box` }
//- rjf: layout params
{ ChildLayoutAxis child_layout_axis Axis2 `Axis2_X` }
+4 -4
View File
@@ -1245,8 +1245,8 @@ ui_scroll_bar(Axis2 axis, UI_Size off_axis_size, UI_ScrollPt pt, Rng1S64 idx_ran
UI_Signal space_before_sig = {0};
UI_Signal space_after_sig = {0};
UI_Signal scroller_sig = {0};
UI_Box *scroll_area_box = &ui_g_nil_box;
UI_Box *scroller_box = &ui_g_nil_box;
UI_Box *scroll_area_box = &ui_nil_box;
UI_Box *scroller_box = &ui_nil_box;
UI_Parent(container_box)
{
ui_set_next_pref_size(axis, ui_pct(1, 0));
@@ -1464,14 +1464,14 @@ ui_scroll_list_begin(UI_ScrollListParams *params, UI_ScrollPt *scroll_pt, Vec2S6
ui_scroll_list_scroll_idx_rng = scroll_row_idx_range;
//- rjf: build top-level container
UI_Box *container_box = &ui_g_nil_box;
UI_Box *container_box = &ui_nil_box;
UI_FixedWidth(params->dim_px.x) UI_FixedHeight(params->dim_px.y) UI_ChildLayoutAxis(Axis2_X)
{
container_box = ui_build_box_from_key(0, ui_key_zero());
}
//- rjf: build scrollable container
UI_Box *scrollable_container_box = &ui_g_nil_box;
UI_Box *scrollable_container_box = &ui_nil_box;
UI_Parent(container_box) UI_ChildLayoutAxis(Axis2_Y) UI_FixedWidth(params->dim_px.x-ui_scroll_list_scroll_bar_dim_px) UI_FixedHeight(params->dim_px.y)
{
scrollable_container_box = ui_build_box_from_stringf(UI_BoxFlag_Clip|UI_BoxFlag_AllowOverflowY|UI_BoxFlag_Scroll, "###sp");
+16 -16
View File
@@ -381,14 +381,14 @@ ui_scroll_pt_clamp_idx(UI_ScrollPt *v, Rng1S64 range)
internal B32
ui_box_is_nil(UI_Box *box)
{
return box == 0 || box == &ui_g_nil_box;
return box == 0 || box == &ui_nil_box;
}
internal UI_BoxRec
ui_box_rec_df(UI_Box *box, UI_Box *root, U64 sib_member_off, U64 child_member_off)
{
UI_BoxRec result = {0};
result.next = &ui_g_nil_box;
result.next = &ui_nil_box;
if(!ui_box_is_nil(*MemberFromOffset(UI_Box **, box, child_member_off)))
{
result.next = *MemberFromOffset(UI_Box **, box, child_member_off);
@@ -765,7 +765,7 @@ internal UI_Box *
ui_box_from_key(UI_Key key)
{
ProfBeginFunction();
UI_Box *result = &ui_g_nil_box;
UI_Box *result = &ui_nil_box;
if(!ui_key_match(key, ui_key_zero()))
{
U64 slot = key.u64[0] % ui_state->box_table_size;
@@ -791,7 +791,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
//- rjf: reset per-build ui state
{
UI_InitStacks(ui_state);
ui_state->root = &ui_g_nil_box;
ui_state->root = &ui_nil_box;
ui_state->ctx_menu_touched_this_frame = 0;
ui_state->is_animating = 0;
ui_state->clipboard_copy_key = ui_key_zero();
@@ -942,7 +942,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
}
if(last_box == box)
{
ui_box_list_push(scratch.arena, &next_focus_box_candidates, &ui_g_nil_box);
ui_box_list_push(scratch.arena, &next_focus_box_candidates, &ui_nil_box);
break;
}
}
@@ -965,7 +965,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
}
}
UI_Box *last_box = box;
UI_Box *root_descendant = &ui_g_nil_box;
UI_Box *root_descendant = &ui_nil_box;
if(box == nav_root && box == search_start)
{
for(UI_Box *d = box->last; !ui_box_is_nil(d); d = d->last)
@@ -974,7 +974,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
root_descendant = d;
}
}
UI_Box *prev_descendant = &ui_g_nil_box;
UI_Box *prev_descendant = &ui_nil_box;
for(UI_Box *d = box->prev; !ui_box_is_nil(d); d = d->last)
{
moved_in_axis[d->parent->child_layout_axis] += 1;
@@ -995,7 +995,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
}
if(box == last_box)
{
ui_box_list_push(scratch.arena, &next_focus_box_candidates, &ui_g_nil_box);
ui_box_list_push(scratch.arena, &next_focus_box_candidates, &ui_nil_box);
break;
}
}
@@ -1179,7 +1179,7 @@ ui_end_build(void)
if(box->last_touched_build_index < ui_state->build_index ||
ui_key_match(box->key, ui_key_zero()))
{
DLLRemove_NPZ(&ui_g_nil_box, ui_state->box_table[slot_idx].hash_first, ui_state->box_table[slot_idx].hash_last, box, hash_next, hash_prev);
DLLRemove_NPZ(&ui_nil_box, ui_state->box_table[slot_idx].hash_first, ui_state->box_table[slot_idx].hash_last, box, hash_next, hash_prev);
SLLStackPush(ui_state->first_free_box, box);
}
}
@@ -1604,7 +1604,7 @@ ui_calc_sizes_upwards_dependent__in_place_rec(UI_Box *root, Axis2 axis)
case UI_SizeKind_ParentPct:
{
// rjf: find parent that has a fixed size
UI_Box *fixed_parent = &ui_g_nil_box;
UI_Box *fixed_parent = &ui_nil_box;
for(UI_Box *p = root->parent; !ui_box_is_nil(p); p = p->parent)
{
if(p->flags & (UI_BoxFlag_FixedWidth<<axis) ||
@@ -2182,7 +2182,7 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
//- rjf: zero key on duplicate
if(!box_first_frame && box->last_touched_build_index == ui_state->build_index)
{
box = &ui_g_nil_box;
box = &ui_nil_box;
key = ui_key_zero();
box_first_frame = 1;
}
@@ -2208,7 +2208,7 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
//- rjf: zero out per-frame state
{
box->first = box->last = box->next = box->prev = box->parent = &ui_g_nil_box;
box->first = box->last = box->next = box->prev = box->parent = &ui_nil_box;
box->child_count = 0;
box->flags = 0;
box->hover_cursor = OS_Cursor_Pointer;
@@ -2220,13 +2220,13 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
if(box_first_frame && !box_is_transient)
{
U64 slot = key.u64[0] % ui_state->box_table_size;
DLLInsert_NPZ(&ui_g_nil_box, ui_state->box_table[slot].hash_first, ui_state->box_table[slot].hash_last, ui_state->box_table[slot].hash_last, box, hash_next, hash_prev);
DLLInsert_NPZ(&ui_nil_box, ui_state->box_table[slot].hash_first, ui_state->box_table[slot].hash_last, ui_state->box_table[slot].hash_last, box, hash_next, hash_prev);
}
//- rjf: hook into per-frame tree structure
if(!ui_box_is_nil(parent))
{
DLLPushBack_NPZ(&ui_g_nil_box, parent->first, parent->last, box, next, prev);
DLLPushBack_NPZ(&ui_nil_box, parent->first, parent->last, box, next, prev);
parent->child_count += 1;
box->parent = parent;
}
@@ -2337,7 +2337,7 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
internal UI_Key
ui_active_seed_key(void)
{
UI_Box *keyed_ancestor = &ui_g_nil_box;
UI_Box *keyed_ancestor = &ui_nil_box;
{
for(UI_Box *p = ui_top_parent(); !ui_box_is_nil(p); p = p->parent)
{
@@ -2923,7 +2923,7 @@ ui_signal_from_box(UI_Box *box)
//////////////////////////////
//- rjf: get default nav ancestor
//
UI_Box *default_nav_parent = &ui_g_nil_box;
UI_Box *default_nav_parent = &ui_nil_box;
for(UI_Box *p = ui_top_parent(); !ui_box_is_nil(p); p = p->parent)
{
if(p->flags & UI_BoxFlag_DefaultFocusNav)
+8 -8
View File
@@ -753,15 +753,15 @@ internal void ui_scroll_pt_clamp_idx(UI_ScrollPt *v, Rng1S64 range);
////////////////////////////////
//~ rjf: Box Type Functions
read_only global UI_Box ui_g_nil_box =
read_only global UI_Box ui_nil_box =
{
&ui_g_nil_box,
&ui_g_nil_box,
&ui_g_nil_box,
&ui_g_nil_box,
&ui_g_nil_box,
&ui_g_nil_box,
&ui_g_nil_box,
&ui_nil_box,
&ui_nil_box,
&ui_nil_box,
&ui_nil_box,
&ui_nil_box,
&ui_nil_box,
&ui_nil_box,
};
internal B32 ui_box_is_nil(UI_Box *box);
internal UI_BoxRec ui_box_rec_df(UI_Box *box, UI_Box *root, U64 sib_member_off, U64 child_member_off);