CtrlEditFlags.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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_CTRLEDITFLAGS_H__759EB1B4_55C4_11D5_86CA_00002103143B__INCLUDED_)
  13. #define AFX_CTRLEDITFLAGS_H__759EB1B4_55C4_11D5_86CA_00002103143B__INCLUDED_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif // _MSC_VER > 1000
  17. // CtrlEditFlags.h : header file
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CCtrlEditFlags window
  21. class CCtrlEditFlags : public CButton
  22. {
  23. // Construction
  24. public:
  25. CTString m_astrBitDescription[32];
  26. CCtrlEditFlags();
  27. CWnd *m_pDialog;
  28. ULONG m_ulValue;
  29. ULONG m_ulDefined;
  30. ULONG m_ulEditable;
  31. ULONG m_ulDefault;
  32. INDEX m_iCurrentBank;
  33. RECT m_rectButton;
  34. PIX m_dx;
  35. INDEX m_iLastArea;
  36. INDEX m_iMouseDownArea;
  37. void SetBitDescription(INDEX iBit, CTString strBitName);
  38. void SetDialogPtr( CWnd *pDialog);
  39. void SetDefaultValue(ULONG ulDefault);
  40. void SetEditableMask(ULONG ulEditable);
  41. void SetFlags(ULONG ulFlags);
  42. void MergeFlags(ULONG ulFlags);
  43. void SetPrevEditableBank( void);
  44. void SetNextEditableBank( void);
  45. void SetFirstEditableBank( void);
  46. CTString GetTipForArea(INDEX iArea) const;
  47. void ApplyChange(ULONG &ulOldFlags);
  48. RECT GetRectForArea(INDEX iArea) const;
  49. INDEX GetAreaUnderMouse( CPoint point) const;
  50. int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const;
  51. // Attributes
  52. public:
  53. // Operations
  54. public:
  55. // Overrides
  56. // ClassWizard generated virtual function overrides
  57. //{{AFX_VIRTUAL(CCtrlEditFlags)
  58. public:
  59. virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  60. //}}AFX_VIRTUAL
  61. // Implementation
  62. public:
  63. virtual ~CCtrlEditFlags();
  64. // Generated message map functions
  65. protected:
  66. //{{AFX_MSG(CCtrlEditFlags)
  67. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  68. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  69. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  70. afx_msg void OnKillFocus(CWnd* pNewWnd);
  71. //}}AFX_MSG
  72. DECLARE_MESSAGE_MAP()
  73. };
  74. /////////////////////////////////////////////////////////////////////////////
  75. //{{AFX_INSERT_LOCATION}}
  76. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  77. #endif // !defined(AFX_CTRLEDITFLAGS_H__759EB1B4_55C4_11D5_86CA_00002103143B__INCLUDED_)