mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
GUI: Tab split option in toolbar
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4083 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e15de53f15
commit
f9cf9c7610
@ -247,6 +247,7 @@ EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote)
|
||||
|
||||
EVT_MENU(IDM_PERSPECTIVE_0, CFrame::OnToolBar)
|
||||
EVT_MENU(IDM_PERSPECTIVE_1, CFrame::OnToolBar)
|
||||
EVT_MENU(IDM_TAB_SPLIT, CFrame::OnToolBar)
|
||||
|
||||
#if defined(HAVE_SFML) && HAVE_SFML
|
||||
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
|
||||
@ -372,7 +373,7 @@ CFrame::CFrame(bool showLogWindow,
|
||||
m_Panel = new CPanel(this, IDM_MPANEL);
|
||||
//wxPanel * m_Panel2 = new wxPanel(this, wxID_ANY);
|
||||
|
||||
static int Style = wxAUI_NB_TOP | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
|
||||
static int Style = wxAUI_NB_TOP | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
|
||||
wxBitmap aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
|
||||
|
||||
if (UseDebugger)
|
||||
|
@ -115,6 +115,7 @@ class CFrame : public wxFrame
|
||||
void HidePane();
|
||||
void SetSimplePaneSize();
|
||||
void SetPaneSize(wxArrayInt,wxArrayInt);
|
||||
void ToggleNotebookStyle(long);
|
||||
void Save();
|
||||
|
||||
private:
|
||||
|
@ -282,8 +282,9 @@ void CFrame::PopulateToolbarAui(wxAuiToolBar* ToolBar)
|
||||
h = m_Bitmaps[Toolbar_FileOpen].GetHeight();
|
||||
ToolBar->SetToolBitmapSize(wxSize(w, h));
|
||||
|
||||
ToolBar->AddTool(IDM_PERSPECTIVE_0, wxT("View 1"), g_pCodeWindow->m_Bitmaps[Toolbar_GotoPC], wxT("View 1"));
|
||||
ToolBar->AddTool(IDM_PERSPECTIVE_1, wxT("View 2"), g_pCodeWindow->m_Bitmaps[Toolbar_GotoPC], wxT("View 2"));
|
||||
ToolBar->AddTool(IDM_PERSPECTIVE_0, wxT("View 1"), g_pCodeWindow->m_Bitmaps[Toolbar_GotoPC], wxT("View 1"), wxITEM_CHECK);
|
||||
ToolBar->AddTool(IDM_PERSPECTIVE_1, wxT("View 2"), g_pCodeWindow->m_Bitmaps[Toolbar_GotoPC], wxT("View 2"), wxITEM_CHECK);
|
||||
ToolBar->AddTool(IDM_TAB_SPLIT, wxT("Split"), g_pCodeWindow->m_Bitmaps[Toolbar_GotoPC], wxT("Tab Split"), wxITEM_CHECK);
|
||||
|
||||
ToolBar->Realize();
|
||||
}
|
||||
@ -719,13 +720,32 @@ void CFrame::OnToolBar(wxCommandEvent& event)
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_PERSPECTIVE_0:
|
||||
m_ToolBarAui->ToggleTool(IDM_PERSPECTIVE_1, false);
|
||||
DoLoadPerspective(0);
|
||||
break;
|
||||
case IDM_PERSPECTIVE_1:
|
||||
m_ToolBarAui->ToggleTool(IDM_PERSPECTIVE_0, false);
|
||||
DoLoadPerspective(1);
|
||||
break;
|
||||
case IDM_TAB_SPLIT:
|
||||
ToggleNotebookStyle(wxAUI_NB_TAB_SPLIT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void CFrame::ToggleNotebookStyle(long Style)
|
||||
{
|
||||
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
|
||||
for (int i = 0, Count = AllPanes.GetCount(); i < Count; ++i)
|
||||
{
|
||||
wxAuiPaneInfo& Pane = AllPanes.Item(i);
|
||||
if (Pane.window->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
||||
{
|
||||
wxAuiNotebook* NB = (wxAuiNotebook*)Pane.window;
|
||||
NB->SetWindowStyleFlag(NB->GetWindowStyleFlag() ^ Style);
|
||||
NB->Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@ -1096,7 +1116,6 @@ void CFrame::UpdateGUI()
|
||||
m_ToolBar->SetToolLabel(IDM_PLAY, _("Pause"));
|
||||
}
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->SetText(_("&Pause\tF10"));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -179,6 +179,7 @@ enum
|
||||
ID_TOOLBAR_AUI,
|
||||
IDM_PERSPECTIVE_0,
|
||||
IDM_PERSPECTIVE_1,
|
||||
IDM_TAB_SPLIT,
|
||||
// --------------------------------------------------------------
|
||||
|
||||
IDM_TOGGLE_DUALCORE, // Other
|
||||
|
Loading…
Reference in New Issue
Block a user