summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/MemoryWindow.h
blob: 59b7d1da9d4cb5dc8ac793861f6ef3cfb1dd0684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.

#pragma once

#include <wx/defs.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/panel.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/windowid.h>

#include "Common/CommonTypes.h"

class CMemoryView;
class IniFile;
class wxButton;
class wxCheckBox;
class wxListBox;
class wxTextCtrl;
class wxWindow;

class CMemoryWindow
	: public wxPanel
{
	public:

		CMemoryWindow(wxWindow* parent,
					  wxWindowID id = wxID_ANY,
					  const wxPoint& pos = wxDefaultPosition,
					  const wxSize& size = wxDefaultSize,
					  long style = wxTAB_TRAVERSAL | wxBORDER_NONE,
					  const wxString& name = _("Memory"));

		wxCheckBox* chk8;
		wxCheckBox* chk16;
		wxCheckBox* chk32;
		wxButton*   btnSearch;
		wxCheckBox* chkAscii;
		wxCheckBox* chkHex;
		void Save(IniFile& _IniFile) const;
		void Load(IniFile& _IniFile);

		void Update() override;
		void NotifyMapLoaded();

		void JumpToAddress(u32 _Address);

	private:
		DECLARE_EVENT_TABLE()

		CMemoryView* memview;
		wxListBox* symbols;

		wxButton* buttonGo;
		wxTextCtrl* addrbox;
		wxTextCtrl* valbox;

		void U8(wxCommandEvent& event);
		void U16(wxCommandEvent& event);
		void U32(wxCommandEvent& event);
		void onSearch(wxCommandEvent& event);
		void onAscii(wxCommandEvent& event);
		void onHex(wxCommandEvent& event);
		void OnSymbolListChange(wxCommandEvent& event);
		void OnCallstackListChange(wxCommandEvent& event);
		void OnAddrBoxChange(wxCommandEvent& event);
		void OnHostMessage(wxCommandEvent& event);
		void SetMemoryValue(wxCommandEvent& event);
		void OnDumpMemory(wxCommandEvent& event);
		void OnDumpMem2(wxCommandEvent& event);
		void OnDumpFakeVMEM(wxCommandEvent& event);
};