#pragma once
#include "DocPaneDlgViewBase.h"
#include "BaseDialog.h"
#include "BreakPoint.h"
#include "EnterEditCtrl.h"

// Диалоговое окно CBreakpointView

class CBreakpointView : public CDocPaneDlgViewBase
{
		DECLARE_DYNAMIC(CBreakpointView)

		CBPTListCtrl    m_ListBPT;

	public:
		CBreakpointView();   // стандартный конструктор
		virtual ~CBreakpointView() override;
		void            InitView();
// Данные диалогового окна
		enum { IDD = IDD_BREAKPOINTLIST_DLG };

	protected:
		virtual void DoDataExchange(CDataExchange *pDX) override;    // поддержка DDX/DDV
		afx_msg LRESULT OnBreakpointsUpdate(WPARAM, LPARAM);
		afx_msg LRESULT HandleInitDialog(WPARAM wp, LPARAM lp);
		afx_msg void    OnSetFocus(CWnd *pOldWnd);
		afx_msg void    OnBnClickedButtonAddAddrBP();
		afx_msg void    OnBnClickedButtonAddMemBP();
		afx_msg void    OnBnClickedButtonDelBP();
		afx_msg void    OnBnClickedButtonOnOffBP();
		afx_msg void    OnBnClickedButtonDelAllBP();
		afx_msg void    OnBnClickedButtonOnAllBP();
		afx_msg void    OnBnClickedButtonOffAllBP();
		afx_msg void    OnUpdateButton(CCmdUI *pCmdUI);
		afx_msg void    OnUpdateButton2(CCmdUI *pCmdUI);
		afx_msg void    OnShowWindow(BOOL bShow, UINT nStatus);
		DECLARE_MESSAGE_MAP()
};

struct NewBPParam
{
	int nAddr;
	uint32_t nFlags;
	NewBPParam()
		: nAddr(0)
		, nFlags(0)
	{}
};

// Диалоговое окно CAddAddrBP

class CAddAddrBP : public CBaseDialog
{
		DECLARE_DYNAMIC(CAddAddrBP)
		NewBPParam     *m_pParam;
		CRect           m_nOwnRect;
		CEnterEdit      m_EditAddr;
		int             m_nAddr;
		CString         m_strAddr;

	public:
		CAddAddrBP(const CRect &OwnRect, NewBPParam *pParam = nullptr, CWnd *pParent = nullptr);   // стандартный конструктор
		virtual ~CAddAddrBP() override;

		// Данные диалогового окна
		enum { IDD = IDD_ADDADDRBP_DLG };

	protected:
		virtual void DoDataExchange(CDataExchange *pDX) override;    // поддержка DDX/DDV
		virtual BOOL OnInitDialog() override;
		virtual void OnOK() override;

		DECLARE_MESSAGE_MAP()
};



// Диалоговое окно CAddMemBP

class CAddMemBP : public CBaseDialog
{
		DECLARE_DYNAMIC(CAddMemBP)
		NewBPParam     *m_pParam;
		CRect           m_nOwnRect;
		CEnterEdit      m_EditAddr;
		int             m_nAddr;
		CString         m_strAddr;
		BOOL            m_bByte;
		BOOL            m_bRead;
		BOOL            m_bWrite;

	public:
		CAddMemBP(const CRect &OwnRect, NewBPParam *pParam = nullptr, CWnd *pParent = nullptr);   // стандартный конструктор
		virtual ~CAddMemBP() override;

		// Данные диалогового окна
		enum { IDD = IDD_ADDMEMBP_DLG };

	protected:
		virtual void DoDataExchange(CDataExchange *pDX) override;    // поддержка DDX/DDV
		virtual BOOL OnInitDialog() override;
		virtual void OnOK() override;

		DECLARE_MESSAGE_MAP()

};



