Lots more work on making the frame aui stuff functional.

Also added a DSPCORE_STOP state.  The DSP-LLE debugger window segmentation faults if it is openned when a game is not running.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5931 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-07-22 02:05:28 +00:00
parent fb36de2338
commit 3859a7dce2
33 changed files with 245 additions and 534 deletions

View File

@ -48,17 +48,9 @@ class CCodeWindow
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxT("Dolphin-Debugger")
long style = wxTAB_TRAVERSAL,
const wxString& name = wxT("Code")
);
/*
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& title = _T("Dolphin-Debugger"),
const wxPoint& pos = wxPoint(950, 100),
const wxSize& size = wxSize(400, 500),
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
*/
~CCodeWindow();
void Load();
@ -122,13 +114,13 @@ class CCodeWindow
bool bAutomaticStart; bool bBootToPause;
int iLogWindow;
int iConsoleWindow;
bool bCodeWindow; int iCodeWindow; bool bFloatCodeWindow;
bool bRegisterWindow; int iRegisterWindow; bool bFloatRegisterWindow;
bool bBreakpointWindow; int iBreakpointWindow; bool bFloatBreakpointWindow;
bool bMemoryWindow; int iMemoryWindow; bool bFloatMemoryWindow;
bool bJitWindow; int iJitWindow; bool bFloatJitWindow;
bool bSoundWindow; int iSoundWindow; bool bFloatSoundWindow;
bool bVideoWindow; int iVideoWindow; bool bFloatVideoWindow;
bool bCodeWindow; int iCodeWindow;
bool bRegisterWindow; int iRegisterWindow;
bool bBreakpointWindow; int iBreakpointWindow;
bool bMemoryWindow; int iMemoryWindow;
bool bJitWindow; int iJitWindow;
bool bSoundWindow; int iSoundWindow;
bool bVideoWindow; int iVideoWindow;
private:

View File

@ -107,15 +107,15 @@ void CCodeWindow::Load()
ini.Get(_Section.c_str(), "Sound", &iSoundWindow, 0);
ini.Get(_Section.c_str(), "Video", &iVideoWindow, 0);
// Get floating setting
ini.Get("Float", "Log", &Parent->bFloatLogWindow, false);
ini.Get("Float", "Console", &Parent->bFloatConsoleWindow, false);
ini.Get("Float", "Code", &bFloatCodeWindow, false);
ini.Get("Float", "Registers", &bFloatRegisterWindow, false);
ini.Get("Float", "Breakpoints", &bFloatBreakpointWindow, false);
ini.Get("Float", "Memory", &bFloatMemoryWindow, false);
ini.Get("Float", "JIT", &bFloatJitWindow, false);
ini.Get("Float", "Sound", &bFloatSoundWindow, false);
ini.Get("Float", "Video", &bFloatVideoWindow, false);
ini.Get("Float", "Log", &Parent->bFloatWindow[0], false);
ini.Get("Float", "Console", &Parent->bFloatWindow[1], false);
ini.Get("Float", "Code", &Parent->bFloatWindow[2], false);
ini.Get("Float", "Registers", &Parent->bFloatWindow[3], false);
ini.Get("Float", "Breakpoints", &Parent->bFloatWindow[4], false);
ini.Get("Float", "Memory", &Parent->bFloatWindow[5], false);
ini.Get("Float", "JIT", &Parent->bFloatWindow[6], false);
ini.Get("Float", "Sound", &Parent->bFloatWindow[7], false);
ini.Get("Float", "Video", &Parent->bFloatWindow[8], false);
// Boot to pause or not
ini.Get("ShowOnStart", "AutomaticStart", &bAutomaticStart, false);
@ -470,7 +470,8 @@ void CCodeWindow::OnToggleWindow(wxCommandEvent& event)
void CCodeWindow::ToggleCodeWindow(bool bShow)
{
if (bShow)
Parent->DoAddPage(this, iCodeWindow, wxT("Code"), bFloatCodeWindow);
Parent->DoAddPage(this, iCodeWindow,
Parent->bFloatWindow[IDM_CODEWINDOW - IDM_LOGWINDOW]);
else // hide
Parent->DoRemovePage(this);
}
@ -483,7 +484,7 @@ void CCodeWindow::ToggleRegisterWindow(bool bShow)
if (!m_RegisterWindow)
m_RegisterWindow = new CRegisterWindow(Parent, IDM_REGISTERWINDOW);
Parent->DoAddPage(m_RegisterWindow, iRegisterWindow,
wxT("Registers"), bFloatRegisterWindow);
Parent->bFloatWindow[IDM_REGISTERWINDOW - IDM_LOGWINDOW]);
}
else // hide
Parent->DoRemovePage(m_RegisterWindow);
@ -497,7 +498,7 @@ void CCodeWindow::ToggleBreakPointWindow(bool bShow)
if (!m_BreakpointWindow)
m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
Parent->DoAddPage(m_BreakpointWindow, iBreakpointWindow,
wxT("Breakpoints"), bFloatBreakpointWindow);
Parent->bFloatWindow[IDM_BREAKPOINTWINDOW - IDM_LOGWINDOW]);
}
else // hide
Parent->DoRemovePage(m_BreakpointWindow);
@ -510,7 +511,8 @@ void CCodeWindow::ToggleMemoryWindow(bool bShow)
{
if (!m_MemoryWindow)
m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
Parent->DoAddPage(m_MemoryWindow, iMemoryWindow, wxT("Memory"), bFloatMemoryWindow);
Parent->DoAddPage(m_MemoryWindow, iMemoryWindow,
Parent->bFloatWindow[IDM_MEMORYWINDOW - IDM_LOGWINDOW]);
}
else // hide
Parent->DoRemovePage(m_MemoryWindow);
@ -523,7 +525,8 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
{
if (!m_JitWindow)
m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
Parent->DoAddPage(m_JitWindow, iJitWindow, wxT("JIT"), bFloatJitWindow);
Parent->DoAddPage(m_JitWindow, iJitWindow,
Parent->bFloatWindow[IDM_JITWINDOW - IDM_LOGWINDOW]);
}
else // hide
Parent->DoRemovePage(m_JitWindow);
@ -537,50 +540,51 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
void CCodeWindow::ToggleDLLWindow(int Id, bool bShow)
{
std::string DLLName;
wxString Title;
int PluginType, i;
bool bFloat;
wxPanel *Win;
switch(Id)
{
case IDM_SOUNDWINDOW:
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str();
PluginType = PLUGIN_TYPE_DSP;
Title = wxT("Sound");
i = iSoundWindow;
bFloat = bFloatSoundWindow;
bFloat = Parent->bFloatWindow[IDM_SOUNDWINDOW - IDM_LOGWINDOW];
break;
case IDM_VIDEOWINDOW:
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str();
PluginType = PLUGIN_TYPE_VIDEO;
Title = wxT("Video");
i = iVideoWindow;
bFloat = bFloatVideoWindow;
bFloat = Parent->bFloatWindow[IDM_VIDEOWINDOW - IDM_LOGWINDOW];
break;
default:
PanicAlert("CCodeWindow::ToggleDLLWindow called with invalid Id");
return;
}
GetMenuBar()->FindItem(Id)->Check(bShow);
if (bShow)
{
// Show window
CPluginManager::GetInstance().OpenDebug(Parent,
Win = (wxPanel *)CPluginManager::GetInstance().OpenDebug(Parent,
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
wxWindow* Win = Parent->GetWxWindow(Title);
if (Win)
{
Win->Show();
Win->SetId(Id);
Parent->DoAddPage(Win, i, Title, bFloat);
Parent->DoAddPage(Win, i, bFloat);
}
}
else
{
Parent->DoRemovePageId(Id, false, false);
CPluginManager::GetInstance().OpenDebug(Parent,
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
Win = (wxPanel *)FindWindowById(Id);
if (Win)
{
Parent->DoRemovePageId(Id, false, false);
Win->Close();
Win->Destroy();
}
}
GetMenuBar()->FindItem(Id)->Check(bShow && !!Win);
}

View File

@ -67,9 +67,9 @@ BEGIN_EVENT_TABLE(CJitWindow, wxPanel)
END_EVENT_TABLE()
CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id,
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxPanel(parent, id, pos, size, style)
CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
const wxSize& size, long style, const wxString& name)
: wxPanel(parent, id, pos, size, style, name)
{
the_jit_window = this;
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);

View File

@ -46,10 +46,10 @@ class CJitWindow : public wxPanel
public:
CJitWindow(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& title = _T("JIT block viewer"),
const wxPoint& pos = wxPoint(950, 100),
const wxSize& size = wxSize(400, 500),
long style = wxNO_BORDER);
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxString& title = _T("JIT block viewer"));
~CJitWindow();
static void ViewAddr(u32 em_address);

View File

@ -71,8 +71,8 @@ EVT_CHECKBOX(IDM_HEX , CMemoryWindow::onHex)
END_EVENT_TABLE()
CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxPanel(parent, id, pos, size, style)
const wxPoint& pos, const wxSize& size, long style, const wxString& name)
: wxPanel(parent, id, pos, size, style, name)
{
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);

View File

@ -38,10 +38,10 @@ class CMemoryWindow
CMemoryWindow(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& title = _T("Dolphin-Memory"),
const wxPoint& pos = wxPoint(950, 100),
const wxSize& size = wxSize(400, 500),
long style = wxNO_BORDER);
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER,
const wxString& name = _T("Memory"));
~CMemoryWindow();
wxCheckBox* chk8;