DialogScriptEditor.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. ===========================================================================
  3. Doom 3 GPL Source Code
  4. Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
  6. Doom 3 Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 Source Code 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.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #ifndef __DIALOGSCRIPTEDITOR_H__
  21. #define __DIALOGSCRIPTEDITOR_H__
  22. #pragma once
  23. #include "../comafx/CSyntaxRichEditCtrl.h"
  24. // DialogScriptEditor dialog
  25. class DialogScriptEditor : public CDialog {
  26. DECLARE_DYNAMIC(DialogScriptEditor)
  27. public:
  28. DialogScriptEditor( CWnd* pParent = NULL ); // standard constructor
  29. virtual ~DialogScriptEditor();
  30. void OpenFile( const char *fileName );
  31. //{{AFX_VIRTUAL(DialogScriptEditor)
  32. virtual BOOL OnInitDialog();
  33. virtual void DoDataExchange( CDataExchange* pDX ); // DDX/DDV support
  34. virtual BOOL PreTranslateMessage( MSG* pMsg );
  35. //}}AFX_VIRTUAL
  36. protected:
  37. //{{AFX_MSG(DialogScriptEditor)
  38. afx_msg BOOL OnToolTipNotify( UINT id, NMHDR *pNMHDR, LRESULT *pResult );
  39. afx_msg void OnSetFocus( CWnd *pOldWnd );
  40. afx_msg void OnDestroy();
  41. afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  42. afx_msg void OnMove( int x, int y );
  43. afx_msg void OnSize( UINT nType, int cx, int cy );
  44. afx_msg void OnSizing( UINT nSide, LPRECT lpRect );
  45. afx_msg void OnEditGoToLine();
  46. afx_msg void OnEditFind();
  47. afx_msg void OnEditFindNext();
  48. afx_msg void OnEditReplace();
  49. afx_msg LRESULT OnFindDialogMessage( WPARAM wParam, LPARAM lParam );
  50. afx_msg void OnEnChangeEdit( NMHDR *pNMHDR, LRESULT *pResult );
  51. afx_msg void OnEnInputEdit( NMHDR *pNMHDR, LRESULT *pResult );
  52. afx_msg void OnBnClickedOk();
  53. afx_msg void OnBnClickedCancel();
  54. //}}AFX_MSG
  55. DECLARE_MESSAGE_MAP()
  56. private:
  57. //{{AFX_DATA(DialogScriptEditor)
  58. enum { IDD = IDD_DIALOG_SCRIPTEDITOR };
  59. CStatusBarCtrl statusBar;
  60. CSyntaxRichEditCtrl scriptEdit;
  61. CButton okButton;
  62. CButton cancelButton;
  63. //}}AFX_DATA
  64. static toolTip_t toolTips[];
  65. HACCEL m_hAccel;
  66. CRect initialRect;
  67. CFindReplaceDialog *findDlg;
  68. CString findStr;
  69. CString replaceStr;
  70. bool matchCase;
  71. bool matchWholeWords;
  72. bool searchForward;
  73. idStr fileName;
  74. int firstLine;
  75. private:
  76. void InitScriptEvents( void );
  77. void UpdateStatusBar( void );
  78. };
  79. #endif /* !__DIALOGSCRIPTEDITOR_H__ */