/*************************************************
*           BK Emulator v3.9 for Windows         *
*************************************************/

/*
File: RegDumpFDDDlg.h
Version: 1.0.0
Written by: Yuriy Kalmykov <kalmykov@stoik.com>
    Copyright (c) 2002-2004 Yuriy Kalmykov

    BK Emulator is a program emulated hardware environment for running
code for BK 0010(01) in different configurations.

    This code may be used in compiled form in any way you desire.
This file or it's parts can't be redistributed without the authors
written consent, but can be modified for your private needs.
    Providing that this notice and the authors name and all copyright
notices remains intact.

    Please, an email me to know how you are using it and where. You can
ask me for any information about this below code or any attendant
knowledge.

    This file is provided "as is" with no expressed or implied warranty.
The author accepts no liability for any damage or loss of business that
this product may cause.
*/


#pragma once
#include "afxcmn.h"
#include "resource.h"
#include "GFResizeDialogHelper.h"
#include "MultiEditListCtrl.h"

// RegDumpFDDDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRegDumpDlg dialog
#define COLUMN_WIDTH 60
#define COLUMN_WIDTH_PRT 78
#define COLUMN_WIDTH_REG 38
#define COLUMN_WIDTH_TXT 70

class CDebugger;

class CRegDumpFDDDlg : public CDialogEx
{
		GFResizeDialogHelper m_Resizer;
		CDebugger           *m_pDebugger;
		CMultiEditListCtrl   m_listFDD;
		CMultiEditListCtrl   m_listHDD;
		CFont                hFont;
		HACCEL               m_hAccelTable;

		static const UINT m_pLISTFDDIDs[4];
		static const CString m_plistHDDHDrs[10];

		//номера колонок для listFDD
		enum : int
		{
			LISTFDD_NAME_COL = 0,
			LISTFDD_VALUE_COL
		};

		//номера строки для listFDD
		enum : int
		{
			FDDREG177130IN_LINE = 0,
			FDDREG177130OUT_LINE,
			FDDREG177132IN_LINE,
			FDDREG177132OUT_LINE
		};

		//номера колонок для listHDD
		enum : int
		{
			LISTHDD_NAME1_COL = 0,
			LISTHDD_VALUE11_COL,
			LISTHDD_VALUE12_COL,
			LISTHDD_NAME2_COL,
			LISTHDD_VALUE21_COL,
			LISTHDD_VALUE22_COL
		};

		//номера строк для listHDD
		enum : int
		{
			R1F0_LINE = 0,
			R1F1_LINE,
			R1F2_LINE,
			R1F3_LINE,
			R1F4_LINE,
			R1F5_LINE,
			R1F6_LINE,
			R1F7_LINE,
			R3F6_LINE,
			R3F7_LINE
		};

// Construction
	public:
		CRegDumpFDDDlg(CWnd *pParent = nullptr);   // standard constructor
		virtual ~CRegDumpFDDDlg();

		enum { IDD = IDD_REGDUMP_FDD_DLG };
		CSize               GetMinSize();
		void                AttachDebugger(CDebugger *pDbgr);
		void                DisplayFDDData();
		void                DisplayHDDData();

	protected:
		virtual void DoDataExchange(CDataExchange *pDX) override;    // DDX/DDV support
		virtual BOOL PreTranslateMessage(MSG *pMsg) override;

		void                ResizeList(CMultiEditListCtrl *list, int height);

		// Generated message map functions
		virtual BOOL OnInitDialog() override;
		virtual void OnOK() override;
		virtual void OnCancel() override;
		afx_msg void OnSize(UINT nType, int cx, int cy);
		afx_msg void OnLvnItemchangedMdFddData(NMHDR *pNMHDR, LRESULT *pResult);

		DECLARE_MESSAGE_MAP()
};
