NewTexWnd.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. #if !defined(NEWTEXWND_H)
  21. #define NEWTEXWND_H
  22. #if _MSC_VER >= 1000
  23. #pragma once
  24. #endif // _MSC_VER >= 1000
  25. // TexWnd.h : header file
  26. //
  27. #include "../../renderer/tr_local.h"
  28. //#include "texwnd.h"
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CTexWnd window
  31. class CNewTexWnd : public CWnd
  32. {
  33. DECLARE_DYNCREATE(CNewTexWnd);
  34. // Construction
  35. public:
  36. CNewTexWnd();
  37. void UpdateFilter(const char* pFilter);
  38. void UpdatePrefs();
  39. void FocusEdit();
  40. // Attributes
  41. public:
  42. // Operations
  43. public:
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(CNewTexWnd)
  47. public:
  48. virtual BOOL DestroyWindow();
  49. virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  50. protected:
  51. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  52. //}}AFX_VIRTUAL
  53. // Implementation
  54. public:
  55. void EnsureTextureIsVisible(const char *name);
  56. void LoadMaterials();
  57. virtual ~CNewTexWnd();
  58. BOOL OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult );
  59. int CNewTexWnd::OnToolHitTest(CPoint point, TOOLINFO * pTI);
  60. virtual BOOL PreTranslateMessage(MSG* pMsg);
  61. protected:
  62. //CTexEdit m_wndFilter;
  63. //CButton m_wndShaders;
  64. bool m_bNeedRange;
  65. HGLRC hglrcTexture;
  66. CDC *hdcTexture;
  67. CPoint cursor;
  68. CPoint origin;
  69. CPoint draw;
  70. CPoint drawRow;
  71. CPoint current;
  72. CRect rectClient;
  73. int currentRow;
  74. int currentIndex;
  75. idList<const idMaterial*> materialList;
  76. // Generated message map functions
  77. protected:
  78. const idMaterial* NextPos();
  79. const idMaterial *getMaterialAtPoint(CPoint point);
  80. void InitPos();
  81. //{{AFX_MSG(CNewTexWnd)
  82. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  83. afx_msg void OnSize(UINT nType, int cx, int cy);
  84. afx_msg void OnParentNotify(UINT message, LPARAM lParam);
  85. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  86. afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
  87. afx_msg void OnPaint();
  88. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  89. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  90. afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
  91. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  92. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  93. afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
  94. afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  95. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  96. afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
  97. //}}AFX_MSG
  98. afx_msg void OnShaderClick();
  99. DECLARE_MESSAGE_MAP()
  100. public:
  101. afx_msg void OnSetFocus(CWnd* pOldWnd);
  102. };
  103. /////////////////////////////////////////////////////////////////////////////
  104. //{{AFX_INSERT_LOCATION}}
  105. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  106. #endif // !defined(NEWTEXWND_H)