File: FifoPlayerDlg.h

package info (click to toggle)
dolphin-emu 5.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 29,052 kB
  • sloc: cpp: 213,146; java: 6,252; asm: 2,277; xml: 1,998; ansic: 1,514; python: 462; sh: 279; pascal: 247; makefile: 124; perl: 97
file content (126 lines) | stat: -rw-r--r-- 3,335 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Copyright 2011 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <cstddef>
#include <vector>
#include <wx/dialog.h>

#include "Common/CommonTypes.h"

class wxButton;
class wxCheckBox;
class wxListBox;
class wxNotebook;
class wxPaintEvent;
class wxPanel;
class wxSpinCtrl;
class wxSpinEvent;
class wxStaticText;
class wxTextCtrl;

class FifoPlayerDlg : public wxDialog
{
public:
	FifoPlayerDlg(wxWindow* parent);
	~FifoPlayerDlg();

private:
	void CreateGUIControls();

	void OnPaint(wxPaintEvent& event);
	void OnFrameFrom(wxSpinEvent& event);
	void OnFrameTo(wxSpinEvent& event);
	void OnObjectFrom(wxSpinEvent& event);
	void OnObjectTo(wxSpinEvent& event);
	void OnCheckEarlyMemoryUpdates(wxCommandEvent& event);
	void OnRecordStop(wxCommandEvent& event);
	void OnSaveFile(wxCommandEvent& event);
	void OnNumFramesToRecord(wxSpinEvent& event);
	void OnCloseClick(wxCommandEvent& event);

	void OnBeginSearch(wxCommandEvent& event);
	void OnFindNextClick(wxCommandEvent& event);
	void OnFindPreviousClick(wxCommandEvent& event);
	void OnSearchFieldTextChanged(wxCommandEvent& event);
	void ChangeSearchResult(unsigned int result_idx);
	void ResetSearch();

	void OnRecordingFinished(wxEvent& event);
	void OnFrameWritten(wxEvent& event);

	void OnFrameListSelectionChanged(wxCommandEvent& event);
	void OnObjectListSelectionChanged(wxCommandEvent& event);
	void OnObjectCmdListSelectionChanged(wxCommandEvent& event);
	void OnObjectCmdListSelectionCopy(wxCommandEvent& WXUNUSED(event));

	void UpdatePlayGui();
	void UpdateRecorderGui();
	void UpdateAnalyzerGui();

	wxString CreateFileFrameCountLabel() const;
	wxString CreateCurrentFrameLabel() const;
	wxString CreateFileObjectCountLabel() const;
	wxString CreateRecordingFifoSizeLabel() const;
	wxString CreateRecordingMemSizeLabel() const;
	wxString CreateRecordingFrameCountLabel() const;

	bool GetSaveButtonEnabled() const;

	// Called from a non-GUI thread
	static void RecordingFinished();
	static void FileLoaded();
	static void FrameWritten();

	static wxEvtHandler *volatile m_EvtHandler;

	wxNotebook* m_Notebook;
	wxPanel* m_PlayPage;
	wxStaticText* m_NumFramesLabel;
	wxStaticText* m_CurrentFrameLabel;
	wxStaticText* m_NumObjectsLabel;
	wxStaticText* m_FrameFromLabel;
	wxSpinCtrl* m_FrameFromCtrl;
	wxStaticText* m_FrameToLabel;
	wxSpinCtrl* m_FrameToCtrl;
	wxStaticText* m_ObjectFromLabel;
	wxSpinCtrl* m_ObjectFromCtrl;
	wxStaticText* m_ObjectToLabel;
	wxSpinCtrl* m_ObjectToCtrl;
	wxCheckBox* m_EarlyMemoryUpdates;
	wxPanel* m_RecordPage;
	wxStaticText* m_RecordingFifoSizeLabel;
	wxStaticText* m_RecordingMemSizeLabel;
	wxStaticText* m_RecordingFramesLabel;
	wxButton* m_RecordStop;
	wxButton* m_Save;
	wxStaticText* m_FramesToRecordLabel;
	wxSpinCtrl* m_FramesToRecordCtrl;

	wxPanel* m_AnalyzePage;
	wxListBox* m_framesList;
	wxListBox* m_objectsList;
	wxListBox* m_objectCmdList;
	std::vector<u32> m_objectCmdOffsets;
	wxStaticText* m_objectCmdInfo;

	wxTextCtrl* m_searchField;
	wxButton* m_beginSearch;
	wxButton* m_findNext;
	wxButton* m_findPrevious;
	wxStaticText* m_numResultsText;

	struct SearchResult {
		int frame_idx;
		int obj_idx;
		int cmd_idx;
	};
	std::vector<SearchResult> search_results;
	unsigned int m_search_result_idx;

	wxButton* m_Close;

	s32 m_FramesToRecord;
};