OSDN Git Service

Remove compiler warnings
[winmerge-jp/winmerge-jp.git] / Src / PatchDlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 //    License (GPLv2+):
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.
7 //
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.
12 //
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 /////////////////////////////////////////////////////////////////////////////
17 /** 
18  * @file  PatchDlg.h
19  *
20  * @brief Declaration file for patch creation dialog
21  */
22 // ID line follows -- this is updated by SVN
23 // $Id: PatchDlg.h 6783 2009-05-25 06:47:22Z kimmov $
24
25 #if !defined(AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_)
26 #define AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_
27
28 #include "resource.h"
29 #include "SuperComboBox.h"
30
31 struct PATCHFILES;
32
33 /////////////////////////////////////////////////////////////////////////////
34 // PatchDlg dialog
35
36 /** 
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.
40  */
41 class CPatchDlg : public CDialog
42 {
43 // Construction
44 public:
45         CPatchDlg(CWnd* pParent = NULL);   // standard constructor
46
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);
51         void ClearItems();
52
53 // Dialog Data
54         //{{AFX_DATA(CPatchDlg)
55         enum { IDD = IDD_GENERATE_PATCH };
56         CComboBox m_comboStyle;
57         CSuperComboBox m_comboContext;
58         BOOL m_caseSensitive;
59         CSuperComboBox m_ctlFile1;
60         CSuperComboBox m_ctlFile2;
61         CSuperComboBox m_ctlResult;
62         CString m_file1;
63         CString m_file2;
64         CString m_fileResult;
65         BOOL m_ignoreBlanks;
66         BOOL m_ignoreEOLDifference;
67         int m_whitespaceCompare;
68         BOOL m_appendFile;
69         BOOL m_openToEditor;
70         BOOL m_includeCmdLine;
71         //}}AFX_DATA
72
73         enum output_style m_outputStyle; /**< Patch style (context, unified etc.) */
74         int m_contextLines; /**< How many context lines are added. */
75
76 // Overrides
77         // ClassWizard generated virtual function overrides
78         //{{AFX_VIRTUAL(CPatchDlg)
79         protected:
80         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
81         //}}AFX_VIRTUAL
82
83 // Implementation
84 protected:
85
86         std::vector<PATCHFILES> m_fileList; /**< Source files to create patch from */
87
88         void ChangeFile(const CString &sFile, BOOL bLeft);
89         void UpdateSettings();
90         void LoadSettings();
91         void SaveSettings();
92         void Swap();
93
94         // Generated message map functions
95         //{{AFX_MSG(CPatchDlg)
96         virtual void OnOK();
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();
107         //}}AFX_MSG
108         DECLARE_MESSAGE_MAP()
109 };
110
111 //{{AFX_INSERT_LOCATION}}
112 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
113
114 #endif // !defined(AFX_PATCHDLG_H__AB3CE671_1328_11D7_B088_005004D9D386__INCLUDED_)