Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / standard / 03_Viewer2d / src / Properties / ColorPropertyPage.h
1 #if !defined(AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_)
2 #define AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_
3
4 #if _MSC_VER >= 1000
5 #pragma once
6 #endif // _MSC_VER >= 1000
7 // ColorPropertyPage.h : header file
8 //
9 #include "Aspect_ColorMap.hxx"
10
11 /////////////////////////////////////////////////////////////////////////////
12 // CColorPropertyPage dialog
13
14 class CColorPropertyPage : public CPropertyPage
15 {
16         DECLARE_DYNCREATE(CColorPropertyPage)
17
18 private :
19     Handle(Aspect_ColorMap) myColorMap;
20 private :
21     Handle(V2d_Viewer) myViewer;
22 public:
23     void SetViewer(Handle(V2d_Viewer) aViewer) {
24         myViewer = aViewer;
25         myColorMap = aViewer->ColorMap();
26     };
27
28
29 // Construction
30 public:
31         CColorPropertyPage();
32     ~CColorPropertyPage();
33
34 // Dialog Data
35         //{{AFX_DATA(CColorPropertyPage)
36         enum { IDD = IDD_DIALOG_Color };
37         CComboBox       m_NewEntryColorNameCtrl;
38         CTabCtrl        m_TabCtrl;
39         CString m_ColorMapSize ;
40         CString m_ColorMapType ;
41         CString m_CurrentEntryRed;
42         CString m_CurrentEntryGreen;
43         CString m_CurrentEntryBlue;
44         CString m_NearsetColorName;
45         double  m_NewEntryRed;
46         double  m_NewEntryBlue;
47         double  m_NewEntryGreen;
48         //}}AFX_DATA
49
50
51 // Overrides
52         // ClassWizard generate virtual function overrides
53         //{{AFX_VIRTUAL(CColorPropertyPage)
54         public:
55         virtual BOOL OnApply();
56         protected:
57         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
58         //}}AFX_VIRTUAL
59
60 // Implementation
61 protected:
62         // Generated message map functions
63         //{{AFX_MSG(CColorPropertyPage)
64         virtual BOOL OnInitDialog();
65         afx_msg void OnSelchangeColorMapTAB(NMHDR* pNMHDR, LRESULT* pResult);
66         afx_msg void OnSelchangeColorMapCOMBONewEntryColorName();
67         afx_msg void OnColorMapBUTTONUpdateCurrentEntry();
68         afx_msg void OnColorMapBUTTONNewColorCubeColorMap();
69         afx_msg void OnColorMapBUTTONNewGenericColorMap();
70         afx_msg void OnColorMapBUTTONNewColorRampColorMap();
71         afx_msg void OnColorMapBUTTONNewEntryEditColor();
72         afx_msg void OnColorMapBUTTONAddNewEntry();
73         //}}AFX_MSG
74         DECLARE_MESSAGE_MAP()
75
76 private:
77   void UpdateDisplay(int CurrentSelectionIndex);
78 };
79
80 //{{AFX_INSERT_LOCATION}}
81 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
82
83 #endif // !defined(AFX_ColorPropertyPage_H__A815F7A3_D51B_11D1_8DDE_0800369C8A03__INCLUDED_)