ContourOptions.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. ** Command & Conquer Generals(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_ContourOptions_H__7B56E24C_582E_4530_A451_873397C8852D__INCLUDED_)
  19. #define AFX_ContourOptions_H__7B56E24C_582E_4530_A451_873397C8852D__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // ContourOptions.h : header file
  24. //
  25. /////////////////////////////////////////////////////////////////////////////
  26. /// ContourOptions modeless (floating) dialog - allows entry and display of brush width and feather.
  27. class ContourOptions : public CDialog
  28. {
  29. // Construction
  30. public:
  31. enum {MIN_CONTOUR_STEP=1,
  32. MAX_CONTOUR_STEP=10,
  33. MIN_CONTOUR_OFFSET=-10,
  34. MAX_CONTOUR_OFFSET=+10,
  35. MIN_WIDTH=1,
  36. MAX_WIDTH=6};
  37. ContourOptions(CWnd* pParent = NULL); // standard constructor
  38. // Dialog Data
  39. //{{AFX_DATA(ContourOptions)
  40. enum { IDD = IDD_CONTOUR_OPTIONS };
  41. // NOTE: the ClassWizard will add data members here
  42. //}}AFX_DATA
  43. // Overrides
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(ContourOptions)
  46. protected:
  47. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  48. //}}AFX_VIRTUAL
  49. // Implementation
  50. protected:
  51. // Generated message map functions
  52. //{{AFX_MSG(ContourOptions)
  53. virtual BOOL OnInitDialog();
  54. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  55. afx_msg void OnShowContours();
  56. //}}AFX_MSG
  57. DECLARE_MESSAGE_MAP()
  58. protected:
  59. static Int m_contourStep; ///< current contour step in the ui.
  60. static Int m_contourOffset; ///< current contour offset in the ui.
  61. static Int m_contourWidth; ///< current contour offset in the ui.
  62. Bool m_updating; ///<true if the ui is updating itself.
  63. CSliderCtrl m_contourStepSlider; ///< Feather slider control.
  64. CSliderCtrl m_contourOffsetSlider; ///< Brush width slider control.
  65. CSliderCtrl m_contourWidthSlider; ///< Brush width slider control.
  66. public:
  67. static Int getContourWidth(void) {return m_contourWidth;}; ///<Returns width.
  68. static Int getContourOffset(void) {return m_contourOffset;}; ///<Returns offset.
  69. static Int getContourStep(void) {return m_contourStep;}; ///<Returns step.
  70. };
  71. //{{AFX_INSERT_LOCATION}}
  72. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  73. #endif // !defined(AFX_ContourOptions_H__6B56E20C_582E_4030_A251_879097C8853C__INCLUDED_)