Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Windows/GEDebugger/TabState.h
3185 views
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "Windows/W32Util/DialogManager.h"
21
#include "Windows/W32Util/Misc.h"
22
23
#include "GPU/Debugger/GECommandTable.h"
24
25
struct TabStateRow;
26
27
class CtrlStateValues: public GenericListControl {
28
public:
29
CtrlStateValues(const GECommand *rows, int rowCount, HWND hwnd);
30
31
// Used by watch.
32
void UpdateRows(const GECommand *rows, int rowCount) {
33
rows_ = rows;
34
rowCount_ = rowCount;
35
}
36
37
protected:
38
bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) override {
39
return false;
40
}
41
void GetColumnText(wchar_t *dest, size_t destSize, int row, int col) override;
42
int GetRowCount() override { return rowCount_; }
43
void OnDoubleClick(int row, int column) override;
44
void OnRightClick(int row, int column, const POINT& point) override;
45
46
bool ListenRowPrePaint() override { return true; }
47
bool OnRowPrePaint(int row, LPNMLVCUSTOMDRAW msg) override;
48
49
private:
50
bool RowValuesChanged(int row);
51
void SetCmdValue(u32 op);
52
void PromptBreakpointCond(const GECmdInfo &info);
53
54
const GECommand *rows_;
55
int rowCount_;
56
};
57
58
class TabStateValues : public Dialog {
59
public:
60
TabStateValues(const GECommand *rows, size_t rowCount, LPCSTR dialogID, HINSTANCE _hInstance, HWND _hParent);
61
~TabStateValues();
62
63
void Update() override {
64
values->Update();
65
}
66
67
protected:
68
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
69
70
CtrlStateValues *values;
71
72
private:
73
void UpdateSize(WORD width, WORD height);
74
};
75
76
class TabStateFlags : public TabStateValues {
77
public:
78
TabStateFlags(HINSTANCE _hInstance, HWND _hParent);
79
};
80
81
class TabStateLighting : public TabStateValues {
82
public:
83
TabStateLighting(HINSTANCE _hInstance, HWND _hParent);
84
};
85
86
class TabStateSettings : public TabStateValues {
87
public:
88
TabStateSettings(HINSTANCE _hInstance, HWND _hParent);
89
};
90
91
class TabStateTexture : public TabStateValues {
92
public:
93
TabStateTexture(HINSTANCE _hInstance, HWND _hParent);
94
};
95
96
class TabStateWatch : public TabStateValues {
97
public:
98
TabStateWatch(HINSTANCE _hInstance, HWND _hParent);
99
100
void Update() override;
101
};
102
103