dolphin/Source/Core/DolphinWX/Debugger/DSPRegisterView.h

47 lines
1.1 KiB
C
Raw Normal View History

// Copyright 2009 Dolphin Emulator Project
2015-05-17 23:08:10 +00:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
2014-02-22 22:36:30 +00:00
#include <cstring>
#include <wx/grid.h>
2014-02-22 22:36:30 +00:00
#include "Common/CommonTypes.h"
class CDSPRegTable : public wxGridTableBase
{
private:
u64 m_CachedCounter;
u16 m_CachedRegs[32];
bool m_CachedRegHasChanged[32];
DECLARE_NO_COPY_CLASS(CDSPRegTable);
public:
CDSPRegTable()
{
memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
memset(m_CachedRegHasChanged, 0, sizeof(m_CachedRegHasChanged));
}
int GetNumberCols() override { return 2; }
int GetNumberRows() override { return 32; }
bool IsEmptyCell(int row, int col) override { return false; }
2014-03-08 00:54:44 +00:00
wxString GetValue(int row, int col) override;
void SetValue(int row, int col, const wxString &) override;
wxGridCellAttr *GetAttr(int, int, wxGridCellAttr::wxAttrKind) override;
void UpdateCachedRegs();
};
class DSPRegisterView : public wxGrid
{
public:
DSPRegisterView(wxWindow* parent, wxWindowID id = wxID_ANY);
2014-03-08 00:54:44 +00:00
void Update() override;
private:
// Owned by wx. Deleted implicitly upon destruction.
CDSPRegTable* m_register_table;
};