1 /////////////////////////////////////////////////////////////////////////////
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 2 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 /////////////////////////////////////////////////////////////////////////////
20 * @brief Declaration file for patch creation dialog
22 // ID line follows -- this is updated by SVN
23 // $Id: PatchDlg.h 6783 2009-05-25 06:47:22Z kimmov $
25 #if !defined(AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_)
26 #define AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_
29 #include "SuperComboBox.h"
30 #include "UnicodeString.h"
34 /////////////////////////////////////////////////////////////////////////////
38 * @brief Dialog class for Generate Patch -dialog.
39 * This dialog allows user to select files from which to create a patch,
40 * patch file's filename and several options related to patch.
42 class CPatchDlg : public CDialog
46 CPatchDlg(CWnd* pParent = NULL); // standard constructor
48 // Functions to add and get selected files (as PATCHFILEs)
49 void AddItem(const PATCHFILES& pf);
50 size_t GetItemCount();
51 const PATCHFILES& GetItemAt(size_t position);
55 //{{AFX_DATA(CPatchDlg)
56 enum { IDD = IDD_GENERATE_PATCH };
57 CComboBox m_comboStyle;
58 CSuperComboBox m_comboContext;
60 CSuperComboBox m_ctlFile1;
61 CSuperComboBox m_ctlFile2;
62 CSuperComboBox m_ctlResult;
67 bool m_ignoreEOLDifference;
68 int m_whitespaceCompare;
71 bool m_includeCmdLine;
74 enum output_style m_outputStyle; /**< Patch style (context, unified etc.) */
75 int m_contextLines; /**< How many context lines are added. */
78 // ClassWizard generated virtual function overrides
79 //{{AFX_VIRTUAL(CPatchDlg)
81 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
87 std::vector<PATCHFILES> m_fileList; /**< Source files to create patch from */
89 void ChangeFile(const String &sFile, bool bLeft);
90 void UpdateSettings();
95 // Generated message map functions
96 //{{AFX_MSG(CPatchDlg)
98 virtual BOOL OnInitDialog();
99 afx_msg void OnDiffBrowseFile1();
100 afx_msg void OnDiffBrowseFile2();
101 afx_msg void OnDiffBrowseResult();
102 afx_msg void OnSelchangeFile1Combo();
103 afx_msg void OnSelchangeFile2Combo();
104 afx_msg void OnSelchangeResultCombo();
105 afx_msg void OnSelchangeDiffStyle();
106 afx_msg void OnDiffSwapFiles();
107 afx_msg void OnDefaultSettings();
109 DECLARE_MESSAGE_MAP()
112 //{{AFX_INSERT_LOCATION}}
113 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
115 #endif // !defined(AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_)