1 ////////////////////////////////////////////////////////////////////////////
2 // File: cfindtextdlg.h
4 // Created: 29-Dec-1998
6 // Author: Stcherbatchenko Andrei
7 // E-mail: windfall@gmx.de
9 // Declaration of the CFindTextDlg dialog, a part of Crystal Edit -
10 // syntax coloring text editor.
12 // You are free to use or modify this code to the following restrictions:
13 // - Acknowledge me somewhere in your about box, simple "Parts of code by.."
14 // will be enough. If you can't (or don't want to), contact me personally.
15 // - LEAVE THIS HEADER INTACT
16 ////////////////////////////////////////////////////////////////////////////
18 ////////////////////////////////////////////////////////////////////////////
21 // + FEATURE: see cpps ...
23 // ... it's being edited very rapidly so sorry for non-commented
24 // and maybe "ugly" code ...
25 ////////////////////////////////////////////////////////////////////////////
27 * @file cfindtextdlg.h
29 * @brief Declaration Find-dialog.
31 // RCS ID line follows -- this is updated by CVS
39 class CCrystalTextView;
42 * @brief Infos about the last search settings (saved in registry)
44 * @note Is also used in the replace dialog
46 struct LastSearchInfos
48 int m_nDirection; // only for search
57 /////////////////////////////////////////////////////////////////////////////
58 // CFindTextDlg dialog
60 class EDITPADC_CLASS CFindTextDlg : public CDialog
63 void UpdateControls();
64 CCrystalTextView * m_pBuddy;
68 CFindTextDlg (CCrystalTextView * pBuddy);
69 void SetLastSearch (LPCTSTR sText, bool bMatchCase, bool bWholeWord, bool bRegExp, int nDirection);
70 void UseLastSearch ();
71 LastSearchInfos * GetLastSearchInfos ();
73 CPoint m_ptCurrentPos;
74 LastSearchInfos lastSearch;
77 //{{AFX_DATA(CFindTextDlg)
78 enum { IDD = IDD_EDIT_FIND };
79 CMemComboBox m_ctlFindText;
80 CButton m_ctlWholeWord;
91 // ClassWizard generated virtual function overrides
92 //{{AFX_VIRTUAL(CFindTextDlg)
94 virtual void DoDataExchange (CDataExchange * pDX); // DDX/DDV support
100 void UpdateRegExp ();
101 void UpdateLastSearch ();
102 void FindText (int nDirection);
104 // Generated message map functions
105 //{{AFX_MSG(CFindTextDlg)
106 virtual void OnOK ();
107 afx_msg void OnChangeEditText ();
108 afx_msg void OnChangeSelected ();
109 virtual BOOL OnInitDialog ();
110 virtual void OnCancel ();
111 afx_msg void OnRegExp ();
112 afx_msg void OnFindPrev ();
113 virtual void PostNcDestroy ();
115 DECLARE_MESSAGE_MAP ()