project64/Source/Project64/UserInterface/Debugger/Debugger-DMALogView.h

89 lines
3.4 KiB
C
Raw Normal View History

2017-08-18 05:08:22 +00:00
/****************************************************************************
* *
* Project64 - A Nintendo 64 emulator. *
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
#include <stdafx.h>
#include "DebuggerUI.h"
class CDebugDMALogView :
2017-09-13 10:36:03 +00:00
public CDebugDialog<CDebugDMALogView>,
public CDialogResize<CDebugDMALogView>
2017-08-18 05:08:22 +00:00
{
public:
2017-09-13 10:36:03 +00:00
enum { IDD = IDD_Debugger_DMALog };
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
CDebugDMALogView(CDebuggerUI * debugger);
virtual ~CDebugDMALogView(void);
2017-08-18 05:08:22 +00:00
2019-04-02 19:16:39 +00:00
void RefreshDMALogWindow(bool bReset = false);
2017-08-18 05:08:22 +00:00
private:
2019-04-02 18:28:46 +00:00
enum
{
WM_REFRESH = WM_USER + 1
};
void RefreshList(void);
void Export(void);
2019-04-02 18:28:46 +00:00
2017-09-13 10:36:03 +00:00
CDMALog* m_DMALog;
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
int m_nLastStartIndex;
bool m_bConvertingAddress;
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
bool m_bUniqueRomAddresses;
bool m_bFilterChanged;
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
// Return true if entry meets requirements
bool FilterEntry(int dmaLogIndex);
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
CListViewCtrl m_DMAList;
CEdit m_DMARamEdit;
CEdit m_DMARomEdit;
CStatic m_BlockInfo;
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
bool m_bCustomDrawClrNext;
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
2019-04-02 19:16:39 +00:00
LRESULT OnRefresh(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/);
2017-09-13 10:36:03 +00:00
LRESULT OnClicked(WORD wNotifyCode, WORD wID, HWND /*hWndCtl*/, BOOL& bHandled);
LRESULT OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnRamAddrChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnRomAddrChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnCustomDrawList(NMHDR* pNMHDR);
LRESULT OnDestroy(void);
void OnExitSizeMove(void);
2017-09-13 10:36:03 +00:00
BEGIN_MSG_MAP_EX(CDebugDMALogView)
2019-04-02 18:28:46 +00:00
MESSAGE_HANDLER(WM_REFRESH, OnRefresh)
2017-09-13 10:36:03 +00:00
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_CODE_HANDLER(BN_CLICKED, OnClicked)
MESSAGE_HANDLER(WM_ACTIVATE, OnActivate)
COMMAND_HANDLER(IDC_DMA_RAM_EDIT, EN_CHANGE, OnRamAddrChanged)
COMMAND_HANDLER(IDC_DMA_ROM_EDIT, EN_CHANGE, OnRomAddrChanged)
NOTIFY_HANDLER_EX(IDC_DMA_LIST, NM_CUSTOMDRAW, OnCustomDrawList)
CHAIN_MSG_MAP(CDialogResize<CDebugDMALogView>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove)
2019-04-02 18:28:46 +00:00
END_MSG_MAP()
2017-09-13 10:36:03 +00:00
BEGIN_DLGRESIZE_MAP(CDebugDMALogView)
DLGRESIZE_CONTROL(IDC_DMA_LIST, DLSZ_SIZE_X | DLSZ_SIZE_Y)
DLGRESIZE_CONTROL(IDC_TRACE_STATIC, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDC_BLOCK_INFO, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDC_RAM_STATIC, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDC_ROM_STATIC, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDC_DMA_ROM_EDIT, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDC_DMA_RAM_EDIT, DLSZ_MOVE_Y)
DLGRESIZE_CONTROL(IDC_CLEAR_BTN, DLSZ_MOVE_X | DLSZ_MOVE_Y)
2020-11-17 18:17:31 +00:00
DLGRESIZE_CONTROL(IDC_EXPORT_BTN, DLSZ_MOVE_X | DLSZ_MOVE_Y)
2017-09-13 10:36:03 +00:00
END_DLGRESIZE_MAP()
2017-08-18 05:08:22 +00:00
};