summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/RegisterWindow.cpp
blob: b849eb86fe8ffbd532bc0c7c6839a8b6302a725b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <cstddef>
#include <wx/panel.h>
#include <wx/sizer.h>

#include "Core/PowerPC/PowerPC.h"
#include "DolphinWX/Debugger/RegisterView.h"
#include "DolphinWX/Debugger/RegisterWindow.h"

CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id, const wxPoint& position,
                                 const wxSize& size, long style, const wxString& name)
    : wxPanel(parent, id, position, size, style, name), m_GPRGridView(nullptr)
{
  CreateGUIControls();
}

void CRegisterWindow::CreateGUIControls()
{
  wxBoxSizer* sGrid = new wxBoxSizer(wxVERTICAL);
  m_GPRGridView = new CRegisterView(this);
  sGrid->Add(m_GPRGridView, 1, wxEXPAND);
  SetSizer(sGrid);

  NotifyUpdate();
}

void CRegisterWindow::NotifyUpdate()
{
  if (m_GPRGridView != nullptr)
    m_GPRGridView->Repopulate();
}