Apply backgroundcolors.patch
[TortoiseGit.git] / src / TortoiseMerge / EncodingDlg.h
bloba65b8966abb0ae7dfdba51efd0d81e8c34f790cf
1 // TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2020, 2023 - TortoiseGit
4 // Copyright (C) 2013, 2020 - 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.
20 #pragma once
21 #include "resource.h"
22 #include <afxcmn.h>
23 #include "HistoryCombo.h"
24 #include "FileTextLines.h"
25 #include "StandAloneDlg.h"
27 extern const CFileTextLines::UnicodeType uctArray[9];
28 extern const EOL eolArray[10];
30 /**
31 * \ingroup TortoiseMerge
32 * Encoding dialog used in TortoiseMerge.
34 class CEncodingDlg : public CStandAloneDialog
36 DECLARE_DYNAMIC(CEncodingDlg)
38 public:
39 CEncodingDlg(CWnd* pParent = nullptr); // standard constructor
40 virtual ~CEncodingDlg();
41 void Create(CWnd* pParent = nullptr) { __super::Create(IDD, pParent); ShowWindow(SW_SHOW); UpdateWindow(); }
42 // Dialog Data
43 enum { IDD = IDD_ENCODING };
45 CFileTextLines::UnicodeType texttype = CFileTextLines::UnicodeType::ASCII;
46 EOL lineendings = EOL::AutoLine;
47 CString view;
48 protected:
49 void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support
51 DECLARE_MESSAGE_MAP()
52 void OnCancel() override;
53 void OnOK() override;
54 BOOL OnInitDialog() override;
55 CComboBox m_Encoding;
56 CComboBox m_EOL;