6 #include "StandAloneDlg.h"
11 typedef std::map
<CString
,CShadowTree
> TShadowTreeMap
;
13 CShadowTree():m_hTree(NULL
),m_pParent(NULL
){}
15 CShadowTree
* GetNextSub(CString
& nameLeft
);
17 bool IsLeaf()const {return m_ShadowTree
.empty();}
18 CString
GetRefName()const
22 return m_pParent
->GetRefName()+"/"+m_csRefName
;
24 bool IsFrom(const wchar_t* from
)const
26 return wcsncmp(GetRefName(),from
,wcslen(from
))==0;
37 TShadowTreeMap m_ShadowTree
;
38 CShadowTree
* m_pParent
;
41 class CBrowseRefsDlg
: public CResizableStandAloneDialog
43 DECLARE_DYNAMIC(CBrowseRefsDlg
)
46 CBrowseRefsDlg(CWnd
* pParent
= NULL
); // standard constructor
47 virtual ~CBrowseRefsDlg();
51 eCmd_ViewLog
= WM_APP
,
58 enum { IDD
= IDD_DIALOG_BROWSE_REFS
};
61 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
65 afx_msg
void OnBnClickedOk();
66 virtual BOOL
OnInitDialog();
70 CShadowTree
& GetTreeNode(CString refName
, CShadowTree
* pTreePos
=NULL
);
72 void FillListCtrlForTreeNode(HTREEITEM treeNode
);
74 void FillListCtrlForShadowTree(CShadowTree
* pTree
, CString refNamePrefix
, bool isFirstLevel
);
76 bool SelectRef(CString refName
);
80 CShadowTree m_TreeRoot
;
81 CTreeCtrl m_RefTreeCtrl
;
82 CListCtrl m_ListRefLeafs
;
83 afx_msg
void OnTvnSelchangedTreeRef(NMHDR
*pNMHDR
, LRESULT
*pResult
);
86 afx_msg
void OnContextMenu(CWnd
* pWndFrom
, CPoint point
);
88 void OnContextMenu_ListRefLeafs(CPoint point
);
89 void OnContextMenu_RefTreeCtrl(CPoint point
);
90 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);