ColorPaletteWnd.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. // ColorPaletteWnd.h : header file
  13. //
  14. #ifndef COLORPALETTEWND_H
  15. #define COLORPALETTEWND_H
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CColorPaletteWnd window
  18. extern COLOR *_pcolColorToSet;
  19. class CColorPaletteWnd : public CWnd
  20. {
  21. // Construction
  22. public:
  23. CColorPaletteWnd();
  24. // Attributes
  25. public:
  26. INDEX m_iSelectedColor;
  27. CDrawPort *m_pDrawPort;
  28. CViewPort *m_pViewPort;
  29. // Operations
  30. public:
  31. // calculate given color's box in pixels
  32. PIXaabbox2D GetColorBBox( INDEX iColor);
  33. // Overrides
  34. // ClassWizard generated virtual function overrides
  35. //{{AFX_VIRTUAL(CColorPaletteWnd)
  36. //}}AFX_VIRTUAL
  37. // Implementation
  38. public:
  39. virtual ~CColorPaletteWnd();
  40. // Generated message map functions
  41. protected:
  42. //{{AFX_MSG(CColorPaletteWnd)
  43. afx_msg void OnPaint();
  44. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  45. afx_msg void OnKillFocus(CWnd* pNewWnd);
  46. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  47. //}}AFX_MSG
  48. DECLARE_MESSAGE_MAP()
  49. };
  50. /////////////////////////////////////////////////////////////////////////////
  51. #endif // COLORPALETTEWND_H