mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-23 20:24:59 -07:00
formalize more compact panel layout
This commit is contained in:
@@ -177,6 +177,7 @@ DF_CoreCmdTable:// | | |
|
||||
|
||||
//- rjf: panel splitting
|
||||
{ResetToDefaultPanels 0 Null Nil 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 0 Null Nil 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 0 Null Nil 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 0 Null Nil 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 0 Null Nil 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" }
|
||||
|
||||
@@ -216,7 +216,7 @@ DF_CoreCmdKind_Null,
|
||||
DF_CoreCmdKind_Null,
|
||||
};
|
||||
|
||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[213] =
|
||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[214] =
|
||||
{
|
||||
{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
|
||||
@@ -270,6 +270,7 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[213] =
|
||||
{ str8_lit_comp("confirm_accept"), str8_lit_comp("Accepts the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Accept"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("confirm_cancel"), str8_lit_comp("Cancels the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Cancel"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("reset_to_default_panels"), str8_lit_comp("Resets the window to the default panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Default Panel Layout"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window},
|
||||
{ str8_lit_comp("reset_to_compact_panels"), str8_lit_comp("Resets the window to the compact panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Compact Panel Layout"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window},
|
||||
{ str8_lit_comp("new_panel_left"), str8_lit_comp("Creates a new panel to the left of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Left"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit},
|
||||
{ str8_lit_comp("new_panel_up"), str8_lit_comp("Creates a new panel at the top of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Up"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_YSplit},
|
||||
{ str8_lit_comp("new_panel_right"), str8_lit_comp("Creates a new panel to the right of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Right"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit},
|
||||
|
||||
@@ -101,6 +101,7 @@ DF_CoreCmdKind_ToggleFullscreen,
|
||||
DF_CoreCmdKind_ConfirmAccept,
|
||||
DF_CoreCmdKind_ConfirmCancel,
|
||||
DF_CoreCmdKind_ResetToDefaultPanels,
|
||||
DF_CoreCmdKind_ResetToCompactPanels,
|
||||
DF_CoreCmdKind_NewPanelLeft,
|
||||
DF_CoreCmdKind_NewPanelUp,
|
||||
DF_CoreCmdKind_NewPanelRight,
|
||||
|
||||
+191
-99
@@ -1290,7 +1290,22 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
df_panel_notify_mutation(ws, panel);
|
||||
}break;
|
||||
case DF_CoreCmdKind_ResetToDefaultPanels:
|
||||
case DF_CoreCmdKind_ResetToCompactPanels:
|
||||
{
|
||||
typedef enum Layout
|
||||
{
|
||||
Layout_Default,
|
||||
Layout_Compact,
|
||||
}
|
||||
Layout;
|
||||
Layout layout = Layout_Default;
|
||||
switch(core_cmd_kind)
|
||||
{
|
||||
default:{}break;
|
||||
case DF_CoreCmdKind_ResetToDefaultPanels:{layout = Layout_Default;}break;
|
||||
case DF_CoreCmdKind_ResetToCompactPanels:{layout = Layout_Compact;}break;
|
||||
}
|
||||
|
||||
//- rjf: gather all panels in the panel tree - remove & gather views
|
||||
// we'd like to keep in the next layout
|
||||
DF_HandleList panels_to_close = {0};
|
||||
@@ -1377,22 +1392,22 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
watch = df_view_alloc();
|
||||
df_view_equip_spec(ws, watch, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Watch), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(locals))
|
||||
if(layout == Layout_Default && df_view_is_nil(locals))
|
||||
{
|
||||
locals = df_view_alloc();
|
||||
df_view_equip_spec(ws, locals, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Locals), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(regs))
|
||||
if(layout == Layout_Default && df_view_is_nil(regs))
|
||||
{
|
||||
regs = df_view_alloc();
|
||||
df_view_equip_spec(ws, regs, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Registers), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(globals))
|
||||
if(layout == Layout_Default && df_view_is_nil(globals))
|
||||
{
|
||||
globals = df_view_alloc();
|
||||
df_view_equip_spec(ws, globals, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Globals), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(tlocals))
|
||||
if(layout == Layout_Default && df_view_is_nil(tlocals))
|
||||
{
|
||||
tlocals = df_view_alloc();
|
||||
df_view_equip_spec(ws, tlocals, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_ThreadLocals), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
@@ -1402,7 +1417,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
types = df_view_alloc();
|
||||
df_view_equip_spec(ws, types, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Types), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(procs))
|
||||
if(layout == Layout_Default && df_view_is_nil(procs))
|
||||
{
|
||||
procs = df_view_alloc();
|
||||
df_view_equip_spec(ws, procs, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Procedures), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
@@ -1417,7 +1432,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
breakpoints = df_view_alloc();
|
||||
df_view_equip_spec(ws, breakpoints, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Breakpoints), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(watch_pins))
|
||||
if(layout == Layout_Default && df_view_is_nil(watch_pins))
|
||||
{
|
||||
watch_pins = df_view_alloc();
|
||||
df_view_equip_spec(ws, watch_pins, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_WatchPins), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
@@ -1447,7 +1462,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
disasm = df_view_alloc();
|
||||
df_view_equip_spec(ws, disasm, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Disassembly), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
if(df_view_is_nil(memory))
|
||||
if(layout == Layout_Default && df_view_is_nil(memory))
|
||||
{
|
||||
memory = df_view_alloc();
|
||||
df_view_equip_spec(ws, memory, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_Memory), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
@@ -1458,102 +1473,177 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
df_view_equip_spec(ws, getting_started, df_view_spec_from_gfx_view_kind(DF_GfxViewKind_GettingStarted), &df_g_nil_entity, str8_lit(""), &df_g_nil_cfg_node);
|
||||
}
|
||||
|
||||
// rjf: root split
|
||||
ws->root_panel->split_axis = Axis2_X;
|
||||
DF_Panel *root_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(ws->root_panel, ws->root_panel->last, root_0);
|
||||
df_panel_insert(ws->root_panel, ws->root_panel->last, root_1);
|
||||
root_0->pct_of_parent = 0.85f;
|
||||
root_1->pct_of_parent = 0.15f;
|
||||
|
||||
// rjf: root_0 split
|
||||
root_0->split_axis = Axis2_Y;
|
||||
DF_Panel *root_0_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0, root_0->last, root_0_0);
|
||||
df_panel_insert(root_0, root_0->last, root_0_1);
|
||||
root_0_0->pct_of_parent = 0.80f;
|
||||
root_0_1->pct_of_parent = 0.20f;
|
||||
|
||||
// rjf: root_1 split
|
||||
root_1->split_axis = Axis2_Y;
|
||||
DF_Panel *root_1_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_1_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_1, root_1->last, root_1_0);
|
||||
df_panel_insert(root_1, root_1->last, root_1_1);
|
||||
root_1_0->pct_of_parent = 0.50f;
|
||||
root_1_1->pct_of_parent = 0.50f;
|
||||
df_panel_insert_tab_view(root_1_0, root_1_0->last_tab_view, targets);
|
||||
df_panel_insert_tab_view(root_1_1, root_1_1->last_tab_view, scheduler);
|
||||
root_1_0->selected_tab_view = df_handle_from_view(targets);
|
||||
root_1_1->selected_tab_view = df_handle_from_view(scheduler);
|
||||
root_1_1->tab_side = Side_Max;
|
||||
|
||||
// rjf: root_0_0 split
|
||||
root_0_0->split_axis = Axis2_X;
|
||||
DF_Panel *root_0_0_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_0_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0_0, root_0_0->last, root_0_0_0);
|
||||
df_panel_insert(root_0_0, root_0_0->last, root_0_0_1);
|
||||
root_0_0_0->pct_of_parent = 0.25f;
|
||||
root_0_0_1->pct_of_parent = 0.75f;
|
||||
|
||||
// rjf: root_0_0_0 split
|
||||
root_0_0_0->split_axis = Axis2_Y;
|
||||
DF_Panel *root_0_0_0_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_0_0_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_0);
|
||||
df_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_1);
|
||||
root_0_0_0_0->pct_of_parent = 0.5f;
|
||||
root_0_0_0_1->pct_of_parent = 0.5f;
|
||||
df_panel_insert_tab_view(root_0_0_0_0, root_0_0_0_0->last_tab_view, disasm);
|
||||
root_0_0_0_0->selected_tab_view = df_handle_from_view(disasm);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, breakpoints);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, watch_pins);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, output);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, memory);
|
||||
root_0_0_0_1->selected_tab_view = df_handle_from_view(output);
|
||||
|
||||
// rjf: root_0_1 split
|
||||
root_0_1->split_axis = Axis2_X;
|
||||
DF_Panel *root_0_1_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_1_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0_1, root_0_1->last, root_0_1_0);
|
||||
df_panel_insert(root_0_1, root_0_1->last, root_0_1_1);
|
||||
root_0_1_0->pct_of_parent = 0.60f;
|
||||
root_0_1_1->pct_of_parent = 0.40f;
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, watch);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, locals);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, regs);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, globals);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, tlocals);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, types);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, procs);
|
||||
root_0_1_0->selected_tab_view = df_handle_from_view(watch);
|
||||
root_0_1_0->tab_side = Side_Max;
|
||||
df_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, callstack);
|
||||
df_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, modules);
|
||||
root_0_1_1->selected_tab_view = df_handle_from_view(callstack);
|
||||
root_0_1_1->tab_side = Side_Max;
|
||||
|
||||
// rjf: fill main panel with getting started, OR all collected code views
|
||||
if(code_views.count == 0)
|
||||
//- rjf: apply layout
|
||||
switch(layout)
|
||||
{
|
||||
df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, getting_started);
|
||||
}
|
||||
else for(DF_HandleNode *n = code_views.first; n != 0; n = n->next)
|
||||
{
|
||||
DF_View *view = df_view_from_handle(n->handle);
|
||||
if(!df_view_is_nil(view))
|
||||
//- rjf: default layout
|
||||
case Layout_Default:
|
||||
{
|
||||
df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, view);
|
||||
}
|
||||
// rjf: root split
|
||||
ws->root_panel->split_axis = Axis2_X;
|
||||
DF_Panel *root_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(ws->root_panel, ws->root_panel->last, root_0);
|
||||
df_panel_insert(ws->root_panel, ws->root_panel->last, root_1);
|
||||
root_0->pct_of_parent = 0.85f;
|
||||
root_1->pct_of_parent = 0.15f;
|
||||
|
||||
// rjf: root_0 split
|
||||
root_0->split_axis = Axis2_Y;
|
||||
DF_Panel *root_0_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0, root_0->last, root_0_0);
|
||||
df_panel_insert(root_0, root_0->last, root_0_1);
|
||||
root_0_0->pct_of_parent = 0.80f;
|
||||
root_0_1->pct_of_parent = 0.20f;
|
||||
|
||||
// rjf: root_1 split
|
||||
root_1->split_axis = Axis2_Y;
|
||||
DF_Panel *root_1_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_1_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_1, root_1->last, root_1_0);
|
||||
df_panel_insert(root_1, root_1->last, root_1_1);
|
||||
root_1_0->pct_of_parent = 0.50f;
|
||||
root_1_1->pct_of_parent = 0.50f;
|
||||
df_panel_insert_tab_view(root_1_0, root_1_0->last_tab_view, targets);
|
||||
df_panel_insert_tab_view(root_1_1, root_1_1->last_tab_view, scheduler);
|
||||
root_1_0->selected_tab_view = df_handle_from_view(targets);
|
||||
root_1_1->selected_tab_view = df_handle_from_view(scheduler);
|
||||
root_1_1->tab_side = Side_Max;
|
||||
|
||||
// rjf: root_0_0 split
|
||||
root_0_0->split_axis = Axis2_X;
|
||||
DF_Panel *root_0_0_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_0_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0_0, root_0_0->last, root_0_0_0);
|
||||
df_panel_insert(root_0_0, root_0_0->last, root_0_0_1);
|
||||
root_0_0_0->pct_of_parent = 0.25f;
|
||||
root_0_0_1->pct_of_parent = 0.75f;
|
||||
|
||||
// rjf: root_0_0_0 split
|
||||
root_0_0_0->split_axis = Axis2_Y;
|
||||
DF_Panel *root_0_0_0_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_0_0_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_0);
|
||||
df_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_1);
|
||||
root_0_0_0_0->pct_of_parent = 0.5f;
|
||||
root_0_0_0_1->pct_of_parent = 0.5f;
|
||||
df_panel_insert_tab_view(root_0_0_0_0, root_0_0_0_0->last_tab_view, disasm);
|
||||
root_0_0_0_0->selected_tab_view = df_handle_from_view(disasm);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, breakpoints);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, watch_pins);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, output);
|
||||
df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, memory);
|
||||
root_0_0_0_1->selected_tab_view = df_handle_from_view(output);
|
||||
|
||||
// rjf: root_0_1 split
|
||||
root_0_1->split_axis = Axis2_X;
|
||||
DF_Panel *root_0_1_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_0_1_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(root_0_1, root_0_1->last, root_0_1_0);
|
||||
df_panel_insert(root_0_1, root_0_1->last, root_0_1_1);
|
||||
root_0_1_0->pct_of_parent = 0.60f;
|
||||
root_0_1_1->pct_of_parent = 0.40f;
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, watch);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, locals);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, regs);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, globals);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, tlocals);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, types);
|
||||
df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, procs);
|
||||
root_0_1_0->selected_tab_view = df_handle_from_view(watch);
|
||||
root_0_1_0->tab_side = Side_Max;
|
||||
df_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, callstack);
|
||||
df_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, modules);
|
||||
root_0_1_1->selected_tab_view = df_handle_from_view(callstack);
|
||||
root_0_1_1->tab_side = Side_Max;
|
||||
|
||||
// rjf: fill main panel with getting started, OR all collected code views
|
||||
if(code_views.count == 0)
|
||||
{
|
||||
df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, getting_started);
|
||||
}
|
||||
else for(DF_HandleNode *n = code_views.first; n != 0; n = n->next)
|
||||
{
|
||||
DF_View *view = df_view_from_handle(n->handle);
|
||||
if(!df_view_is_nil(view))
|
||||
{
|
||||
df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, view);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: choose initial focused panel
|
||||
ws->focused_panel = root_0_0_1;
|
||||
}break;
|
||||
|
||||
//- rjf: compact layout:
|
||||
case Layout_Compact:
|
||||
{
|
||||
// rjf: root split
|
||||
ws->root_panel->split_axis = Axis2_X;
|
||||
DF_Panel *root_0 = df_panel_alloc(ws);
|
||||
DF_Panel *root_1 = df_panel_alloc(ws);
|
||||
df_panel_insert(ws->root_panel, ws->root_panel->last, root_0);
|
||||
df_panel_insert(ws->root_panel, ws->root_panel->last, root_1);
|
||||
root_0->pct_of_parent = 0.25f;
|
||||
root_1->pct_of_parent = 0.75f;
|
||||
|
||||
// rjf: root_0 split
|
||||
root_0->split_axis = Axis2_Y;
|
||||
DF_Panel *root_0_0 = df_panel_alloc(ws);
|
||||
{
|
||||
if(!df_view_is_nil(watch)) { df_panel_insert_tab_view(root_0_0, root_0_0->last_tab_view, watch); }
|
||||
if(!df_view_is_nil(types)) { df_panel_insert_tab_view(root_0_0, root_0_0->last_tab_view, types); }
|
||||
root_0_0->selected_tab_view = df_handle_from_view(watch);
|
||||
}
|
||||
DF_Panel *root_0_1 = df_panel_alloc(ws);
|
||||
{
|
||||
if(!df_view_is_nil(scheduler)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, scheduler); }
|
||||
if(!df_view_is_nil(targets)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, targets); }
|
||||
if(!df_view_is_nil(breakpoints)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, breakpoints); }
|
||||
if(!df_view_is_nil(watch_pins)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, watch_pins); }
|
||||
root_0_1->selected_tab_view = df_handle_from_view(scheduler);
|
||||
}
|
||||
DF_Panel *root_0_2 = df_panel_alloc(ws);
|
||||
{
|
||||
if(!df_view_is_nil(disasm)) { df_panel_insert_tab_view(root_0_2, root_0_2->last_tab_view, disasm); }
|
||||
if(!df_view_is_nil(output)) { df_panel_insert_tab_view(root_0_2, root_0_2->last_tab_view, output); }
|
||||
root_0_2->selected_tab_view = df_handle_from_view(disasm);
|
||||
}
|
||||
DF_Panel *root_0_3 = df_panel_alloc(ws);
|
||||
{
|
||||
if(!df_view_is_nil(callstack)) { df_panel_insert_tab_view(root_0_3, root_0_3->last_tab_view, callstack); }
|
||||
if(!df_view_is_nil(modules)) { df_panel_insert_tab_view(root_0_3, root_0_3->last_tab_view, modules); }
|
||||
root_0_3->selected_tab_view = df_handle_from_view(callstack);
|
||||
}
|
||||
df_panel_insert(root_0, root_0->last, root_0_0);
|
||||
df_panel_insert(root_0, root_0->last, root_0_1);
|
||||
df_panel_insert(root_0, root_0->last, root_0_2);
|
||||
df_panel_insert(root_0, root_0->last, root_0_3);
|
||||
root_0_0->pct_of_parent = 0.25f;
|
||||
root_0_1->pct_of_parent = 0.25f;
|
||||
root_0_2->pct_of_parent = 0.25f;
|
||||
root_0_3->pct_of_parent = 0.25f;
|
||||
|
||||
// rjf: fill main panel with getting started, OR all collected code views
|
||||
if(code_views.count == 0)
|
||||
{
|
||||
df_panel_insert_tab_view(root_1, root_1->last_tab_view, getting_started);
|
||||
}
|
||||
else for(DF_HandleNode *n = code_views.first; n != 0; n = n->next)
|
||||
{
|
||||
DF_View *view = df_view_from_handle(n->handle);
|
||||
if(!df_view_is_nil(view))
|
||||
{
|
||||
df_panel_insert_tab_view(root_1, root_1->last_tab_view, view);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: choose initial focused panel
|
||||
ws->focused_panel = root_1;
|
||||
}break;
|
||||
}
|
||||
|
||||
// rjf: choose initial focused panel
|
||||
ws->focused_panel = root_0_0_1;
|
||||
|
||||
// rjf: dispatch cfg saves
|
||||
for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1))
|
||||
{
|
||||
@@ -4216,6 +4306,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
DF_CoreCmdKind_TabBarTop,
|
||||
DF_CoreCmdKind_TabBarBottom,
|
||||
DF_CoreCmdKind_ResetToDefaultPanels,
|
||||
DF_CoreCmdKind_ResetToCompactPanels,
|
||||
};
|
||||
U32 codepoints[] =
|
||||
{
|
||||
@@ -4231,6 +4322,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
Assert(ArrayCount(codepoints) == ArrayCount(cmds));
|
||||
df_cmd_list_menu_buttons(ws, ArrayCount(cmds), cmds, codepoints);
|
||||
|
||||
Reference in New Issue
Block a user