// Copyright 2009 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #pragma once #include #include #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 m_CachedRegs{}; std::array m_CachedRegHasChanged{}; 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; };