6 #include "StandAloneDlg.h"
\r
11 typedef std::map<CString,CShadowTree> TShadowTreeMap;
\r
13 CShadowTree():m_hTree(NULL),m_pParent(NULL){}
\r
15 CShadowTree* GetNextSub(CString& nameLeft, bool bCreateIfNotExist);
\r
17 bool IsLeaf()const {return m_ShadowTree.empty();}
\r
18 CString GetRefName()const
\r
22 return m_pParent->GetRefName()+"/"+m_csRefName;
\r
24 bool IsFrom(const wchar_t* from)const
\r
26 return wcsncmp(GetRefName(),from,wcslen(from))==0;
\r
29 CString m_csRefName;
\r
30 CString m_csRefHash;
\r
33 CString m_csSubject;
\r
37 TShadowTreeMap m_ShadowTree;
\r
38 CShadowTree* m_pParent;
\r
40 typedef std::vector<CShadowTree*> VectorPShadowTree;
\r
42 class CBrowseRefsDlg : public CResizableStandAloneDialog
\r
44 DECLARE_DYNAMIC(CBrowseRefsDlg)
\r
47 CBrowseRefsDlg(CString cmdPath, CWnd* pParent = NULL); // standard constructor
\r
48 virtual ~CBrowseRefsDlg();
\r
52 eCmd_ViewLog = WM_APP,
\r
62 enum { IDD = IDD_DIALOG_BROWSE_REFS };
\r
65 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
\r
67 DECLARE_MESSAGE_MAP()
\r
69 afx_msg void OnBnClickedOk();
\r
70 virtual BOOL OnInitDialog();
\r
72 void Refresh(bool bSelectCurHead=false);
\r
74 CShadowTree& GetTreeNode(CString refName, CShadowTree* pTreePos=NULL, bool bCreateIfNotExist=false);
\r
76 void FillListCtrlForTreeNode(HTREEITEM treeNode);
\r
78 void FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel);
\r
80 bool SelectRef(CString refName);
\r
82 bool ConfirmDeleteRef(CString completeRefName);
\r
83 bool DoDeleteRef(CString completeRefName, bool bForce);
\r
88 CShadowTree m_TreeRoot;
\r
89 CTreeCtrl m_RefTreeCtrl;
\r
90 CListCtrl m_ListRefLeafs;
\r
91 afx_msg void OnTvnSelchangedTreeRef(NMHDR *pNMHDR, LRESULT *pResult);
\r
94 afx_msg void OnContextMenu(CWnd* pWndFrom, CPoint point);
\r
96 void OnContextMenu_ListRefLeafs(CPoint point);
\r
97 void OnContextMenu_RefTreeCtrl(CPoint point);
\r
99 void ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPShadowTree& selectedLeafs);
\r
100 virtual BOOL PreTranslateMessage(MSG* pMsg);
\r