Switch to a ini/git config style version check file
[TortoiseGit.git] / src / TortoiseProc / FindDlg.h
blobeb56fa65f92af9631e933a587ca118884a6b558d
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2011-2013 - 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 "afxcmn.h"
24 #include "afxwin.h"
25 #include "StandAloneDlg.h"
26 #include "LoglistCommonResource.h"
27 #include "registry.h"
29 // CFindDlg dialog
31 #define IDT_FILTER 101
33 class CFindDlg : public CResizableStandAloneDialog
35 DECLARE_DYNAMIC(CFindDlg)
37 public:
38 CFindDlg(CWnd* pParent = NULL); // standard constructor
39 virtual ~CFindDlg();
40 void Create(CWnd * pParent = NULL) {m_pParent = pParent; CDialog::Create(IDD, pParent);ShowWindow(SW_SHOW);UpdateWindow();}
42 bool IsTerminating() {return m_bTerminating;}
43 bool FindNext() {return m_bFindNext;}
44 bool MatchCase() {return !!m_bMatchCase;}
45 bool WholeWord() {return !!m_bWholeWord;}
46 bool Regex() {return !!m_bRegex;}
47 bool IsRef() {return !!m_bIsRef;}
48 CString GetFindString() {return m_FindString;}
49 void SetFindString(const CString& str) { if (!str.IsEmpty()) { m_FindCombo.SetWindowText(str); } }
50 void RefreshList();
52 // Dialog Data
53 enum { IDD = IDD_FIND };
55 protected:
56 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
57 virtual void OnCancel();
58 virtual void PostNcDestroy();
59 virtual void OnOK();
60 virtual BOOL OnInitDialog();
61 afx_msg void OnCbnEditchangeFindcombo();
63 DECLARE_MESSAGE_MAP()
65 UINT m_FindMsg;
66 bool m_bTerminating;
67 bool m_bFindNext;
68 BOOL m_bMatchCase;
69 BOOL m_bLimitToDiffs;
70 BOOL m_bWholeWord;
71 BOOL m_bRegex;
72 bool m_bIsRef;
73 CHistoryCombo m_FindCombo;
74 CString m_FindString;
75 CWnd *m_pParent;
76 STRING_VECTOR m_RefList;
77 CRegDWORD m_regMatchCase;
78 CRegDWORD m_regWholeWord;
79 CRegDWORD m_regRegex;
81 void AddToList();
83 public:
84 CListCtrl m_ctrlRefList;
85 CEdit m_ctrlFilter;
86 afx_msg void OnNMClickListRef(NMHDR *pNMHDR, LRESULT *pResult);
87 afx_msg void OnEnChangeEditFilter();
88 afx_msg void OnTimer(UINT_PTR nIDEvent);