#if !defined(AFX_TABLEVALDLG_H__B02B1712_76A4_4097_B740_518E2C9ABAD8__INCLUDED_)
#define AFX_TABLEVALDLG_H__B02B1712_76A4_4097_B740_518E2C9ABAD8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TableValDlg.h : header file
//
#include "resource.h"
#include <apl_gui.h>
#include "ResizableDialog.h" 
/////////////////////////////////////////////////////////////////////////////
// CTableValDlg dialog

class CTableValDlg : public CResizableDialog
{
// Construction
public:
	CTableValDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CTableValDlg)
	enum { IDD = IDD_TABLE_VALUE };
	CStatic	m_satic_fon;
	CaplButton	m_cancel_btn;
	CaplButton	m_ok_btn;
	CaplButton	m_bottom_btn;
	CaplButton	m_top_btn;
	CaplButton	m_save_to_file;
	CSortListCtrl	m_aggr_val;
	//}}AFX_DATA

	bool m_ReadOnly;
	CString m_mode;
	bool m_no_del_val_if_selchange;

	CaplNetStepData *m_data;
	CaplCharacteristicManager *m_charact_mgr;
	CaplInstance *m_value,*m_old_value;
	CaplInstance *m_unit;
	CaplInstance *m_parent_value;
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTableValDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void PrintAggrInList(CaplInstance *val);
	bool CreateTableHeader(CaplInstance *unit);
	void PrintTableInList(CaplInstance *val);
	bool PointToVal(CPoint *point, int &i,int &j,CaplInstance **val, CaplInstance **unit,int &type);
	bool EditVal(int i,int j,CaplInstance **value, CaplInstance *unit);
	CaplMap m_ColumnListMap;
	CaplMap m_val_map;
	bool m_changed_aggr;

	// Generated message map functions
	//{{AFX_MSG(CTableValDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSaveToFile();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnTop();
	afx_msg void OnBottom();
	afx_msg void OnDblclkAggrVal(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TABLEVALDLG_H__B02B1712_76A4_4097_B740_518E2C9ABAD8__INCLUDED_)
