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
|
|
|
|
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
|
|
|
|
2015-04-28 00:36:09 +00:00
|
|
|
u32 GetSelection() const { return selection ; }
|
|
|
|
int GetMemoryType() const { 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:
|
2015-04-28 00:36:09 +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);
|
|
|
|
|
2009-06-17 19:50:59 +00:00
|
|
|
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;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|