2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2014-10-19 10:45:40 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <string>
|
|
|
|
#include <wx/grid.h>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class CWatchTable : public wxGridTableBase
|
|
|
|
{
|
2016-06-24 08:43:46 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
MAX_SPECIALS = 256,
|
|
|
|
};
|
2014-10-19 10:45:40 +00:00
|
|
|
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
CWatchTable() {}
|
|
|
|
int GetNumberCols() override { return 5; }
|
|
|
|
int GetNumberRows() override { return MAX_SPECIALS; }
|
|
|
|
wxString GetValue(int row, int col) override;
|
|
|
|
void SetValue(int row, int col, const wxString&) override;
|
|
|
|
wxGridCellAttr* GetAttr(int, int, wxGridCellAttr::wxAttrKind) override;
|
|
|
|
void UpdateWatch();
|
2014-10-19 10:45:40 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
std::array<u32, MAX_SPECIALS> m_CachedWatch;
|
|
|
|
std::array<bool, MAX_SPECIALS> m_CachedWatchHasChanged;
|
2014-10-19 10:45:40 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
DECLARE_NO_COPY_CLASS(CWatchTable);
|
2014-10-19 10:45:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CWatchView : public wxGrid
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
CWatchView(wxWindow* parent, wxWindowID id = wxID_ANY);
|
2016-10-03 07:29:50 +00:00
|
|
|
void Repopulate();
|
2015-04-28 00:36:09 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
void OnMouseDownR(wxGridEvent& event);
|
|
|
|
void OnPopupMenu(wxCommandEvent& event);
|
2014-10-24 06:16:54 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
u32 m_selectedAddress = 0;
|
|
|
|
u32 m_selectedRow = 0;
|
|
|
|
CWatchTable* m_watch_table;
|
2014-10-19 10:45:40 +00:00
|
|
|
};
|