Added the ability to split the Debugger window horizontally and vertically via the Add Panes menu.
This commit is contained in:
parent
a3f6cbfe6b
commit
12155ddee4
|
@ -510,7 +510,13 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& core_startup_parameter
|
|||
pPerspectives->AppendSubMenu(Parent->m_SavedPerspectives, _("Saved perspectives"));
|
||||
Parent->PopulateSavedPerspectives();
|
||||
pPerspectives->AppendSeparator();
|
||||
pPerspectives->Append(IDM_PERSPECTIVES_ADD_PANE, _("Add new pane"));
|
||||
wxMenu* pAddPane = new wxMenu;
|
||||
pPerspectives->AppendSubMenu(pAddPane, _("Add new pane to"));
|
||||
pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_TOP, _("Top"));
|
||||
pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_BOTTOM, _("Bottom"));
|
||||
pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_LEFT, _("Left"));
|
||||
pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_RIGHT, _("Right"));
|
||||
pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_CENTER, _("Center"));
|
||||
pPerspectives->Append(IDM_TAB_SPLIT, _("Tab split"), "", wxITEM_CHECK);
|
||||
pPerspectives->Append(IDM_NO_DOCKING, _("Disable docking"), "Disable docking of perspective panes to main window", wxITEM_CHECK);
|
||||
|
||||
|
|
|
@ -278,7 +278,11 @@ EVT_MENU(IDM_CONFIG_MENU_COMMANDS, CFrame::OnConfigMenuCommands)
|
|||
EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_EDIT_PERSPECTIVES, CFrame::OnPerspectiveMenu)
|
||||
// Drop down
|
||||
EVT_MENU(IDM_PERSPECTIVES_ADD_PANE, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_PERSPECTIVES_ADD_PANE_TOP, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_PERSPECTIVES_ADD_PANE_BOTTOM, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_PERSPECTIVES_ADD_PANE_LEFT, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_PERSPECTIVES_ADD_PANE_RIGHT, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_PERSPECTIVES_ADD_PANE_CENTER, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU_RANGE(IDM_PERSPECTIVES_0, IDM_PERSPECTIVES_100, CFrame::OnSelectPerspective)
|
||||
EVT_MENU(IDM_ADD_PERSPECTIVE, CFrame::OnPerspectiveMenu)
|
||||
EVT_MENU(IDM_TAB_SPLIT, CFrame::OnPerspectiveMenu)
|
||||
|
|
|
@ -196,6 +196,23 @@ private:
|
|||
EToolbar_Max
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Toolbar_Delete,
|
||||
Toolbar_Add_BP,
|
||||
Toolbar_Add_MC,
|
||||
Num_Bitmaps
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ADD_PANE_TOP,
|
||||
ADD_PANE_BOTTOM,
|
||||
ADD_PANE_LEFT,
|
||||
ADD_PANE_RIGHT,
|
||||
ADD_PANE_CENTER
|
||||
};
|
||||
|
||||
wxTimer m_poll_hotkey_timer;
|
||||
|
||||
wxBitmap m_Bitmaps[EToolbar_Max];
|
||||
|
@ -239,7 +256,7 @@ private:
|
|||
const wxString& title = "",
|
||||
wxWindow * = nullptr);
|
||||
wxString AuiFullscreen, AuiCurrent;
|
||||
void AddPane();
|
||||
void AddPane(int dir);
|
||||
void UpdateCurrentPerspective();
|
||||
void SaveIniPerspectives();
|
||||
void LoadIniPerspectives();
|
||||
|
|
|
@ -527,8 +527,20 @@ void CFrame::OnPerspectiveMenu(wxCommandEvent& event)
|
|||
GetStatusBar()->SetStatusText(StrToWxStr(std::string
|
||||
("Saved " + Perspectives[ActivePerspective].Name)), 0);
|
||||
break;
|
||||
case IDM_PERSPECTIVES_ADD_PANE:
|
||||
AddPane();
|
||||
case IDM_PERSPECTIVES_ADD_PANE_TOP:
|
||||
AddPane(ADD_PANE_TOP);
|
||||
break;
|
||||
case IDM_PERSPECTIVES_ADD_PANE_BOTTOM:
|
||||
AddPane(ADD_PANE_BOTTOM);
|
||||
break;
|
||||
case IDM_PERSPECTIVES_ADD_PANE_LEFT:
|
||||
AddPane(ADD_PANE_LEFT);
|
||||
break;
|
||||
case IDM_PERSPECTIVES_ADD_PANE_RIGHT:
|
||||
AddPane(ADD_PANE_RIGHT);
|
||||
break;
|
||||
case IDM_PERSPECTIVES_ADD_PANE_CENTER:
|
||||
AddPane(ADD_PANE_CENTER);
|
||||
break;
|
||||
case IDM_EDIT_PERSPECTIVES:
|
||||
m_bEdit = event.IsChecked();
|
||||
|
@ -877,14 +889,37 @@ void CFrame::SaveIniPerspectives()
|
|||
TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
|
||||
}
|
||||
|
||||
void CFrame::AddPane()
|
||||
void CFrame::AddPane(int dir)
|
||||
{
|
||||
int PaneNum = GetNotebookCount() + 1;
|
||||
wxString PaneName = wxString::Format("Pane %i", PaneNum);
|
||||
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
|
||||
wxAuiPaneInfo PaneInfo = wxAuiPaneInfo()
|
||||
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking)
|
||||
.Name(PaneName).Caption(PaneName)
|
||||
.Position(GetNotebookCount()));
|
||||
.Position(GetNotebookCount());
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case ADD_PANE_TOP:
|
||||
PaneInfo = PaneInfo.Top();
|
||||
break;
|
||||
case ADD_PANE_BOTTOM:
|
||||
PaneInfo = PaneInfo.Bottom();
|
||||
break;
|
||||
case ADD_PANE_LEFT:
|
||||
PaneInfo = PaneInfo.Left();
|
||||
break;
|
||||
case ADD_PANE_RIGHT:
|
||||
PaneInfo = PaneInfo.Right();
|
||||
break;
|
||||
case ADD_PANE_CENTER:
|
||||
PaneInfo = PaneInfo.Center();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
m_Mgr->AddPane(CreateEmptyNotebook(), PaneInfo);
|
||||
|
||||
AddRemoveBlankPage();
|
||||
m_Mgr->Update();
|
||||
|
|
|
@ -250,7 +250,11 @@ enum
|
|||
ID_TOOLBAR_AUI,
|
||||
IDM_SAVE_PERSPECTIVE,
|
||||
IDM_ADD_PERSPECTIVE,
|
||||
IDM_PERSPECTIVES_ADD_PANE,
|
||||
IDM_PERSPECTIVES_ADD_PANE_TOP,
|
||||
IDM_PERSPECTIVES_ADD_PANE_BOTTOM,
|
||||
IDM_PERSPECTIVES_ADD_PANE_LEFT,
|
||||
IDM_PERSPECTIVES_ADD_PANE_RIGHT,
|
||||
IDM_PERSPECTIVES_ADD_PANE_CENTER,
|
||||
IDM_EDIT_PERSPECTIVES,
|
||||
IDM_TAB_SPLIT,
|
||||
IDM_NO_DOCKING,
|
||||
|
|
Loading…
Reference in New Issue