// Copyright 2013 Dolphin Emulator Project // Licensed under GPLv2 // Refer to the license.txt file included. #pragma once #include #include #include "Core/PatchEngine.h" class wxButton; class wxRadioBox; class wxSpinButton; class wxSpinEvent; class wxStaticBoxSizer; class wxTextCtrl; class CPatchAddEdit : public wxDialog { public: CPatchAddEdit(int _selection, std::vector* _onFrame, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit Patch"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE); virtual ~CPatchAddEdit(); private: wxTextCtrl* EditPatchName; wxTextCtrl* EditPatchOffset; wxRadioBox* EditPatchType; wxTextCtrl* EditPatchValue; wxSpinButton* EntrySelection; wxButton* EntryAdd; wxButton* EntryRemove; wxStaticBoxSizer* sbEntry; std::vector* onFrame; void CreateGUIControls(int selection); void ChangeEntry(wxSpinEvent& event); void SavePatchData(wxCommandEvent& event); void AddEntry(wxCommandEvent& event); void RemoveEntry(wxCommandEvent& event); void UpdateEntryCtrls(PatchEngine::PatchEntry pE); bool UpdateTempEntryData(std::vector::iterator iterEntry); int selection, currentItem; std::vector tempEntries; std::vector::iterator itCurEntry; };