DialogEntityDefEditor.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 __DIALOGENTITYDEFEDITOR_H__
  21. #define __DIALOGENTITYDEFEDITOR_H__
  22. #pragma once
  23. #include "../radiant/PropertyList.h"
  24. // DialogEntityDefEditor dialog
  25. class DialogEntityDefEditor : public CDialog {
  26. DECLARE_DYNAMIC(DialogEntityDefEditor)
  27. public:
  28. DialogEntityDefEditor( CWnd* pParent = NULL ); // standard constructor
  29. virtual ~DialogEntityDefEditor();
  30. void LoadDecl( idDeclEntityDef *decl );
  31. //{{AFX_VIRTUAL(DialogEntityDefEditor)
  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(DialogEntityDefEditor)
  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 LRESULT OnFindDialogMessage( WPARAM wParam, LPARAM lParam );
  46. afx_msg void OnEditChange();
  47. afx_msg void OnInheritChange();
  48. afx_msg void OnEnInputEdit( NMHDR *pNMHDR, LRESULT *pResult );
  49. afx_msg void OnKeyValChange();
  50. afx_msg void OnBnClickedAdd();
  51. afx_msg void OnBnClickedDelete();
  52. afx_msg void OnBnClickedTest();
  53. afx_msg void OnBnClickedOk();
  54. afx_msg void OnBnClickedCancel();
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. private:
  58. //{{AFX_DATA(DialogEntityDefEditor)
  59. enum { IDD = IDD_DIALOG_ENTITYEDITOR };
  60. CStatusBarCtrl statusBar;
  61. CEdit declNameEdit;
  62. CComboBox inheritCombo;
  63. CComboBox spawnclassCombo;
  64. CPropertyList keyValsList;
  65. CStatic keyLabel;
  66. CEdit keyEdit;
  67. CButton addButton;
  68. CButton delButton;
  69. CStatic line;
  70. CButton testButton;
  71. CButton okButton;
  72. CButton cancelButton;
  73. //}}AFX_DATA
  74. static toolTip_t toolTips[];
  75. HACCEL m_hAccel;
  76. CRect initialRect;
  77. idDeclEntityDef * decl;
  78. int firstLine;
  79. private:
  80. void PopulateLists(idStr &declText);
  81. void SetInherit(idStr &inherit);
  82. void BuildDeclText(idStr &declText);
  83. bool TestDecl( const idStr &declText );
  84. void UpdateStatusBar( void );
  85. };
  86. #endif /* !__DIALOGENTITYDEFEDITOR_H__ */