TortoiseSVN -> TortoiseGit
[TortoiseGit.git] / src / TortoiseProc / RevisionRangeDlg.h
blobca9a78bc18bb82bf857f10c177f490002897475a
1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2006 - Stefan Kueng
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
21 #include "SVNRev.h"
22 #include "StandAloneDlg.h"
24 /**
25 * \ingroup TortoiseProc
26 * A dialog to select a revision range.
28 class CRevisionRangeDlg : public CStandAloneDialog
30 DECLARE_DYNAMIC(CRevisionRangeDlg)
32 public:
33 CRevisionRangeDlg(CWnd* pParent = NULL);
34 virtual ~CRevisionRangeDlg();
36 enum { IDD = IDD_REVISIONRANGE };
38 /**
39 * Returns the string entered in the start revision edit box.
41 CString GetEnteredStartRevisionString() const {return m_sStartRevision;}
43 /**
44 * Returns the string entered in the end revision edit box.
46 CString GetEnteredEndRevisionString() const {return m_sEndRevision;}
48 /**
49 * Returns the entered start revision.
51 SVNRev GetStartRevision() const {return m_StartRev;}
53 /**
54 * Returns the entered end revision.
56 SVNRev GetEndRevision() const {return m_EndRev;}
58 /**
59 * Sets the start revision to fill in when the dialog shows up.
61 void SetStartRevision(const SVNRev& rev) {m_StartRev = rev;}
63 /**
64 * Sets the end revision to fill in when the dialog shows up.
66 void SetEndRevision(const SVNRev& rev) {m_EndRev = rev;}
68 /**
69 * If set to \a true, then working copy revisions like BASE, WC, PREV are allowed.
70 * Otherwise, an error balloon is shown when the user tries to enter such revisions.
72 void AllowWCRevs(bool bAllowWCRevs = true) {m_bAllowWCRevs = bAllowWCRevs;}
73 protected:
74 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
75 virtual BOOL OnInitDialog();
76 virtual void OnOK();
77 afx_msg void OnEnChangeRevnum();
78 afx_msg void OnEnChangeRevnum2();
80 DECLARE_MESSAGE_MAP()
82 protected:
83 CString m_sStartRevision;
84 CString m_sEndRevision;
85 SVNRev m_StartRev;
86 SVNRev m_EndRev;
87 bool m_bAllowWCRevs;