1 // TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2006-2007, 2010, 2013-2014, 2016 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #include "HistoryCombo.h"
25 #define REPLACEMSGSTRINGW L"TortoiseGitMerge_FindReplace"
28 * \ingroup TortoiseMerge
29 * Find dialog used in TortoiseMerge.
31 class CFindDlg
: public CDialog
33 DECLARE_DYNAMIC(CFindDlg
)
36 CFindDlg(CWnd
* pParent
= nullptr); // standard constructor
38 void Create(CWnd
* pParent
= nullptr, int id
= 0);
39 bool IsTerminating() {return m_bTerminating
;}
40 bool FindNext() {return m_bFindNext
;}
41 bool MatchCase() {return !!m_bMatchCase
;}
42 bool LimitToDiffs() {return !!m_bLimitToDiffs
;}
43 bool WholeWord() {return !!m_bWholeWord
;}
44 bool SearchUp() { return !!m_bSearchUp
; }
45 CString
GetFindString() { return m_FindCombo
.GetString(); }
46 CString
GetReplaceString() { return m_ReplaceCombo
.GetString(); }
47 void SetFindString(const CString
& str
) { if (!str
.IsEmpty()) { m_FindCombo
.SetWindowText(str
); } }
48 void SetStatusText(const CString
& str
, COLORREF color
= RGB(0, 0, 255));
49 void SetReadonly(bool bReadonly
);
51 enum { IDD
= IDD_FIND
};
62 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
65 virtual void OnCancel();
66 virtual void PostNcDestroy();
68 virtual BOOL
OnInitDialog();
69 afx_msg
void OnCbnEditchangeFindcombo();
70 afx_msg
void OnBnClickedCount();
71 afx_msg HBRUSH
OnCtlColor(CDC
* pDC
, CWnd
*pWnd
, UINT nCtlColor
);
72 afx_msg
void OnBnClickedReplace();
73 afx_msg
void OnBnClickedReplaceall();
74 void SaveWindowPos(CWnd
* pParent
);
83 CHistoryCombo m_FindCombo
;
84 CHistoryCombo m_ReplaceCombo
;
87 CRegDWORD m_regMatchCase
;
88 CRegDWORD m_regLimitToDiffs
;
89 CRegDWORD m_regWholeWord
;
90 COLORREF m_clrFindStatus
;