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/panel.h>
|
|
|
|
#include "Common/CommonTypes.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
class CMemoryView;
|
|
|
|
class IniFile;
|
|
|
|
class wxButton;
|
|
|
|
class wxCheckBox;
|
2016-10-03 07:29:50 +00:00
|
|
|
class wxRadioBox;
|
|
|
|
class wxRadioButton;
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxListBox;
|
2015-08-03 08:39:06 +00:00
|
|
|
class wxSearchCtrl;
|
2016-10-03 07:29:50 +00:00
|
|
|
class wxStaticText;
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxTextCtrl;
|
2016-08-18 20:08:26 +00:00
|
|
|
class wxRadioButton;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-10-19 02:55:23 +00:00
|
|
|
class CMemoryWindow : public wxPanel
|
2008-12-08 04:46:09 +00:00
|
|
|
{
|
2014-10-19 02:55:23 +00:00
|
|
|
public:
|
2017-04-30 07:13:09 +00:00
|
|
|
explicit 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"));
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2016-10-03 07:29:50 +00:00
|
|
|
void Repopulate();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2017-04-30 06:44:27 +00:00
|
|
|
void JumpToAddress(u32 address);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-10-19 02:55:23 +00:00
|
|
|
private:
|
2017-04-18 20:12:15 +00:00
|
|
|
enum class SearchType
|
|
|
|
{
|
|
|
|
FindNext,
|
|
|
|
FindPrevious
|
|
|
|
};
|
|
|
|
|
2017-04-30 07:55:55 +00:00
|
|
|
void CreateGUI();
|
|
|
|
wxSizer* CreateRightHandSideSizer();
|
|
|
|
wxSizer* CreateSearchSizer();
|
|
|
|
wxSizer* CreateDumpSizer();
|
|
|
|
wxSizer* CreateSearchTypeSizer();
|
|
|
|
wxSizer* CreateMemcheckOptionSizer();
|
|
|
|
|
2016-10-03 07:29:50 +00:00
|
|
|
void OnDataTypeChanged(wxCommandEvent& event);
|
2017-04-18 18:08:44 +00:00
|
|
|
void OnFindNext(wxCommandEvent& event);
|
2017-04-18 20:12:15 +00:00
|
|
|
void OnFindPrevious(wxCommandEvent& event);
|
2017-04-30 06:44:27 +00:00
|
|
|
void OnSearchAddressChanged(wxCommandEvent& event);
|
2016-10-03 07:29:50 +00:00
|
|
|
void OnValueChanged(wxCommandEvent&);
|
2017-04-30 06:44:27 +00:00
|
|
|
void OnSetMemoryValueFromValBox(wxCommandEvent& event);
|
|
|
|
void OnSetMemoryValue(wxCommandEvent& event);
|
2016-06-24 08:43:46 +00:00
|
|
|
void OnDumpMemory(wxCommandEvent& event);
|
|
|
|
void OnDumpMem2(wxCommandEvent& event);
|
|
|
|
void OnDumpFakeVMEM(wxCommandEvent& event);
|
2016-10-03 07:29:50 +00:00
|
|
|
void OnMemCheckOptionChange(wxCommandEvent& event);
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2017-04-18 20:12:15 +00:00
|
|
|
void Search(SearchType search_type);
|
|
|
|
|
|
|
|
wxButton* m_btn_find_next;
|
|
|
|
wxButton* m_btn_find_previous;
|
2016-10-03 07:29:50 +00:00
|
|
|
wxRadioButton* m_rb_ascii;
|
|
|
|
wxRadioButton* m_rb_hex;
|
|
|
|
|
|
|
|
wxRadioBox* m_rbox_data_type;
|
|
|
|
wxStaticText* m_search_result_msg;
|
|
|
|
|
2017-04-30 06:44:27 +00:00
|
|
|
wxCheckBox* m_log_checkbox;
|
|
|
|
wxRadioButton* m_read_radio_btn;
|
|
|
|
wxRadioButton* m_write_radio_btn;
|
|
|
|
wxRadioButton* m_read_write_radio_btn;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2017-04-30 06:44:27 +00:00
|
|
|
CMemoryView* m_memory_view;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2017-04-30 06:44:27 +00:00
|
|
|
wxSearchCtrl* m_address_search_ctrl;
|
|
|
|
wxTextCtrl* m_value_text_ctrl;
|
2016-10-03 07:29:50 +00:00
|
|
|
|
|
|
|
u32 m_last_search_address = 0;
|
|
|
|
bool m_continue_search = false;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|