OSDN Git Service

d1a1f4bbeb1561af3e34d0cde598f083eebf79e6
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / BrowseRefsDlg.h
1 #pragma once\r
2 \r
3 #include "Git.h"\r
4 #include <map>\r
5 #include "afxcmn.h"\r
6 #include "StandAloneDlg.h"\r
7 \r
8 class CShadowTree\r
9 {\r
10 public:\r
11         typedef std::map<CString,CShadowTree> TShadowTreeMap;\r
12 \r
13         CShadowTree():m_hTree(NULL){}\r
14         \r
15         CShadowTree*    GetNextSub(CString& nameLeft);\r
16 \r
17         bool                    IsLeaf()const {return m_ShadowTree.empty();}\r
18 \r
19 \r
20         CString                 m_csName;\r
21         CString                 m_csRef;\r
22 \r
23         HTREEITEM               m_hTree;\r
24 \r
25         TShadowTreeMap  m_ShadowTree;\r
26         CShadowTree*    m_pParent;\r
27 };\r
28 \r
29 class CBrowseRefsDlg : public CResizableStandAloneDialog\r
30 {\r
31         DECLARE_DYNAMIC(CBrowseRefsDlg)\r
32 \r
33 public:\r
34         CBrowseRefsDlg(CWnd* pParent = NULL);   // standard constructor\r
35         virtual ~CBrowseRefsDlg();\r
36 \r
37 // Dialog Data\r
38         enum { IDD = IDD_DIALOG_BROWSE_REFS };\r
39 \r
40 protected:\r
41         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
42 \r
43         DECLARE_MESSAGE_MAP()\r
44 public:\r
45         afx_msg void OnBnClickedOk();\r
46         virtual BOOL OnInitDialog();\r
47 \r
48         void                    Refresh();\r
49 \r
50         CShadowTree&    GetTreeNode(CString refName, CShadowTree* pTreePos=NULL);\r
51 \r
52         void                    FillListCtrlForTreeNode(HTREEITEM treeNode);\r
53 \r
54         void                    FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel);\r
55 \r
56 private:\r
57         MAP_HASH_NAME   m_RefMap;\r
58 \r
59         CShadowTree             m_TreeRoot;\r
60         CTreeCtrl               m_RefTreeCtrl;\r
61         CListCtrl               m_ListRefLeafs;\r
62         afx_msg void OnTvnSelchangedTreeRef(NMHDR *pNMHDR, LRESULT *pResult);\r
63 };\r