RingSizePropPage.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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_RINGSIZEPROPPAGE_H__E86BBE8A_F527_11D3_A08F_00104B791122__INCLUDED_)
  19. #define AFX_RINGSIZEPROPPAGE_H__E86BBE8A_F527_11D3_A08F_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // RingSizePropPage.h : header file
  24. //
  25. #include "resource.h"
  26. #include "ringobj.h"
  27. #include "colorbar.h"
  28. /////////////////////////////////////////////////////////////////////////////
  29. //
  30. // RingSizePropPageClass
  31. //
  32. /////////////////////////////////////////////////////////////////////////////
  33. class RingSizePropPageClass : public CPropertyPage
  34. {
  35. DECLARE_DYNCREATE(RingSizePropPageClass)
  36. // Construction
  37. public:
  38. RingSizePropPageClass(RingRenderObjClass *ring = NULL);
  39. ~RingSizePropPageClass();
  40. // Dialog Data
  41. //{{AFX_DATA(RingSizePropPageClass)
  42. enum { IDD = IDD_PROP_PAGE_RING_SCALE };
  43. CSpinButtonCtrl m_InnerSizeXSpin;
  44. CSpinButtonCtrl m_InnerSizeYSpin;
  45. CSpinButtonCtrl m_OuterSizeXSpin;
  46. CSpinButtonCtrl m_OuterSizeYSpin;
  47. //}}AFX_DATA
  48. // Overrides
  49. // ClassWizard generate virtual function overrides
  50. //{{AFX_VIRTUAL(RingSizePropPageClass)
  51. public:
  52. virtual BOOL OnApply();
  53. virtual void OnCancel();
  54. protected:
  55. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  56. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  57. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  58. //}}AFX_VIRTUAL
  59. // Implementation
  60. protected:
  61. // Generated message map functions
  62. //{{AFX_MSG(RingSizePropPageClass)
  63. virtual BOOL OnInitDialog();
  64. afx_msg void OnDestroy();
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. public:
  68. /////////////////////////////////////////////////////////
  69. // Public methods
  70. /////////////////////////////////////////////////////////
  71. //
  72. // Inline accessors
  73. //
  74. RingRenderObjClass * Get_Ring (void) const { return m_RenderObj; }
  75. void Set_Ring (RingRenderObjClass *ring) { m_RenderObj = ring; Initialize (); }
  76. bool Is_Data_Valid (void) const { return m_bValid; }
  77. protected:
  78. /////////////////////////////////////////////////////////
  79. // Protected methods
  80. /////////////////////////////////////////////////////////
  81. void Initialize (void);
  82. void Update_Inner_Scale_Array (void);
  83. void Update_Outer_Scale_Array (void);
  84. private:
  85. /////////////////////////////////////////////////////////
  86. // Private member data
  87. /////////////////////////////////////////////////////////
  88. RingRenderObjClass * m_RenderObj;
  89. bool m_bValid;
  90. ColorBarClass * m_InnerScaleXBar;
  91. ColorBarClass * m_InnerScaleYBar;
  92. ColorBarClass * m_OuterScaleXBar;
  93. ColorBarClass * m_OuterScaleYBar;
  94. Vector2 m_InnerSize;
  95. Vector2 m_OuterSize;
  96. RingScaleChannelClass m_InnerScaleChannel;
  97. RingScaleChannelClass m_OrigInnerScaleChannel;
  98. RingScaleChannelClass m_OuterScaleChannel;
  99. RingScaleChannelClass m_OrigOuterScaleChannel;
  100. };
  101. //{{AFX_INSERT_LOCATION}}
  102. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  103. #endif // !defined(AFX_RINGSIZEPROPPAGE_H__E86BBE8A_F527_11D3_A08F_00104B791122__INCLUDED_)