#pragma once
#include "resource.h"
#include "DisasmCtrl.h"
#include "EnterEditCtrl.h"
#include "DocPaneDlgViewBase.h"

// DisasmDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CDisasmDlg dialog
class CDebugger;

class CDisasmDlg : public CDocPaneDlg
{
		DECLARE_DYNAMIC(CDisasmDlg)

		CDisasmCtrl          m_ListDisasm;
		CEnterEdit           m_EditAddr;
		CString              m_strDisasmAddr;

	public:
		CDisasmDlg(CWnd *pParent = nullptr);   // standard constructor
		virtual ~CDisasmDlg() override;

		enum { IDD = IDD_BKDISASM_DLG };

		inline CDisasmCtrl *GetDisasmCtrl()
		{
			return &m_ListDisasm;
		}
		void                InitDebugger();
		void                SetDisasmAddr(uint16_t addr);

	protected:
		virtual void DoDataExchange(CDataExchange *pDX) override;    // DDX/DDV support
		LRESULT OnDisasmTopAddressUpdate(WPARAM, LPARAM);
		LRESULT OnDisasmTopAddressSet(WPARAM wp, LPARAM);
		LRESULT OnDisasmCurrentAddressChange(WPARAM wp, LPARAM);

		virtual BOOL OnInitDialog() override;
		afx_msg void OnSetFocus(CWnd *pOldWnd);
		DECLARE_MESSAGE_MAP()
};
