2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <cstddef>
|
|
|
|
#include <wx/defs.h>
|
|
|
|
#include <wx/event.h>
|
|
|
|
#include <wx/gdicmn.h>
|
|
|
|
#include <wx/panel.h>
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/windowid.h>
|
2010-12-05 15:28:31 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "DolphinWX/Debugger/RegisterView.h"
|
|
|
|
#include "DolphinWX/Debugger/RegisterWindow.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxWindow;
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
extern const char* GetGRPName(unsigned int index);
|
|
|
|
|
2009-09-01 02:41:48 +00:00
|
|
|
BEGIN_EVENT_TABLE(CRegisterWindow, wxPanel)
|
2008-12-08 05:30:24 +00:00
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
2009-08-26 09:19:15 +00:00
|
|
|
|
2010-07-27 02:39:12 +00:00
|
|
|
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id,
|
2013-04-08 05:16:50 +00:00
|
|
|
const wxPoint& position, const wxSize& size,
|
|
|
|
long style, const wxString& name)
|
2010-07-27 02:39:12 +00:00
|
|
|
: wxPanel(parent, id, position, size, style, name)
|
2014-03-09 20:14:26 +00:00
|
|
|
, m_GPRGridView(nullptr)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
|
|
|
CreateGUIControls();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CRegisterWindow::CreateGUIControls()
|
|
|
|
{
|
2008-12-09 05:29:14 +00:00
|
|
|
wxBoxSizer *sGrid = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_GPRGridView = new CRegisterView(this, ID_GPR);
|
|
|
|
sGrid->Add(m_GPRGridView, 1, wxGROW);
|
|
|
|
SetSizer(sGrid);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
NotifyUpdate();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CRegisterWindow::NotifyUpdate()
|
2010-07-26 03:46:14 +00:00
|
|
|
{
|
2014-03-09 20:14:26 +00:00
|
|
|
if (m_GPRGridView != nullptr)
|
2008-12-09 05:29:14 +00:00
|
|
|
m_GPRGridView->Update();
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|