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