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

43 lines
1 KiB
C
Raw Normal View History

// Copyright 2009 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <array>
#include <wx/grid.h>
2014-02-22 23:36:30 +01:00
#include "Common/CommonTypes.h"
class CDSPRegTable final : public wxGridTableBase
{
public:
CDSPRegTable() = default;
int GetNumberCols() override { return 2; }
int GetNumberRows() override { return 32; }
bool IsEmptyCell(int row, int col) override { return false; }
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();
private:
u64 m_CachedCounter = 0;
std::array<u16, 32> m_CachedRegs{};
std::array<bool, 32> m_CachedRegHasChanged{};
2017-07-30 21:56:12 +02:00
DECLARE_NO_COPY_CLASS(CDSPRegTable)
};
class DSPRegisterView final : public wxGrid
{
public:
explicit DSPRegisterView(wxWindow* parent, wxWindowID id = wxID_ANY);
void Repopulate();
private:
// Owned by wx. Deleted implicitly upon destruction.
CDSPRegTable* m_register_table;
};