CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Windows/GEDebugger/TabState.h
Views: 1401
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
struct TabStateRow;
24
25
class CtrlStateValues: public GenericListControl {
26
public:
27
CtrlStateValues(const TabStateRow *rows, int rowCount, HWND hwnd);
28
29
// Used by watch.
30
void UpdateRows(const TabStateRow *rows, int rowCount) {
31
rows_ = rows;
32
rowCount_ = rowCount;
33
}
34
35
protected:
36
bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) override {
37
return false;
38
}
39
void GetColumnText(wchar_t* dest, int row, int col) override;
40
int GetRowCount() override { return rowCount_; }
41
void OnDoubleClick(int row, int column) override;
42
void OnRightClick(int row, int column, const POINT& point) override;
43
44
bool ListenRowPrePaint() override { return true; }
45
bool OnRowPrePaint(int row, LPNMLVCUSTOMDRAW msg) override;
46
47
private:
48
bool RowValuesChanged(int row);
49
void SetCmdValue(u32 op);
50
void PromptBreakpointCond(const TabStateRow &info);
51
52
const TabStateRow *rows_;
53
int rowCount_;
54
};
55
56
class TabStateValues : public Dialog {
57
public:
58
TabStateValues(const TabStateRow *rows, int rowCount, LPCSTR dialogID, HINSTANCE _hInstance, HWND _hParent);
59
~TabStateValues();
60
61
void Update() override {
62
values->Update();
63
}
64
65
protected:
66
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
67
68
CtrlStateValues *values;
69
70
private:
71
void UpdateSize(WORD width, WORD height);
72
};
73
74
class TabStateFlags : public TabStateValues {
75
public:
76
TabStateFlags(HINSTANCE _hInstance, HWND _hParent);
77
};
78
79
class TabStateLighting : public TabStateValues {
80
public:
81
TabStateLighting(HINSTANCE _hInstance, HWND _hParent);
82
};
83
84
class TabStateSettings : public TabStateValues {
85
public:
86
TabStateSettings(HINSTANCE _hInstance, HWND _hParent);
87
};
88
89
class TabStateTexture : public TabStateValues {
90
public:
91
TabStateTexture(HINSTANCE _hInstance, HWND _hParent);
92
};
93
94
class TabStateWatch : public TabStateValues {
95
public:
96
TabStateWatch(HINSTANCE _hInstance, HWND _hParent);
97
98
void Update() override;
99
};
100
101