dolphin/Source/Core/DolphinWX/PatchAddEdit.h

60 lines
1.5 KiB
C
Raw Normal View History

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
2014-02-22 22:36:30 +00:00
#include <vector>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/windowid.h>
2014-02-22 22:36:30 +00:00
#include "Core/PatchEngine.h"
class wxButton;
class wxRadioBox;
class wxSpinButton;
class wxSpinEvent;
class wxStaticBoxSizer;
class wxTextCtrl;
class wxWindow;
class CPatchAddEdit : public wxDialog
{
public:
2015-02-24 23:32:17 +00:00
CPatchAddEdit(int _selection, const std::vector<PatchEngine::Patch>& _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;
2015-02-24 23:32:17 +00:00
std::vector<PatchEngine::Patch> 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<PatchEngine::PatchEntry>::iterator iterEntry);
int selection, currentItem;
std::vector<PatchEngine::PatchEntry> tempEntries;
std::vector<PatchEngine::PatchEntry>::iterator itCurEntry;
};