OSDN Git Service

Fixed issue #112: (7) Low hanging GUI fruits during Commit and Push
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / CopyDlg.h
1 // TortoiseSVN - a Windows shell extension for easy version control\r
2 \r
3 // Copyright (C) 2003-2008 - TortoiseSVN\r
4 \r
5 // This program is free software; you can redistribute it and/or\r
6 // modify it under the terms of the GNU General Public License\r
7 // as published by the Free Software Foundation; either version 2\r
8 // of the License, or (at your option) any later version.\r
9 \r
10 // This program is distributed in the hope that it will be useful,\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 // GNU General Public License for more details.\r
14 \r
15 // You should have received a copy of the GNU General Public License\r
16 // along with this program; if not, write to the Free Software Foundation,\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
18 //\r
19 #pragma once\r
20 #include "ProjectProperties.h"\r
21 #include "StandAloneDlg.h"\r
22 #include "HistoryCombo.h"\r
23 #include "RegHistory.h"\r
24 #include "SciEdit.h"\r
25 #include "TSVNPath.h"\r
26 #include "SVNRev.h"\r
27 #include "LogDlg.h"\r
28 #include "Tooltip.h"\r
29 \r
30 #define WM_TSVN_MAXREVFOUND                     (WM_APP + 1)\r
31 \r
32 /**\r
33  * \ingroup TortoiseProc\r
34  * Prompts the user for the required information needed for a copy command.\r
35  * The required information is a single URL to copy the current URL of the \r
36  * working copy to.\r
37  */\r
38 class CCopyDlg : public CResizableStandAloneDialog, public SVN\r
39 {\r
40         DECLARE_DYNAMIC(CCopyDlg)\r
41 \r
42 public:\r
43         CCopyDlg(CWnd* pParent = NULL);   // standard constructor\r
44         virtual ~CCopyDlg();\r
45 \r
46 // Dialog Data\r
47         enum { IDD = IDD_COPY };\r
48 \r
49 protected:\r
50         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
51 \r
52         virtual BOOL OnInitDialog();\r
53         virtual void OnOK();\r
54         virtual void OnCancel();\r
55         virtual BOOL PreTranslateMessage(MSG* pMsg);\r
56         afx_msg LRESULT OnRevFound(WPARAM wParam, LPARAM lParam);\r
57         afx_msg void OnBnClickedBrowse();\r
58         afx_msg void OnBnClickedHelp();\r
59         afx_msg LRESULT OnRevSelected(WPARAM wParam, LPARAM lParam);\r
60         afx_msg void OnBnClickedBrowsefrom();\r
61         afx_msg void OnBnClickedCopyhead();\r
62         afx_msg void OnBnClickedCopyrev();\r
63         afx_msg void OnBnClickedCopywc();\r
64         afx_msg void OnBnClickedHistory();\r
65         afx_msg void OnEnChangeLogmessage();\r
66         afx_msg void OnCbnEditchangeUrlcombo();\r
67         DECLARE_MESSAGE_MAP()\r
68 \r
69         virtual BOOL Cancel() {return m_bCancelled;}\r
70         void            SetRevision(const SVNRev& rev);\r
71 public:\r
72         CString                 m_URL;\r
73         CTSVNPath               m_path;\r
74         CString                 m_sLogMessage;\r
75         SVNRev                  m_CopyRev;\r
76         BOOL                    m_bDoSwitch;\r
77 \r
78 private:\r
79         CLogDlg *               m_pLogDlg;\r
80         CSciEdit                m_cLogMessage;\r
81         CFont                   m_logFont;\r
82         BOOL                    m_bFile;\r
83         ProjectProperties       m_ProjectProperties;\r
84         CString                 m_sBugID;\r
85         CHistoryCombo   m_URLCombo;\r
86         CString                 m_wcURL;\r
87         CButton                 m_butBrowse;\r
88         CRegHistory             m_History;\r
89         CToolTips               m_tooltips;\r
90 \r
91         svn_revnum_t    m_minrev;\r
92         svn_revnum_t    m_maxrev;\r
93         bool                    m_bswitched;\r
94         bool                    m_bmodified;\r
95         bool                    m_bSparse;\r
96         bool                    m_bSettingChanged;\r
97         static UINT             FindRevThreadEntry(LPVOID pVoid);\r
98         UINT                    FindRevThread();\r
99         CWinThread *    m_pThread;\r
100         bool                    m_bCancelled;\r
101         volatile LONG   m_bThreadRunning;\r
102 };\r