#pragma once
#include "Windows/W32Util/DialogManager.h"
#include "Windows/W32Util/Misc.h"
#include "GPU/Debugger/GECommandTable.h"
struct TabStateRow;
class CtrlStateValues: public GenericListControl {
public:
CtrlStateValues(const GECommand *rows, int rowCount, HWND hwnd);
void UpdateRows(const GECommand *rows, int rowCount) {
rows_ = rows;
rowCount_ = rowCount;
}
protected:
bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) override {
return false;
}
void GetColumnText(wchar_t *dest, size_t destSize, int row, int col) override;
int GetRowCount() override { return rowCount_; }
void OnDoubleClick(int row, int column) override;
void OnRightClick(int row, int column, const POINT& point) override;
bool ListenRowPrePaint() override { return true; }
bool OnRowPrePaint(int row, LPNMLVCUSTOMDRAW msg) override;
private:
bool RowValuesChanged(int row);
void SetCmdValue(u32 op);
void PromptBreakpointCond(const GECmdInfo &info);
const GECommand *rows_;
int rowCount_;
};
class TabStateValues : public Dialog {
public:
TabStateValues(const GECommand *rows, size_t rowCount, LPCSTR dialogID, HINSTANCE _hInstance, HWND _hParent);
~TabStateValues();
void Update() override {
values->Update();
}
protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
CtrlStateValues *values;
private:
void UpdateSize(WORD width, WORD height);
};
class TabStateFlags : public TabStateValues {
public:
TabStateFlags(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateLighting : public TabStateValues {
public:
TabStateLighting(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateSettings : public TabStateValues {
public:
TabStateSettings(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateTexture : public TabStateValues {
public:
TabStateTexture(HINSTANCE _hInstance, HWND _hParent);
};
class TabStateWatch : public TabStateValues {
public:
TabStateWatch(HINSTANCE _hInstance, HWND _hParent);
void Update() override;
};