convert the register window to wxGrid, allows multiplatform colors. fix wxw debug build error msg.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1454 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2008-12-09 05:29:14 +00:00
parent 5ede71fb84
commit 668337eb84
8 changed files with 2541 additions and 165 deletions

View File

@ -25,20 +25,18 @@ extern const char* GetGRPName(unsigned int index);
BEGIN_EVENT_TABLE(CRegisterWindow, wxDialog)
EVT_CLOSE(CRegisterWindow::OnClose)
EVT_MENU(wxID_REFRESH, CRegisterWindow::OnRefresh)
END_EVENT_TABLE()
CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
, m_GPRListView(NULL)
, m_GPRGridView(NULL)
{
CreateGUIControls();
}
CRegisterWindow::~CRegisterWindow()
{}
{
}
void CRegisterWindow::Save(IniFile& _IniFile) const
{
@ -48,7 +46,6 @@ void CRegisterWindow::Save(IniFile& _IniFile) const
_IniFile.Set("RegisterWindow", "h", GetSize().GetHeight());
}
void CRegisterWindow::Load(IniFile& _IniFile)
{
int x,y,w,h;
@ -59,39 +56,30 @@ void CRegisterWindow::Load(IniFile& _IniFile)
SetSize(x, y, w, h);
}
void CRegisterWindow::CreateGUIControls()
{
SetTitle(wxT("Registers"));
SetIcon(wxNullIcon);
SetSize(8, 8, 400, 370);
Center();
m_GPRListView = new CRegisterView(this, ID_GPR, wxDefaultPosition, GetSize(),
wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING);
wxBoxSizer *sGrid = new wxBoxSizer(wxVERTICAL);
m_GPRGridView = new CRegisterView(this, ID_GPR);
sGrid->Add(m_GPRGridView, 1, wxGROW);
SetSizer(sGrid);
sGrid->SetSizeHints(this);
NotifyUpdate();
}
void CRegisterWindow::OnClose(wxCloseEvent& /*event*/)
void CRegisterWindow::OnClose(wxCloseEvent& WXUNUSED (event))
{
Hide();
}
void CRegisterWindow::OnRefresh(wxCommandEvent& WXUNUSED (event))
{
m_GPRListView->Refresh();
m_GPRListView->Update();
}
void CRegisterWindow::NotifyUpdate()
{
if (m_GPRListView != NULL)
{
if (m_GPRGridView != NULL)
{
m_GPRListView->Update();
m_GPRGridView->Update();
}
}