VisErrorReportDialog.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program 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. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_VISERRORREPORTDIALOG_H__3CAE29F6_3FAF_11D3_A04C_00104B791122__INCLUDED_)
  19. #define AFX_VISERRORREPORTDIALOG_H__3CAE29F6_3FAF_11D3_A04C_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // VisErrorReportDialog.h : header file
  24. //
  25. #include "HistogramCtl.H"
  26. #include "Resource.H"
  27. #include "VisLog.H"
  28. // Forward delcarations
  29. class Matrix3D;
  30. /////////////////////////////////////////////////////////////////////////////
  31. //
  32. // VisErrorReportDialogClass
  33. //
  34. /////////////////////////////////////////////////////////////////////////////
  35. class VisErrorReportDialogClass : public CDialog
  36. {
  37. // Construction
  38. public:
  39. VisErrorReportDialogClass(CWnd* pParent = NULL); // standard constructor
  40. ~VisErrorReportDialogClass(void);
  41. // Dialog Data
  42. //{{AFX_DATA(VisErrorReportDialogClass)
  43. enum { IDD = IDD_VIS_ERRORS };
  44. CSliderCtrl m_ZoomSlider;
  45. //}}AFX_DATA
  46. // Overrides
  47. // ClassWizard generated virtual function overrides
  48. //{{AFX_VIRTUAL(VisErrorReportDialogClass)
  49. protected:
  50. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. protected:
  54. // Generated message map functions
  55. //{{AFX_MSG(VisErrorReportDialogClass)
  56. virtual BOOL OnInitDialog();
  57. afx_msg void OnPaint();
  58. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  59. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  60. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  61. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  62. afx_msg void OnPrevError();
  63. afx_msg void OnNextError();
  64. afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
  65. afx_msg UINT OnNcHitTest(CPoint point);
  66. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  67. afx_msg void OnDestroy();
  68. //}}AFX_MSG
  69. DECLARE_MESSAGE_MAP()
  70. public:
  71. ////////////////////////////////////////////////////////////////////////
  72. // Public methods
  73. ////////////////////////////////////////////////////////////////////////
  74. void Re_Sync_Data (void);
  75. void Refresh_View (void);
  76. void Display_Point (const Matrix3D &transform, bool fly_to);
  77. void Add_Point (const VisSampleClass &point);
  78. void Free_Point_List (void);
  79. protected:
  80. ////////////////////////////////////////////////////////////////////////
  81. // Protected methods
  82. ////////////////////////////////////////////////////////////////////////
  83. void On_Graph_Sel_Changed (void);
  84. int Find_Value_Index (float fraction);
  85. void Update_Nav_Buttons (void);
  86. void Update_Current_Point_Text (void);
  87. void Paint_Axis_Area (HDC hdc);
  88. bool Update_Axis_Area (bool do_view_change = false);
  89. private:
  90. ////////////////////////////////////////////////////////////////////////
  91. // Private data types
  92. ////////////////////////////////////////////////////////////////////////
  93. typedef struct
  94. {
  95. HBITMAP normal;
  96. HBITMAP disabled;
  97. } BUTTON_BMP;
  98. ////////////////////////////////////////////////////////////////////////
  99. // Private member data
  100. ////////////////////////////////////////////////////////////////////////
  101. BUTTON_BMP m_PrevButton;
  102. BUTTON_BMP m_NextButton;
  103. HBITMAP m_AxisBMP;
  104. HBITMAP m_AxisSelBMP;
  105. VIS_SAMPLE_LIST m_PointList;
  106. HistogramCtlClass m_Graph;
  107. CRect m_GraphArea;
  108. CRect m_AxisArea;
  109. int m_AxisSel;
  110. CRect m_AxisSelAreas[6];
  111. int m_AxisHilightBit;
  112. int m_CurrentPoint;
  113. int m_CurrentMinPoint;
  114. int m_CurrentMaxPoint;
  115. int m_TotalPoints;
  116. bool m_bTrackingSel;
  117. int m_TrackPixel;
  118. int m_SelStartIndex;
  119. int m_SelEndIndex;
  120. };
  121. //{{AFX_INSERT_LOCATION}}
  122. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  123. #endif // !defined(AFX_VISERRORREPORTDIALOG_H__3CAE29F6_3FAF_11D3_A04C_00104B791122__INCLUDED_)