2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// 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 <wx/event.h>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class DebugInterface;
|
|
|
|
class wxWindow;
|
2008-12-08 04:46:09 +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:
|
2011-02-24 05:05:25 +00:00
|
|
|
CMemoryView(DebugInterface* debuginterface, wxWindow* parent);
|
2009-06-17 19:50:59 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
2009-10-12 16:20:31 +00:00
|
|
|
void OnMouseDownL(wxMouseEvent& event);
|
2009-06-17 19:50:59 +00:00
|
|
|
void OnMouseMove(wxMouseEvent& event);
|
|
|
|
void OnMouseUpL(wxMouseEvent& event);
|
2009-10-12 16:20:31 +00:00
|
|
|
void OnMouseDownR(wxMouseEvent& event);
|
2009-06-17 19:50:59 +00:00
|
|
|
void OnPopupMenu(wxCommandEvent& event);
|
|
|
|
|
2009-06-30 21:11:39 +00:00
|
|
|
u32 GetSelection() { return selection ; }
|
|
|
|
int GetMemoryType() { return memory; }
|
2009-06-17 19:50:59 +00:00
|
|
|
|
|
|
|
void Center(u32 addr)
|
|
|
|
{
|
|
|
|
curAddress = addr;
|
2011-02-24 05:05:25 +00:00
|
|
|
Refresh();
|
2009-06-17 19:50:59 +00:00
|
|
|
}
|
2014-02-17 04:51:41 +00:00
|
|
|
int dataType; // u8,u16,u32
|
|
|
|
int curAddress; // Will be accessed by parent
|
2010-02-18 12:06:13 +00:00
|
|
|
|
2009-06-17 19:50:59 +00:00
|
|
|
private:
|
|
|
|
int YToAddress(int y);
|
2011-02-24 05:05:25 +00:00
|
|
|
void OnResize(wxSizeEvent& event);
|
2009-06-17 19:50:59 +00:00
|
|
|
|
|
|
|
DebugInterface* debugger;
|
|
|
|
|
|
|
|
int align;
|
|
|
|
int rowHeight;
|
|
|
|
|
|
|
|
u32 selection;
|
|
|
|
u32 oldSelection;
|
|
|
|
bool selecting;
|
|
|
|
|
|
|
|
int memory;
|
|
|
|
|
2009-10-12 16:20:31 +00:00
|
|
|
enum EViewAsType
|
|
|
|
{
|
|
|
|
VIEWAS_ASCII = 0,
|
|
|
|
VIEWAS_FP,
|
2009-11-25 10:07:56 +00:00
|
|
|
VIEWAS_HEX,
|
2009-10-12 16:20:31 +00:00
|
|
|
};
|
2009-11-25 10:07:56 +00:00
|
|
|
|
2009-10-12 16:20:31 +00:00
|
|
|
EViewAsType viewAsType;
|
|
|
|
|
2009-06-17 19:50:59 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|