3 Star 9 Fork 7

Gitee 极速下载/WinMerge

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/winmerge/winmerge
克隆/下载
PatchDlg.h 2.98 KB
一键复制 编辑 原始数据 按行查看 历史
// SPDX-License-Identifier: GPL-2.0-or-later
/**
* @file PatchDlg.h
*
* @brief Declaration file for patch creation dialog
*/
#pragma once
#include "resource.h"
#include "TrDialogs.h"
#include "SuperComboBox.h"
#include "UnicodeString.h"
struct PATCHFILES;
/////////////////////////////////////////////////////////////////////////////
// PatchDlg dialog
/**
* @brief Dialog class for Generate Patch -dialog.
* This dialog allows user to select files from which to create a patch,
* patch file's filename and several options related to patch.
*/
class CPatchDlg : public CTrDialog
{
// Construction
public:
explicit CPatchDlg(CWnd* pParent = nullptr); // standard constructor
// Functions to add and get selected files (as PATCHFILEs)
void AddItem(const PATCHFILES& pf);
size_t GetItemCount();
const PATCHFILES& GetItemAt(size_t position);
void ClearItems();
// Dialog Data
//{{AFX_DATA(CPatchDlg)
enum { IDD = IDD_GENERATE_PATCH };
CComboBox m_comboStyle;
CSuperComboBox m_comboContext;
CSuperComboBox m_ctlFile1;
CSuperComboBox m_ctlFile2;
CSuperComboBox m_ctlResult;
String m_file1;
String m_file2;
String m_fileResult;
bool m_copyToClipboard;
bool m_appendFile;
bool m_openToEditor;
bool m_includeCmdLine;
//}}AFX_DATA
enum output_style m_outputStyle; /**< Patch style (context, unified etc.) */
int m_contextLines; /**< How many context lines are added. */
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPatchDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
std::vector<PATCHFILES> m_fileList; /**< Source files to create patch from */
void UpdateSettings();
void LoadSettings();
void SaveSettings();
void Swap();
// Generated message map functions
//{{AFX_MSG(CPatchDlg)
virtual void OnOK() override;
virtual BOOL OnInitDialog() override;
afx_msg void OnDiffBrowseFile1();
afx_msg void OnDiffBrowseFile2();
afx_msg void OnDiffBrowseResult();
afx_msg void OnSelchangeDiffStyle();
afx_msg void OnDiffSwapFiles();
afx_msg void OnDefaultSettings();
afx_msg void OnSelchangeFile1();
afx_msg void OnSelchangeFile2();
afx_msg void OnEditchangeFile1();
afx_msg void OnEditchangeFile2();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/**
* @brief Add patch item to internal list.
* @param [in] pf Patch item to add.
*/
inline void CPatchDlg::AddItem(const PATCHFILES& pf)
{
m_fileList.push_back(pf);
}
/**
* @brief Returns amount of patch items in the internal list.
* @return Count of patch items in the list.
*/
inline size_t CPatchDlg::GetItemCount()
{
return m_fileList.size();
}
/**
* @brief Return item in the internal list at given position
* @param [in] position Zero-based index of item to get
* @return PATCHFILES from given position.
*/
inline const PATCHFILES& CPatchDlg::GetItemAt(size_t position)
{
return m_fileList.at(position);
}
/**
* @brief Empties internal item list.
*/
inline void CPatchDlg::ClearItems()
{
m_fileList.clear();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mirrors/WinMerge.git
git@gitee.com:mirrors/WinMerge.git
mirrors
WinMerge
WinMerge
master

搜索帮助