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/Debugger/WatchItemWindow.h
Views: 1401
1
// Copyright (c) 2023- 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 <string>
21
#include "Common/CommonWindows.h"
22
#include "Common/CommonTypes.h"
23
#include "Core/Debugger/DebugInterface.h"
24
#include "Windows/Debugger/Debugger_Lists.h"
25
26
class WatchItemWindow {
27
public:
28
WatchItemWindow(HINSTANCE inst, HWND parent, DebugInterface *cpu) : parentHwnd_(parent), cpu_(cpu) {}
29
30
void Init(const std::string &name, const std::string &expression, WatchFormat fmt) {
31
name_ = name;
32
expression_ = expression;
33
format_ = fmt;
34
}
35
36
bool Exec();
37
38
const std::string &GetName() const {
39
return name_;
40
}
41
const std::string &GetExpression() const {
42
return expression_;
43
}
44
WatchFormat GetFormat() const {
45
return format_;
46
}
47
48
private:
49
static INT_PTR CALLBACK StaticDlgFunc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
50
INT_PTR DlgFunc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
51
bool FetchDialogData(HWND hwnd);
52
53
HWND parentHwnd_;
54
DebugInterface *cpu_;
55
56
std::string name_;
57
std::string expression_;
58
WatchFormat format_ = WatchFormat::HEX;
59
};
60
61