GUI debugger: Added more windows to aui
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4065 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
2e24e7db06
commit
b185fedb85
|
@ -23,9 +23,6 @@ class CCodeWindow;
|
||||||
class wxListEvent;
|
class wxListEvent;
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
#undef BREAKPOINT_WINDOW_STYLE
|
|
||||||
#define BREAKPOINT_WINDOW_STYLE wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX | wxRESIZE_BORDER
|
|
||||||
|
|
||||||
class CBreakPointWindow
|
class CBreakPointWindow
|
||||||
: public wxFrame
|
: public wxFrame
|
||||||
{
|
{
|
||||||
|
@ -37,7 +34,7 @@ class CBreakPointWindow
|
||||||
|
|
||||||
CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id = 1, const wxString& title = wxT("Breakpoints"),
|
CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id = 1, const wxString& title = wxT("Breakpoints"),
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 250),
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 250),
|
||||||
long style = BREAKPOINT_WINDOW_STYLE);
|
long style = wxNO_BORDER);
|
||||||
|
|
||||||
virtual ~CBreakPointWindow();
|
virtual ~CBreakPointWindow();
|
||||||
|
|
||||||
|
|
|
@ -116,12 +116,12 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxPanel)
|
||||||
EVT_MENU(IDM_JITPOFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITPOFF, CCodeWindow::OnCPUMode)
|
||||||
EVT_MENU(IDM_JITSROFF, CCodeWindow::OnCPUMode)
|
EVT_MENU(IDM_JITSROFF, CCodeWindow::OnCPUMode)
|
||||||
|
|
||||||
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleRegisterWindow) //views
|
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleWindow) //views
|
||||||
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
|
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleMemoryWindow)
|
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleJitWindow)
|
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_SOUNDWINDOW, CCodeWindow::OnToggleSoundWindow)
|
EVT_MENU(IDM_SOUNDWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_VIDEOWINDOW, CCodeWindow::OnToggleVideoWindow)
|
EVT_MENU(IDM_VIDEOWINDOW, CCodeWindow::OnToggleWindow)
|
||||||
EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
|
EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
|
||||||
|
|
||||||
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
||||||
|
@ -178,6 +178,7 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
||||||
file.Load(DEBUGGER_CONFIG_FILE);
|
file.Load(DEBUGGER_CONFIG_FILE);
|
||||||
this->Load_(file);
|
this->Load_(file);
|
||||||
|
|
||||||
|
page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
|
||||||
InitBitmaps();
|
InitBitmaps();
|
||||||
|
|
||||||
CreateGUIControls(_LocalCoreStartupParameter);
|
CreateGUIControls(_LocalCoreStartupParameter);
|
||||||
|
@ -203,6 +204,9 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
||||||
|
|
||||||
CCodeWindow::~CCodeWindow()
|
CCodeWindow::~CCodeWindow()
|
||||||
{
|
{
|
||||||
|
// Will be fixed. Pointers currently non-NULL while object is deleted on close
|
||||||
|
|
||||||
|
/*
|
||||||
IniFile file;
|
IniFile file;
|
||||||
file.Load(DEBUGGER_CONFIG_FILE);
|
file.Load(DEBUGGER_CONFIG_FILE);
|
||||||
|
|
||||||
|
@ -213,6 +217,7 @@ CCodeWindow::~CCodeWindow()
|
||||||
if (m_JitWindow) m_JitWindow->Save(file);
|
if (m_JitWindow) m_JitWindow->Save(file);
|
||||||
|
|
||||||
file.Save(DEBUGGER_CONFIG_FILE);
|
file.Save(DEBUGGER_CONFIG_FILE);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,7 +226,7 @@ CCodeWindow::~CCodeWindow()
|
||||||
// ------------
|
// ------------
|
||||||
wxFrame *CCodeWindow::GetParentFrame()
|
wxFrame *CCodeWindow::GetParentFrame()
|
||||||
{
|
{
|
||||||
wxFrame *Parent = wxDynamicCast(GetParent(), wxFrame);
|
wxFrame *Parent = wxDynamicCast(GetParent()->GetParent(), wxFrame);
|
||||||
return Parent;
|
return Parent;
|
||||||
}
|
}
|
||||||
wxMenuBar *CCodeWindow::GetMenuBar()
|
wxMenuBar *CCodeWindow::GetMenuBar()
|
||||||
|
@ -240,6 +245,13 @@ void CCodeWindow::UpdateToolbar(wxAuiToolBar * _ToolBar2)
|
||||||
{
|
{
|
||||||
m_ToolBar2 = _ToolBar2;
|
m_ToolBar2 = _ToolBar2;
|
||||||
}
|
}
|
||||||
|
void CCodeWindow::UpdateNotebook(int _i, wxAuiNotebook * _NB)
|
||||||
|
{
|
||||||
|
if (_i == 0)
|
||||||
|
m_NB0 = _NB;
|
||||||
|
else
|
||||||
|
m_NB1 = _NB;
|
||||||
|
}
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
@ -407,31 +419,12 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
||||||
|
|
||||||
sync_event.Init();
|
sync_event.Init();
|
||||||
|
|
||||||
if (bRegisterWindow)
|
if (bRegisterWindow) OnToggleRegisterWindow(true, m_NB0);
|
||||||
{
|
if (bBreakpointWindow) OnToggleBreakPointWindow(true, m_NB1);
|
||||||
m_RegisterWindow = new CRegisterWindow(this);
|
if (bMemoryWindow) OnToggleMemoryWindow(true, m_NB0);
|
||||||
m_RegisterWindow->Show(true);
|
if (bJitWindow) OnToggleJitWindow(true, m_NB0);
|
||||||
}
|
if (bSoundWindow) OnToggleSoundWindow(true, m_NB1);
|
||||||
|
/*
|
||||||
if (bBreakpointWindow)
|
|
||||||
{
|
|
||||||
m_BreakpointWindow = new CBreakPointWindow(this, this);
|
|
||||||
m_BreakpointWindow->Show(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bMemoryWindow)
|
|
||||||
{
|
|
||||||
m_MemoryWindow = new CMemoryWindow(this);
|
|
||||||
m_MemoryWindow->Show(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bJitWindow)
|
|
||||||
{
|
|
||||||
m_JitWindow = new CJitWindow(this);
|
|
||||||
m_JitWindow->Show(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bSoundWindow)
|
|
||||||
{
|
{
|
||||||
// Possible todo: add some kind of if here to? can it fail?
|
// Possible todo: add some kind of if here to? can it fail?
|
||||||
CPluginManager::GetInstance().OpenDebug(
|
CPluginManager::GetInstance().OpenDebug(
|
||||||
|
@ -440,8 +433,10 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
||||||
PLUGIN_TYPE_DSP, true
|
PLUGIN_TYPE_DSP, true
|
||||||
);
|
);
|
||||||
} // don't have any else, just ignore it
|
} // don't have any else, just ignore it
|
||||||
|
*/
|
||||||
|
|
||||||
if (bVideoWindow)
|
if (bVideoWindow) OnToggleVideoWindow(true, m_NB1);
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
// possible todo: add some kind of if here to? can it fail?
|
// possible todo: add some kind of if here to? can it fail?
|
||||||
CPluginManager::GetInstance().OpenDebug(
|
CPluginManager::GetInstance().OpenDebug(
|
||||||
|
@ -450,6 +445,7 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
||||||
PLUGIN_TYPE_VIDEO, true
|
PLUGIN_TYPE_VIDEO, true
|
||||||
);
|
);
|
||||||
} // don't have any else, just ignore it
|
} // don't have any else, just ignore it
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/listbox.h>
|
#include <wx/listbox.h>
|
||||||
|
#include <wx/artprov.h>
|
||||||
#include <wx/aui/aui.h>
|
#include <wx/aui/aui.h>
|
||||||
|
|
||||||
#include "Thread.h"
|
#include "Thread.h"
|
||||||
|
@ -54,10 +55,12 @@ class CCodeWindow
|
||||||
// Function redirection
|
// Function redirection
|
||||||
wxFrame *GetParentFrame();
|
wxFrame *GetParentFrame();
|
||||||
wxMenuBar * GetMenuBar();
|
wxMenuBar * GetMenuBar();
|
||||||
wxAuiToolBar * GetToolBar();
|
wxAuiToolBar * GetToolBar(), * m_ToolBar2;
|
||||||
wxAuiToolBar * m_ToolBar2;
|
wxAuiNotebook *m_NB0, *m_NB1;
|
||||||
bool IsActive();
|
bool IsActive();
|
||||||
void UpdateToolbar(wxAuiToolBar *);
|
void UpdateToolbar(wxAuiToolBar *);
|
||||||
|
void UpdateNotebook(int, wxAuiNotebook *);
|
||||||
|
wxBitmap page_bmp;
|
||||||
|
|
||||||
void Load_(IniFile &file);
|
void Load_(IniFile &file);
|
||||||
void Load(IniFile &file);
|
void Load(IniFile &file);
|
||||||
|
@ -79,6 +82,13 @@ class CCodeWindow
|
||||||
void CreateSymbolsMenu();
|
void CreateSymbolsMenu();
|
||||||
void UpdateButtonStates();
|
void UpdateButtonStates();
|
||||||
|
|
||||||
|
// Sub dialogs
|
||||||
|
wxMenuBar* pMenuBar;
|
||||||
|
CRegisterWindow* m_RegisterWindow;
|
||||||
|
CBreakPointWindow* m_BreakpointWindow;
|
||||||
|
CMemoryWindow* m_MemoryWindow;
|
||||||
|
CJitWindow* m_JitWindow;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -123,12 +133,13 @@ class CCodeWindow
|
||||||
|
|
||||||
void OnAddrBoxChange(wxCommandEvent& event);
|
void OnAddrBoxChange(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnToggleRegisterWindow(wxCommandEvent& event);
|
void OnToggleWindow(wxCommandEvent& event);
|
||||||
void OnToggleBreakPointWindow(wxCommandEvent& event);
|
void OnToggleRegisterWindow(bool,wxAuiNotebook*);
|
||||||
void OnToggleMemoryWindow(wxCommandEvent& event);
|
void OnToggleBreakPointWindow(bool,wxAuiNotebook*);
|
||||||
void OnToggleJitWindow(wxCommandEvent& event);
|
void OnToggleMemoryWindow(bool,wxAuiNotebook*);
|
||||||
void OnToggleSoundWindow(wxCommandEvent& event);
|
void OnToggleJitWindow(bool,wxAuiNotebook*);
|
||||||
void OnToggleVideoWindow(wxCommandEvent& event);
|
void OnToggleSoundWindow(bool,wxAuiNotebook*);
|
||||||
|
void OnToggleVideoWindow(bool,wxAuiNotebook*);
|
||||||
void OnChangeFont(wxCommandEvent& event);
|
void OnChangeFont(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnHostMessage(wxCommandEvent& event);
|
void OnHostMessage(wxCommandEvent& event);
|
||||||
|
@ -145,13 +156,6 @@ class CCodeWindow
|
||||||
void DoTip(wxString text);
|
void DoTip(wxString text);
|
||||||
void OnKeyDown(wxKeyEvent& event);
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
|
|
||||||
// Sub dialogs
|
|
||||||
wxMenuBar* pMenuBar;
|
|
||||||
CRegisterWindow* m_RegisterWindow;
|
|
||||||
CBreakPointWindow* m_BreakpointWindow;
|
|
||||||
CMemoryWindow* m_MemoryWindow;
|
|
||||||
CJitWindow* m_JitWindow;
|
|
||||||
|
|
||||||
wxMenuItem* jitblocklinking, *jitunlimited, *jitoff;
|
wxMenuItem* jitblocklinking, *jitunlimited, *jitoff;
|
||||||
wxMenuItem* jitlsoff, *jitlslxzoff, *jitlslwzoff, *jitlslbzxoff;
|
wxMenuItem* jitlsoff, *jitlslxzoff, *jitlslwzoff, *jitlslbzxoff;
|
||||||
wxMenuItem* jitlspoff;
|
wxMenuItem* jitlspoff;
|
||||||
|
|
|
@ -308,14 +308,45 @@ void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::OnToggleRegisterWindow(wxCommandEvent& event)
|
|
||||||
|
// Change the global DebuggerFont
|
||||||
|
void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxFontData data;
|
||||||
|
data.SetInitialFont(GetFont());
|
||||||
|
|
||||||
|
wxFontDialog dialog(this, data);
|
||||||
|
if ( dialog.ShowModal() == wxID_OK )
|
||||||
|
DebuggerFont = dialog.GetFontData().GetChosenFont();
|
||||||
|
}
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Toogle windows
|
||||||
|
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||||
|
void CCodeWindow::OnToggleWindow(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
bool Show = GetMenuBar()->IsChecked(event.GetId());
|
bool Show = GetMenuBar()->IsChecked(event.GetId());
|
||||||
|
|
||||||
|
switch (event.GetId())
|
||||||
|
{
|
||||||
|
case IDM_REGISTERWINDOW: OnToggleRegisterWindow(Show, m_NB0); break;
|
||||||
|
case IDM_BREAKPOINTWINDOW: OnToggleBreakPointWindow(Show, m_NB1); break;
|
||||||
|
case IDM_MEMORYWINDOW: OnToggleMemoryWindow(Show, m_NB0); break;
|
||||||
|
case IDM_JITWINDOW: OnToggleJitWindow(Show, m_NB0); break;
|
||||||
|
case IDM_SOUNDWINDOW: OnToggleSoundWindow(Show, m_NB1); break;
|
||||||
|
case IDM_VIDEOWINDOW: OnToggleVideoWindow(Show, m_NB1); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCodeWindow::OnToggleRegisterWindow(bool Show, wxAuiNotebook * _NB)
|
||||||
|
{
|
||||||
if (Show)
|
if (Show)
|
||||||
{
|
{
|
||||||
if (!m_RegisterWindow) m_RegisterWindow = new CRegisterWindow(this);
|
if (m_RegisterWindow && _NB->GetPageIndex(m_RegisterWindow) != wxNOT_FOUND) return;
|
||||||
m_RegisterWindow->Show(true);
|
if (!m_RegisterWindow) m_RegisterWindow = new CRegisterWindow(GetParent()->GetParent());
|
||||||
|
_NB->AddPage(m_RegisterWindow, wxT("Registers"), true, page_bmp );
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
{
|
{
|
||||||
|
@ -324,19 +355,93 @@ void CCodeWindow::OnToggleRegisterWindow(wxCommandEvent& event)
|
||||||
// It should be true just after the menu item was selected,
|
// It should be true just after the menu item was selected,
|
||||||
// if there was no modeless dialog yet.
|
// if there was no modeless dialog yet.
|
||||||
wxASSERT(m_RegisterWindow != NULL);
|
wxASSERT(m_RegisterWindow != NULL);
|
||||||
if (m_RegisterWindow) m_RegisterWindow->Hide();
|
//if (m_RegisterWindow) m_RegisterWindow->Hide();
|
||||||
|
if (m_RegisterWindow)
|
||||||
|
{
|
||||||
|
_NB->RemovePage(_NB->GetPageIndex(m_RegisterWindow));
|
||||||
|
m_RegisterWindow->Hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
void CCodeWindow::OnToggleBreakPointWindow(bool Show, wxAuiNotebook * _NB)
|
||||||
// Toggle Sound Debugging Window
|
|
||||||
// ------------
|
|
||||||
void CCodeWindow::OnToggleSoundWindow(wxCommandEvent& event)
|
|
||||||
{
|
{
|
||||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
if (Show)
|
||||||
|
{
|
||||||
|
if (m_BreakpointWindow && _NB->GetPageIndex(m_BreakpointWindow) != wxNOT_FOUND) return;
|
||||||
|
if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, GetParent()->GetParent());
|
||||||
|
_NB->AddPage(m_BreakpointWindow, wxT("Breakpoints"), true, page_bmp );
|
||||||
|
}
|
||||||
|
else // hide
|
||||||
|
{
|
||||||
|
// If m_dialog is NULL, then possibly the system
|
||||||
|
// didn't report the checked menu item status correctly.
|
||||||
|
// It should be true just after the menu item was selected,
|
||||||
|
// if there was no modeless dialog yet.
|
||||||
|
wxASSERT(m_BreakpointWindow != NULL);
|
||||||
|
|
||||||
if (show)
|
if (m_BreakpointWindow)
|
||||||
|
{
|
||||||
|
_NB->RemovePage(_NB->GetPageIndex(m_BreakpointWindow));
|
||||||
|
m_BreakpointWindow->Hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCodeWindow::OnToggleJitWindow(bool Show, wxAuiNotebook * _NB)
|
||||||
|
{
|
||||||
|
if (Show)
|
||||||
|
{
|
||||||
|
if (m_JitWindow && _NB->GetPageIndex(m_JitWindow) != wxNOT_FOUND) return;
|
||||||
|
if (!m_JitWindow) m_JitWindow = new CJitWindow(GetParent()->GetParent());
|
||||||
|
_NB->AddPage(m_JitWindow, wxT("JIT"), true, page_bmp );
|
||||||
|
}
|
||||||
|
else // hide
|
||||||
|
{
|
||||||
|
// If m_dialog is NULL, then possibly the system
|
||||||
|
// didn't report the checked menu item status correctly.
|
||||||
|
// It should be true just after the menu item was selected,
|
||||||
|
// if there was no modeless dialog yet.
|
||||||
|
wxASSERT(m_JitWindow != NULL);
|
||||||
|
|
||||||
|
if (m_JitWindow)
|
||||||
|
{
|
||||||
|
_NB->RemovePage(_NB->GetPageIndex(m_JitWindow));
|
||||||
|
m_JitWindow->Hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CCodeWindow::OnToggleMemoryWindow(bool Show, wxAuiNotebook * _NB)
|
||||||
|
{
|
||||||
|
if (Show)
|
||||||
|
{
|
||||||
|
if (m_MemoryWindow && _NB->GetPageIndex(m_MemoryWindow) != wxNOT_FOUND) return;
|
||||||
|
if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(GetParent()->GetParent());
|
||||||
|
_NB->AddPage(m_MemoryWindow, wxT("Memory"), true, page_bmp );
|
||||||
|
}
|
||||||
|
else // hide
|
||||||
|
{
|
||||||
|
// If m_dialog is NULL, then possibly the system
|
||||||
|
// didn't report the checked menu item status correctly.
|
||||||
|
// It should be true just after the menu item was selected,
|
||||||
|
// if there was no modeless dialog yet.
|
||||||
|
wxASSERT(m_MemoryWindow != NULL);
|
||||||
|
|
||||||
|
if (m_MemoryWindow)
|
||||||
|
{
|
||||||
|
_NB->RemovePage(_NB->GetPageIndex(m_MemoryWindow));
|
||||||
|
m_MemoryWindow->Hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Toggle Sound Debugging Window
|
||||||
|
void CCodeWindow::OnToggleSoundWindow(bool Show, wxAuiNotebook * _NB)
|
||||||
|
{
|
||||||
|
if (Show)
|
||||||
{
|
{
|
||||||
// TODO: add some kind of if() check here to?
|
// TODO: add some kind of if() check here to?
|
||||||
CPluginManager::GetInstance().OpenDebug(
|
CPluginManager::GetInstance().OpenDebug(
|
||||||
|
@ -355,18 +460,14 @@ void CCodeWindow::OnToggleSoundWindow(wxCommandEvent& event)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ===========
|
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
|
||||||
// Toggle Video Debugging Window
|
// Toggle Video Debugging Window
|
||||||
// ------------
|
void CCodeWindow::OnToggleVideoWindow(bool Show, wxAuiNotebook * _NB)
|
||||||
void CCodeWindow::OnToggleVideoWindow(wxCommandEvent& event)
|
|
||||||
{
|
{
|
||||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
|
||||||
//GetMenuBar()->Check(event.GetId(), false); // Turn off
|
//GetMenuBar()->Check(event.GetId(), false); // Turn off
|
||||||
|
|
||||||
if (show)
|
if (Show)
|
||||||
{
|
{
|
||||||
// It works now, but I'll keep this message in case the problem reappears
|
// It works now, but I'll keep this message in case the problem reappears
|
||||||
/*if(Core::GetState() == Core::CORE_UNINITIALIZED)
|
/*if(Core::GetState() == Core::CORE_UNINITIALIZED)
|
||||||
|
@ -392,101 +493,5 @@ may cause a crash when a game is later started. Todo: figure out why and fix it.
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ===========
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
void CCodeWindow::OnToggleJitWindow(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
{
|
|
||||||
if (!m_JitWindow)
|
|
||||||
{
|
|
||||||
m_JitWindow = new CJitWindow(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_JitWindow->Show(true);
|
|
||||||
}
|
|
||||||
else // hide
|
|
||||||
{
|
|
||||||
// If m_dialog is NULL, then possibly the system
|
|
||||||
// didn't report the checked menu item status correctly.
|
|
||||||
// It should be true just after the menu item was selected,
|
|
||||||
// if there was no modeless dialog yet.
|
|
||||||
wxASSERT(m_JitWindow != NULL);
|
|
||||||
|
|
||||||
if (m_JitWindow)
|
|
||||||
{
|
|
||||||
m_JitWindow->Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CCodeWindow::OnToggleBreakPointWindow(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
{
|
|
||||||
if (!m_BreakpointWindow)
|
|
||||||
{
|
|
||||||
m_BreakpointWindow = new CBreakPointWindow(this, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_BreakpointWindow->Show(true);
|
|
||||||
}
|
|
||||||
else // hide
|
|
||||||
{
|
|
||||||
// If m_dialog is NULL, then possibly the system
|
|
||||||
// didn't report the checked menu item status correctly.
|
|
||||||
// It should be true just after the menu item was selected,
|
|
||||||
// if there was no modeless dialog yet.
|
|
||||||
wxASSERT(m_BreakpointWindow != NULL);
|
|
||||||
|
|
||||||
if (m_BreakpointWindow)
|
|
||||||
{
|
|
||||||
m_BreakpointWindow->Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCodeWindow::OnToggleMemoryWindow(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
|
||||||
|
|
||||||
if (show)
|
|
||||||
{
|
|
||||||
if (!m_MemoryWindow)
|
|
||||||
{
|
|
||||||
m_MemoryWindow = new CMemoryWindow(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_MemoryWindow->Show(true);
|
|
||||||
}
|
|
||||||
else // hide
|
|
||||||
{
|
|
||||||
// If m_dialog is NULL, then possibly the system
|
|
||||||
// didn't report the checked menu item status correctly.
|
|
||||||
// It should be true just after the menu item was selected,
|
|
||||||
// if there was no modeless dialog yet.
|
|
||||||
wxASSERT(m_MemoryWindow != NULL);
|
|
||||||
|
|
||||||
if (m_MemoryWindow)
|
|
||||||
{
|
|
||||||
m_MemoryWindow->Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
// Change the global DebuggerFont
|
|
||||||
void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
wxFontData data;
|
|
||||||
data.SetInitialFont(GetFont());
|
|
||||||
|
|
||||||
wxFontDialog dialog(this, data);
|
|
||||||
if ( dialog.ShowModal() == wxID_OK )
|
|
||||||
DebuggerFont = dialog.GetFontData().GetChosenFont();
|
|
||||||
}
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
const wxString& title = _T("JIT block viewer"),
|
const wxString& title = _T("JIT block viewer"),
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
const wxPoint& pos = wxPoint(950, 100),
|
||||||
const wxSize& size = wxSize(400, 500),
|
const wxSize& size = wxSize(400, 500),
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
long style = wxNO_BORDER);
|
||||||
|
|
||||||
~CJitWindow();
|
~CJitWindow();
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class CMemoryWindow
|
||||||
const wxString& title = _T("Dolphin-Memory"),
|
const wxString& title = _T("Dolphin-Memory"),
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
const wxPoint& pos = wxPoint(950, 100),
|
||||||
const wxSize& size = wxSize(400, 500),
|
const wxSize& size = wxSize(400, 500),
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
long style = wxNO_BORDER);
|
||||||
|
|
||||||
~CMemoryWindow();
|
~CMemoryWindow();
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ BEGIN_EVENT_TABLE(CRegisterWindow, wxDialog)
|
||||||
EVT_CLOSE(CRegisterWindow::OnClose)
|
EVT_CLOSE(CRegisterWindow::OnClose)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
, m_GPRGridView(NULL)
|
, m_GPRGridView(NULL)
|
||||||
|
@ -57,9 +58,9 @@ void CRegisterWindow::Load(IniFile& _IniFile)
|
||||||
|
|
||||||
void CRegisterWindow::CreateGUIControls()
|
void CRegisterWindow::CreateGUIControls()
|
||||||
{
|
{
|
||||||
SetTitle(wxT("Registers"));
|
//SetTitle(wxT("Registers"));
|
||||||
SetIcon(wxNullIcon);
|
//SetIcon(wxNullIcon);
|
||||||
Center();
|
//Center();
|
||||||
|
|
||||||
wxBoxSizer *sGrid = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *sGrid = new wxBoxSizer(wxVERTICAL);
|
||||||
m_GPRGridView = new CRegisterView(this, ID_GPR);
|
m_GPRGridView = new CRegisterView(this, ID_GPR);
|
||||||
|
|
|
@ -25,12 +25,12 @@ class CRegisterWindow
|
||||||
: public wxDialog
|
: public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CRegisterWindow(wxWindow* parent,
|
CRegisterWindow(wxWindow* parent, wxWindowID id = 1,
|
||||||
wxWindowID id = 1,
|
|
||||||
const wxString& title = wxT("Registers"),
|
const wxString& title = wxT("Registers"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
|
long style = wxNO_BORDER);
|
||||||
|
|
||||||
virtual ~CRegisterWindow();
|
virtual ~CRegisterWindow();
|
||||||
|
|
||||||
void Save(IniFile& _IniFile) const;
|
void Save(IniFile& _IniFile) const;
|
||||||
|
|
|
@ -297,6 +297,8 @@ EVT_TEXT(wxID_ANY, CFrame::PostEvent)
|
||||||
//EVT_MENU_HIGHLIGHT_ALL(CFrame::PostMenuEvent)
|
//EVT_MENU_HIGHLIGHT_ALL(CFrame::PostMenuEvent)
|
||||||
//EVT_UPDATE_UI(wxID_ANY, CFrame::PostUpdateUIEvent)
|
//EVT_UPDATE_UI(wxID_ANY, CFrame::PostUpdateUIEvent)
|
||||||
|
|
||||||
|
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, CFrame::OnNotebookPageClose)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -356,8 +358,27 @@ CFrame::CFrame(bool showLogWindow,
|
||||||
if (SConfig::GetInstance().m_InterfaceConsole)
|
if (SConfig::GetInstance().m_InterfaceConsole)
|
||||||
console->Open();
|
console->Open();
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Panels
|
||||||
|
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||||
m_Panel = new CPanel(this, IDM_MPANEL);
|
m_Panel = new CPanel(this, IDM_MPANEL);
|
||||||
wxPanel * m_Panel2 = new wxPanel(this, wxID_ANY);
|
//wxPanel * m_Panel2 = new wxPanel(this, wxID_ANY);
|
||||||
|
|
||||||
|
if (UseDebugger)
|
||||||
|
{
|
||||||
|
wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
|
||||||
|
|
||||||
|
m_NB1 = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(430,200),
|
||||||
|
wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER);
|
||||||
|
|
||||||
|
m_NB0 = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(430,200),
|
||||||
|
wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER);
|
||||||
|
m_NB0->AddPage(g_pCodeWindow, wxT("Code"), false, page_bmp );
|
||||||
|
|
||||||
|
g_pCodeWindow->UpdateNotebook(0, m_NB0);
|
||||||
|
g_pCodeWindow->UpdateNotebook(1, m_NB1);
|
||||||
|
}
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
m_GameListCtrl = new CGameListCtrl(m_Panel, LIST_CTRL,
|
m_GameListCtrl = new CGameListCtrl(m_Panel, LIST_CTRL,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
|
@ -379,11 +400,11 @@ CFrame::CFrame(bool showLogWindow,
|
||||||
AuiFullscreen = m_Mgr->SavePerspective();
|
AuiFullscreen = m_Mgr->SavePerspective();
|
||||||
m_Mgr->GetPane(wxT("Pane1")).PaneBorder(true);
|
m_Mgr->GetPane(wxT("Pane1")).PaneBorder(true);
|
||||||
|
|
||||||
m_Mgr->AddPane(m_Panel2, wxAuiPaneInfo().
|
m_Mgr->AddPane(m_NB1, wxAuiPaneInfo().
|
||||||
Name(wxT("Pane2")).Caption(wxT("Pane2")).
|
Name(wxT("Pane2")).Caption(wxT("Pane2")).
|
||||||
CenterPane().Layer(1));
|
CenterPane().Layer(1));
|
||||||
|
|
||||||
m_Mgr->AddPane(g_pCodeWindow, wxAuiPaneInfo().
|
m_Mgr->AddPane(m_NB0, wxAuiPaneInfo().
|
||||||
Name(wxT("Pane3")).Caption(wxT("Pane3")).
|
Name(wxT("Pane3")).Caption(wxT("Pane3")).
|
||||||
CenterPane().Layer(2));
|
CenterPane().Layer(2));
|
||||||
}
|
}
|
||||||
|
@ -492,6 +513,17 @@ void CFrame::OnClose(wxCloseEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
|
wxAuiNotebook* ctrl = (wxAuiNotebook*)event.GetEventObject();
|
||||||
|
|
||||||
|
if (ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Registers"))) { GetMenuBar()->FindItem(IDM_REGISTERWINDOW)->Check(false); g_pCodeWindow->m_RegisterWindow = NULL; }
|
||||||
|
if (ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Breakpoints"))) { GetMenuBar()->FindItem(IDM_BREAKPOINTWINDOW)->Check(false); g_pCodeWindow->m_BreakpointWindow = NULL; }
|
||||||
|
if (ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("JIT"))) { GetMenuBar()->FindItem(IDM_JITWINDOW)->Check(false); g_pCodeWindow->m_JitWindow = NULL; }
|
||||||
|
if (ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Memory"))) { GetMenuBar()->FindItem(IDM_MEMORYWINDOW)->Check(false); g_pCodeWindow->m_MemoryWindow = NULL; }
|
||||||
|
}
|
||||||
|
|
||||||
void CFrame::DoFullscreen(bool _F)
|
void CFrame::DoFullscreen(bool _F)
|
||||||
{
|
{
|
||||||
ShowFullScreen(_F);
|
ShowFullScreen(_F);
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <wx/busyinfo.h>
|
#include <wx/busyinfo.h>
|
||||||
#include <wx/mstream.h>
|
#include <wx/mstream.h>
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
|
#include <wx/artprov.h>
|
||||||
#include <wx/aui/aui.h>
|
#include <wx/aui/aui.h>
|
||||||
|
|
||||||
#include "CDUtils.h"
|
#include "CDUtils.h"
|
||||||
|
@ -109,11 +110,13 @@ class CFrame : public wxFrame
|
||||||
// AUI
|
// AUI
|
||||||
wxAuiManager *m_Mgr;
|
wxAuiManager *m_Mgr;
|
||||||
wxAuiToolBar *m_ToolBar, *m_ToolBar2;
|
wxAuiToolBar *m_ToolBar, *m_ToolBar2;
|
||||||
|
wxAuiNotebook *m_NB0, *m_NB1;
|
||||||
// Perspectives
|
// Perspectives
|
||||||
wxString AuiFullscreen;
|
wxString AuiFullscreen;
|
||||||
wxString AuiMode1;
|
wxString AuiMode1;
|
||||||
wxString AuiMode2;
|
wxString AuiMode2;
|
||||||
wxString AuiCurrent;
|
wxString AuiCurrent;
|
||||||
|
void OnNotebookPageClose(wxAuiNotebookEvent& evt);
|
||||||
|
|
||||||
char **drives;
|
char **drives;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue