2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:43:35 +00:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <wx/control.h>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class DebugInterface;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2015-07-09 11:47:51 +00:00
|
|
|
enum class MemoryDataType
|
|
|
|
{
|
2016-06-24 08:43:46 +00:00
|
|
|
U8,
|
|
|
|
U16,
|
|
|
|
U32
|
2015-07-09 11:47:51 +00:00
|
|
|
};
|
|
|
|
|
2009-06-17 19:50:59 +00:00
|
|
|
class CMemoryView : public wxControl
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
2009-06-17 19:50:59 +00:00
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
CMemoryView(DebugInterface* debuginterface, wxWindow* parent);
|
|
|
|
|
|
|
|
u32 GetSelection() const { return selection; }
|
|
|
|
int GetMemoryType() const { return memory; }
|
|
|
|
void Center(u32 addr)
|
|
|
|
{
|
|
|
|
curAddress = addr;
|
|
|
|
Refresh();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetDataType(MemoryDataType data_type)
|
|
|
|
{
|
|
|
|
dataType = data_type;
|
|
|
|
Refresh();
|
|
|
|
}
|
2010-02-18 12:06:13 +00:00
|
|
|
|
2016-08-18 20:08:26 +00:00
|
|
|
void SetMemCheckOptions(bool read, bool write, bool log)
|
|
|
|
{
|
|
|
|
memCheckRead = read;
|
|
|
|
memCheckWrite = write;
|
|
|
|
memCheckLog = log;
|
|
|
|
}
|
|
|
|
|
2009-06-17 19:50:59 +00:00
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnMouseDownL(wxMouseEvent& event);
|
|
|
|
void OnMouseMove(wxMouseEvent& event);
|
|
|
|
void OnMouseUpL(wxMouseEvent& event);
|
|
|
|
void OnMouseDownR(wxMouseEvent& event);
|
|
|
|
void OnScrollWheel(wxMouseEvent& event);
|
|
|
|
void OnPopupMenu(wxCommandEvent& event);
|
|
|
|
|
|
|
|
int YToAddress(int y);
|
|
|
|
void OnResize(wxSizeEvent& event);
|
|
|
|
|
|
|
|
DebugInterface* debugger;
|
|
|
|
|
|
|
|
int align;
|
|
|
|
int rowHeight;
|
|
|
|
|
|
|
|
u32 selection;
|
|
|
|
u32 oldSelection;
|
|
|
|
bool selecting;
|
|
|
|
|
|
|
|
int memory;
|
|
|
|
int curAddress;
|
|
|
|
MemoryDataType dataType;
|
|
|
|
|
2016-08-18 20:08:26 +00:00
|
|
|
bool memCheckRead;
|
|
|
|
bool memCheckWrite;
|
|
|
|
bool memCheckLog;
|
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
enum EViewAsType
|
|
|
|
{
|
|
|
|
VIEWAS_ASCII = 0,
|
|
|
|
VIEWAS_FP,
|
|
|
|
VIEWAS_HEX,
|
|
|
|
};
|
|
|
|
|
|
|
|
EViewAsType viewAsType;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|