Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmMFCColorWheel.h

00001 //=================================================================================================//
00002 // filename: RmMFCColorWheel.h                                                                     //
00003 //                                                                                                 //
00004 //           ATI Research, Inc.                                                                    //
00005 //           3D Application Research Group                                                         //
00006 //                                                                                                 //
00007 // description: Definition of the CRmColorWheel class.                                             //
00008 //                                                                                                 //
00009 //=================================================================================================//
00010 //   (C) 2004 ATI Research, Inc.  All rights reserved.                                             //
00011 //=================================================================================================//
00012 
00013 #ifndef _RM_MFC_UTILITIES_COLOR_WHEEL_H_
00014 #define _RM_MFC_UTILITIES_COLOR_WHEEL_H_
00015 
00016 #include <MFCUtilities/RmMFCTypes.h>
00017 
00018 //=================================================================================================//
00019 // Class:         CRmColorWheel                                                                    //
00020 //                                                                                                 //
00021 // Description:   Class definition for CRmColorWheel                                               //
00022 //                Derived from CWnd, this class                                                    //
00023 //                creates a color wheel control                                                    //
00024 //=================================================================================================//
00025 class RMMFCUTIL_API CRmColorWheel : public CWnd
00026 {
00027 public: // Public member functions
00028 
00029    // Construction
00030         CRmColorWheel();
00031    
00032    // Destruction
00033         virtual ~CRmColorWheel();
00034 
00035         // ClassWizard generated virtual function overrides
00036         //{{AFX_VIRTUAL(CRmColorWheel)
00037         //}}AFX_VIRTUAL
00038 
00039 protected: // Protected member functions
00040 
00041    POINT MapColorToPosition(  float r, float g, float b, int radius );
00042    void  MapPositionToColor(  int x, int y, int radius,
00043                               float *r, float *g, float *b );
00044 
00045    void  HSVtoRGB(   float *r, float *g, float *b,
00046                      float h, float s, float v );
00047 
00048    void  SetColorFromPoint( CPoint *pPoint );
00049 
00050         //{{AFX_MSG(CRmColorWheel)
00051         afx_msg void OnPaint();
00052         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00053         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00054         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00055    afx_msg LRESULT OnColorChanged( WPARAM wParam, LPARAM lParam );
00056    afx_msg void OnCaptureChanged(CWnd *pWnd);
00057         //}}AFX_MSG
00058 
00059         DECLARE_MESSAGE_MAP()
00060 
00061 public: // Public member variables
00062 
00063    float *m_pfColorArray;
00064    
00065 private: // Private member variables
00066 
00067    bool     m_bLButtonDown;
00068    CPoint   m_point;
00069    int      m_nChangeMessageIndex;
00070    
00071 };// end class RMMFCUTIL_API CRmColorWheel : public CWnd
00072 
00073 #endif // !#define RMMFC_CCOLORWHEEL_DEFINE

Generated on Fri Feb 25 16:08:38 2005 for RenderMonkey SDK by doxygen 1.3.6