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
32 CString m_csDate_Iso8601;
\r
34 CString m_csSubject;
\r
38 TShadowTreeMap m_ShadowTree;
\r
39 CShadowTree* m_pParent;
\r
41 typedef std::vector<CShadowTree*> VectorPShadowTree;
\r
43 class CBrowseRefsDlg : public CResizableStandAloneDialog
\r
45 DECLARE_DYNAMIC(CBrowseRefsDlg)
\r
48 CBrowseRefsDlg(CString cmdPath, CWnd* pParent = NULL); // standard constructor
\r
49 virtual ~CBrowseRefsDlg();
\r
53 eCmd_ViewLog = WM_APP,
\r
71 enum { IDD = IDD_DIALOG_BROWSE_REFS };
\r
74 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
\r
76 DECLARE_MESSAGE_MAP()
\r
78 afx_msg void OnBnClickedOk();
\r
79 virtual BOOL OnInitDialog();
\r
81 CString GetSelectedRef(bool onlyIfLeaf);
\r
83 void Refresh(CString selectRef = CString());
\r
85 CShadowTree& GetTreeNode(CString refName, CShadowTree* pTreePos=NULL, bool bCreateIfNotExist=false);
\r
87 void FillListCtrlForTreeNode(HTREEITEM treeNode);
\r
89 void FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel);
\r
91 bool SelectRef(CString refName);
\r
93 bool ConfirmDeleteRef(CString completeRefName);
\r
94 bool DoDeleteRef(CString completeRefName, bool bForce);
\r
99 CShadowTree m_TreeRoot;
\r
100 CTreeCtrl m_RefTreeCtrl;
\r
101 CListCtrl m_ListRefLeafs;
\r
104 bool m_currSortDesc;
\r
105 afx_msg void OnTvnSelchangedTreeRef(NMHDR *pNMHDR, LRESULT *pResult);
\r
108 afx_msg void OnContextMenu(CWnd* pWndFrom, CPoint point);
\r
110 void OnContextMenu_ListRefLeafs(CPoint point);
\r
111 void OnContextMenu_RefTreeCtrl(CPoint point);
\r
113 void ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPShadowTree& selectedLeafs);
\r
114 virtual BOOL PreTranslateMessage(MSG* pMsg);
\r
115 afx_msg void OnLvnColumnclickListRefLeafs(NMHDR *pNMHDR, LRESULT *pResult);
\r
116 afx_msg void OnDestroy();
\r
117 afx_msg void OnNMDblclkListRefLeafs(NMHDR *pNMHDR, LRESULT *pResult);
\r
121 CString m_initialRef;
\r
122 CString m_pickedRef;
\r
124 static CString PickRef(bool returnAsHash = false, CString initialRef = CString());
\r