1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2011-2016 - TortoiseGit
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"
23 #include "StandAloneDlg.h"
24 #include "LoglistCommonResource.h"
29 #define IDT_FILTER 101
31 class CFindDlg
: public CResizableStandAloneDialog
33 DECLARE_DYNAMIC(CFindDlg
)
36 CFindDlg(CWnd
* pParent
= nullptr); // standard constructor
38 void Create(CWnd
* pParent
= nullptr) { m_pParent
= pParent
; CDialog::Create(IDD
, pParent
); ShowWindow(SW_SHOW
); UpdateWindow(); }
40 bool IsTerminating() {return m_bTerminating
;}
41 bool FindNext() {return m_bFindNext
;}
42 bool MatchCase() {return !!m_bMatchCase
;}
43 bool WholeWord() {return !!m_bWholeWord
;}
44 bool Regex() {return !!m_bRegex
;}
45 bool IsRef() {return !!m_bIsRef
;}
46 CString
GetFindString() {return m_FindString
;}
47 void SetFindString(const CString
& str
) { if (!str
.IsEmpty()) { m_FindCombo
.SetWindowText(str
); } }
51 enum { IDD
= IDD_FIND
};
54 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
55 virtual void OnCancel();
56 virtual void PostNcDestroy();
58 virtual BOOL
OnInitDialog();
59 afx_msg
void OnCbnEditchangeFindcombo();
60 afx_msg
void OnNMClickListRef(NMHDR
* pNMHDR
, LRESULT
* pResult
);
61 afx_msg
void OnEnChangeEditFilter();
62 afx_msg
void OnTimer(UINT_PTR nIDEvent
);
74 CHistoryCombo m_FindCombo
;
77 STRING_VECTOR m_RefList
;
78 CRegDWORD m_regMatchCase
;
79 CRegDWORD m_regWholeWord
;
85 CListCtrl m_ctrlRefList
;