[Debugger] Move CCommandList::Attach in to Debugger-Commands.cpp

This commit is contained in:
zilmar 2017-11-03 17:34:43 +11:00
parent 769b279537
commit 415c97080a
2 changed files with 1093 additions and 1087 deletions

View File

@ -19,12 +19,35 @@
#include <Project64-core/N64System/Mips/OpCodeName.h>
void CCommandList::Attach(HWND hWndNew)
{
CListViewCtrl::Attach(hWndNew);
ModifyStyle(LVS_OWNERDRAWFIXED, 0, 0);
SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_LABELTIP);
AddColumn("", COL_ARROWS);
SetColumnWidth(COL_ARROWS, 30);
AddColumn("Address", COL_ADDRESS);
SetColumnWidth(COL_ADDRESS, 65);
AddColumn("Command", COL_COMMAND);
SetColumnWidth(COL_COMMAND, 60);
AddColumn("Parameters", COL_PARAMETERS);
SetColumnWidth(COL_PARAMETERS, 120);
AddColumn("Symbol", COL_SYMBOL);
SetColumnWidth(COL_SYMBOL, 140);
}
CDebugCommandsView* CDebugCommandsView::_this = NULL;
HHOOK CDebugCommandsView::hWinMessageHook = NULL;
CDebugCommandsView::CDebugCommandsView(CDebuggerUI * debugger) :
CDebugDialog<CDebugCommandsView>(debugger),
CToolTipDialog<CDebugCommandsView>()
CDebugDialog<CDebugCommandsView>(debugger),
CToolTipDialog<CDebugCommandsView>()
{
m_HistoryIndex = -1;
m_bIgnoreAddrChange = false;
@ -35,9 +58,8 @@ CToolTipDialog<CDebugCommandsView>()
m_RowHeight = 13;
}
CDebugCommandsView::~CDebugCommandsView(void)
CDebugCommandsView::~CDebugCommandsView()
{
}
LRESULT CDebugCommandsView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
@ -1363,7 +1385,6 @@ LRESULT CDebugCommandsView::OnCommandListRightClicked(NMHDR* pNMHDR)
return 0;
}
LRESULT CDebugCommandsView::OnListBoxClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
if (wID == IDC_BP_LIST)
@ -1437,7 +1458,7 @@ LRESULT CDebugCommandsView::OnScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
{
WORD type = LOWORD(wParam);
switch(type)
switch (type)
{
case SB_LINEUP:
ShowAddress(m_StartAddress - 8, TRUE);

View File

@ -29,22 +29,7 @@ public:
COL_SYMBOL
};
void Attach(HWND hWndNew)
{
CListViewCtrl::Attach(hWndNew);
ModifyStyle(LVS_OWNERDRAWFIXED, 0, 0);
SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_LABELTIP);
AddColumn("", COL_ARROWS);
AddColumn("Address", COL_ADDRESS);
AddColumn("Command", COL_COMMAND);
AddColumn("Parameters", COL_PARAMETERS);
AddColumn("Symbol", COL_SYMBOL);
SetColumnWidth(COL_ARROWS, 30);
SetColumnWidth(COL_ADDRESS, 65);
SetColumnWidth(COL_COMMAND, 60);
SetColumnWidth(COL_PARAMETERS, 120);
SetColumnWidth(COL_SYMBOL, 140);
}
void Attach(HWND hWndNew);
BEGIN_MSG_MAP_EX(CCommandsList)
END_MSG_MAP()