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

RmMFCColorPickerWnd.h

00001 //=================================================================================================//
00002 // filename: RmMFCColorPickerWnd.h                                                                 //
00003 //                                                                                                 //
00004 //           ATI Research, Inc.                                                                    //
00005 //           3D Application Research Group                                                         //
00006 //                                                                                                 //
00007 // description: Defines the CRmColorPickerWnd class.                                               //
00008 //                                                                                                 //
00009 //=================================================================================================//
00010 //   (C) 2004 ATI Research, Inc.  All rights reserved.                                             //
00011 //=================================================================================================//
00012 
00013 #ifndef _RM_MFC_UTILITIES_COLOR_PICKER_WND_H_
00014 #define _RM_MFC_UTILITIES_COLOR_PICKER_WND_H_
00015 
00016 #if _MSC_VER > 1000
00017 #pragma once
00018 #endif // _MSC_VER > 1000
00019 // RmColorPickerWnd.h : header file
00020 //
00021 
00022 #include <Utilities/RmUtilControlPlacement.h>
00023 #include <MFCUtilities/RmMFCTypes.h>
00024 #include <MFCUtilities/RmMFCNumericEdit.h>
00025 #include <MFCUtilities/RmMFCColorSlider.h>
00026 #include <MFCUtilities/RmMFCColorWheel.h>
00027 #include <MFCUtilities/RmMFCUtilitiesResource.h>
00028 
00029 //=================================================================================================//
00030 // Class:         CRmColorPickerWnd                                                                //
00031 //                                                                                                 //
00032 // Description:   Definition for CRmColorPickerWnd control                                         //
00033 //=================================================================================================//
00034 class RMMFCUTIL_API CRmColorPickerWnd : public CDialog
00035 {
00036 public: // Public Definitions
00037 
00038    typedef enum
00039    {
00040       COLOR_PICKER_TYPE_RGB,
00041       COLOR_PICKER_TYPE_HSV
00042 
00043    } ColorPickerWndType;
00044 
00045 public: // Public Member Functions
00046 
00047    // Construction
00048         CRmColorPickerWnd();
00049 
00050    // Creation
00051    BOOL Create(   const RM_TCHAR *pStrName,
00052                   float          *pColorData             = NULL,
00053                   COLORREF       *pColorRef              = NULL,
00054                   HWND           hwndParent              = NULL,
00055                   RmNode         *pRmNode                = NULL,
00056                   bool           bInitialFloatingPoint   = false,
00057                   int            nInitialColorType       = COLOR_PICKER_TYPE_RGB );
00058 
00059         //{{AFX_DATA(CRmColorPickerWnd)
00060         enum { IDD = IDD_COLOR_PICKER_WINDOW };
00061         CButton          m_chkFloatingPoint;
00062         CRmNumericEdit     m_edit4;
00063         CRmNumericEdit     m_edit3;
00064         CRmNumericEdit    m_edit2;
00065         CRmNumericEdit    m_edit1;
00066         CStatic          m_static4;
00067         CStatic          m_static3;
00068         CStatic          m_static2;
00069         CStatic          m_static1;
00070         CComboBox             m_colorTypeCombo;
00071         CColorSlider       m_colorSlider5;
00072         CColorSlider       m_colorSlider4;
00073         CColorSlider       m_colorSlider3;
00074         CColorSlider       m_colorSlider2;
00075         CColorSlider      m_colorSlider1;
00076         CColorWheel       m_colorWheel;
00077         //}}AFX_DATA
00078 
00079         // ClassWizard generated virtual function overrides
00080         //{{AFX_VIRTUAL(CRmColorPickerWnd)
00081         protected:
00082         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00083         //}}AFX_VIRTUAL
00084 
00085 protected: // Protected Member Functions
00086 
00087    void UpdateControls( HWND hWnd );
00088    void UpdateTextControls();
00089    
00090         // Generated message map functions
00091         //{{AFX_MSG(CRmColorPickerWnd)
00092         virtual BOOL      OnInitDialog();
00093         afx_msg void      OnSelchangeColorTypeCombo();
00094         afx_msg void      OnKillfocusEdit1();
00095         afx_msg void      OnKillfocusEdit2();
00096         afx_msg void      OnKillfocusEdit3();
00097         afx_msg void      OnKillfocusEdit4();
00098         afx_msg BOOL      OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
00099         afx_msg void      OnFloatingPointCheck();
00100    afx_msg void      OnSize(UINT nType, int cx, int cy);
00101    afx_msg LRESULT   OnColorChanged( WPARAM wParam, LPARAM lParam );
00102    afx_msg LRESULT   OnValueChanged( WPARAM wParam, LPARAM lParam );
00103    
00104         //}}AFX_MSG
00105 
00106         DECLARE_MESSAGE_MAP()
00107 
00108 private: // Private Member Variables
00109 
00110    RmNode   *m_pRmNode;
00111    CString  m_strDialogName;
00112 
00113    float    *m_pColorData;
00114    COLORREF *m_pColorRef;
00115 
00116    float    m_fColorArray[ 3 ];
00117    float    m_fAlpha;
00118 
00119    float    m_fHue;
00120    float    m_fSaturation;
00121    float    m_fValue;
00122 
00123    float    m_fStandardColorMultiplier;
00124    int      m_nNumericPrecesion;
00125    
00126    RmControlPlacementContainer m_controlPlacementContainer;
00127    
00128    bool     m_bInitialFloatingPoint;
00129    int      m_nInitialColorType;
00130    
00131 }; // end class RMMFCUTIL_API CRmColorPickerWnd : public CDialog
00132 
00133 #endif

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