00001 #pragma once 00002 #include "afxwin.h" 00003 #include "resource.h" 00004 00005 #include "MetaGMEVisitor.h" 00006 #include "afxcmn.h" 00007 00008 // NmspSpec dialog 00009 00010 class NmspSpec : public CDialog 00011 { 00012 DECLARE_DYNAMIC(NmspSpec) 00013 00014 public: 00015 NmspSpec(CWnd* pParent = NULL); // standard constructor 00016 virtual ~NmspSpec(); 00017 00018 // Dialog Data 00019 enum { IDD = IDD_DIALOG1 }; 00020 00021 protected: 00022 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 00023 00024 DECLARE_MESSAGE_MAP() 00025 00026 protected: 00027 void initElems(); 00028 void insert( int pIdx, MetaBON::MetaGMEVisitor::VectorOfPairs::const_iterator it); 00029 00030 void updateEditField( int pSel = -1); 00031 void updateItemInfo( int pIdx, CString pTxt); 00032 bool loadItemInfo( int pIdx, CString& pTxt); 00033 00034 MetaBON::MetaGMEVisitor::VectorOfPairs m_data; 00035 00036 public: 00037 void setData( MetaBON::MetaGMEVisitor::VectorOfPairs& pData); 00038 void getData( MetaBON::MetaGMEVisitor::VectorOfPairs& rData); 00039 00040 public: 00041 CEdit m_edName; 00042 CButton m_bEnabled; 00043 CButton m_bSave; 00044 CTreeCtrl m_tree; 00045 HTREEITEM m_rootElem; 00046 bool m_edChanged; 00047 00048 virtual BOOL OnInitDialog(); 00049 00050 afx_msg void OnEnKillfocusEdit1(); 00051 afx_msg void OnEnChangeEdit1(); 00052 00053 afx_msg void OnNMClickTree1(NMHDR *pNMHDR, LRESULT *pResult); 00054 afx_msg void OnNMSetfocusTree1(NMHDR *pNMHDR, LRESULT *pResult); 00055 afx_msg void OnTvnSelchangedTree1(NMHDR *pNMHDR, LRESULT *pResult); 00056 afx_msg void OnBnClickedSave(); 00057 afx_msg void OnEnSetfocusEdit1(); 00058 };