Fix typo in doc
[TortoiseGit.git] / src / TortoiseProc / FindDlg.h
blobd9d4acb4d84cdf6845d1067ad23d15c2a4dbf77f
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.
20 #pragma once
22 #include "HistoryCombo.h"
23 #include "StandAloneDlg.h"
24 #include "LoglistCommonResource.h"
25 #include "registry.h"
27 // CFindDlg dialog
29 #define IDT_FILTER 101
31 class CFindDlg : public CResizableStandAloneDialog
33 DECLARE_DYNAMIC(CFindDlg)
35 public:
36 CFindDlg(CWnd* pParent = nullptr); // standard constructor
37 virtual ~CFindDlg();
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); } }
48 void RefreshList();
50 // Dialog Data
51 enum { IDD = IDD_FIND };
53 protected:
54 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
55 virtual void OnCancel();
56 virtual void PostNcDestroy();
57 virtual void OnOK();
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);
64 DECLARE_MESSAGE_MAP()
66 UINT m_FindMsg;
67 bool m_bTerminating;
68 bool m_bFindNext;
69 BOOL m_bMatchCase;
70 BOOL m_bLimitToDiffs;
71 BOOL m_bWholeWord;
72 BOOL m_bRegex;
73 bool m_bIsRef;
74 CHistoryCombo m_FindCombo;
75 CString m_FindString;
76 CWnd *m_pParent;
77 STRING_VECTOR m_RefList;
78 CRegDWORD m_regMatchCase;
79 CRegDWORD m_regWholeWord;
80 CRegDWORD m_regRegex;
82 void AddToList();
84 public:
85 CListCtrl m_ctrlRefList;
86 CEdit m_ctrlFilter;