WndDisplayTexture.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. #if !defined(AFX_WNDDISPLAYTEXTURE_H__4B489BC1_FAD9_11D1_82EA_000000000000__INCLUDED_)
  13. #define AFX_WNDDISPLAYTEXTURE_H__4B489BC1_FAD9_11D1_82EA_000000000000__INCLUDED_
  14. #if _MSC_VER >= 1000
  15. #pragma once
  16. #endif // _MSC_VER >= 1000
  17. // WndDisplayTexture.h : header file
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CWndDisplayTexture window
  21. class CWndDisplayTexture : public CWnd
  22. {
  23. // Construction
  24. public:
  25. CWndDisplayTexture();
  26. // function that is called when lmb is clicked
  27. inline void SetLeftMouseButtonClicked( void(*pLeftMouseButtonClicked)( PIX pixX, PIX pixY))
  28. {m_pLeftMouseButtonClicked=pLeftMouseButtonClicked;};
  29. // function that is called when lmb is released
  30. inline void SetLeftMouseButtonReleased( void(*pLeftMouseButtonReleased)( PIX pixX, PIX pixY))
  31. {m_pLeftMouseButtonReleased=pLeftMouseButtonReleased;};
  32. // function that is called when rmb is clicked
  33. inline void SetRightMouseButtonClicked( void(*pRightMouseButtonClicked)( PIX pixX, PIX pixY))
  34. {m_pRightMouseButtonClicked=pRightMouseButtonClicked;};
  35. // function that is called when rmb is moved
  36. inline void SetRightMouseButtonMoved( void(*pRightMouseButtonMoved)( PIX pixX, PIX pixY))
  37. {m_pRightMouseButtonMoved=pRightMouseButtonMoved;};
  38. void (*m_pLeftMouseButtonClicked)( PIX pixX, PIX pixY);
  39. void (*m_pLeftMouseButtonReleased)( PIX pixX, PIX pixY);
  40. void (*m_pRightMouseButtonClicked)( PIX pixX, PIX pixY);
  41. void (*m_pRightMouseButtonMoved)( PIX pixX, PIX pixY);
  42. CTextureObject m_toTexture;
  43. CDrawPort *m_pDrawPort;
  44. CViewPort *m_pViewPort;
  45. int m_iTimerID;
  46. BOOL m_bChequeredAlpha;
  47. BOOL m_bForce32;
  48. FLOAT m_fWndTexRatio;
  49. PIX m_pixWinWidth;
  50. PIX m_pixWinHeight;
  51. PIX m_pixWinOffsetU;
  52. PIX m_pixWinOffsetV;
  53. public:
  54. BOOL m_bDrawLine;
  55. PIX m_pixLineStartU;
  56. PIX m_pixLineStartV;
  57. PIX m_pixLineStopU;
  58. PIX m_pixLineStopV;
  59. // Operations
  60. public:
  61. // Overrides
  62. // ClassWizard generated virtual function overrides
  63. //{{AFX_VIRTUAL(CWndDisplayTexture)
  64. //}}AFX_VIRTUAL
  65. // Implementation
  66. public:
  67. virtual ~CWndDisplayTexture();
  68. // Generated message map functions
  69. protected:
  70. //{{AFX_MSG(CWndDisplayTexture)
  71. afx_msg void OnDestroy();
  72. afx_msg void OnPaint();
  73. afx_msg void OnTimer(UINT nIDEvent);
  74. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  75. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  76. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  77. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  78. //}}AFX_MSG
  79. DECLARE_MESSAGE_MAP()
  80. };
  81. /////////////////////////////////////////////////////////////////////////////
  82. //{{AFX_INSERT_LOCATION}}
  83. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  84. #endif // !defined(AFX_WNDDISPLAYTEXTURE_H__4B489BC1_FAD9_11D1_82EA_000000000000__INCLUDED_)