SphereSizePropPage.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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_SPHERESIZEPROPPAGE_H__E86BBE8A_F527_11D3_A08F_00104B791122__INCLUDED_)
  19. #define AFX_SPHERESIZEPROPPAGE_H__E86BBE8A_F527_11D3_A08F_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // SphereSizePropPage.h : header file
  24. //
  25. #include "resource.h"
  26. #include "sphereobj.h"
  27. #include "colorbar.h"
  28. /////////////////////////////////////////////////////////////////////////////
  29. //
  30. // SphereSizePropPageClass
  31. //
  32. /////////////////////////////////////////////////////////////////////////////
  33. class SphereSizePropPageClass : public CPropertyPage
  34. {
  35. DECLARE_DYNCREATE(SphereSizePropPageClass)
  36. // Construction
  37. public:
  38. SphereSizePropPageClass(SphereRenderObjClass *sphere = NULL);
  39. ~SphereSizePropPageClass();
  40. // Dialog Data
  41. //{{AFX_DATA(SphereSizePropPageClass)
  42. enum { IDD = IDD_PROP_PAGE_SPHERE_SCALE };
  43. CSpinButtonCtrl m_SizeZSpin;
  44. CSpinButtonCtrl m_SizeYSpin;
  45. CSpinButtonCtrl m_SizeXSpin;
  46. //}}AFX_DATA
  47. // Overrides
  48. // ClassWizard generate virtual function overrides
  49. //{{AFX_VIRTUAL(SphereSizePropPageClass)
  50. public:
  51. virtual BOOL OnApply();
  52. virtual void OnCancel();
  53. protected:
  54. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  55. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  56. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  57. //}}AFX_VIRTUAL
  58. // Implementation
  59. protected:
  60. // Generated message map functions
  61. //{{AFX_MSG(SphereSizePropPageClass)
  62. virtual BOOL OnInitDialog();
  63. afx_msg void OnDestroy();
  64. //}}AFX_MSG
  65. DECLARE_MESSAGE_MAP()
  66. public:
  67. /////////////////////////////////////////////////////////
  68. // Public methods
  69. /////////////////////////////////////////////////////////
  70. //
  71. // Inline accessors
  72. //
  73. SphereRenderObjClass * Get_Sphere (void) const { return m_RenderObj; }
  74. void Set_Sphere (SphereRenderObjClass *sphere) { m_RenderObj = sphere; Initialize (); }
  75. bool Is_Data_Valid (void) const { return m_bValid; }
  76. protected:
  77. /////////////////////////////////////////////////////////
  78. // Protected methods
  79. /////////////////////////////////////////////////////////
  80. void Initialize (void);
  81. void Update_Scale_Array (void);
  82. private:
  83. /////////////////////////////////////////////////////////
  84. // Private member data
  85. /////////////////////////////////////////////////////////
  86. SphereRenderObjClass * m_RenderObj;
  87. bool m_bValid;
  88. ColorBarClass * m_ScaleXBar;
  89. ColorBarClass * m_ScaleYBar;
  90. ColorBarClass * m_ScaleZBar;
  91. Vector3 m_Size;
  92. SphereScaleChannelClass m_ScaleChannel;
  93. SphereScaleChannelClass m_OrigScaleChannel;
  94. };
  95. //{{AFX_INSERT_LOCATION}}
  96. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  97. #endif // !defined(AFX_SPHERESIZEPROPPAGE_H__E86BBE8A_F527_11D3_A08F_00104B791122__INCLUDED_)