// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)

////////////////////////////////
//~ rjf: Embedded Data

@embed_file rd_icon_font_bytes:         "../data/icons.ttf"
@embed_file rd_default_main_font_bytes: "../data/Roboto-Regular.ttf"
@embed_file rd_default_code_font_bytes: "../data/liberation-mono.ttf"
//@embed_file rd_default_code_font_bytes: "../data/Inconsolata-Regular.ttf"
@embed_file rd_icon_file_bytes:         "../data/logo.ico"

////////////////////////////////
//~ rjf: Config Sources

@table(string, name, load_cmd, write_cmd, apply_cmd)
RD_CfgSrcTable:
{
  {"user"            User             OpenUser       WriteUserData       ApplyUserData    }
  {"project"         Project          OpenProject    WriteProjectData    ApplyProjectData }
  {"command_line"    CommandLine      Null           Null                Null             }
  {"transient"       Transient        Null           Null                Null             }
}

@enum RD_CfgSrc:
{
  @expand(RD_CfgSrcTable a) `$(a.name)`,
  COUNT,
}

@data(String8) rd_cfg_src_string_table:
{
  @expand(RD_CfgSrcTable a) `str8_lit_comp("$(a.string)")`,
}

@data(RD_CmdKind) rd_cfg_src_load_cmd_kind_table:
{
  @expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.load_cmd)`,
}

@data(RD_CmdKind) rd_cfg_src_write_cmd_kind_table:
{
  @expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.write_cmd)`,
}

////////////////////////////////
//~ rjf: Vocabulary Maps

@table(code_name     code_name_plural    display_name      display_name_plural    icon_kind)
RD_VocabularyMap:
// NOTE(rjf): the _ character is used as a fastpath for default rules. when
// pluralizing, you just append an `s`, and so on.
{
  {auto_view_rule       _                           "Auto View Rule"            _                     Binoculars                                     }
  {file_path_map        _                           "File Path Map"             _                     FileOutline                                    }
  {watch_pin            _                           "Watch Pin"                 _                     Pin                                            }
  {watch                watches                     "Watch"                     "Watches"             Binoculars                                     }
  {view_rule            _                           "View Rule"                 _                     Binoculars                                     }
  {breakpoint           _                           "Breakpoint"                _                     CircleFilled                                   }
  {condition            _                           "Condition"                 _                     Null                                           }
  {location             _                           "Location"                  _                     Null                                           }
  {target               _                           "Target"                    _                     Target                                         }
  {executable           _                           "Executable"                _                     Module                                         }
  {arguments            arguments                   "Arguments"                 "Arguments"           Null                                           }
  {working_directory    working_directories         "Working Directory"         "Working Directories" FolderClosedFilled                             }
  {entry_point          _                           "Entry Point"               _                     Null                                           }
  {stdout_path          _                           "Standard Output Path"      _                     Null                                           }
  {stderr_path          _                           "Standard Error Path"       _                     Null                                           }
  {stdin_path           _                           "Standard Input Path"       _                     Null                                           }
  {window               _                           "Window"                    _                     Window                                         }
  {panel                _                           "Panel"                     _                     Null                                           }
  {view                 _                           "View"                      _                     Null                                           }
  {tab                  _                           "Tab"                       _                     Null                                           }
  {recent_project       _                           "Recent Project"            _                     Briefcase                                      }
  {recent_file          _                           "Recent File"               _                     FileOutline                                    }
  {src                  _                           "Source"                    _                     Null                                           }
  {dst                  _                           "Destination"               _                     Null                                           }
  {conversion_task      _                           "Conversion Task"           _                     Null                                           }
  {conversion_fail      _                           "Conversion Fail"           _                     Null                                           }
  {lang                 _                           "Language"                  _                     Null                                           }
  {arch                 _                           "Architecture"              _                     Null                                           }
  {expr                 _                           "Expression"                _                     Null                                           }
  {expression           _                           "Expression"                _                     Null                                           }
  {size                 _                           "Size"                      _                     Null                                           }
  {count                _                           "Count"                     _                     Null                                           }
  {bool                 _                           "Boolean"                   _                     Null                                           }
  {w                    _                           "Width"                     _                     Null                                           }
  {h                    _                           "Height"                    _                     Null                                           }
  {fmt                  _                           "Format"                    _                     Null                                           }
  {addresses            addresses                   "Addresses"                 "Addresses"           Null                                           }
  {code_bytes           code_bytes                  "Code Bytes"                "Code Bytes"          Null                                           }
  {vtx                  _                           "Vertex Buffer"             _                     Null                                           }
  {vtx_size             _                           "Vertex Buffer Size"        _                     Null                                           }
  {label                _                           "Label"                     _                     Null                                           }
  {thread               _                           "Thread"                    _                     Thread                                         }
  {process              processes                   "Process"                   "Processes"           Threads                                        }
  {machine              _                           "Machine"                   _                     Machine                                        }
  {module               _                           "Module"                    _                     Module                                         }
}

@struct RD_VocabularyInfo:
{
  `String8 code_name`;
  `String8 code_name_plural`;
  `String8 display_name`;
  `String8 display_name_plural`;
  `RD_IconKind icon_kind`;
}

@data(RD_VocabularyInfo) rd_vocabulary_info_table:
{
  @expand(RD_VocabularyMap a) `{str8_lit_comp("$(a.code_name)"), str8_lit_comp("$(a.code_name_plural == _ -> a.code_name .. 's')$(a.code_name_plural != _ -> a.code_name_plural)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.display_name_plural == _ -> a.display_name .. 's')$(a.display_name_plural != _ -> a.display_name_plural)"), RD_IconKind_$(a.icon_kind)}`;
}

////////////////////////////////
//~ rjf: Schemas

@table(name schema cmd_names) RD_SchemaTable:
{
  //- rjf: settings
  {
    settings,
    ```x:
    {
      @default(1) 'hover_animations':     bool,
      @default(1) 'press_animations':     bool,
      @default(0) 'focus_animations':     bool,
      @default(1) 'tooltip_animations':   bool,
      @default(1) 'menu_animations':      bool,
      @default(1) 'scrolling_animations': bool,
      @default(1) 'background_blur':      bool,
      @default(1) 'thread_lines':         bool,
      @default(1) 'breakpoint_lines':     bool,
      @default(1) 'thread_glow':          bool,
      @default(1) 'breakpoint_glow':      bool,
      @default(0) 'opaque_backgrounds':   bool,
      @default(1) 'smooth_main_text':     bool,
      @default(0) 'smooth_code_text':     bool,
      @default(1) 'hint_main_text':       bool,
      @default(1) 'hint_code_text':       bool,
      @default(2) 'tab_width':      @range[1, 32] u64,
      @can_be_per_window 'main_font_size': @range[6, 72] u64,
      @can_be_per_window 'code_font_size': @range[1, 32] u64,
    }
    ```
  }
  
  //- rjf: targets
  {
    target,
    ```x:
    {
      'label':              code_string,
      'executable':         path,
      'arguments':          string,
      'working_directory':  path,
      'entry_point':        code_string,
      'stdout_path':        path,
      'stderr_path':        path,
      'stdin_path':         path,
      'debug_subprocesses': bool,
    }
    ```,
    `launch_and_run,launch_and_init,select_cfg,remove_cfg`,
  }
  
  //- rjf: breakpoints
  {
    breakpoint,
    ```x:
    {
      'label':         code_string,
      'condition':     code_string,
      'location':      location,
      'hit_count':     u64,
      'disabled':      bool,
    }
    ```,
    `enable_cfg,remove_cfg`,
  }
  
  //- rjf: watch pins
  {
    watch_pin,
    ```x:
    {
      'expression': code_string,
      'view_rule':  code_string,
      'location':   location,
    }
    ```,
    `remove_cfg`,
  }
  
  //- rjf: file path maps
  {
    file_path_map,
    ```x:{'source':path, 'dest':path}```,
    `remove_cfg`,
  }
  
  //- rjf: auto view rules
  {
    auto_view_rule,
    ```x:{'source':code_string, 'dest':code_string}```,
    `remove_cfg`,
  }
  
  //- rjf: machines
  {
    machine,
    ```x:{'frozen':bool, 'label':code_string}```,
  }
  
  //- rjf: processes
  {
    process,
    ```x:{'frozen':bool, 'label':code_string, 'id':u64}```,
  }
  
  //- rjf: modules
  {
    module,
    ```x:{'exe':path, 'dbg':path, 'vaddr_range':vaddr_range}```,
  }
  
  //- rjf: threads
  {
    thread,
    ```x:{'frozen':bool, 'label':code_string, 'id':u64}```,
  }
}

@struct RD_NameSchemaInfo:
{
  `String8 name`;
  `String8 schema`;
  `String8 cmd_names`;
}

@data(RD_NameSchemaInfo) rd_name_schema_info_table:
{
  @expand(RD_SchemaTable a) `{str8_lit_comp("$(a.name)"), str8_lit_comp("$(a.schema)"), str8_lit_comp("$(a.cmd_names)")}`
}

////////////////////////////////
//~ rjf: Entity Kind Tables

@table(name          name_lower            name_lower_plural             op_delete  op_freeze  op_edit  op_rename  op_enable  op_cond  op_dup  name_is_code  name_is_path  user_lifetime  is_serialized  name_label   icon_kind  display_string)
//                                                                       |                                                                                                                                                                     |
//                                                                       |                                _____________________________________________________________________________________________________________________________________/
//                                                                       |                               /
//                                                                        operations________  names lt sz
//                                                                       /..................\ /...\ |  |
//                                                                       dl fz ed rn en cn dp nc np ul iz
RD_EntityKindTable:
{
  {Nil                nil                   nils                          0  0  0  0  0  0  0  0  0  0  0                      "Label"             Null                   "Nil"                        }
  {Root               root                  roots                         0  0  0  0  0  0  0  0  0  0  0                      "Label"             Null                   "Root"                       }
  
  //- rjf: auto view rules
  {AutoViewRule       auto_view_rule        auto_view_rules               1  0  0  0  0  0  0  0  0  1  1                      "Label"             Binoculars             "Auto View Rule"             }
  
  //- rjf: file path maps
  {FilePathMap        file_path_map         file_path_maps                1  0  0  0  0  0  0  0  0  0  1                      "Label"             FileOutline            "File Path Map"              }
  
  //- rjf: watch pins
  {WatchPin           watch_pin             watch_pins                    1  0  0  1  0  0  1  1  0  1  1                      "Expression"        Pin                    "Watch Pin"                  }
  
  //- rjf: watches
  {Watch              watch                 watches                       1  0  0  1  1  0  1  1  0  1  1                      "Expression"        Binoculars             "Watch"                      }
  {ViewRule           view_rule             view_rules                    1  0  0  1  1  0  1  1  0  1  0                      "Expression"        Binoculars             "View Rule"                  }
  
  //- rjf: breakpoints
  {Breakpoint         breakpoint            breakpoints                   1  0  0  1  1  1  1  1  0  1  1                      "Label"             CircleFilled           "Breakpoint"                 }
  {Condition          condition             conditions                    0  0  0  0  0  0  0  1  0  1  0                      "Expression"        CircleFilled           "Condition"                  }
  
  //- rjf: user-controlled locations (source, addresses, symbol names)
  {Location           location              locations                     0  0  0  0  0  0  0  1  1  1  0                      "Location"          Null                   "Location"                   }
  
  //- rjf: targets
  {Target             target                targets                       1  0  1  1  1  0  1  0  0  1  1                      "Label"             Target                 "Target"                     }
  {Executable         executable            executables                   0  0  0  0  0  0  0  0  1  1  0                      "Executable"        Null                   "Executable"                 }
  {Arguments          arguments             argumentses                   0  0  0  0  0  0  0  0  0  1  0                      "Arguments"         Null                   "Arguments"                  }
  {WorkingDirectory   working_directory     working_directories           0  0  0  0  0  0  0  0  1  1  0                      "Path"              Null                   "Working Directory"          }
  {EntryPoint         entry_point           entry_points                  0  0  0  0  0  0  0  0  0  1  0                      "Symbol Name"       Null                   "Entry Point"                }
  {StdoutPath         stdout_path           stdout_paths                  0  0  0  0  0  0  0  0  1  1  0                      "Path"              Null                   "Standard Output Path"       }
  {StderrPath         stderr_path           stderr_paths                  0  0  0  0  0  0  0  0  1  1  0                      "Path"              Null                   "Standard Error Path"        }
  {StdinPath          stdin_path            stdin_paths                   0  0  0  0  0  0  0  0  1  1  0                      "Path"              Null                   "Standard Input Path"        }
  
  //- rjf: frontend containers (windows, panels, views)
  {Window             window                windows                       1  0  0  0  0  0  1  0  0  1  1                      "Label"             Window                 "Window"                     }
  {Panel              panel                 panels                        1  0  0  0  0  0  1  0  0  1  1                      "Label"             XSplit                 "Panel"                      }
  {View               view                  views                         1  0  0  0  0  0  1  0  0  1  1                      "Label"             Null                   "View"                       }
  
  //- rjf: recent projects
  {RecentProject      recent_project        recent_projects               0  0  0  0  0  0  0  0  1  0  1                      "Path"              Briefcase              "Recent Project"             }
  
  //- rjf: recent files
  {RecentFile         recent_file           recent_files                  0  0  0  0  0  0  0  0  1  0  1                      "Path"              FileOutline            "Recent File"                }
  
  //- rjf: src -> dst mapping
  {Source             source                sources                       0  0  0  0  0  0  0  0  0  0  0                      "Path"              Null                   "Source"                     }
  {Dest               dest                  dests                         0  0  0  0  0  0  0  0  0  0  0                      "Path"              Null                   "Destination"                }
  
  //- rjf: parser task entities
  {ConversionTask     conversion_task       conversion_tasks              0  0  0  1  0  0  0  0  0  0  0                      "Label"             Null                   "Conversion Task"            }
  {ConversionFail     conversion_fail       conversion_fails              0  0  0  1  0  0  0  0  0  0  0                      "Label"             Null                   "Conversion Failure"         }
}

@enum RD_EntityKind:
{
  @expand(RD_EntityKindTable a) `$(a.name)`,
  COUNT,
}

@data(String8) d_entity_kind_display_string_table:
{
  @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.display_string)")`,
}

@data(String8) d_entity_kind_name_lower_table:
{
  @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.name_lower)")`,
}

@data(String8) d_entity_kind_name_lower_plural_table:
{
  @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.name_lower_plural)")`,
}

@data(String8) d_entity_kind_name_label_table:
{
  @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.name_label)")`,
}

@data(RD_EntityKindFlags) rd_entity_kind_flags_table:
{
  @expand(RD_EntityKindTable a) `($(a.op_delete)*RD_EntityKindFlag_CanDelete) | ($(a.op_freeze)*RD_EntityKindFlag_CanFreeze) | ($(a.op_edit)*RD_EntityKindFlag_CanEdit) | ($(a.op_rename)*RD_EntityKindFlag_CanRename) | ($(a.op_enable)*RD_EntityKindFlag_CanEnable) | ($(a.op_cond)*RD_EntityKindFlag_CanCondition) | ($(a.op_dup)*RD_EntityKindFlag_CanDuplicate) | ($(a.name_is_code)*RD_EntityKindFlag_NameIsCode) | ($(a.name_is_path)*RD_EntityKindFlag_NameIsPath) | ($(a.user_lifetime)*RD_EntityKindFlag_UserDefinedLifetime) | ($(a.is_serialized)*RD_EntityKindFlag_IsSerializedToConfig)`,
}

////////////////////////////////
//~ rjf: Registers Type Table

@table(c_type  name_lower  name)
RD_RegTable:
{
  // rjf: entity slots
  {CTRL_Handle       machine          Machine       }
  {CTRL_Handle       module           Module        }
  {CTRL_Handle       process          Process       }
  {CTRL_Handle       thread           Thread        }
  {CTRL_Handle       ctrl_entity      CtrlEntity    }
  {RD_Handle         window           Window        }
  {RD_Handle         panel            Panel         }
  {RD_Handle         view             View          }
  {RD_Handle         prev_view        PrevView      }
  {RD_Handle         dst_panel        DstPanel      }
  {RD_Handle         cfg              Cfg           }
  {RD_HandleList     cfg_list         CfgList       }
  {RD_Handle         entity           Entity        }
  {RD_HandleList     entity_list      EntityList    }
  
  // rjf: frame selection
  {U64              unwind_count     UnwindCount   }
  {U64              inline_depth     InlineDepth   }
  
  // rjf: code / address location info
  {String8          file_path        FilePath      }
  {TxtPt            cursor           Cursor        }
  {TxtPt            mark             Mark          }
  {U128             text_key         TextKey       }
  {TXT_LangKind     lang_kind        LangKind      }
  {D_LineList       lines            Lines         }
  {DI_Key           dbgi_key         DbgiKey       }
  {U64              vaddr            Vaddr         }
  {U64              voff             Voff          }
  {Rng1U64          vaddr_range      VaddrRange    }
  {Rng1U64          voff_range       VoffRange     }
  
  // rjf: ui context
  {UI_Key           ui_key           UIKey         }
  {Vec2F32          off_px           OffPx         }
  {RD_ListerFlags   lister_flags     ListerFlags   }
  {RD_RegSlot       reg_slot         RegSlot       }
  
  // rjf: general parameters
  {U32              pid              PID           }
  {B32              force_confirm    ForceConfirm  }
  {B32              prefer_disasm    PreferDisasm  }
  {Dir2             dir2             Dir2          }
  {String8          string           String        }
  {String8          cmd_name         CmdName       }
  {`MD_Node *`      params_tree      ParamsTree    }
  {`OS_Event *`     os_event         OSEvent       }
}

@enum RD_RegSlot:
{
  Null,
  @expand(RD_RegTable a) `$(a.name)`,
  COUNT,
}

@struct RD_Regs:
{
  @expand(RD_RegTable a) `$(a.c_type) $(a.name_lower)`
}

@data(Rng1U64) rd_reg_slot_range_table:
{
  `{0}`,
  @expand(RD_RegTable a) `{OffsetOf(RD_Regs, $(a.name_lower)), OffsetOf(RD_Regs, $(a.name_lower)) + sizeof($(a.c_type))}`
}

@gen
{
  `#define rd_regs_lit_init_top \\`
  @expand(RD_RegTable a) `.$(a.name_lower) = rd_regs()->$(a.name_lower),\\`
    ``;
}

////////////////////////////////
//~ rjf: Command Table

@table(name                      ui_vis   ipc_docs_vis   q_slot       q_view  q_ent_kind  q_ctrl_ent_kind  q_allow_files q_allow_folders  q_keep_oi   q_select_oi  q_is_code  q_required                    canonical_icon        string                        display_name                                  desc                                                                                                               search_tags                      ctx_filter)
//    /                          |        |              |             \___                                                       _____________________________________________________/                    |                     |                             |                                             |                                                                                                                  |                                |
//   /                           |        |              |                 \                                                     /                                                                          |                     |                             |                                             |                                                                                                                  |                                |
RD_CmdTable:    //               |        |              |                  |                                                   |                                                                           |                     |                             |                                             |                                                                                                                  |                                |
{
  //- rjf: exiting
  {Exit                           1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           X                     "exit"                        "Exit"                                        "Exits the debugger."                                                                                              "quit,close,abort"               ""                                                               }
  
  //- rjf: top-level lister
  {OpenLister                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "open_lister"                 "Open Lister"                                 "Opens the lister."                                                                                                "help,cmd"                       ""                                                               }
  
  //- rjf: command runner
  {RunCommand                     1        1              CmdName            commands          Nil                     Null       0  0  0  0  0  1                                                           Null                  "run_command"                 "Run Command"                                 "Runs a command from the command palette."                                                                         "help,cmd"                       ""                                                               }
  
  //- rjf: os event passthrough
  {OSEvent                        0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "os_event"                    "OS Event"                                    ""                                                                                                                 ""                               ""                                                               }
  
  //- rjf: thread/frame selection
  {SelectThread                   1        1              Thread             null              Nil                     Thread     0  0  0  0  0  1                                                           Null                  "select_thread"               "Select Thread"                               "Selects a thread."                                                                                                ""                               ""                                                               }
  {SelectUnwind                   0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "select_unwind"               "Select Unwind"                               "Selects an unwind frame number for the selected thread."                                                          ""                               ""                                                               }
  {UpOneFrame                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           UpArrow               "up_one_frame"                "Up One Frame"                                "Selects the call stack frame above the currently selected."                                                       ""                               ""                                                               }
  {DownOneFrame                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           DownArrow             "down_one_frame"              "Down One Frame"                              "Selects the call stack frame below the currently selected."                                                       "callstack,unwind"               ""                                                               }
  
  //- rjf: font sizes
  {IncUIFontScale                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "inc_ui_font_scale"           "Increase UI Font Scale"                      "Increases the font size used for UI."                                                                             ""                               ""                                                               }
  {DecUIFontScale                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "dec_ui_font_scale"           "Decrease UI Font Scale"                      "Decreases the font size used for UI."                                                                             ""                               ""                                                               }
  {IncCodeFontScale               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "inc_code_font_scale"         "Increase Code Font Scale"                    "Increases the font size used for code."                                                                           ""                               ""                                                               }
  {DecCodeFontScale               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "dec_code_font_scale"         "Decrease Code Font Scale"                    "Decreases the font size used for code."                                                                           ""                               ""                                                               }
  
  //- rjf: windows
  {OpenWindow                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Window                "open_window"                 "Open New Window"                             "Opens a new window."                                                                                              ""                               ""                                                               }
  {CloseWindow                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Window                "close_window"                "Close Window"                                "Closes an opened window."                                                                                         ""                               ""                                                               }
  {ToggleFullscreen               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Window                "toggle_fullscreen"           "Toggle Fullscreen"                           "Toggles fullscreen view on the active window."                                                                    ""                               ""                                                               }
  {BringToFront                   0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Window                "bring_to_front"              "Bring To Front"                              "Brings all windows to the front, and focuses the most recently focused window."                                   "top"                            ""                                                               }
  
  //- rjf: popups
  {PopupAccept                    0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "popup_accept"                "Popup Accept"                                "Accepts the active popup prompt."                                                                                 ""                               ""                                                               }
  {PopupCancel                    0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "popup_cancel"                "Popup Cancel"                                "Cancels the active popup prompt."                                                                                 ""                               ""                                                               }
  
  //- rjf: panel splitting
  {ResetToDefaultPanels           1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Window                "reset_to_default_panels"     "Reset To Default Panel Layout"               "Resets the window to the default panel layout."                                                                   "panel"                          ""                                                               }
  {ResetToCompactPanels           1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Window                "reset_to_compact_panels"     "Reset To Compact Panel Layout"               "Resets the window to the compact panel layout."                                                                   "panel"                          ""                                                               }
  {NewPanelLeft                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           XSplit                "new_panel_left"              "Split Panel Left"                            "Creates a new panel to the left of the active panel."                                                             "panel"                          ""                                                               }
  {NewPanelUp                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           YSplit                "new_panel_up"                "Split Panel Up"                              "Creates a new panel at the top of the active panel."                                                              "panel"                          ""                                                               }
  {NewPanelRight                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           XSplit                "new_panel_right"             "Split Panel Right"                           "Creates a new panel to the right of the active panel."                                                            "panel"                          ""                                                               }
  {NewPanelDown                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           YSplit                "new_panel_down"              "Split Panel Down"                            "Creates a new panel at the bottom of the active panel."                                                           "panel"                          ""                                                               }
  {SplitPanel                     0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "split_panel"                 "Split Panel"                                 "Creates a new panel in a given direction, and moves a tab to it, if specified."                                   ""                               ""                                                               }
  
  //- rjf: panel rotation
  {RotatePanelColumns             1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "rotate_panel_columns"        "Rotate Panel Columns"                        "Rotates all panels at the closest column level of the panel hierarchy."                                           ""                               ""                                                               }
  
  //- rjf: focused panel changing
  {NextPanel                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           RightArrow            "next_panel"                  "Focus Next Panel"                            "Cycles the active panel forward."                                                                                 ""                               ""                                                               }
  {PrevPanel                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           LeftArrow             "prev_panel"                  "Focus Previous Panel"                        "Cycles the active panel backwards."                                                                               ""                               ""                                                               }
  {FocusPanel                     0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "focus_panel"                 "Focus Panel"                                 "Focuses a new panel."                                                                                             ""                               ""                                                               }
  {FocusPanelRight                1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           RightArrow            "focus_panel_right"           "Focus Panel Right"                           "Focuses a panel rightward of the currently focused panel."                                                        ""                               ""                                                               }
  {FocusPanelLeft                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           LeftArrow             "focus_panel_left"            "Focus Panel Left"                            "Focuses a panel leftward of the currently focused panel."                                                         ""                               ""                                                               }
  {FocusPanelUp                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           UpArrow               "focus_panel_up"              "Focus Panel Up"                              "Focuses a panel upward of the currently focused panel."                                                           ""                               ""                                                               }
  {FocusPanelDown                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           DownArrow             "focus_panel_down"            "Focus Panel Down"                            "Focuses a panel downward of the currently focused panel."                                                         ""                               ""                                                               }
  
  //- rjf: undo/redo
  {Undo                           0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Undo                  "undo"                        "Undo"                                        "Undoes the previous action."                                                                                      ""                               ""                                                               }
  {Redo                           0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Redo                  "redo"                        "Redo"                                        "Redoes the first previously undone action."                                                                       ""                               ""                                                               }
  
  //- rjf: focus history
  {GoBack                         0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           LeftArrow             "go_back"                     "Go Back"                                     "Returns to the previously selected panel and tab in recorded history."                                            ""                               ""                                                               }
  {GoForward                      0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           RightArrow            "go_forward"                  "Go Forward"                                  "Returns to the next selected panel and tab in recorded history."                                                  ""                               ""                                                               }
  
  //- rjf: panel removal
  {ClosePanel                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           ClosePanel            "close_panel"                 "Close Panel"                                 "Closes the currently active panel."                                                                               ""                               ""                                                               }
  
  //- rjf: panel tab
  {FocusTab                       0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "focus_tab"                   "Focus Tab"                                   "Focuses the passed tab within its containing panel."                                                              ""                               ""                                                               }
  {NextTab                        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           RightArrow            "next_tab"                    "Focus Next Tab"                              "Focuses the next tab on the active panel."                                                                        ""                               ""                                                               }
  {PrevTab                        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           LeftArrow             "prev_tab"                    "Focus Previous Tab"                          "Focuses the previous tab on the active panel."                                                                    ""                               ""                                                               }
  {MoveTabRight                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           RightArrow            "move_tab_right"              "Move Tab Right"                              "Moves the selected tab right one slot."                                                                           ""                               "$tab,"                                                          }
  {MoveTabLeft                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           LeftArrow             "move_tab_left"               "Move Tab Left"                               "Moves the selected tab left one slot."                                                                            ""                               "$tab,"                                                          }
  {OpenTab                        0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "open_tab"                    "Open Tab"                                    "Opens a new tab with the parameterized view specification."                                                       ""                               ""                                                               }
  {CloseTab                       1        1              View               null              Nil                     Null       0  0  0  0  0  0                                                           X                     "close_tab"                   "Close Tab"                                   "Closes the currently opened tab."                                                                                 ""                               "$tab,"                                                          }
  {MoveTab                        0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_tab"                    "Move Tab"                                    "Moves a tab to a new panel."                                                                                      ""                               ""                                                               }
  {TabBarTop                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           UpArrow               "tab_bar_top"                 "Anchor Tab Bar To Top"                       "Anchors a panel's tab bar to the top of the panel."                                                               ""                               "$tab,"                                                          }
  {TabBarBottom                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           DownArrow             "tab_bar_bottom"              "Anchor Tab Bar To Bottom"                    "Anchors a panel's tab bar to the bottom of the panel."                                                            ""                               "$tab,"                                                          }
  
  //- rjf: files
  {SetCurrentPath                 0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           FileOutline           "set_current_path"            "Set Current Path"                            "Sets the debugger's current path, which is used as a starting point when browsing for files."                     ""                               ""                                                               }
  {Open                           1        1              FilePath           null              Nil                     Null       1  0  0  0  0  1                                                           FileOutline           "open"                        "Open"                                        "Opens a file."                                                                                                    "code,source,file"               ""                                                               }
  {Switch                         1        1              Entity             null              RecentFile              Null       0  0  0  0  0  1                                                           FileOutline           "switch"                      "Switch"                                      "Switches to a recent file."                                                                                       "code,source,file"               ""                                                               }
  {SwitchToPartnerFile            1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           FileOutline           "switch_to_partner_file"      "Switch To Partner File"                      "Switches to the focused file's partner; or from header to implementation or vice versa."                          "code,source,file"               ""                                                               }
  {RecordFileInProject            0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           FileOutline           "record_file_in_project"      "Record File In Project"                      "Records the passed file path as a recent file in the currently loaded project."                                   ""                               ""                                                               }
  {ShowFileInExplorer             0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           FileOutline           "show_file_in_explorer"       "Show File In Explorer"                       "Opens the operating system's file explorer and shows the selected file."                                          ""                               "$file,"                                                         }
  
  //- rjf: source <-> disasm
  {GoToDisassembly                1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Glasses               "go_to_disassembly"           "Go To Disassembly"                           "Goes to the disassembly, if any, for a given source code line."                                                   "code,source,disassembly,disasm" "$text_pt,"                                                      }
  {GoToSource                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           FileOutline           "go_to_source"                "Go To Source"                                "Goes to the source code, if any, for a given disassembly line."                                                   "code,source,disassembly,disasm" ""                                                               }
  
  //- rjf: override file links
  {SetFileReplacementPath         0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "set_file_replacement_path"   "Set File Replacement Path"                   "Sets the path which should be used as the replacement for the passed file."                                       ""                               ""                                                               }
  
  //- rjf: setting config paths
  {OpenUser                       1        1              FilePath           null              Nil                     Null       1  0  0  0  0  1                                                           Person                "open_user"                   "Open User"                                   "Opens a user file path, immediately loading it, and begins autosaving to it."                                     "load,user,project,layout"       ""                                                               }
  {OpenProject                    1        1              FilePath           null              Nil                     Null       1  0  0  0  0  1                                                           Briefcase             "open_project"                "Open Project"                                "Opens a project file path, immediately loading it, and begins autosaving to it."                                  "project,project,session"        ""                                                               }
  {OpenRecentProject              1        1              Entity             null              RecentProject           Null       0  0  0  0  0  1                                                           Briefcase             "open_recent_project"         "Open Recent Project"                         "Opens a recently used project file."                                                                              "project,project,session"        ""                                                               }
  
  //- rjf: writing config changes
  {WriteUserData                  0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "write_user_data"             "Write User Data"                             "Writes user data to the active user file."                                                                        ""                               ""                                                               }
  {WriteProjectData               0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "write_project_data"          "Write Project Data"                          "Writes project data to the active project file."                                                                  ""                               ""                                                               }
  
  //- rjf: meta controls
  {Edit                           1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Pencil                "edit"                        "Edit"                                        "Edits the current selection."                                                                                     ""                               ""                                                               }
  {Accept                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           CheckFilled           "accept"                      "Accept"                                      "Accepts current changes, or answers prompts in the affirmative."                                                  ""                               ""                                                               }
  {Cancel                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           X                     "cancel"                      "Cancel"                                      "Rejects current changes, exits temporary menus, or answers prompts in the negative."                              ""                               ""                                                               }
  
  //- rjf: directional movement & text controls
  {MoveLeft                       1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_left"                   "Move Left"                                   "Moves the cursor or selection left."                                                                              ""                               ""                                                               }
  {MoveRight                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_right"                  "Move Right"                                  "Moves the cursor or selection right."                                                                             ""                               ""                                                               }
  {MoveUp                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up"                     "Move Up"                                     "Moves the cursor or selection up."                                                                                ""                               ""                                                               }
  {MoveDown                       1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down"                   "Move Down"                                   "Moves the cursor or selection down."                                                                              ""                               ""                                                               }
  {MoveLeftSelect                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_left_select"            "Move Left Select"                            "Moves the cursor or selection left, while selecting."                                                             ""                               ""                                                               }
  {MoveRightSelect                1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_right_select"           "Move Right Select"                           "Moves the cursor or selection right, while selecting."                                                            ""                               ""                                                               }
  {MoveUpSelect                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_select"              "Move Up Select"                              "Moves the cursor or selection up, while selecting."                                                               ""                               ""                                                               }
  {MoveDownSelect                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_select"            "Move Down Select"                            "Moves the cursor or selection down, while selecting."                                                             ""                               ""                                                               }
  {MoveLeftChunk                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_left_chunk"             "Move Left Chunk"                             "Moves the cursor or selection left one chunk."                                                                    ""                               ""                                                               }
  {MoveRightChunk                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_right_chunk"            "Move Right Chunk"                            "Moves the cursor or selection right one chunk."                                                                   ""                               ""                                                               }
  {MoveUpChunk                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_chunk"               "Move Up Chunk"                               "Moves the cursor or selection up one chunk."                                                                      ""                               ""                                                               }
  {MoveDownChunk                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_chunk"             "Move Down Chunk"                             "Moves the cursor or selection down one chunk."                                                                    ""                               ""                                                               }
  {MoveUpPage                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_page"                "Move Up Page"                                "Moves the cursor or selection up one page."                                                                       ""                               ""                                                               }
  {MoveDownPage                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_page"              "Move Down Page"                              "Moves the cursor or selection down one page."                                                                     ""                               ""                                                               }
  {MoveUpWhole                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_whole"               "Move Up Whole"                               "Moves the cursor or selection to the beginning of the relevant content."                                          ""                               ""                                                               }
  {MoveDownWhole                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_whole"             "Move Down Whole"                             "Moves the cursor or selection to the end of the relevant content."                                                ""                               ""                                                               }
  {MoveLeftChunkSelect            1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_left_chunk_select"      "Move Left Chunk Select"                      "Moves the cursor or selection left one chunk."                                                                    ""                               ""                                                               }
  {MoveRightChunkSelect           1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_right_chunk_select"     "Move Right Chunk Select"                     "Moves the cursor or selection right one chunk."                                                                   ""                               ""                                                               }
  {MoveUpChunkSelect              1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_chunk_select"        "Move Up Chunk Select"                        "Moves the cursor or selection up one chunk."                                                                      ""                               ""                                                               }
  {MoveDownChunkSelect            1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_chunk_select"      "Move Down Chunk Select"                      "Moves the cursor or selection down one chunk."                                                                    ""                               ""                                                               }
  {MoveUpPageSelect               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_page_select"         "Move Up Page Select"                         "Moves the cursor or selection up one page, while selecting."                                                      ""                               ""                                                               }
  {MoveDownPageSelect             1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_page_select"       "Move Down Page Select"                       "Moves the cursor or selection down one page, while selecting."                                                    ""                               ""                                                               }
  {MoveUpWholeSelect              1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_whole_select"        "Move Up Whole Select"                        "Moves the cursor or selection to the beginning of the relevant content, while selecting."                         ""                               ""                                                               }
  {MoveDownWholeSelect            1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_whole_select"      "Move Down Whole Select"                      "Moves the cursor or selection to the end of the relevant content, while selecting."                               ""                               ""                                                               }
  {MoveUpReorder                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_up_reorder"             "Move Up Reorder"                             "Moves the cursor or selection up, while swapping the currently selected element with that upward."                ""                               ""                                                               }
  {MoveDownReorder                1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_down_reorder"           "Move Down Reorder"                           "Moves the cursor or selection down, while swapping the currently selected element with that downward."            ""                               ""                                                               }
  {MoveHome                       1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_home"                   "Move Home"                                   "Moves the cursor to the beginning of the line."                                                                   ""                               ""                                                               }
  {MoveEnd                        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_end"                    "Move End"                                    "Moves the cursor to the end of the line."                                                                         ""                               ""                                                               }
  {MoveHomeSelect                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_home_select"            "Move Home Select"                            "Moves the cursor to the beginning of the line, while selecting."                                                  ""                               ""                                                               }
  {MoveEndSelect                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "move_end_select"             "Move End Select"                             "Moves the cursor to the end of the line, while selecting."                                                        ""                               ""                                                               }
  {SelectAll                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "select_all"                  "Select All"                                  "Selects everything possible."                                                                                     ""                               ""                                                               }
  {DeleteSingle                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "delete_single"               "Delete Single"                               "Deletes a single element to the right of the cursor, or the active selection."                                    ""                               ""                                                               }
  {DeleteChunk                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "delete_chunk"                "Delete Chunk"                                "Deletes a chunk to the right of the cursor, or the active selection."                                             ""                               ""                                                               }
  {BackspaceSingle                1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "backspace_single"            "Backspace Single"                            "Deletes a single element to the left of the cursor, or the active selection."                                     ""                               ""                                                               }
  {BackspaceChunk                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "backspace_chunk"             "Backspace Chunk"                             "Deletes a chunk to the left of the cursor, or the active selection."                                              ""                               ""                                                               }
  {Copy                           1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Clipboard             "copy"                        "Copy"                                        "Copies the active selection to the clipboard."                                                                    ""                               "$text_rng,"                                                     }
  {Cut                            1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Clipboard             "cut"                         "Cut"                                         "Copies the active selection to the clipboard, then deletes it."                                                   ""                               ""                                                               }
  {Paste                          1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Clipboard             "paste"                       "Paste"                                       "Pastes the current contents of the clipboard."                                                                    ""                               ""                                                               }
  {InsertText                     0        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "insert_text"                 "Insert Text"                                 "Inserts the text that was used to cause this command."                                                            ""                               ""                                                               }
  
  //- rjf: code navigation
  {GoToLine                       1        1              Cursor             null              Nil                     Null       0  0  0  0  1  1                                                           Null                  "goto_line"                   "Go To Line"                                  "Jumps to a line number in the current code file."                                                                 ""                               ""                                                               }
  {GoToAddress                    1        1              Vaddr              null              Nil                     Null       0  0  0  0  1  1                                                           Null                  "goto_address"                "Go To Address"                               "Jumps to an address in the current memory or disassembly view."                                                   ""                               ""                                                               }
  {CenterCursor                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "center_cursor"               "Center Cursor"                               "Snaps the current code view to center the cursor."                                                                ""                               ""                                                               }
  {ContainCursor                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "contain_cursor"              "Contain Cursor"                              "Snaps the current code view to contain the cursor."                                                               ""                               ""                                                               }
  {FindTextForward                1        1              String             null              Nil                     Null       0  0  1  1  1  1                                                           Find                  "find_text_forward"           "Find Text (Forward)"                         "Searches the current code file forward (from the cursor) for a string."                                           ""                               ""                                                               }
  {FindTextBackward               1        1              String             null              Nil                     Null       0  0  1  1  1  1                                                           Find                  "find_text_backward"          "Find Text (Backwards)"                       "Searches the current code file backwards (from the cursor) for a string."                                         ""                               ""                                                               }
  {FindNext                       1        1              Null               null              Nil                     Null       0  0  1  0  0  0                                                           Find                  "find_next"                   "Find Next"                                   "Searches the current code file forward (from the cursor) for the last searched string."                           ""                               ""                                                               }
  {FindPrev                       1        1              Null               null              Nil                     Null       0  0  1  0  0  0                                                           Find                  "find_prev"                   "Find Previous"                               "Searches the current code file backwards (from the cursor) for the last searched string."                         ""                               ""                                                               }
  
  //- rjf: thread finding
  {FindThread                     1        1              Thread             null              Nil                     Thread     0  0  0  0  0  1                                                           Find                  "find_thread"                 "Find Thread"                                 "Jumps to the passed thread in either source code, disassembly, or both if they're already open."                  ""                               ""                                                               }
  {FindSelectedThread             1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Find                  "find_selected_thread"        "Find Selected Thread"                        "Jumps to the selected thread in either source code, disassembly, or both if they're already open."                ""                               ""                                                               }
  
  //- rjf: name finding
  {GoToName                       1        1              String             symbol_lister     Nil                     Null       0  0  0  0  1  1                                                           Null                  "goto_name"                   "Go To Name"                                  "Searches for the passed string as a file, a symbol in debug info, and more, then jumps to it if possible."        ""                               "$text_pt,"                                                      }
  {GoToNameAtCursor               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "goto_name_at_cursor"         "Go To Name At Cursor"                        "Searches for the text at the cursor as a file, a symbol in debug info, and more, then jumps to it if possible."   ""                               ""                                                               }
  
  //- rjf: watch expressions
  {ToggleWatchExpression          1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "toggle_watch_expr"           "Toggle Watch Expression"                     "Adds or removes an expression to an opened watch view."                                                           ""                               "$text_pt,"                                                      }
  {ToggleWatchExpressionAtCursor  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "toggle_watch_expr_at_cursor" "Toggle Watch Expression At Cursor"           "Adds or removes the expression that the cursor or selection is currently over to an opened watch view."           ""                               ""                                                               }
  {ToggleWatchExpressionAtMouse   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "toggle_watch_expr_at_mouse"  "Toggle Watch Expression At Mouse"            "Adds or removes the expression that the mouse is currently over to an opened watch view."                         ""                               ""                                                               }
  
  //- rjf: memory view parameterization
  {SetColumns                     1        1              Null               null              Nil                     Null       0  0  0  0  1  1                                                           Thumbnails            "set_columns"                 "Set Columns"                                 "Sets the number of columns for a memory view."                                                                    ""                               ""                                                               }
  
  //- rjf: disassembly view parameterization
  {ToggleAddressVisibility        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Thumbnails            "toggle_address_visibility"   "Toggle Address Visibility"                   "Toggles the visibility of addresses in a disassembly view."                                                       ""                               "$disasm,"                                                       }
  {ToggleCodeBytesVisibility      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Thumbnails            "toggle_code_bytes_visibility""Toggle Code Bytes Visibility"                "Toggles the visibility of machine code bytes in a disassembly view."                                              ""                               "$disasm,"                                                       }
  
  //- rjf: general config operations
  {EnableCfg                      0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "enable_cfg"                  "Enable Config Tree"                          "Enables an entity."                                                                                               ""                               ""                                                               }
  {DisableCfg                     0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "disable_cfg"                 "Disable Config Tree"                         "Disables an entity."                                                                                              ""                               ""                                                               }
  {SelectCfg                      0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           CheckHollow           "select_cfg"                  "Select Config Tree"                          "Selects an entity, disabling all others of the same kind."                                                        ""                               ""                                                               }
  {RemoveCfg                      0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Trash                 "remove_cfg"                  "Remove Config Tree"                          "Removes an entity."                                                                                               ""                               ""                                                               }
  {NameCfg                        0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "name_cfg"                    "Name Config Tree"                            "Equips an entity with a name."                                                                                    ""                               ""                                                               }
  {ConditionCfg                   0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "condition_cfg"               "Condition Config Tree"                       "Equips an entity with a condition string."                                                                        ""                               ""                                                               }
  {DuplicateCfg                   0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "duplicate_cfg"               "Duplicate Config Tree"                       "Duplicates an entity."                                                                                            ""                               ""                                                               }
  {RelocateCfg                    0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "relocate_cfg"                "Relocate Config Tree"                        "Relocates an entity."                                                                                             ""                               ""                                                               }
  
  //- rjf: breakpoints
  {AddBreakpoint                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           CircleFilled          "add_breakpoint"              "Add Breakpoint"                              "Places a breakpoint at a given location (file path and line number, address, or symbol name)."                    ""                               ""                                                               }
  {AddAddressBreakpoint           1        0              Vaddr              null              Nil                     Null       0  0  0  0  1  1                                                           CircleFilled          "add_address_breakpoint"      "Add Address Breakpoint"                      "Places a breakpoint on the specified address."                                                                    ""                               "$breakpoints,"                                                  }
  {AddFunctionBreakpoint          1        0              String             symbol_lister     Nil                     Null       0  0  0  0  1  1                                                           CircleFilled          "add_function_breakpoint"     "Add Function Breakpoint"                     "Places a breakpoint on the first address(es) of the specified function."                                          ""                               "$breakpoints,"                                                  }
  {ToggleBreakpoint               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           CircleFilled          "toggle_breakpoint"           "Toggle Breakpoint"                           "Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)."         ""                               "$text_pt,"                                                      }
  {EnableBreakpoint               1        1              Entity             null              Breakpoint              Null       0  0  0  0  0  1                                                           CheckFilled           "enable_breakpoint"           "Enable Breakpoint"                           "Enables a breakpoint."                                                                                            ""                               ""                                                               }
  {DisableBreakpoint              1        1              Entity             null              Breakpoint              Null       0  0  0  0  0  1                                                           CheckHollow           "disable_breakpoint"          "Disable Breakpoint"                          "Disables a breakpoint."                                                                                           ""                               ""                                                               }
  
  //- rjf: watch pins
  {AddWatchPin                    1        1              String             null              Nil                     Null       0  0  0  0  1  1                                                           Pin                   "add_watch_pin"               "Add Watch Pin"                               "Places a watch pin at a given location (file path and line number or address)."                                   ""                               "$watch_pins,"                                                   }
  {ToggleWatchPin                 1        0              String             null              Nil                     Null       0  0  0  0  1  1                                                           Binoculars            "toggle_watch_pin"            "Toggle Watch Pin"                            "Places or removes a watch pin at a given location (file path and line number or address)."                        ""                               ""                                                               }
  
  //- rjf: line operations
  {SetNextStatement               1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           RightArrow            "set_next_statement"          "Set Next Statement"                          "Sets the selected thread's instruction pointer to the cursor's position."                                         ""                               "$text_pt,"                                                      }
  
  //- rjf: targets
  {AddTarget                      1        1              FilePath           null              Nil                     Null       1  0  0  0  0  1                                                           Target                "add_target"                  "Add Target"                                  "Adds a new target."                                                                                               "application,executable,debug"   "$targets,"                                                      }
  {SelectTarget                   1        1              Entity             null              Target                  Null       0  0  0  0  0  1                                                           Target                "select_target"               "Select Target"                               "Selects a target."                                                                                                ""                               ""                                                               }
  {EnableTarget                   1        1              Entity             null              Target                  Null       0  0  0  0  0  1                                                           CheckFilled           "enable_target"               "Enable Target"                               "Enables a target, in addition to all targets currently enabled."                                                  ""                               ""                                                               }
  {DisableTarget                  1        1              Entity             null              Target                  Null       0  0  0  0  0  1                                                           CheckHollow           "disable_target"              "Disable Target"                              "Disables a target."                                                                                               ""                               ""                                                               }
  
  //- rjf: attaching
  {RegisterAsJITDebugger          1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "register_as_jit_debugger"    "Register As Just-In-Time (JIT) Debugger"     "Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."                      ""                               ""                                                               }
  
  //- rjf: snap-to-code-location
  {FindCodeLocation               0        1              FilePath           null              Nil                     Null       0  0  0  0  0  1                                                           FileOutline           "find_code_location"          "Find Code Location"                          "Finds a specific source code location given file, line, and column coordinates. Opens the file if necessary."     ""                               ""                                                               }
  
  //- rjf: general-purpose view filtering
  {Filter                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Find                  "filter"                      "Filter"                                      "Begins filtering the active view."                                                                                "sort,search,filter,find"        ""                                                               }
  {ApplyFilter                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Find                  "apply_filter"                "Apply Filter"                                "Applies the typed filter to the active view."                                                                     "sort,search,filter,find,apply"  ""                                                               }
  {ClearFilter                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Find                  "clear_filter"                "Clear Filter"                                "Clears the filter applied to the active view."                                                                    "sort,search,filter,find,clear"  ""                                                               }
  
  //- rjf: view drivers
  {GettingStarted                 1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           QuestionMark          "getting_started"             "Getting Started"                             "Opens the menu for information on getting started."                                                               "tutorial,help"                  ""                                                               }
  {Commands                       0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           List                  "commands"                    "Commands"                                    "Opens the list of all commands."                                                                                  ""                               ""                                                               }
  {Target                         0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Target                "target"                      "Target"                                      "Opens the editor for a target."                                                                                   ""                               ""                                                               }
  {Targets                        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Target                "targets"                     "Targets"                                     "Opens the list of all targets."                                                                                   ""                               ""                                                               }
  {FilePathMap                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           FileOutline           "file_path_map"               "File Path Map"                               "Opens the file path mapping editor."                                                                              ""                               ""                                                               }
  {AutoViewRules                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "auto_view_rules"             "Auto View Rules"                             "Opens the auto view rule editor."                                                                                 ""                               ""                                                               }
  {Breakpoints                    1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           CircleFilled          "breakpoints"                 "Breakpoints"                                 "Opens the breakpoints view."                                                                                      ""                               ""                                                               }
  {WatchPins                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Pin                   "watch_pins"                  "Watch Pins"                                  "Opens the watch pins view."                                                                                       ""                               ""                                                               }
  {Scheduler                      1        1              Null               null              Nil                     Null       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               null              Nil                     Null       0  0  0  0  0  0                                                           Thread                "call_stack"                  "Call Stack"                                  "Opens the call stack view."                                                                                       "callstack,thread,unwind"        ""                                                               }
  {Modules                        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Module                "modules"                     "Modules"                                     "Opens the modules view."                                                                                          ""                               ""                                                               }
  {Watch                          1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "watch"                       "Watch"                                       "Opens a watch view."                                                                                              ""                               ""                                                               }
  {Locals                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "locals"                      "Locals"                                      "Opens a locals view."                                                                                             ""                               ""                                                               }
  {Registers                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "registers"                   "Registers"                                   "Opens a registers view."                                                                                          ""                               ""                                                               }
  {Globals                        1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "globals"                     "Globals"                                     "Opens a globals view."                                                                                            ""                               ""                                                               }
  {ThreadLocals                   1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "thread_locals"               "Thread Locals"                               "Opens a thread locals view."                                                                                      ""                               ""                                                               }
  {Types                          1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "types"                       "Types"                                       "Opens a types view."                                                                                              ""                               ""                                                               }
  {Procedures                     1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Binoculars            "procedures"                  "Procedures"                                  "Opens a procedures view."                                                                                         ""                               ""                                                               }
  {PendingFile                    0        0              Null               null              Nil                     Null       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               null              Nil                     Null       0  0  0  0  0  0                                                           Glasses               "disasm"                      "Disassembly"                                 "Opens the disassembly view."                                                                                      "disasm"                         ""                                                               }
  {Output                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           List                  "output"                      "Output"                                      "Opens an output view."                                                                                            ""                               ""                                                               }
  {Memory                         1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Grid                  "memory"                      "Memory"                                      "Opens a memory view."                                                                                             ""                               ""                                                               }
  {Settings                       1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Gear                  "settings"                    "Settings"                                    "Opens the settings view."                                                                                         "theme,color,scheme,options"     ""                                                               }
  
  //- rjf: queries
  {PickFile                       0        0              FilePath           null              Nil                     Null       1  0  0  0  0  1                                                           FileOutline           "pick_file"                   "Pick File"                                   "Opens the file browser to pick a file."                                                                           ""                               ""                                                               }
  {PickFolder                     0        0              FilePath           null              Nil                     Null       0  1  0  0  0  1                                                           FolderOpenFilled      "pick_folder"                 "Pick Folder"                                 "Opens the file browser to pick a folder."                                                                         ""                               ""                                                               }
  {PickFileOrFolder               0        0              FilePath           null              Nil                     Null       1  1  0  0  0  1                                                           FileOutline           "pick_file_or_folder"         "Pick File/Folder"                            "Opens the file browser to pick a file or folder."                                                                 ""                               ""                                                               }
  
  //- rjf: query stack
  {PushQuery                      0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "push_lister"                 "Push Lister"                                 "Pushes a new lister onto the lister stack."                                                                       ""                               ""                                                               }
  {CompleteQuery                  0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "complete_lister"             "Complete Lister"                             "Completes a lister, and pops it off the lister stack."                                                            ""                               ""                                                               }
  {CancelQuery                    0        0              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "cancel_lister"               "Cancel Lister"                               "Cancels a lister, and pops it off the lister stack."                                                              ""                               ""                                                               }
  
  //- rjf: developer commands
  {ToggleDevMenu                  1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "toggle_dev_menu"             "Toggle Developer Menu"                       "Opens and closes the developer menu."                                                                             ""                               ""                                                               }
  {LogMarker                      1        1              Null               null              Nil                     Null       0  0  0  0  0  0                                                           Null                  "log_marker"                  "Log Marker"                                  "Logs a marker in the application log, to denote specific points in time within the log."                          ""                               ""                                                               }
}

@enum RD_CmdKind:
{
  `Null`,
  @expand(D_CmdTable a) `$(a.name)`,
  @expand(RD_CmdTable, a) `$(a.name)`,
  COUNT,
}

@struct RD_Query:
{
  `RD_QueryFlags flags`;
  `RD_RegSlot slot`;
  `String8 view_name`;
  `RD_EntityKind entity_kind`;
  `CTRL_EntityKind ctrl_entity_kind`;
}

@struct RD_CmdKindInfo:
{
  `String8 string`;
  `String8 description`;
  `String8 search_tags`;
  `String8 ctx_filter`;
  `String8 display_name`;
  `RD_IconKind icon_kind`;
  `RD_CmdKindFlags flags`;
  `RD_Query query`;
};

@data(RD_CmdKindInfo) @c_file rd_cmd_kind_info_table:
{
  `{0}`,
  @expand(D_CmdTable, a)
    ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.ctx_filter)"), str8_lit_comp("$(a.display_name)"), RD_IconKind_$(a.canonical_icon), (RD_CmdKindFlag_ListInUI*$(a.ui_vis))|(RD_CmdKindFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {(RD_QueryFlag_AllowFiles*$(a.q_allow_files))|(RD_QueryFlag_AllowFolders*$(a.q_allow_folders))|(RD_QueryFlag_CodeInput*$(a.q_is_code))|(RD_QueryFlag_KeepOldInput*$(a.q_keep_oi))|(RD_QueryFlag_SelectOldInput*$(a.q_select_oi))|(RD_QueryFlag_Required*$(a.q_required)), RD_RegSlot_$(a.q_slot), str8_lit_comp("$(a.q_view != 'null' -> a.q_view)"), RD_EntityKind_$(a.q_ent_kind), CTRL_EntityKind_$(a.q_ctrl_ent_kind)}}```;
  @expand(RD_CmdTable, a)
    ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.ctx_filter)"), str8_lit_comp("$(a.display_name)"), RD_IconKind_$(a.canonical_icon), (RD_CmdKindFlag_ListInUI*$(a.ui_vis))|(RD_CmdKindFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {(RD_QueryFlag_AllowFiles*$(a.q_allow_files))|(RD_QueryFlag_AllowFolders*$(a.q_allow_folders))|(RD_QueryFlag_CodeInput*$(a.q_is_code))|(RD_QueryFlag_KeepOldInput*$(a.q_keep_oi))|(RD_QueryFlag_SelectOldInput*$(a.q_select_oi))|(RD_QueryFlag_Required*$(a.q_required)), RD_RegSlot_$(a.q_slot), str8_lit_comp("$(a.q_view != 'null' -> a.q_view)"), RD_EntityKind_$(a.q_ent_kind), CTRL_EntityKind_$(a.q_ctrl_ent_kind)}}```;
}

////////////////////////////////
//~ rjf: Default Bindings

@table(name key ctrl shift alt)
RD_DefaultBindingTable:
{
  //- rjf: low-level target control operations
  { "kill_all"                    F5        0        shift     0          }
  { "step_into_inst"              F11       0        0         alt        }
  { "step_over_inst"              F10       0        0         alt        }
  { "step_out"                    F11       0        shift     0          }
  { "halt"                        X         ctrl     shift     0          }
  { "halt"                        Pause     0        0         0          }
  { "soft_halt_refresh"           R         0        0         alt        }
  
  //- rjf: high-level composite target control operations
  { "run"                         F5        0        0         0          }
  { "restart"                     F5        ctrl     shift     0          }
  { "step_into"                   F11       0        0         0          }
  { "step_over"                   F10       0        0         0          }
  { "run_to_line"                 F10       ctrl     0         0          }
  { "set_next_statement"          F10       ctrl     shift     0          }
  
  //- rjf: font sizes
  { "inc_ui_font_scale"           Equal     0        0         alt        }
  { "dec_ui_font_scale"           Minus     0        0         alt        }
  { "inc_code_font_scale"         Equal     0        shift     alt        }
  { "dec_code_font_scale"         Minus     0        shift     alt        }
  
  //- rjf: windows
  { "window"                      N         ctrl     shift     0          }
  { "toggle_fullscreen"           Return    ctrl     0         0          }
  
  //- rjf: panel splitting
  { "new_panel_right"             P         ctrl     0         0          }
  { "new_panel_down"              Minus     ctrl     0         0          }
  
  //- rjf: panel rotation
  { "rotate_panel_columns"        2         ctrl     0         0          }
  
  //- rjf: focused panel changing
  { "next_panel"                  Comma     ctrl     0         0          }
  { "prev_panel"                  Comma     ctrl     shift     0          }
  { "focus_panel_right"           Right     ctrl     0         alt        }
  { "focus_panel_left"            Left      ctrl     0         alt        }
  { "focus_panel_up"              Up        ctrl     0         alt        }
  { "focus_panel_down"            Down      ctrl     0         alt        }
  
  //- rjf: undo/redo
  { "undo"                        Z         ctrl     0         0          }
  { "redo"                        Y         ctrl     0         0          }
  
  //- rjf: focus history
  { "go_back"                     Left      0        0         alt        }
  { "go_forward"                  Right     0        0         alt        }
  
  //- rjf: panel removal
  { "close_panel"                 P         ctrl     shift     alt        }
  
  //- rjf: panel tab
  { "next_tab"                    PageDown  ctrl     0         0          }
  { "prev_tab"                    PageUp    ctrl     0         0          }
  { "next_tab"                    Tab       ctrl     0         0          }
  { "prev_tab"                    Tab       ctrl     shift     0          }
  { "move_tab_right"              PageDown  ctrl     shift     0          }
  { "move_tab_left"               PageUp    ctrl     shift     0          }
  { "close_tab"                   W         ctrl     0         0          }
  { "tab_bar_top"                 Up        ctrl     shift     alt        }
  { "tab_bar_bottom"              Down      ctrl     shift     alt        }
  
  //- rjf: files
  { "open"                        O         ctrl     0         0          }
  { "reload_active"               R         ctrl     shift     0          }
  { "switch"                      I         ctrl     0         0          }
  { "switch_to_partner_file"      O         0        0         alt        }
  
  //- rjf: setting config paths
  { "open_user"                   O         ctrl     shift     alt        }
  { "open_project"                O         ctrl     0         alt        }
  
  //- rjf: meta controls
  { "edit"                        F2        0        0         0          }
  { "accept"                      Return    0        0         0          }
  { "cancel"                      Esc       0        0         0          }
  
  //- rjf: directional movement & text controls
  { "move_left"                   Left      0        0         0          }
  { "move_right"                  Right     0        0         0          }
  { "move_up"                     Up        0        0         0          }
  { "move_down"                   Down      0        0         0          }
  { "move_left_select"            Left      0        shift     0          }
  { "move_right_select"           Right     0        shift     0          }
  { "move_up_select"              Up        0        shift     0          }
  { "move_down_select"            Down      0        shift     0          }
  { "move_left_chunk"             Left      ctrl     0         0          }
  { "move_right_chunk"            Right     ctrl     0         0          }
  { "move_up_chunk"               Up        ctrl     0         0          }
  { "move_down_chunk"             Down      ctrl     0         0          }
  { "move_up_page"                PageUp    0        0         0          }
  { "move_down_page"              PageDown  0        0         0          }
  { "move_up_whole"               Home      ctrl     0         0          }
  { "move_down_whole"             End       ctrl     0         0          }
  { "move_left_chunk_select"      Left      ctrl     shift     0          }
  { "move_right_chunk_select"     Right     ctrl     shift     0          }
  { "move_up_chunk_select"        Up        ctrl     shift     0          }
  { "move_down_chunk_select"      Down      ctrl     shift     0          }
  { "move_up_page_select"         PageUp    0        shift     0          }
  { "move_down_page_select"       PageDown  0        shift     0          }
  { "move_up_whole_select"        Home      ctrl     shift     0          }
  { "move_down_whole_select"      End       ctrl     shift     0          }
  { "move_up_reorder"             Up        0        0         alt        }
  { "move_down_reorder"           Down      0        0         alt        }
  { "move_home"                   Home      0        0         0          }
  { "move_end"                    End       0        0         0          }
  { "move_home_select"            Home      0        shift     0          }
  { "move_end_select"             End       0        shift     0          }
  { "select_all"                  A         ctrl     0         0          }
  { "delete_single"               Delete    0        0         0          }
  { "delete_chunk"                Delete    ctrl     0         0          }
  { "backspace_single"            Backspace 0        0         0          }
  { "backspace_chunk"             Backspace ctrl     0         0          }
  { "copy"                        C         ctrl     0         0          }
  { "copy"                        Insert    ctrl     0         0          }
  { "cut"                         X         ctrl     0         0          }
  { "paste"                       V         ctrl     0         0          }
  { "paste"                       Insert    0        shift     0          }
  { "insert_text"                 Null      0        0         0          }
  
  //- rjf: code navigation
  { "goto_line"                   G         ctrl     0         0          }
  { "goto_address"                G         0        0         alt        }
  { "find_text_forward"           F         ctrl     0         0          }
  { "find_text_backward"          R         ctrl     0         0          }
  { "find_next"                   F3        0        0         0          }
  { "find_prev"                   F3        shift    0         0          }
  
  //- rjf: thread finding
  { "find_selected_thread"        F4        0        0         0          }
  
  //- rjf: name finding
  { "goto_name"                   J         ctrl     0         0          }
  { "goto_name_at_cursor"         F12       0        0         0          }
  
  //- rjf: watch expressions
  { "toggle_watch_expr_at_cursor" W         0        0         alt        }
  { "toggle_watch_expr_at_mouse"  D         ctrl     0         0          }
  { "toggle_watch_pin"            F9        ctrl     0         0          }
  
  //- rjf: breakpoints
  { "toggle_breakpoint"           F9        0        0         0          }
  
  //- rjf: targets
  { "add_target"                  T         ctrl     0         0          }
  
  //- rjf: attaching
  { "attach"                      F6        0        shift     0          }
  
  //- rjf: filtering
  { "filter"                      Slash     ctrl     0         0          }
  
  //- rjf: command lister
  // { "run_command"                 F1        0        0         0          }
  { "open_lister"                 F1        0        0         0          }
  
  //- rjf: developer commands
  { "log_marker"                  M         ctrl     shift     alt        }
  { "toggle_dev_menu"             D         ctrl     shift     alt        }
}

@data(RD_StringBindingPair) rd_default_binding_table:
{
  @expand(RD_DefaultBindingTable a) ```{str8_lit_comp("$(a.name)"), {OS_Key_$(a.key), 0 $(a.ctrl != 0 -> `|OS_Modifier_Ctrl`) $(a.shift != 0 -> `|OS_Modifier_Shift`) $(a.alt != 0 -> `|OS_Modifier_Alt`)}}```;
}

////////////////////////////////
//~ rjf: Binding Version Remap Table

@table(old_name new_name)
RD_BindingVersionRemapTable:
{
  {"commands"     "run_command"}
  {"load_user"    "open_user"}
  {"load_profile" "open_profile"}
  {"load_project" "open_project"}
  {"open_profile" "open_project"}
  {"address_breakpoint" "add_address_breakpoint"}
  {"function_breakpoint" "add_function_breakpoint"}
  {"toggle_breakpoint_cursor" "toggle_breakpoint"}
  
}

@data(String8) rd_binding_version_remap_old_name_table:
{
  @expand(RD_BindingVersionRemapTable a) `str8_lit_comp("$(a.old_name)")`
}

@data(String8) rd_binding_version_remap_new_name_table:
{
  @expand(RD_BindingVersionRemapTable a) `str8_lit_comp("$(a.new_name)")`
}

////////////////////////////////
//~ rjf: Icons

@table(name, text)
RD_IconTable:
{
  (Null                     "")
  (FolderOpenOutline        "b")
  (FolderClosedOutline      "c")
  (FolderOpenFilled         "B")
  (FolderClosedFilled       "C")
  (FileOutline              "f")
  (FileFilled               "F")
  (Play                     "g")
  (PlayStepForward          "h")
  (Pause                    "r")
  (Stop                     "s")
  (Info                     "i")
  (WarningSmall             "w")
  (WarningBig               "W")
  (Unlocked                 "k")
  (Locked                   "K")
  (LeftArrow                "L")
  (RightArrow               "R")
  (UpArrow                  "U")
  (DownArrow                "D")
  (Gear                     "G")
  (Pencil                   "P")
  (Trash                    "3")
  (Pin                      "p")
  (RadioHollow              "O")
  (RadioFilled              "o")
  (CheckHollow              "!")
  (CheckFilled              "1")
  (LeftCaret                "<")
  (RightCaret               ">")
  (UpCaret                  "^")
  (DownCaret                "v")
  (UpScroll                 "9")
  (DownScroll               "0")
  (LeftScroll               "7")
  (RightScroll              "8")
  (Add                      "+")
  (Minus                    "-")
  (Thread                   "'")
  (Threads                  '\\"')
  (Machine                  "M")
  (CircleFilled             ".")
  (X                        "x")
  (Refresh                  "q")
  (Undo                     "j")
  (Redo                     "u")
  (Save                     "m")
  (Window                   "n")
  (Target                   "l")
  (Clipboard                "a")
  (Scheduler                "z")
  (Module                   "y")
  (XSplit                   "X")
  (YSplit                   "Y")
  (ClosePanel               "S")
  (StepInto                 "T")
  (StepOver                 "Z")
  (StepOut                  "d")
  (Find                     "N")
  (Palette                  "E")
  (Thumbnails               "H")
  (Glasses                  "e")
  (Binoculars               "I")
  (List                     "J")
  (Grid                     "A")
  (QuestionMark             "?")
  (Person                   "4")
  (Briefcase                "5")
  (Dot                      "c")
}

@enum RD_IconKind:
{
  @expand(RD_IconTable a) `$(a.name)`,
  COUNT,
}

@data(String8) rd_icon_kind_text_table:
{
  @expand(RD_IconTable a) `str8_lit_comp("$(a.text)")`;
}

////////////////////////////////
//~ rjf: View Rules

@table(name               name_lower             display_name                 params_schema                                                                                              icon            can_filter  filter_is_code  typing_automatically_filters  can_use_in_watch_table  can_fill_value_cell  can_expand           show_in_docs description)
RD_ViewRuleTable:
{
  //- rjf: basics
  { Empty                  empty                  ""                           ""                                                                                                         Null            0 0 0 0 0 0     0 ""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         }
  { GettingStarted         getting_started        "Getting Started"            ""                                                                                                         QuestionMark    0 0 0 0 0 0     0 ""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         }
  
  //- rjf: meta (settings)
  { Settings               settings               "Settings"                   ""                                                                                                         Gear            0 0 0 0 0 0     1 "An interface to modify general settings for the debugger's appearance and behavior."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      }
  
  //- 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 ""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         }
  
  //- rjf: watch or watch-style tables
  { Watch                  watch                  "Watch"                      ""                                                                                                         Binoculars      1 1 1 0 0 0     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      1 1 1 0 0 0     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      1 1 1 0 0 0     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      1 1 1 0 0 0     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      1 1 1 0 0 0     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      1 1 1 0 0 0     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      1 1 1 0 0 0     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: configuration watch tables
  { Targets                targets                "Targets"                    ""                                                                                                         Target          1 1 1 0 0 0     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     1 1 1 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      1 1 1 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    1 1 1 0 0 0     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             1 1 1 0 0 0     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 info watch tables
  { Scheduler              scheduler              "Scheduler"                  ""                                                                                                         Scheduler       1 1 1 0 0 0     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          1 1 1 0 0 0     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          1 1 1 0 0 0     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: data visualizers
  { Text                   text                   "Text"                       "x:{'lang':lang, 'size':expr}"                                                                             FileOutline     0 0 0 1 0 1     0 ""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         }
  { Disasm                 disasm                 "Disassembly"                "x:{'arch':arch, 'size':expr, 'addresses':bool, 'code_bytes':bool}"                                        Glasses         0 0 0 1 0 1     1 "Displays disassembled instructions in a textual form from the selected thread's containing process virtual address space."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
  { Output                 output                 "Output"                     ""                                                                                                         List            0 0 0 0 0 0     1 "Displays debug strings, output from attached processes."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }
  { Memory                 memory                 "Memory"                     "x:{'size':expr}"                                                                                          Grid            0 0 0 1 0 1     1 "A hex-editor-like grid interface for viewing memory."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     }
  { Bitmap                 bitmap                 "Bitmap"                     "x:{'w':expr, 'h':expr, 'fmt':tex2dformat}"                                                                Binoculars      0 0 0 1 0 1     1 "Visualizes memory as a bitmap."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           }
  { Checkbox               checkbox               "Checkbox"                   ""                                                                                                         CheckFilled     0 0 0 1 1 0     1 "Visualizes memory as an RGBA color."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      }
  { ColorRGBA              color_rgba             "Color (RGBA)"               ""                                                                                                         Palette         0 0 0 1 1 1     1 "Visualizes memory as an RGBA color."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      }
  { Geo3D                  geo3d                  "Geometry (3D)"              "x:{'count':expr, 'vtx':expr, 'vtx_size':expr}"                                                            Binoculars      0 0 0 1 0 1     1 "Visualizes memory as 3D geometry."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
}

@enum RD_ViewRuleKind:
{
  Null,
  @expand(RD_ViewRuleTable a) `$(a.name)`,
  COUNT
}

@struct RD_ViewRuleInfo:
{
  `String8 string`;
  `String8 description`;
  `String8 display_name`;
  `String8 params_schema`;
  `RD_IconKind icon_kind`;
  `RD_ViewRuleInfoFlags flags`;
  `EV_ViewRuleExprExpandInfoHookFunctionType *expr_expand_info`;
  `RD_ViewRuleUIFunctionType *ui`;
}

@gen
{
  `RD_VIEW_RULE_UI_FUNCTION_DEF(null);`,
  @expand(RD_ViewRuleTable a) `$(a.can_use_in_watch_table != 0 && a.can_expand != 0 -> "EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(" .. a.name_lower .. ");")`,
  @expand(RD_ViewRuleTable a) `RD_VIEW_RULE_UI_FUNCTION_DEF($(a.name_lower));`,
}

@data(RD_ViewRuleInfo) rd_view_rule_kind_info_table:
{
  `{{0}, {0}, {0}, {0}, RD_IconKind_Null, 0, EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(null)}`,
  @expand(RD_ViewRuleTable a) `{str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.description)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.params_schema)"), RD_IconKind_$(a.icon), (RD_ViewRuleInfoFlag_ShowInDocs*$(a.show_in_docs)|RD_ViewRuleInfoFlag_CanFilter*$(a.can_filter)|RD_ViewRuleInfoFlag_FilterIsCode*$(a.filter_is_code)|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*$(a.typing_automatically_filters)|RD_ViewRuleInfoFlag_CanUseInWatchTable*$(a.can_use_in_watch_table)|RD_ViewRuleInfoFlag_CanFillValueCell*$(a.can_fill_value_cell)|RD_ViewRuleInfoFlag_CanExpand*$(a.can_expand)), $(a.can_expand != 0 -> "EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(" .. a.name_lower .. ")") $(a.can_expand == 0 -> "EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_NAME(nil)"), RD_VIEW_RULE_UI_FUNCTION_NAME($(a.name_lower))}`,
}

////////////////////////////////
//~ rjf: Built-In Debug Engine Kind -> Icon Kind Table

@data(RD_IconKind) rd_entity_kind_icon_kind_table:
{
  @expand(RD_EntityKindTable a) `RD_IconKind_$(a.icon_kind)`,
}

////////////////////////////////
//~ rjf: Theme Tables

@table(name_upper  name_lower  display_string)
RD_ThemePresetTable:
{
  { DefaultDark      default_dark     "Default (Dark)"    }
  { DefaultLight     default_light    "Default (Light)"   }
  { VSDark           vs_dark          "VS (Dark)"         }
  { VSLight          vs_light         "VS (Light)"        }
  { SolarizedDark    solarized_dark   "Solarized (Dark)"  }
  { SolarizedLight   solarized_light  "Solarized (Light)" }
  { HandmadeHero     handmade_hero    "Handmade Hero"     }
  { FourCoder        four_coder       "4coder"            }
  { FarManager       far_manager      "Far Manager"       }
}

@table(name                      display_name                        name_lower                             default_dark        default_light        vs_dark            vs_light            solarized_dark      solarized_light     handmade_hero       four_coder          far_manager         desc)
RD_ThemeColorTable:
{
  {Null                           "Null"                              null                                   0xff00ffff          0xff00ffff          0xff00ffff          0xff00ffff          0xff00ffff          0xff00ffff          0xff00ffff          0xff00ffff          0xff00ffff          ""}
  
  //- rjf: global ui colors
  {Text                           "Text"                              text                                   0xe5e5e5ff          0x4c4c4cff          0xe5e5e5ff          0x000000ff          0x999999ff          0x333333ff          0xa08462ff          0x90b080ff          0x00fefeff          ""}
  {TextPositive                   "Text (Positive)"                   text_positive                          0x4dc221ff          0x4d9e2eff          0x4dc221ff          0x4dc221ff          0x4dc221ff          0x4dc221ff          0x4dc221ff          0x4dc221ff          0x4dc221ff          ""}
  {TextNegative                   "Text (Negative)"                   text_negative                          0xc56452ff          0xbd371eff          0xc56452ff          0xc46451ff          0xc56452ff          0xc56452ff          0xc56452ff          0xc56452ff          0xc56452ff          ""}
  {TextNeutral                    "Text (Neutral)"                    text_neutral                           0x307eb2ff          0x0064a7ff          0x307eb2ff          0x307eb2ff          0x307eb2ff          0x307eb2ff          0x307eb2ff          0x307eb2ff          0x307eb2ff          ""}
  {TextWeak                       "Text (Weak)"                       text_weak                              0xa4a4a4fe          0x4c4c4cff          0xa4a4a4fe          0x0000007f          0x9999998a          0x818181ff          0x6e512eff          0x566e4bff          0x00a9a9ff          ""}
  {Cursor                         "Cursor"                            cursor                                 0x8aff00ff          0x699830ff          0x8aff00ff          0x000000ff          0x8aff00ff          0x586e75ff          0x8aff00ff          0x8aff00ff          0x8aff00ff          ""}
  {CursorInactive                 "Cursor (Inactive)"                 cursor_inactive                        0xb23217ff          0xb23217ff          0xb23217ff          0xb23217ff          0xb23217ff          0xb23217ff          0xb23217ff          0xb23217ff          0xb23217ff          ""}
  {Focus                          "Focus"                             focus                                  0xfda200ff          0x9c5900ff          0xfda200ff          0x002affff          0xfda200ff          0x92743dff          0xfda200ff          0xfda200ff          0x00fefeff          ""}
  {Hover                          "Hover"                             hover                                  0xffffffff          0xffffffff          0xffffffff          0x000000ff          0xffffffff          0x747474ff          0xffffffff          0xffffffff          0xffffffff          ""}
  {DropShadow                     "Drop Shadow"                       drop_shadow                            0x0000007f          0x0000004c          0x0000007f          0xa3a3a37e          0x0000007f          0xc9bfa394          0x0000007f          0x0000007f          0x0000007f          ""}
  {DisabledOverlay                "Disabled Overlay"                  disabled_overlay                       0x0000003f          0xa6a6a63f          0x0000003f          0x0000003f          0x0000003f          0xe4dac090          0x0000003f          0x0000003f          0x0000003f          ""}
  {DropSiteOverlay                "Drop Site Overlay"                 drop_site_overlay                      0xffffff0c          0x4848480c          0xffffff0c          0x0000000c          0xffffff0c          0xffffff0c          0xffffff0c          0xffffff0c          0xffffff0c          ""}
  {InactivePanelOverlay           "Inactive Panel Overlay"            inactive_panel_overlay                 0x0000003f          0xa4a4a43f          0x0000003f          0xfefefe53          0x0000003f          0x0000001c          0x0000003f          0x0000003f          0x0000003f          ""}
  {SelectionOverlay               "Selection Overlay"                 selection_overlay                      0x99ccff4c          0x003d7a48          0x99ccff4c          0x3d74ab4b          0x99ccff4c          0x678cb24c          0x99ccff4c          0x99ccff4c          0x99ccff4c          ""}
  {HighlightOverlay               "Highlight Overlay"                 highlight_overlay                      0xffffff1e          0xffffff1e          0xffffff1e          0x0000001e          0xffffff1e          0xffffff1e          0xffffff1e          0xffffff1e          0xffffff1e          ""}
  {HighlightOverlayError          "Error Highlight Overlay"           error_highlight_overlay                0x5f12005f          0xff30005f          0x5f12005f          0x5f12005f          0x5f12005f          0x5f12005f          0x5f12005f          0x5f12005f          0x5f12005f          ""}
  
  //- rjf: base ui container colors
  {BaseBackground                 "Base Background"                   base_background                        0x1b1b1bfe          0xccccccfe          0x1b1b1bfe          0xfefefefe          0x002a35fe          0xfcf5e2fe          0x0c0c0cfe          0x0c0c0cfe          0x000081fe          ""}
  {BaseBackgroundAlt              "Base Background (Alternate)"       base_background_alt                    0x222222fe          0x2b2b2bfe          0x1b1b1bfe          0xe7e7e7fe          0x2b2b2bfe          0x2b2b2bfe          0x2b2b2bfe          0x2b2b2bfe          0x2b2b2bfe          ""}
  {BaseBorder                     "Base Border"                       base_border                            0x3f3f3ffe          0xa4a4a4fe          0x3f3f3ffe          0xb6b6b6ff          0xfefefe3a          0xbebaabfe          0x423525fe          0x3f3f3ffe          0x0000fffe          ""}
  
  //- rjf: menu bar ui container colors
  {MenuBarBackground              "Menu Bar Background"               menu_bar_background                    0x3e4c577f          0xeaeaea7f          0x1b1b1bfd          0xffffff7f          0x00202bff          0xeee8d5ff          0x0c0c0cfe          0x0c0c0cfe          0x007d7dff          ""}
  {MenuBarBackgroundAlt           "Menu Bar Background (Alternate)"   menu_bar_background_alt                0x3e4c577f          0x3e4c577f          0x1b1b1bfd          0xffffff7f          0x3e4c577f          0x3e4c577f          0x3e4c577f          0x3e4c577f          0x007d7dff          ""}
  {MenuBarBorder                  "Menu Bar Border"                   menu_bar_border                        0xffffff19          0xa4a4a4fe          0x3f3f3ffe          0xb6b6b6ff          0xffffff19          0xbebaabfe          0xffffff19          0xffffff19          0xfefefe00          ""}
  
  //- rjf: floating ui container colors
  {FloatingBackground             "Floating Background"               floating_background                    0x33333333          0xccccccc0          0x33333333          0xfefefec7          0x007fa14e          0xffffff7c          0x0c0c0c32          0x0c0c0c3e          0x007c7c55          ""}
  {FloatingBackgroundAlt          "Floating Background (Alternate)"   floating_background_alt                0x33333333          0x33333333          0x33333333          0x33333333          0x33333333          0x33333333          0x33333333          0x33333333          0x33333333          ""}
  {FloatingBorder                 "Floating Border"                   floating_border                        0x3f3f3ffd          0xa4a4a4fe          0x3f3f3ffd          0xb6b6b6ff          0xfdfdfd3a          0xbebaabfe          0x423425fe          0x3f3f3ffd          0x00ffff55          ""}
  
  //- rjf: ui element colors
  {ImplicitButtonBackground       "Implicit Button Background"        implicit_button_background             0x00000000          0x00000000          0x00000000          0x00000000          0x00000000          0x00000000          0x00000000          0x00000000          0x00000000          ""}
  {ImplicitButtonBorder           "Implicit Button Border"            implicit_button_border                 0x00000000          0x00000000          0x00000000          0x00000000          0x00000000          0xbdb9aa00          0x00000000          0x00000000          0x00000000          ""}
  {PlainButtonBackground          "Plain Button Background"           plain_button_background                0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          0x1b1b1bfe          ""}
  {PlainButtonBorder              "Plain Button Border"               plain_button_border                    0x3f3f3ffe          0x3f3f3ffe          0x3f3f3ffe          0xb6b6b6ff          0xfefefe3a          0xbebaabfe          0x3f3f3ffe          0x3f3f3ffe          0x3f3f3ffe          ""}
  {PositivePopButtonBackground    "Positive Pop Button Background"    positive_pop_button_background         0x2c5b36ff          0x65f534ff          0x2c5b36ff          0x84ce93ff          0x2c5b36ff          0xb6ddbeff          0x132e19ff          0x152f1bff          0x2c5b36ff          ""}
  {PositivePopButtonBorder        "Positive Pop Button Border"        positive_pop_button_border             0x3f3f3ffd          0x3f3f3ffd          0x3f3f3ffd          0xb6b6b6ff          0xfefefe3a          0xbebaabfe          0x3f3f3ffd          0x3f3f3ffd          0x3f3f3ffd          ""}
  {NegativePopButtonBackground    "Negative Pop Button Background"    negative_pop_button_background         0x803425ff          0xff694cff          0x803425ff          0xbd3e24ff          0x803425ff          0xf8b0a1ff          0x803425ff          0x43150cff          0x803425ff          ""}
  {NegativePopButtonBorder        "Negative Pop Button Border"        negative_pop_button_border             0x3f3f3ffd          0x3f3f3ffd          0x3f3f3ffd          0xb6b6b6ff          0xfefefe3a          0xbebaabfe          0x3f3f3ffd          0x3f3f3ffd          0x3f3f3ffd          ""}
  {NeutralPopButtonBackground     "Neutral Pop Button Background"     neutral_pop_button_background          0x355b6eff          0xa6becaff          0x355b6eff          0x6e9db5ff          0x355b6eff          0xb2d3e3ff          0x15445cff          0x1b323eff          0x933100ff          ""}
  {NeutralPopButtonBorder         "Neutral Pop Button Border"         neutral_pop_button_border              0x3f3f3ffd          0xa6a6a6fd          0x3f3f3ffd          0xb6b6b6ff          0xfefefe3a          0xbebaabfe          0x3f3f3ffd          0x3f3f3ffd          0x3f3f3ffd          ""}
  {ScrollBarButtonBackground      "Scroll Bar Button Background"      scroll_bar_button_background           0x2b2b2bfe          0xa9a9a9fe          0x2b2b2bfe          0xe8e8e8fe          0x005e77fe          0xe3dbc7fe          0x1f1f27fe          0x212721fe          0x007d7dff          ""}
  {ScrollBarButtonBorder          "Scroll Bar Button Border"          scroll_bar_button_border               0x3f3f3ffe          0xc0c0c0fe          0x3f3f3ffe          0xb6b6b6ff          0xfefefe3a          0xbebaabfe          0xfefefe4d          0x3f3f3ffe          0x3f3f3ffe          ""}
  {TabBackground                  "Tab Background"                    tab_background                         0x6f5135fe          0xa98b6fff          0x0079ccff          0xfffffffe          0x005e77fe          0xfdf6e3ff          0x1f1f27fe          0x212721fe          0x007d7dff          ""}
  {TabBorder                      "Tab Border"                        tab_border                             0xfefefe4d          0xffffff4d          0xfefefe4d          0xb6b6b6ff          0xfefefe4d          0xbebaabfe          0xfefefe4d          0xfefefe4d          0xfefefe4d          ""}
  {TabBackgroundInactive          "Tab Background (Inactive)"         tab_background_inactive                0x3e4c577f          0x8282827f          0xfefefe14          0xcdd4dc7f          0x3e4c577f          0xd4cfc0fe          0x131315ee          0x3a3a3a7f          0x3e4c577f          ""}
  {TabBorderInactive              "Tab Border (Inactive)"             tab_border_inactive                    0xffffff19          0xffffff19          0xffffff00          0xb6b6b6ff          0xffffff19          0xbebaabfe          0xffffff19          0x00000019          0xfefefe19          ""}
  
  //- rjf: code colors
  {CodeDefault                    "Code (Default)"                    code_default                           0xcbcbcbff          0x4d4d4dff          0xcbcbcbff          0x000000ff          0xcbcbcbff          0x657b83ff          0xa08462ff          0x90b080ff          0x00fefeff          ""}
  {CodeSymbol                     "Code (Symbol)"                     code_symbol                            0x42a2cffe          0x205670fe          0xdcdcaaff          0x000000ff          0xcb4a15ff          0xcb4a15ff          0xcc5634ff          0x42a2cffe          0x65b1ffff          ""}
  {CodeType                       "Code (Type)"                       code_type                              0xfec746ff          0x996b00ff          0x4ec9afff          0xa33700ff          0xcb4a15ff          0xcb4a15ff          0xd8a51bff          0xfd7c52ff          0xfec746ff          ""}
  {CodeLocal                      "Code (Local)"                      code_local                             0x98bc80ff          0x446a2bff          0x9cdbfeff          0x007666ff          0x98bc80ff          0x258ad2ff          0xc04047ff          0x98bc80ff          0x00ff00ff          ""}
  {CodeRegister                   "Code (Register)"                   code_register                          0xb7afd5ff          0x4c35a1ff          0xb7afd5ff          0xb7afd5ff          0xb7afd5ff          0x373345ff          0xb7afd5ff          0xb7afd5ff          0xb7afd5ff          ""}
  {CodeKeyword                    "Code (Keyword)"                    code_keyword                           0xb38d4cff          0x573700ff          0x569cd6ff          0x0000ffff          0x849803ff          0x586e75ff          0xac7a09ff          0xd08f1eff          0x00ffffff          ""}
  {CodeDelimiterOperator          "Code (Delimiters/Operators)"       code_delimiter_operator                0x767676ff          0x767676ff          0x767676ff          0x767676ff          0x767676ff          0x767676ff          0xa08462ff          0x90b080ff          0xffffffff          ""}
  {CodeNumeric                    "Code (Numeric)"                    code_numeric                           0x98abb1ff          0x3f6e7dff          0xb5cea8ff          0x088658ff          0xd33582ff          0xd33482ef          0x698e21ff          0x4fff2eff          0x00ff00ff          ""}
  {CodeNumericAltDigitGroup       "Code (Numeric, Alt. Digit Group)"  code_numeric_alt_digit_group           0x738287ff          0x1f4450ff          0x729360ff          0x0c3828ff          0x902559ff          0x8e2659ff          0x3a4e11ff          0x3ccd21ff          0x738287ff          ""}
  {CodeString                     "Code (String)"                     code_string                            0x98abb1ff          0x3c606bff          0xd59b85ff          0xa31414ff          0x1f9d91ff          0x29a198ff          0x6a8e22ff          0x4fff2eff          0x98abb1ff          ""}
  {CodeMeta                       "Code (Meta)"                       code_meta                              0xd96759ff          0xad3627ff          0xd59c85ff          0x0000ffff          0x839802ff          0xd96759ff          0xdab98fff          0xa0b8a0ff          0xff0000ff          ""}
  {CodeComment                    "Code (Comment)"                    code_comment                           0x717171ff          0x4b4b4bff          0x57a54aff          0x008000ff          0x556a6fff          0x93a1a1ff          0x686868ff          0x1e8fefff          0xffffffff          ""}
  {CodeLineNumbers                "Code Line Numbers"                 code_line_numbers                      0x7f7f7fff          0x4b4b4bff          0x2a91afff          0x227893ff          0x566c73ff          0x227893ef          0xa08462ff          0x7e7e7ffe          0x007d7dff          ""}
  {CodeLineNumbersSelected        "Code Line Numbers (Selected)"      code_line_numbers_selected             0xbebebeff          0x000000ff          0x9ddaecff          0x123d4bfe          0xa2aaacff          0x111e22ef          0xc8b399ff          0xbebebeff          0x00fefeff          ""}
  
  //- rjf: debugging colors
  {LineInfoBackground0            "Line Info Background 0"            line_info_background_0                 0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          ""}
  {LineInfoBackground1            "Line Info Background 1"            line_info_background_1                 0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          ""}
  {LineInfoBackground2            "Line Info Background 2"            line_info_background_2                 0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          ""}
  {LineInfoBackground3            "Line Info Background 3"            line_info_background_3                 0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          ""}
  {LineInfoBackground4            "Line Info Background 4"            line_info_background_4                 0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          0x99503d3f          ""}
  {LineInfoBackground5            "Line Info Background 5"            line_info_background_5                 0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          0xfe82493f          ""}
  {LineInfoBackground6            "Line Info Background 6"            line_info_background_6                 0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          0xffba173f          ""}
  {LineInfoBackground7            "Line Info Background 7"            line_info_background_7                 0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          0xcefd693f          ""}
  {Thread0                        "Thread 0"                          thread_0                               0xffcb7fff          0x945800ff          0xffcb7fff          0x945800ff          0xffcb7fff          0x945800ff          0xffcb7fff          0xffcb7fff          0xffcb7fff          ""}
  {Thread1                        "Thread 1"                          thread_1                               0xb2ff65ff          0x3f5b23ff          0xb2ff65ff          0x3f5b23ff          0xb2ff65ff          0x3f5b23ff          0xb2ff65ff          0xb2ff65ff          0xb2ff65ff          ""}
  {Thread2                        "Thread 2"                          thread_2                               0xff99e5ff          0x642a55ff          0xff99e5ff          0x642a55ff          0xff99e5ff          0x642a55ff          0xff99e5ff          0xff99e5ff          0xff99e5ff          ""}
  {Thread3                        "Thread 3"                          thread_3                               0x6598ffff          0x30456fff          0x6598ffff          0x30456fff          0x6598ffff          0x30456fff          0x6598ffff          0x6598ffff          0x6598ffff          ""}
  {Thread4                        "Thread 4"                          thread_4                               0x65ffcbff          0x264f41ff          0x65ffcbff          0x264f41ff          0x65ffcbff          0x264f41ff          0x65ffcbff          0x65ffcbff          0x65ffcbff          ""}
  {Thread5                        "Thread 5"                          thread_5                               0xff9819ff          0x736a5fff          0xff9819ff          0x736a5fff          0xff9819ff          0x736a5fff          0xff9819ff          0xff9819ff          0xff9819ff          ""}
  {Thread6                        "Thread 6"                          thread_6                               0x9932ffff          0x472f5eff          0x9932ffff          0x472f5eff          0x9932ffff          0x472f5eff          0x9932ffff          0x9932ffff          0x9932ffff          ""}
  {Thread7                        "Thread 7"                          thread_7                               0x65ff4cff          0x405d3bff          0x65ff4cff          0x405d3bff          0x65ff4cff          0x405d3bff          0x65ff4cff          0x65ff4cff          0x65ff4cff          ""}
  {ThreadUnwound                  "Thread (Unwound)"                  thread_unwound                         0xb2ccd8ff          0x49606aff          0xb2ccd8ff          0x49606aff          0xb2ccd8ff          0x49606aff          0xb2ccd8ff          0xb2ccd8ff          0xb2ccd8ff          ""}
  {ThreadError                    "Thread (Error)"                    thread_error                           0xb23219ff          0xb23219ff          0xb23219ff          0xb23219ff          0xb23219ff          0xb23218ff          0xb23219ff          0xb23219ff          0xb23219ff          ""}
  {Breakpoint                     "Breakpoint"                        breakpoint                             0xa72911ff          0xff2800ff          0xa72911ff          0xa72911ff          0xa72911ff          0xff684bff          0xa72911ff          0xa72911ff          0xff2800ff          ""}
  {CacheLineBoundary              "Cache Line Boundary"               cache_line_boundary                    0x355b6eff          0xa6becaff          0x355b6eff          0x6e9db5ff          0x355b6eff          0xb2d3e3ff          0x15445cff          0x1b323eff          0x933100ff          ""}
}

@table(old_name new_name)
RD_ThemeColorVersionRemapTable:
{
  {plain_text                          text}
  {plain_background                    base_background}
  {plain_border                        base_border}
  {plain_overlay                       drop_site_overlay}
  {code_function                       code_symbol}
  {code_symbol                         code_delimiter_operator}
  {code_numeric                        code_numeric_alt_digit_group}
  {line_info_0                         line_info_background_0}
  {line_info_1                         line_info_background_1}
  {line_info_2                         line_info_background_2}
  {line_info_3                         line_info_background_3}
  {alt_background                      menu_bar_background}
  {alt_border                          menu_bar_border}
  {tab_inactive                        tab_background_inactive}
  {tab_active                          tab_background}
  {weak_text                           text_weak}
  {text_selection                      selection}
  {cursor                              cursor}
  {highlight_0                         focus}
  {success_background                  positive_pop_button_background}
  {failure_background                  negative_pop_button_background}
  {action_background                   neutral_pop_button_background}
}

@enum RD_ThemeColor:
{
  @expand(RD_ThemeColorTable a) `$(a.name)`,
  COUNT,
}

@enum RD_ThemePreset:
{
  @expand(RD_ThemePresetTable a) `$(a.name)`,
  COUNT,
}

@data(String8) rd_theme_preset_display_string_table:
{
  @expand(RD_ThemePresetTable a) `str8_lit_comp("$(a.display_string)")`,
}

@data(String8) rd_theme_preset_code_string_table:
{
  @expand(RD_ThemePresetTable a) `str8_lit_comp("$(a.name_lower)")`,
}

@data(String8) rd_theme_color_version_remap_old_name_table:
{
  @expand(RD_ThemeColorVersionRemapTable a) `str8_lit_comp("$(a.old_name)")`
}

@data(String8) rd_theme_color_version_remap_new_name_table:
{
  @expand(RD_ThemeColorVersionRemapTable a) `str8_lit_comp("$(a.new_name)")`
}

@data(Vec4F32) rd_theme_preset_colors__default_dark:   {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.default_dark))`}
@data(Vec4F32) rd_theme_preset_colors__default_light:  {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.default_light))`}
@data(Vec4F32) rd_theme_preset_colors__vs_dark:        {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.vs_dark))`}
@data(Vec4F32) rd_theme_preset_colors__vs_light:       {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.vs_light))`}
@data(Vec4F32) rd_theme_preset_colors__solarized_dark: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.solarized_dark))`,}
@data(Vec4F32) rd_theme_preset_colors__solarized_light:{@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.solarized_light))`,}
@data(Vec4F32) rd_theme_preset_colors__handmade_hero:  {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.handmade_hero))`,}
@data(Vec4F32) rd_theme_preset_colors__four_coder:     {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.four_coder))`,}
@data(Vec4F32) rd_theme_preset_colors__far_manager:    {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.far_manager))`;}
@data(`Vec4F32*`) rd_theme_preset_colors_table:
{
  @expand(RD_ThemePresetTable a) `rd_theme_preset_colors__$(a.name_lower)`,
}

@data(String8) rd_theme_color_display_string_table:
{
  @expand(RD_ThemeColorTable a) `str8_lit_comp("$(a.display_name)")`
}

@data(String8) rd_theme_color_cfg_string_table:
{
  @expand(RD_ThemeColorTable a) `str8_lit_comp("$(a.name_lower)")`
}

////////////////////////////////
//~ rjf: Help/Docs/README

@markdown
raddbg_readme:
{
  @title "The RAD Debugger (ALPHA)";
  @p "The RAD Debugger is a native, user-mode, multi-process, graphical debugger. It currently only supports local-machine Windows x64 debugging with PDBs, with plans to expand and port in the future.";
  
  @subtitle "Getting Started";
  @p "To launch the RAD Debugger with your executable and command line arguments, run `raddbg` from the command line like so:";
  @p "```raddbg my_program.exe --foo --bar --baz```";
  @p "For more information, see the 'Command-Line Usage' section.";
  @p "Default keyboard shortcuts for common debugger controls include:";
  @unordered_list
  {
    @p "**Ctrl + O**: Open Source Code File";
    @p "**F10**: Step Over";
    @p "**F11**: Step Into";
    @p "**Shift + F11**: Step Out";
    @p "**F5**: Run";
    @p "**Ctrl + Shift + X**, or **Pause**: Halt All Processes";
    @p "**Shift + F5**: Kill All Processes";
    @p "**Shift + F6**: Attach To Process";
    @p "**Ctrl + F**: Search For Text (Forwards)";
    @p "**F9**: Toggle Breakpoint At Cursor";
    @p "**Ctrl + Comma**: Focus Next Panel";
    @p "**Ctrl + Shift + Comma**: Focus Previous Panel";
    @p "**Ctrl + Alt + Arrow Key**: Focus Panel In Direction";
    @p "**Ctrl + Tab**: Focus Next Tab";
    @p "**Ctrl + Shift + Tab**: Focus Previous Tab";
    @p "**Ctrl + W**: Close Tab";
    @p "**F1**: Open Command Palette";
  }
  @p "For more information, see the 'Commands' section.";
  @p "View rules can be used to visualize expressions differently in the watch window. Here are some examples:";
  @unordered_list
  {
    @p "`array:16`: Visualize a pointer as pointing to a 16-element array.";
    @p "`array:(count*2)`: Visualize a pointer as pointing to a `count*2`-element array.";
    // @p "`list:next`: Visualize a linked list flatly, where each node has a `next` pointer, which points to the next node in the list.";
    @p "`hex`: Visualize numeric literals as base-16 (hexadecimal).";
    @p "`dec`: Visualize numeric literals as base-10 (decimal).";
    @p "`oct`: Visualize numeric literals as base-8 (octal).";
    @p "`bin`: Visualize numeric literals as base-2 (binary).";
    @p "`omit:(foo bar baz)`: Prohibits members named `foo`, `bar`, and `baz` from being displayed.";
    @p "`only:(foo bar baz)`: Only allows members named `foo`, `bar`, and `baz` to be displayed.";
    @p "`slice`: Attempts to interpret a structure evaluation as encoding a slice, with a base pointer and an integer delimiting the number of elements to which the pointer points.";
  }
  @p "Multiple view rules can be specified on one line, so they can be combined like so:";
  @p "```array:16, hex, only: {x, y, z}```";
  @p "For more information, see the 'View Rules' section.";
  
  @subtitle "Command-Line Usage";
  @p "When run normally, either by launching through a file explorer or running from a command line without arguments, `raddbg` will open a new instance of the debugger, and await further operations. But it also supports a number of command line options for a number of other purposes. These options are specified with a `-` or `--` prefix, followed by the name of the option, and if the option requires a parameter, followed by a `:` or `=`, followed by the parameter's content. A list of the possible options follows:";
  @unordered_list
  {
    @p "`--help` Displays a help menu which documents the possible command line options.";
    @p "`--user:<path>` Use to specify the location of a user file which should be used. User files are used to store settings for users, including window and panel setups, path mapping, and visual settings. If this file does not exist, it will be created as necessary. This file will be autosaved as user-related changes are made. For more information on user files, read the 'User & Profile Files' section.";
    @p "`--project:<path>` Use to specify the location of a project file which should be used. Project files are used to store settings for users and projects. If this file does not exist, it will be created as necessary. This file will be autosaved as project-related changes are made. For more information on project files, read the 'User & Project Files' section.";
    @p "`--auto_step` This will step into all active targets after the debugger initially starts.";
    @p "`--auto_run` This will run all active targets after the debugger initially starts.";
    @p "`--quit_after_success` (or `-q`) This will close the debugger automatically after all processes exit, if they all exited successfully (with code 0), and ran with no interruptions..";
    @p "`--ipc` This will launch the debugger in the non-graphical IPC mode, which is used to communicate with another running instance of the debugger. The debugger instance will launch, send the specified command, then immediately terminate. This may be used by editors or other programs to control the debugger. For more information on commands, read the 'Commands' section. For more information on driving another debugger instance with this argument, read the 'Driving Another Debugger Instance' section."
  }
  @p "On the command line, non-options (meaning any command line arguments *not* prefixed with a `-` or `--`) can also be specified. with normal usage, they are interpreted as the command line for a target (see the 'Targets' section). When driving another debugger instance (using the `--ipc` argument), this additional command line text is used to encode a debugger command.";
  @p "The debugger will stop parsing `-` and `--` prefixes as arguments after seeing a standalone `--`, *or* after seeing the first non-option argument, when reading the command line left-to-right. Some examples of command line usage and their interpretations are below:";
  @unordered_list
  {
    @p "`raddbg --foo --bar --a:b --c=d test.exe` All options are used to configure `raddbg`. `test.exe` is interpreted as a target executable. `b` is interpreted as the parameter for the `a` option. `d` is interpreted as the parameter for the `c` option.";
    @p "`raddbg test.exe --foo --bar` `test.exe` is interpreted as a target executable. `--foo --bar` is interpreted as arguments for `test.exe`, and thus are *not* used to configure `raddbg`.";
    @p "`raddbg -- test.exe` `test.exe` is interpreted as a target executable.";
    @p "`raddbg --ipc find_code_location \"c:/foo/bar/baz.c:123:1\"` `--ipc` configures `raddbg` to drive another instance of `raddbg`. The remainder of the text is interpreted as a command.";
    @p "`raddbg \"C:/path with spaces/test.exe\" --foo --bar` A target is formed from the `test.exe` path, and `--foo --bar` are interpreted as arguments to the `test.exe` target.";
  }
  
  @subtitle "Windows, Panels, & Tabs";
  @p "Each opened *window* in the debugger frontend is subdivided into *panels*. Panels subdivide regions of their window without overlapping. Each panel can contain multiple *tabs*, and can have one tab selected at any time. Tabs can be dragged and dropped between panels. Each tab is used to view one of the many supported debugger interfaces, including source code, disassembly, memory, or watches. When a tab is selected, that interface will fill the tab's containing panel's region of the containing window.";
  @p "There are no 'special' windows, panels, or tabs; the debugger is written such that the number of windows, each window's panel organization, and the placement and arrangement of tabs can all be organized in a large variety of ways.";
  @p "A list of debugger interfaces, which can occupy tabs, are below:";
  @unordered_list
  {
    @expand(RD_ViewRuleTable a) @p "$(a.show_in_docs -> '`'..a.display_name..'` '..a.description)";
  }
  
  @subtitle "Commands";
  @p "The debugger is operated with *commands*. Commands may be manually executed in the debugger UI through the `Commands` menu, which you can open with the `Run Command` keybinding, which is F1 by default). Operations in the debugger UI are implemented with commands, so if it's ever unclear how to accomplish some operation through the UI, a useful fallback is searching for and running the command through the command menu.";
  @p "Commands are also how a debugger instance launched with `--ipc` may communicate with a primary debugger instance.";
  @p "A list of commands, how they're referred to textually (for the purposes of `--ipc` debugger instances), and their descriptions are below:";
  @unordered_list
  {
    @expand(D_CmdTable a) @p "$(a.ipc_docs_vis == 1 -> '`'..a.display_name..'` '..'(`'..a.string..'`) '..a.desc)";
    @expand(RD_CmdTable a) @p "$(a.ipc_docs_vis == 1 -> '`'..a.display_name..'` '..'(`'..a.string..'`) '..a.desc)";
  }
  
  @subtitle "Targets";
  @p "A *target* is one executable and configuration for launching that executable, including command line arguments and working directory (the directory from which the executable is launched). Each target may also have a custom label (replaces the executable path when visualizing the target), and the name of a custom entry point function (when the default entry points - `main`, `WinMain`, etc. - are not desired when stepping into the program upon launch). The debugger can have several targets at once. Each target can also be enabled or disabled. Some operations work on all enabled targets - for instance, the `Run` or `Kill All` commands (standardly bound as F5 or Shift + F5). Enabling and disabling targets allows one to filter which targets are currently being worked with.";
  @p "To add a target, you can run the `Add Target` command. A target is also created automatically from command line arguments - the rules for how this happens can be found in the `Command-Line Usage` section.";
  @p "Targets created through command line usage are temporary, meaning they are not persistently saved across runs of the debugger. To change this, you can right click the command-line-created target in the `Targets` view, and click `Save To Project`. After doing so, the target will be restored across runs, and will no longer need to be specified on the command-line.";
  
  @subtitle "View Rules";
  @p "*View rules* are used to transform the way that evaluations in the debugger are visualized. An evaluation is produced by taking an expression string - for instance, the name of a variable - and using debug info and information from an attached process' live runtime (memory, registers, and so on) to interpret it.";
  @p "Evaluations may be visualized in a variety of ways. A 64-bit unsigned integer may be visualized as a textual representation of the value with a radix of 10. A 32-bit floating-point value may be visualized as a textual representation of the value. An array of 32-bit floating-point values can be visualized as a list of textual representations of those values.";
  @p "But all of these cases may be visualized in a number of other ways, as well. A 64-bit unsigned integer may be more usefully represented with a radix of 16, 8, or 2. An array of 32-bit floating-point values may encode the R, G, B, and A components of a color, or vertex positions for 3D geometry, or samples for a waveform. An array of bytes may encode raw pixel data for an image, or image data in a compressed format. A struct may have several members which are not useful to look at all the time. A struct may form the head of a linked list, and a flat linked list representation may be more preferable than the traditional watch view representation, which adds an additional layer of hierarchical nesting with the expansion of each 'next' pointer in a linked list. When designing the debugger, we felt that the traditional memory view and watch view representations of data in a debugged-process were not sufficient. View rules were added to the traditional watch view structure to allow per-row specification of extra visualization parameters.";
  @p "View rules are specified with the name of a view rule, and depending on the view rule, a `:`, followed by parameters for the view rule. These parameters may be whitespace delimited, but importantly, multiple view rules may be specified per-row in a watch view. To explicitly separate the parameters of one view rule from the name of another - for instance, in a case like `array:16 bin`, where `bin` will not be interpreted as a view rule, but as a parameter of `array` - then commas and semicolons may be used to separate the two view rules (`array:16, bin`), or parentheses/braces/brackets may also be used to explicitly delimit the view rule parameters (`array:(16) bin`).";
  @p "A list of currently-supported view rules are below:";
  @unordered_list
  {
    @expand(D_ViewRuleTable a) @p "$(a.docs == 'x' -> '`'..a.string..'` ('..a.display_name..') '..a.description)";
  }
  
  @subtitle "Breakpoints";
  @p "Breakpoints interrupt execution of attached processes. They may be placed on specific code addresses, lines of source code, on specific symbol names. In the latter two cases, the higher level locations are resolved to code addresses. If there is no code associated with a line of source code, then the resolution path chooses to use the next closest line of source code in the same file. A symbol name breakpoint will only work if the symbol name is found within loaded debug info.";
  @p "Breakpoints may have stop conditions attached to them. When a breakpoint is hit by a thread, before it stops execution, the stop condition is evaluated, and if it evaluates to a nonzero value, only then is execution stopped.";
  @p "Each breakpoint has a hit count. Every time a breakpoint causes execution to stop, this counter is increased.";
  @p "Processor breakpoints are not currently supported, but planned to be in the future.";
  
  @subtitle "User & Project Files";
  @p "Applicable state controlling the debugger's appearance, behavior, targets, breakpoints, and other configurations is saved and reloaded across runs of the debugger through both *user files* and *project files*. These files are auto-saved. These files are written in a textual format which can be hand-edited as necessary, but they're also continuously re-read and re-written by the debugger. By default, the debugger uses `%appdata%/raddbg/default.raddbg_user` for its user file path, and `%appdata%/raddbg/default.raddbg_project` for its project file path. These paths can be overridden on the command line (see the 'Command-Line Usage' section).";
  @p "The *user file* defaultly stores file path maps, windows (including their preferred monitor, placement, and size), each window's panel layout and tabs, keybindings, theme colors, and fonts.";
  @p "The *project file* defaultly stores targets, breakpoints, watch pins, and exception code filters.";
  @p "Because both can be hand-edited, however, if you want to store something normally stored in a user file in a project file, or vice versa, this can be done by hand transferring the textual data from one file to another. There is no path in the debugger's UI to support this transfer, currently, although this is planned.";
  
  @subtitle "Driving Another Debugger Instance";
  @p "When the debugger is launched with the `--ipc` command-line argument, it does not launch another instance of the graphical debugger. Instead, it launches, sends a string encoding a command to a running instance of the graphical debugger, and then terminates. The set of commands which can be sent are identical to those which can be run from the debugger's UI itself, but these commands must be encoded textually (through the other command-line arguments). These commands are described in the 'Commands' section.";
}
