2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#include "Debugger.h"
|
|
|
|
#include "RegisterWindow.h"
|
|
|
|
#include "PowerPC/PowerPC.h"
|
|
|
|
#include "RegisterView.h"
|
|
|
|
|
|
|
|
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
|
|
|
EVT_CLOSE(CRegisterWindow::OnClose)
|
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
2009-08-26 09:19:15 +00:00
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
2009-09-01 02:41:48 +00:00
|
|
|
: wxPanel(parent, id, position, size, style, title)
|
2008-12-09 05:29:14 +00:00
|
|
|
, m_GPRGridView(NULL)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
|
|
|
CreateGUIControls();
|
|
|
|
}
|
|
|
|
|
|
|
|
CRegisterWindow::~CRegisterWindow()
|
2008-12-09 05:29:14 +00:00
|
|
|
{
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
void CRegisterWindow::CreateGUIControls()
|
|
|
|
{
|
2009-08-26 09:19:15 +00:00
|
|
|
//SetTitle(wxT("Registers"));
|
|
|
|
//SetIcon(wxNullIcon);
|
|
|
|
//Center();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
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);
|
|
|
|
sGrid->SetSizeHints(this);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
NotifyUpdate();
|
|
|
|
}
|
|
|
|
|
2008-12-09 05:29:14 +00:00
|
|
|
void CRegisterWindow::OnClose(wxCloseEvent& WXUNUSED (event))
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
|
|
|
Hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CRegisterWindow::NotifyUpdate()
|
2008-12-09 05:29:14 +00:00
|
|
|
{
|
|
|
|
if (m_GPRGridView != NULL)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2008-12-09 05:29:14 +00:00
|
|
|
m_GPRGridView->Update();
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
}
|