CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Windows/GEDebugger/TabVertices.h
Views: 1401
// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include <vector>20#include "GPU/Common/GPUDebugInterface.h"21#include "Windows/W32Util/DialogManager.h"22#include "Windows/W32Util/Misc.h"2324class VertexDecoder;2526class CtrlVertexList: public GenericListControl {27public:28CtrlVertexList(HWND hwnd);29~CtrlVertexList();3031void SetRaw(bool raw) {32raw_ = raw;33Update();34}3536protected:37bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override { return false; }38void GetColumnText(wchar_t *dest, int row, int col) override;39int GetRowCount() override;4041private:42void FormatVertCol(wchar_t *dest, const GPUDebugVertex &vert, int col);43void FormatVertColRaw(wchar_t *dest, int row, int col);44void FormatVertColRawType(wchar_t *dest, const void *data, int type, int offset);45void FormatVertColRawColor(wchar_t *dest, const void *data, int type);4647std::vector<GPUDebugVertex> vertices;48std::vector<u16> indices;49int rowCount_;50bool raw_;51VertexDecoder *decoder;52};5354class TabVertices : public Dialog {55public:56TabVertices(HINSTANCE _hInstance, HWND _hParent);57~TabVertices();5859void Update() override {60values->Update();61}6263protected:64BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;6566private:67void UpdateSize(WORD width, WORD height);6869CtrlVertexList *values;70};7172class CtrlMatrixList: public GenericListControl {73public:74CtrlMatrixList(HWND hwnd);7576protected:77bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override {78return false;79}80void GetColumnText(wchar_t *dest, int row, int col) override;81int GetRowCount() override;82void OnDoubleClick(int row, int column) override;83void OnRightClick(int row, int column, const POINT &point) override;8485bool ListenColPrePaint() override { return true; }86bool OnColPrePaint(int row, int col, LPNMLVCUSTOMDRAW msg) override;8788private:89bool GetValue(const GPUgstate &state, int row, int col, float &val);90bool ColChanged(const GPUgstate &lastState, const GPUgstate &state, int row, int col);91void ToggleBreakpoint(int row);92void PromptBreakpointCond(int row);93};9495class TabMatrices : public Dialog {96public:97TabMatrices(HINSTANCE _hInstance, HWND _hParent);98~TabMatrices();99100void Update() override {101values->Update();102}103104protected:105BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;106107private:108void UpdateSize(WORD width, WORD height);109110CtrlMatrixList *values;111};112113114