mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
GUI: make some elements such as memory jit and breakpoint windows into
wxpanels. It should now work in linux as well. I had to remove the bar off the breakpoint panel though, so we need to decide what to do with it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4227 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -50,15 +50,12 @@ void BreakPointDlg::CreateGUIControls()
|
|||||||
SetSize(8,8,279,121);
|
SetSize(8,8,279,121);
|
||||||
Center();
|
Center();
|
||||||
|
|
||||||
wxStaticText* WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Address"), wxPoint(8,24), wxDefaultSize, 0, wxT("WxStaticText1"));
|
|
||||||
|
|
||||||
m_pButtonOK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(192,64), wxSize(73,25), 0, wxDefaultValidator, wxT("OK"));
|
m_pButtonOK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(192,64), wxSize(73,25), 0, wxDefaultValidator, wxT("OK"));
|
||||||
|
|
||||||
m_pButtonCancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(112,64), wxSize(73,25), 0, wxDefaultValidator, wxT("Cancel"));
|
m_pButtonCancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(112,64), wxSize(73,25), 0, wxDefaultValidator, wxT("Cancel"));
|
||||||
|
|
||||||
m_pEditAddress = new wxTextCtrl(this, ID_ADDRESS, wxT("80000000"), wxPoint(56,24), wxSize(197,20), 0, wxDefaultValidator, wxT("WxEdit1"));
|
m_pEditAddress = new wxTextCtrl(this, ID_ADDRESS, wxT("80000000"), wxPoint(56,24), wxSize(197,20), 0, wxDefaultValidator, wxT("WxEdit1"));
|
||||||
|
|
||||||
wxStaticBox* WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Address"), wxPoint(0,0), wxSize(265,57));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ extern "C" {
|
|||||||
#include "../resources/toolbar_delete.c"
|
#include "../resources/toolbar_delete.c"
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CBreakPointWindow, wxFrame)
|
BEGIN_EVENT_TABLE(CBreakPointWindow, wxPanel)
|
||||||
EVT_CLOSE(CBreakPointWindow::OnClose)
|
EVT_CLOSE(CBreakPointWindow::OnClose)
|
||||||
EVT_MENU(IDM_DELETE, CBreakPointWindow::OnDelete)
|
EVT_MENU(IDM_DELETE, CBreakPointWindow::OnDelete)
|
||||||
EVT_MENU(IDM_CLEAR, CBreakPointWindow::OnClear)
|
EVT_MENU(IDM_CLEAR, CBreakPointWindow::OnClear)
|
||||||
@ -45,7 +45,7 @@ BEGIN_EVENT_TABLE(CBreakPointWindow, wxFrame)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||||
: wxFrame(parent, id, title, position, size, style)
|
: wxPanel(parent, id, position, size, style, title)
|
||||||
, m_BreakPointListView(NULL)
|
, m_BreakPointListView(NULL)
|
||||||
, m_pCodeWindow(_pCodeWindow)
|
, m_pCodeWindow(_pCodeWindow)
|
||||||
{
|
{
|
||||||
@ -78,8 +78,8 @@ void CBreakPointWindow::Load(IniFile& _IniFile)
|
|||||||
|
|
||||||
void CBreakPointWindow::CreateGUIControls()
|
void CBreakPointWindow::CreateGUIControls()
|
||||||
{
|
{
|
||||||
SetTitle(wxT("Breakpoints"));
|
// SetTitle(wxT("Breakpoints"));
|
||||||
SetIcon(wxNullIcon);
|
// SetIcon(wxNullIcon);
|
||||||
SetSize(8, 8, 400, 370);
|
SetSize(8, 8, 400, 370);
|
||||||
Center();
|
Center();
|
||||||
|
|
||||||
@ -117,18 +117,19 @@ void CBreakPointWindow::PopulateToolbar(wxToolBar* toolBar)
|
|||||||
|
|
||||||
void CBreakPointWindow::RecreateToolbar()
|
void CBreakPointWindow::RecreateToolbar()
|
||||||
{
|
{
|
||||||
|
// FIXME: what do we do with this?
|
||||||
// delete and recreate the toolbar
|
// delete and recreate the toolbar
|
||||||
wxToolBarBase* toolBar = GetToolBar();
|
// wxToolBarBase* toolBar = GetToolBar();
|
||||||
long style = toolBar ? toolBar->GetWindowStyle() : wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
// long style = toolBar ? toolBar->GetWindowStyle() : wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
||||||
|
|
||||||
delete toolBar;
|
// delete toolBar;
|
||||||
SetToolBar(NULL);
|
// SetToolBar(NULL);
|
||||||
|
|
||||||
style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP);
|
// style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP);
|
||||||
wxToolBar* theToolBar = CreateToolBar(style, ID_TOOLBAR);
|
// wxToolBar* theToolBar = CreateToolBar(style, ID_TOOLBAR);
|
||||||
|
|
||||||
PopulateToolbar(theToolBar);
|
// PopulateToolbar(theToolBar);
|
||||||
SetToolBar(theToolBar);
|
// SetToolBar(theToolBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBreakPointWindow::InitBitmaps()
|
void CBreakPointWindow::InitBitmaps()
|
||||||
|
@ -24,7 +24,7 @@ class wxListEvent;
|
|||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
class CBreakPointWindow
|
class CBreakPointWindow
|
||||||
: public wxFrame
|
: public wxPanel
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -33,12 +33,8 @@ class CBreakPointWindow
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
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),
|
||||||
#ifdef _WIN32
|
long style = wxNO_BORDER);
|
||||||
long style = wxNO_BORDER);
|
|
||||||
#else
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual ~CBreakPointWindow();
|
virtual ~CBreakPointWindow();
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
if(pSymbol->type == Symbol::SYMBOL_DATA)
|
if(pSymbol->type == Symbol::SYMBOL_DATA)
|
||||||
{
|
{
|
||||||
if(m_MemoryWindow && m_MemoryWindow->IsVisible())
|
if(m_MemoryWindow)// && m_MemoryWindow->IsVisible())
|
||||||
m_MemoryWindow->JumpToAddress(pSymbol->address);
|
m_MemoryWindow->JumpToAddress(pSymbol->address);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -485,18 +485,10 @@ void CCodeWindow::OnToggleBreakPointWindow(bool _Show, int i)
|
|||||||
if (_Show)
|
if (_Show)
|
||||||
{
|
{
|
||||||
if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
|
if (!m_BreakpointWindow) m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
|
||||||
#ifdef _WIN32
|
|
||||||
Parent->DoAddPage(m_BreakpointWindow, i, wxT("Breakpoints"), bFloatBreakpointWindow);
|
Parent->DoAddPage(m_BreakpointWindow, i, wxT("Breakpoints"), bFloatBreakpointWindow);
|
||||||
#else
|
|
||||||
m_BreakpointWindow->Show();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
#ifdef _WIN32
|
|
||||||
Parent->DoRemovePage(m_BreakpointWindow);
|
Parent->DoRemovePage(m_BreakpointWindow);
|
||||||
#else
|
|
||||||
if (m_BreakpointWindow) m_BreakpointWindow->Hide();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -505,18 +497,10 @@ void CCodeWindow::OnToggleMemoryWindow(bool _Show, int i)
|
|||||||
if (_Show)
|
if (_Show)
|
||||||
{
|
{
|
||||||
if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
|
if (!m_MemoryWindow) m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
|
||||||
#ifdef _WIN32
|
|
||||||
Parent->DoAddPage(m_MemoryWindow, i, wxT("Memory"), bFloatMemoryWindow);
|
Parent->DoAddPage(m_MemoryWindow, i, wxT("Memory"), bFloatMemoryWindow);
|
||||||
#else
|
|
||||||
m_MemoryWindow->Show();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
#ifdef _WIN32
|
|
||||||
Parent->DoRemovePage(m_MemoryWindow);
|
Parent->DoRemovePage(m_MemoryWindow);
|
||||||
#else
|
|
||||||
if (m_MemoryWindow) m_MemoryWindow->Hide();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -525,18 +509,10 @@ void CCodeWindow::OnToggleJitWindow(bool _Show, int i)
|
|||||||
if (_Show)
|
if (_Show)
|
||||||
{
|
{
|
||||||
if (!m_JitWindow) m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
|
if (!m_JitWindow) m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
|
||||||
#ifdef _WIN32
|
|
||||||
Parent->DoAddPage(m_JitWindow, i, wxT("JIT"), bFloatJitWindow);
|
Parent->DoAddPage(m_JitWindow, i, wxT("JIT"), bFloatJitWindow);
|
||||||
#else
|
|
||||||
m_JitWindow->Show();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
#ifdef _WIN32
|
|
||||||
Parent->DoRemovePage(m_JitWindow);
|
Parent->DoRemovePage(m_JitWindow);
|
||||||
#else
|
|
||||||
if (m_JitWindow) m_JitWindow->Hide();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -555,9 +531,6 @@ Notice: This windows docking for plugin windows will produce several wx debuggin
|
|||||||
// Toggle Sound Debugging Window
|
// Toggle Sound Debugging Window
|
||||||
void CCodeWindow::OnToggleDLLWindow(int Id, bool _Show, int i)
|
void CCodeWindow::OnToggleDLLWindow(int Id, bool _Show, int i)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
|
||||||
// ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
|
|
||||||
std::string DLLName;
|
std::string DLLName;
|
||||||
wxString Title;
|
wxString Title;
|
||||||
int PLUGINTYPE;
|
int PLUGINTYPE;
|
||||||
@ -616,7 +589,4 @@ void CCodeWindow::OnToggleDLLWindow(int Id, bool _Show, int i)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
}
|
||||||
CPluginManager::GetInstance().OpenDebug(Parent->GetHandle(), DLLName.c_str(), (PLUGIN_TYPE)PLUGINTYPE, _Show);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
@ -63,7 +63,7 @@ enum
|
|||||||
IDM_BLOCKLIST,
|
IDM_BLOCKLIST,
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CJitWindow, wxFrame)
|
BEGIN_EVENT_TABLE(CJitWindow, wxPanel)
|
||||||
// EVT_TEXT(IDM_ADDRBOX, CJitWindow::OnAddrBoxChange)
|
// EVT_TEXT(IDM_ADDRBOX, CJitWindow::OnAddrBoxChange)
|
||||||
// EVT_LISTBOX(IDM_SYMBOLLIST, CJitWindow::OnSymbolListChange)
|
// EVT_LISTBOX(IDM_SYMBOLLIST, CJitWindow::OnSymbolListChange)
|
||||||
//EVT_HOST_COMMAND(wxID_ANY, CJitWindow::OnHostMessage)
|
//EVT_HOST_COMMAND(wxID_ANY, CJitWindow::OnHostMessage)
|
||||||
@ -73,7 +73,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id,
|
CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id,
|
||||||
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
||||||
: wxFrame(parent, id, title, pos, size, style)
|
: wxPanel(parent, id, pos, size, style)
|
||||||
{
|
{
|
||||||
the_jit_window = this;
|
the_jit_window = this;
|
||||||
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class CJitWindow : public wxFrame
|
class CJitWindow : public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CJitWindow(wxWindow* parent,
|
CJitWindow(wxWindow* parent,
|
||||||
@ -49,12 +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),
|
||||||
#ifdef _WIN32
|
|
||||||
long style = wxNO_BORDER);
|
long style = wxNO_BORDER);
|
||||||
#else
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
~CJitWindow();
|
~CJitWindow();
|
||||||
|
|
||||||
void Save(IniFile& _IniFile) const;
|
void Save(IniFile& _IniFile) const;
|
||||||
|
@ -50,7 +50,7 @@ enum
|
|||||||
IDM_VALBOX,
|
IDM_VALBOX,
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CMemoryWindow, wxFrame)
|
BEGIN_EVENT_TABLE(CMemoryWindow, wxPanel)
|
||||||
EVT_TEXT(IDM_MEM_ADDRBOX, CMemoryWindow::OnAddrBoxChange)
|
EVT_TEXT(IDM_MEM_ADDRBOX, CMemoryWindow::OnAddrBoxChange)
|
||||||
EVT_LISTBOX(IDM_SYMBOLLIST, CMemoryWindow::OnSymbolListChange)
|
EVT_LISTBOX(IDM_SYMBOLLIST, CMemoryWindow::OnSymbolListChange)
|
||||||
EVT_HOST_COMMAND(wxID_ANY, CMemoryWindow::OnHostMessage)
|
EVT_HOST_COMMAND(wxID_ANY, CMemoryWindow::OnHostMessage)
|
||||||
@ -60,7 +60,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
||||||
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
||||||
: wxFrame(parent, id, title, pos, size, style)
|
: wxPanel(parent, id, pos, size, style)
|
||||||
{
|
{
|
||||||
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
|
||||||
wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@ -32,20 +32,16 @@ class CRegisterWindow;
|
|||||||
class CBreakPointWindow;
|
class CBreakPointWindow;
|
||||||
|
|
||||||
class CMemoryWindow
|
class CMemoryWindow
|
||||||
: public wxFrame
|
: public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CMemoryWindow(wxWindow* parent,
|
CMemoryWindow(wxWindow* parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
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),
|
||||||
#ifdef _WIN32
|
long style = wxNO_BORDER);
|
||||||
long style = wxNO_BORDER);
|
|
||||||
#else
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
~CMemoryWindow();
|
~CMemoryWindow();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user