2014-10-18 21:32:50 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2014-10-18 21:32:50 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <wx/panel.h>
|
2015-08-07 14:04:28 +00:00
|
|
|
#include <wx/timer.h>
|
2014-10-18 21:32:50 +00:00
|
|
|
|
|
|
|
class wxButton;
|
|
|
|
class wxChoice;
|
2014-11-02 04:30:02 +00:00
|
|
|
class wxFocusEvent;
|
2015-08-06 03:55:03 +00:00
|
|
|
class wxListView;
|
2014-10-22 23:22:28 +00:00
|
|
|
class wxRadioBox;
|
2014-10-25 20:54:05 +00:00
|
|
|
class wxRadioButton;
|
2014-10-18 21:32:50 +00:00
|
|
|
class wxStaticText;
|
|
|
|
class wxTextCtrl;
|
|
|
|
|
|
|
|
class CheatSearchTab final : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CheatSearchTab(wxWindow* const parent);
|
|
|
|
|
|
|
|
private:
|
|
|
|
class CheatSearchResult final
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CheatSearchResult() : address(0), old_value(0) {}
|
|
|
|
|
|
|
|
u32 address;
|
|
|
|
u32 old_value;
|
|
|
|
};
|
|
|
|
|
2015-08-06 03:55:03 +00:00
|
|
|
void UpdateCheatSearchResultsList();
|
2015-08-07 14:04:28 +00:00
|
|
|
void UpdateCheatSearchResultItem(long index);
|
2015-12-30 00:51:36 +00:00
|
|
|
void FilterCheatSearchResults(u32 value, bool prev);
|
2015-08-06 03:55:03 +00:00
|
|
|
void ResetListViewColumns();
|
2015-08-08 04:20:34 +00:00
|
|
|
bool ParseUserEnteredValue(u32* out) const;
|
2015-08-07 14:04:28 +00:00
|
|
|
u32 SwapValue(u32 value) const;
|
|
|
|
|
2015-08-08 04:20:34 +00:00
|
|
|
void OnNewScanClicked(wxCommandEvent&);
|
|
|
|
void OnNextScanClicked(wxCommandEvent&);
|
|
|
|
void OnCreateARCodeClicked(wxCommandEvent&);
|
2015-08-07 14:04:28 +00:00
|
|
|
void OnTimerUpdate(wxTimerEvent&);
|
2015-08-06 03:55:03 +00:00
|
|
|
|
2014-10-18 21:32:50 +00:00
|
|
|
std::vector<CheatSearchResult> m_search_results;
|
|
|
|
unsigned int m_search_type_size;
|
|
|
|
|
|
|
|
wxChoice* m_search_type;
|
2015-08-06 03:55:03 +00:00
|
|
|
wxListView* m_lview_search_results;
|
2014-10-18 21:32:50 +00:00
|
|
|
wxStaticText* m_label_results_count;
|
|
|
|
wxTextCtrl* m_textctrl_value_x;
|
|
|
|
|
|
|
|
wxButton* m_btn_init_scan;
|
|
|
|
wxButton* m_btn_next_scan;
|
|
|
|
|
2014-10-22 23:22:28 +00:00
|
|
|
wxRadioBox* m_data_sizes;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2015-08-07 14:04:28 +00:00
|
|
|
wxTimer m_update_timer;
|
2014-10-18 21:32:50 +00:00
|
|
|
};
|