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"
33 /////////////////////////////////////////////////////////////////////////////
37 * @brief Dialog class for Generate Patch -dialog.
38 * This dialog allows user to select files from which to create a patch,
39 * patch file's filename and several options related to patch.
41 class CPatchDlg : public CDialog
45 CPatchDlg(CWnd* pParent = NULL); // standard constructor
47 // Functions to add and get selected files (as PATCHFILEs)
48 void AddItem(const PATCHFILES& pf);
49 size_t GetItemCount();
50 const PATCHFILES& GetItemAt(size_t position);
54 //{{AFX_DATA(CPatchDlg)
55 enum { IDD = IDD_GENERATE_PATCH };
56 CComboBox m_comboStyle;
57 CSuperComboBox m_comboContext;
59 CSuperComboBox m_ctlFile1;
60 CSuperComboBox m_ctlFile2;
61 CSuperComboBox m_ctlResult;
66 BOOL m_ignoreEOLDifference;
67 int m_whitespaceCompare;
70 BOOL m_includeCmdLine;
73 enum output_style m_outputStyle; /**< Patch style (context, unified etc.) */
74 int m_contextLines; /**< How many context lines are added. */
77 // ClassWizard generated virtual function overrides
78 //{{AFX_VIRTUAL(CPatchDlg)
80 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
86 std::vector<PATCHFILES> m_fileList; /**< Source files to create patch from */
88 void ChangeFile(const CString &sFile, BOOL bLeft);
89 void UpdateSettings();
94 // Generated message map functions
95 //{{AFX_MSG(CPatchDlg)
97 virtual BOOL OnInitDialog();
98 afx_msg void OnDiffBrowseFile1();
99 afx_msg void OnDiffBrowseFile2();
100 afx_msg void OnDiffBrowseResult();
101 afx_msg void OnSelchangeFile1Combo();
102 afx_msg void OnSelchangeFile2Combo();
103 afx_msg void OnSelchangeResultCombo();
104 afx_msg void OnSelchangeDiffStyle();
105 afx_msg void OnDiffSwapFiles();
106 afx_msg void OnDefaultSettings();
108 DECLARE_MESSAGE_MAP()
111 //{{AFX_INSERT_LOCATION}}
112 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
114 #endif // !defined(AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_)