Get rid of old wx event type usages. Use recommended replacements

This commit is contained in:
Lioncash
2014-05-17 12:49:00 -04:00
parent 5391b2dd9c
commit 90df5efd01
13 changed files with 135 additions and 136 deletions

View File

@ -76,19 +76,19 @@ FifoPlayerDlg::~FifoPlayerDlg()
// Disconnect Events
Unbind(wxEVT_PAINT, &FifoPlayerDlg::OnPaint, this);
m_FrameFromCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameFrom, this);
m_FrameToCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameTo, this);
m_ObjectFromCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectFrom, this);
m_ObjectToCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectTo, this);
m_EarlyMemoryUpdates->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this);
m_RecordStop->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnRecordStop, this);
m_Save->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnSaveFile, this);
m_FramesToRecordCtrl->Unbind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnNumFramesToRecord, this);
m_Close->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnCloseClick, this);
m_FrameFromCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameFrom, this);
m_FrameToCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameTo, this);
m_ObjectFromCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectFrom, this);
m_ObjectToCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectTo, this);
m_EarlyMemoryUpdates->Unbind(wxEVT_CHECKBOX, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this);
m_RecordStop->Unbind(wxEVT_BUTTON, &FifoPlayerDlg::OnRecordStop, this);
m_Save->Unbind(wxEVT_BUTTON, &FifoPlayerDlg::OnSaveFile, this);
m_FramesToRecordCtrl->Unbind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnNumFramesToRecord, this);
m_Close->Unbind(wxEVT_BUTTON, &FifoPlayerDlg::OnCloseClick, this);
m_framesList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnFrameListSelectionChanged, this);
m_objectsList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectListSelectionChanged, this);
m_objectCmdList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this);
m_framesList->Unbind(wxEVT_LISTBOX, &FifoPlayerDlg::OnFrameListSelectionChanged, this);
m_objectsList->Unbind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectListSelectionChanged, this);
m_objectCmdList->Unbind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this);
FifoPlayer::GetInstance().SetFrameWrittenCallback(nullptr);
@ -321,33 +321,33 @@ void FifoPlayerDlg::CreateGUIControls()
// Connect Events
Bind(wxEVT_PAINT, &FifoPlayerDlg::OnPaint, this);
m_FrameFromCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameFrom, this);
m_FrameToCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnFrameTo, this);
m_ObjectFromCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectFrom, this);
m_ObjectToCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnObjectTo, this);
m_EarlyMemoryUpdates->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this);
m_RecordStop->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnRecordStop, this);
m_Save->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnSaveFile, this);
m_FramesToRecordCtrl->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &FifoPlayerDlg::OnNumFramesToRecord, this);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnCloseClick, this);
m_FrameFromCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameFrom, this);
m_FrameToCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnFrameTo, this);
m_ObjectFromCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectFrom, this);
m_ObjectToCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnObjectTo, this);
m_EarlyMemoryUpdates->Bind(wxEVT_CHECKBOX, &FifoPlayerDlg::OnCheckEarlyMemoryUpdates, this);
m_RecordStop->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnRecordStop, this);
m_Save->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnSaveFile, this);
m_FramesToRecordCtrl->Bind(wxEVT_SPINCTRL, &FifoPlayerDlg::OnNumFramesToRecord, this);
Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnCloseClick, this);
m_framesList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnFrameListSelectionChanged, this);
m_objectsList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectListSelectionChanged, this);
m_objectCmdList->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this);
m_framesList->Bind(wxEVT_LISTBOX, &FifoPlayerDlg::OnFrameListSelectionChanged, this);
m_objectsList->Bind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectListSelectionChanged, this);
m_objectCmdList->Bind(wxEVT_LISTBOX, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this);
m_beginSearch->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnBeginSearch, this);
m_findNext->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnFindNextClick, this);
m_findPrevious->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &FifoPlayerDlg::OnFindPreviousClick, this);
m_beginSearch->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnBeginSearch, this);
m_findNext->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnFindNextClick, this);
m_findPrevious->Bind(wxEVT_BUTTON, &FifoPlayerDlg::OnFindPreviousClick, this);
m_searchField->Bind(wxEVT_COMMAND_TEXT_ENTER, &FifoPlayerDlg::OnBeginSearch, this);
m_searchField->Bind(wxEVT_COMMAND_TEXT_UPDATED, &FifoPlayerDlg::OnSearchFieldTextChanged, this);
m_searchField->Bind(wxEVT_TEXT_ENTER, &FifoPlayerDlg::OnBeginSearch, this);
m_searchField->Bind(wxEVT_TEXT, &FifoPlayerDlg::OnSearchFieldTextChanged, this);
// Setup command copying
wxAcceleratorEntry entry;
entry.Set(wxACCEL_CTRL, (int)'C', wxID_COPY);
wxAcceleratorTable accel(1, &entry);
m_objectCmdList->SetAcceleratorTable(accel);
m_objectCmdList->Bind(wxEVT_COMMAND_MENU_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionCopy, this, wxID_COPY);
m_objectCmdList->Bind(wxEVT_MENU, &FifoPlayerDlg::OnObjectCmdListSelectionCopy, this, wxID_COPY);
Bind(RECORDING_FINISHED_EVENT, &FifoPlayerDlg::OnRecordingFinished, this);
Bind(FRAME_WRITTEN_EVENT, &FifoPlayerDlg::OnFrameWritten, this);
@ -583,7 +583,7 @@ void FifoPlayerDlg::ChangeSearchResult(unsigned int result_idx)
m_objectsList->SetSelection(search_results[result_idx].obj_idx);
m_objectCmdList->SetSelection(search_results[result_idx].cmd_idx);
wxCommandEvent ev(wxEVT_COMMAND_LISTBOX_SELECTED);
wxCommandEvent ev(wxEVT_LISTBOX);
if (prev_frame != m_framesList->GetSelection())
{
ev.SetInt(m_framesList->GetSelection());
@ -631,7 +631,7 @@ void FifoPlayerDlg::OnFrameListSelectionChanged(wxCommandEvent& event)
}
// Update object list
wxCommandEvent ev = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
wxCommandEvent ev = wxCommandEvent(wxEVT_LISTBOX);
ev.SetInt(-1);
OnObjectListSelectionChanged(ev);
@ -762,7 +762,7 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
}
}
// Update command list
wxCommandEvent ev = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
wxCommandEvent ev = wxCommandEvent(wxEVT_LISTBOX);
ev.SetInt(-1);
OnObjectCmdListSelectionChanged(ev);
@ -891,7 +891,7 @@ void FifoPlayerDlg::UpdateAnalyzerGui()
m_framesList->Append(wxString::Format("Frame %u", (u32)i));
}
wxCommandEvent ev = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
wxCommandEvent ev = wxCommandEvent(wxEVT_LISTBOX);
ev.SetInt(-1);
OnFrameListSelectionChanged(ev);
}