Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef SEARCHREPLACEDLG_H
  8. #define SEARCHREPLACEDLG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "resource.h"
  13. #include "UtlVector.h"
  14. #include "MapClass.h"
  15. class CMapEntity;
  16. struct FindObject_t;
  17. enum FindReplaceIn_t
  18. {
  19. FindInSelection = 0,
  20. FindInWorld,
  21. };
  22. class CSearchReplaceDlg : public CDialog
  23. {
  24. // Construction
  25. public:
  26. CSearchReplaceDlg(CWnd* pParent = NULL); // standard constructor
  27. int Create(CWnd *pwndParent = NULL);
  28. // Dialog Data
  29. //{{AFX_DATA(CSearchReplaceDlg)
  30. enum { IDD = IDD_SEARCH_REPLACE };
  31. CString m_strFindText;
  32. CString m_strReplaceText;
  33. BOOL m_bVisiblesOnly;
  34. BOOL m_bWholeWord;
  35. BOOL m_bCaseSensitive;
  36. int m_nFindIn;
  37. //}}AFX_DATA
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CSearchReplaceDlg)
  41. protected:
  42. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  43. //}}AFX_VIRTUAL
  44. // Implementation
  45. protected:
  46. // Generated message map functions
  47. //{{AFX_MSG(CSearchReplaceDlg)
  48. afx_msg BOOL OnFindReplace(UINT uCmd);
  49. virtual void OnOK();
  50. virtual void OnCancel();
  51. virtual void OnShowWindow(BOOL bShow, UINT nStatus);
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. private:
  55. void GetFindCriteria(FindObject_t &FindObject, CMapDoc *pDoc);
  56. void FindFirst();
  57. bool FindNext(bool bReplace);
  58. bool m_bNewSearch; // Set to true every time the dialog is brought up.
  59. };
  60. #endif // SEARCHREPLACEDLG_H