OSDN Git Service

Update TortoiseUDiff to version 16491
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / SwitchDlg.h
1 // TortoiseSVN - a Windows shell extension for easy version control\r
2 \r
3 // Copyright (C) 2003-2006,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 "StandAloneDlg.h"\r
21 #include "HistoryCombo.h"\r
22 #include "LogDlg.h"\r
23 #include "GitRev.h"\r
24 \r
25 /**\r
26  * \ingroup TortoiseProc\r
27  * Shows a dialog to prompt the user for an URL of a branch and a revision\r
28  * number to switch the working copy to. Also has a checkbox to\r
29  * specify the current branch instead of a different branch url and\r
30  * one checkbox to specify the newest revision.\r
31  */\r
32 class CSwitchDlg : public CResizableStandAloneDialog\r
33 {\r
34         DECLARE_DYNAMIC(CSwitchDlg)\r
35 \r
36 public:\r
37         CSwitchDlg(CWnd* pParent = NULL);   // standard constructor\r
38         virtual ~CSwitchDlg();\r
39 \r
40         /**\r
41          * Sets the text for the dialog title.\r
42          * \remark this method must be called before the dialog is shown!\r
43          */\r
44         void SetDialogTitle(const CString& sTitle);\r
45 \r
46         /**\r
47          * Sets the label in front of the URL combobox.\r
48          * \remark this method must be called before the dialog is shown!\r
49          */\r
50         void SetUrlLabel(const CString& sLabel);\r
51 \r
52 // Dialog Data\r
53         enum { IDD = IDD_SWITCH };\r
54 \r
55 protected:\r
56         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
57 \r
58         virtual BOOL OnInitDialog();\r
59         virtual void OnOK();\r
60         afx_msg void OnBnClickedBrowse();\r
61         afx_msg void OnBnClickedHelp();\r
62         afx_msg void OnEnChangeRevisionNum();\r
63         afx_msg void OnBnClickedLog();\r
64         afx_msg void OnSizing(UINT fwSide, LPRECT pRect);\r
65         afx_msg LRESULT OnRevSelected(WPARAM wParam, LPARAM lParam);\r
66 \r
67         void            SetRevision(const GitRev& rev);\r
68 \r
69         DECLARE_MESSAGE_MAP()\r
70 \r
71         CString                 m_rev;\r
72         CHistoryCombo   m_URLCombo;\r
73         BOOL                    m_bFolder;\r
74         CString                 m_sTitle;\r
75         CString                 m_sLabel;\r
76         CLogDlg *               m_pLogDlg;\r
77         int                             m_height;\r
78 \r
79 public:\r
80         CString                 m_path;\r
81         CString                 m_URL;\r
82         GitRev                  Revision;\r
83 };\r