1
// TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2017, 2023 - TortoiseGit
4 // Copyright (C) 2003-2006, 2009-2010, 2013, 2016 - TortoiseSVN
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include "HorizontalResizableStandAloneDialog.h"
22 #include "IInputValidator.h"
25 * \ingroup TortoiseProc
26 * Helper dialog, asking for a new name.
28 class CRenameDlg
: public CHorizontalResizableStandAloneDialog
30 DECLARE_DYNAMIC(CRenameDlg
)
33 CRenameDlg(CWnd
* pParent
= nullptr);
34 virtual ~CRenameDlg();
36 void SetInputValidator(IInputValidator validator
) { m_pInputValidator
= validator
; }
37 void SetRenameRequired(bool renameRequired
) { m_renameRequired
= renameRequired
; }
38 enum { IDD
= IDD_RENAME
};
41 void DoDataExchange(CDataExchange
* pDX
) override
; // DDX/DDV support
43 BOOL
OnInitDialog() override
;
45 void OnCancel() override
;
47 afx_msg
void OnEnSetfocusName();
48 afx_msg
void OnBnClickedButtonBrowseRef();
54 CString m_windowtitle
;
59 bool m_bBalloonVisible
= false;
60 bool m_renameRequired
= true;
61 CString m_originalName
;
62 IInputValidator m_pInputValidator
= nullptr;