OSDN Git Service

Fix Issue 22 Error deleting file from context menu if filename contains spaces
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / RevisionRangeDlg.h
1 // TortoiseSVN - a Windows shell extension for easy version control\r
2 \r
3 // Copyright (C) 2003-2006 - Stefan Kueng\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 \r
21 #include "SVNRev.h"\r
22 #include "StandAloneDlg.h"\r
23 \r
24 /**\r
25  * \ingroup TortoiseProc\r
26  * A dialog to select a revision range.\r
27  */\r
28 class CRevisionRangeDlg : public CStandAloneDialog\r
29 {\r
30         DECLARE_DYNAMIC(CRevisionRangeDlg)\r
31 \r
32 public:\r
33         CRevisionRangeDlg(CWnd* pParent = NULL);\r
34         virtual ~CRevisionRangeDlg();\r
35 \r
36         enum { IDD = IDD_REVISIONRANGE };\r
37 \r
38         /**\r
39          * Returns the string entered in the start revision edit box.\r
40          */\r
41         CString GetEnteredStartRevisionString() const {return m_sStartRevision;}\r
42 \r
43         /**\r
44          * Returns the string entered in the end revision edit box.\r
45          */\r
46         CString GetEnteredEndRevisionString() const {return m_sEndRevision;}\r
47 \r
48         /**\r
49          * Returns the entered start revision.\r
50          */\r
51         SVNRev GetStartRevision() const {return m_StartRev;}\r
52 \r
53         /**\r
54          * Returns the entered end revision.\r
55          */\r
56         SVNRev GetEndRevision() const {return m_EndRev;}\r
57 \r
58         /**\r
59          * Sets the start revision to fill in when the dialog shows up.\r
60          */\r
61         void SetStartRevision(const SVNRev& rev) {m_StartRev = rev;}\r
62 \r
63         /**\r
64          * Sets the end revision to fill in when the dialog shows up.\r
65          */\r
66         void SetEndRevision(const SVNRev& rev) {m_EndRev = rev;}\r
67 \r
68         /**\r
69          * If set to \a true, then working copy revisions like BASE, WC, PREV are allowed.\r
70          * Otherwise, an error balloon is shown when the user tries to enter such revisions.\r
71          */\r
72         void AllowWCRevs(bool bAllowWCRevs = true) {m_bAllowWCRevs = bAllowWCRevs;}\r
73 protected:\r
74         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
75         virtual BOOL OnInitDialog();\r
76         virtual void OnOK();\r
77         afx_msg void OnEnChangeRevnum();\r
78         afx_msg void OnEnChangeRevnum2();\r
79 \r
80         DECLARE_MESSAGE_MAP()\r
81 \r
82 protected:\r
83         CString m_sStartRevision;\r
84         CString m_sEndRevision;\r
85         SVNRev  m_StartRev;\r
86         SVNRev  m_EndRev;\r
87         bool    m_bAllowWCRevs;\r
88 };\r