OSDN Git Service

28e7d9a04384898cc21785cf7c8c557d7471c690
[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         CString                 m_csDate;\r
23         CString                 m_csAuthor;\r
24         CString                 m_csSubject;\r
25 \r
26         HTREEITEM               m_hTree;\r
27 \r
28         TShadowTreeMap  m_ShadowTree;\r
29         CShadowTree*    m_pParent;\r
30 };\r
31 \r
32 class CBrowseRefsDlg : public CResizableStandAloneDialog\r
33 {\r
34         DECLARE_DYNAMIC(CBrowseRefsDlg)\r
35 \r
36 public:\r
37         CBrowseRefsDlg(CWnd* pParent = NULL);   // standard constructor\r
38         virtual ~CBrowseRefsDlg();\r
39 \r
40 // Dialog Data\r
41         enum { IDD = IDD_DIALOG_BROWSE_REFS };\r
42 \r
43 protected:\r
44         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
45 \r
46         DECLARE_MESSAGE_MAP()\r
47 public:\r
48         afx_msg void OnBnClickedOk();\r
49         virtual BOOL OnInitDialog();\r
50 \r
51         void                    Refresh();\r
52 \r
53         CShadowTree&    GetTreeNode(CString refName, CShadowTree* pTreePos=NULL);\r
54 \r
55         void                    FillListCtrlForTreeNode(HTREEITEM treeNode);\r
56 \r
57         void                    FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel);\r
58 \r
59         bool                    SelectRef(CString refName);\r
60 \r
61 private:\r
62 //      MAP_HASH_NAME   m_RefMap;\r
63 \r
64         CShadowTree             m_TreeRoot;\r
65         CTreeCtrl               m_RefTreeCtrl;\r
66         CListCtrl               m_ListRefLeafs;\r
67         afx_msg void OnTvnSelchangedTreeRef(NMHDR *pNMHDR, LRESULT *pResult);\r
68 };\r